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

Metagenomics Exchange upload command and related bookkeeping code #350

Merged
merged 49 commits into from
Feb 29, 2024

Conversation

mberacochea
Copy link
Member

No description provided.

mberacochea and others added 30 commits January 29, 2024 11:09
- Refactored the cli wrapper
- Refactored the settings to be in line with the rest
- Modified the unit tests
The test tests/me/test_populate_metagenomics_exchange.py::TestMeAPI::test_removals_dry_mode it's working now.
…nomics/emgapi into feature/metagenomics_exchange
KateSakharova and others added 7 commits January 31, 2024 16:25
…ndexed

This is needed because RenameField doesn't allow you to change
the db_column name.

With this change it seems to work, and the data should be kept:

```sql
--
-- Alter field last_indexed on analysisjob
--
ALTER TABLE "ANALYSIS_JOB" RENAME COLUMN "LAST_INDEXED" TO "LAST_EBI_SEARCH_INDEXED";
--
-- Alter field last_indexed on study
--
ALTER TABLE "STUDY" RENAME COLUMN "LAST_INDEXED" TO "LAST_EBI_SEARCH_INDEXED";
--
-- Rename field last_indexed on analysisjob to last_ebi_search_indexed
--
--
-- Rename field last_indexed on study to last_ebi_search_indexed
--
```
Copy link
Contributor

@MGS-sails MGS-sails left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mberacochea
Thanks for doing this.
Functionally speaking it all looks fine to me.
I just left a few minor comments that could perhaps improve the code in the long term.
But I don't think they are blockers for releasing this.

emgapi/metagenomics_exchange.py Show resolved Hide resolved
emgapi/metagenomics_exchange.py Show resolved Hide resolved
logging.warning(f"Get API request failed")
return analysis_registry_id , metadata_match

if response.ok:
Copy link
Contributor

@MGS-sails MGS-sails Feb 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think reducing the amount of nesting, can make this code more easier to maintain in the future.
Specifically referring to Lines: 111-141

@MGS-sails MGS-sails marked this pull request as ready for review February 12, 2024 10:15
Copy link
Member

@SandyRogers SandyRogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks folks. Nothing much to add from me, other than:

  1. we will need a change to the config repo to add the ME config for dev and prod.
  2. We now usually include an API version bump on develop so that the pip installing the master branch always installs the latest commit.

ci/configuration.yaml Show resolved Hide resolved
@mberacochea
Copy link
Member Author

Thanks folks. Nothing much to add from me, other than:

1. we will need a change to the config repo to add the ME config for dev and prod.

2. We now usually include an API version bump on `develop` so that the pip installing the `master` branch always installs the latest commit.

PR 👍
Bump 👍

@mberacochea mberacochea merged commit cf7d51a into master Feb 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants