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

185 ship schema with package #189

Merged
merged 7 commits into from
Sep 13, 2024
Merged

185 ship schema with package #189

merged 7 commits into from
Sep 13, 2024

Conversation

marc-white
Copy link
Collaborator

This PR closes #185 by incorporating the schema descriptions (JSON) into the package. This has been done IAW what I think is current best practice for storing & loading data files within a package (https://docs.python.org/3/library/importlib.resources.html#module-importlib.resources).

Whilst doing this, I found a couple of places where the data submodule was doing some ad-hoc local data loads. These have also been updated to use the new pattern.

Open questions:

  • Is this how we want to ship schema? How often do the schema need updating, and is it a pain to have to tag a new version every time an update is required?

Also flagged a couple of spots where more 'correct' package data importing should be used
@marc-white marc-white linked an issue Aug 29, 2024 that may be closed by this pull request
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.95%. Comparing base (a07470a) to head (bf43d6d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/access_nri_intake/cli.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #189      +/-   ##
==========================================
- Coverage   96.96%   96.95%   -0.02%     
==========================================
  Files           9        9              
  Lines         626      623       -3     
==========================================
- Hits          607      604       -3     
  Misses         19       19              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

Some comments and pinged Jo and Tommy for comments.

src/access_nri_intake/catalog/__init__.py Outdated Show resolved Hide resolved
src/access_nri_intake/cli.py Outdated Show resolved Hide resolved
src/access_nri_intake/data/__init__.py Outdated Show resolved Hide resolved
src/access_nri_intake/source/__init__.py Outdated Show resolved Hide resolved
@aidanheerdegen
Copy link
Member

Let me know when you want another review @marc-white

Copy link
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

LGTM. Just some commented code to delete.

src/access_nri_intake/data/__init__.py Outdated Show resolved Hide resolved
@marc-white marc-white merged commit e67d2ba into main Sep 13, 2024
13 of 15 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.

Ship schema with package
4 participants