Skip to content

Commit

Permalink
Add to cache as list (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonreusch authored Jun 12, 2023
1 parent abab579 commit aa4038b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions nuztf/base_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def add_res_to_cache(self, res):
):
self.cache[res_alert["objectId"]] = res_alert

def add_to_cache_by_names(self, *args):
for ztf_name in args:
query_res = ampel_api_name(ztf_name, logger=self.logger)
def add_to_cache_by_names(self, ztf_ids: list):
for ztf_id in ztf_ids:
query_res = ampel_api_name(ztf_id, logger=self.logger)
self.add_res_to_cache(query_res)

def check_ampel_filter(self, ztf_name):
Expand Down Expand Up @@ -551,7 +551,7 @@ def create_candidate_summary(self):
pdf_path = self.get_output_dir() / "candidates.pdf"

self.logger.info(
f"Creating overview pdf\n(this might take a moment as it involves catalog matching)"
f"Creating overviewpdf\n(this might take a moment as it involves catalog matching)"
)
self.logger.debug(f"Overview pdf path: {pdf_path}")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nuztf"
version = "2.7.1"
version = "2.7.2"
description = "Package for multi-messenger correlation searches with ZTF"
authors = ["Robert Stein <[email protected]>", "Simeon Reusch <[email protected]>", "Jannis Necker <[email protected]>"]
repository = "https://github.com/desy-multimessenger/nuztf"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_neutrino_scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_scan(self):
# Test manually adding candidates

nu.add_to_cache_by_names(
"ZTF18abteipt",
ztf_ids=["ZTF18abteipt"],
)

# Check
Expand Down

0 comments on commit aa4038b

Please sign in to comment.