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

feature/mx-1352 Revamp primary source loading #19

Merged
merged 9 commits into from
Aug 29, 2023

Conversation

cutoffthetop
Copy link
Contributor

@cutoffthetop cutoffthetop commented Aug 14, 2023

  • fixing typo in extract_oranigram_units (now: extract_organigram_units)
  • remove dependency to sqlalchemy
  • remove BaseSettings.sqlite_path
  • hardcode the stableTargetId of the mex primary source to resolve cyclic dependency
  • remove sqlite-based logic
    • insert_primary_source_into_db function
    • seed-mex-db script
    • insert_test_primary_sources_into_db helper function
    • seed_primary_sources_into_db fixture
    • because the middle-step of loading the primary sources into sqlite is now cut out
    • they are read directly from the JSON file in assets where they are maintained
  • add BaseSettings.primary_sources_path to point to the primary-source.json file
  • replace transform_mex_db_primary_source_to_extracted_primary_source with transform_seed_primary_sources_to_extracted_primary_sources which operates on iterables
  • add extracted_primary_sources fixture that loads all primary sources from primary_sources_path and returns a mapping of human-readable identifiers to ExtractedPrimarySource objects
    • this removes the need for creating individual extracted_foo_primary_source fixtures

@cutoffthetop cutoffthetop self-assigned this Aug 14, 2023
mr-kamran-ali
mr-kamran-ali previously approved these changes Aug 28, 2023
Copy link
Contributor

@mr-kamran-ali mr-kamran-ali left a comment

Choose a reason for hiding this comment

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

Looks good other than poetry conflicts.

@cutoffthetop cutoffthetop merged commit 16cf77f into main Aug 29, 2023
4 checks passed
@cutoffthetop cutoffthetop deleted the feature/mx-1352-primary-source-revamp branch August 29, 2023 07:10
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.

2 participants