Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ena-submission): temporarily do not send gcaAccession to Loculus #2946

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 15 additions & 17 deletions ena-submission/scripts/deposition_dry_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@
datefmt="%H:%M:%S",
)

with open("config/config.yaml", encoding="utf-8") as f:
config = yaml.safe_load(f)

with open("config/defaults.yaml", encoding="utf-8") as f:
defaults = yaml.safe_load(f)

# Merge configs, using defaults only as fallback
# Write to results/config.yaml
for key, value in defaults.items():
if not key in config:
config[key] = value


@dataclass
class Config:
Expand Down Expand Up @@ -71,18 +59,28 @@ def local_ena_submission_generator(
center_name,
mode,
log_level,
config_file,
):
"""
Produce output of submission pipeline locally
"""
logger.setLevel(log_level)
logging.getLogger("requests").setLevel(logging.INFO)

with open(config_file, encoding="utf-8") as file:
full_config = yaml.safe_load(file)
relevant_config = {key: full_config.get(key, []) for key in Config.__annotations__}
config = Config(**relevant_config)
with open("config/config.yaml", encoding="utf-8") as f:
config = yaml.safe_load(f)

with open("config/defaults.yaml", encoding="utf-8") as f:
defaults = yaml.safe_load(f)

# Merge configs, using defaults only as fallback
# Write to results/config.yaml
for key, value in defaults.items():
if not key in config:
config[key] = value

full_config = config
relevant_config = {key: full_config.get(key, []) for key in Config.__annotations__}
config = Config(**relevant_config)

logger.debug(f"Config: {config}")

Expand Down
8 changes: 5 additions & 3 deletions ena-submission/scripts/upload_external_metadata_to_loculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ def get_external_metadata(db_config: SimpleConnectionPool, entry: dict[str, Any]
db_config, table_name="assembly_table", conditions=seq_key
)
if len(corresponding_assembly) == 1:
data["externalMetadata"]["gcaAccession"] = corresponding_assembly[0]["result"][
"gca_accession"
]
# TODO(https://github.com/loculus-project/loculus/issues/2945):
# Add gcaAccession to values.yaml
# data["externalMetadata"]["gcaAccession"] = corresponding_assembly[0]["result"][
# "gca_accession"
# ]
insdc_accession_keys = [
key
for key in corresponding_assembly[0]["result"]
Expand Down
Loading