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/53 odds and ends #54

Merged
merged 6 commits into from
Nov 19, 2024
Merged

Conversation

chrisdicaprio
Copy link
Collaborator

closes #53

@chrisdicaprio chrisdicaprio requested a review from chrisbc October 8, 2024 23:04
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.99%. Comparing base (01cc52f) to head (006a116).
Report is 7 commits behind head on pre-release.

Additional details and impacted files
@@             Coverage Diff              @@
##           pre-release      #54   +/-   ##
============================================
  Coverage        97.99%   97.99%           
============================================
  Files               17       17           
  Lines              299      299           
  Branches            51       47    -4     
============================================
  Hits               293      293           
- Misses               2        3    +1     
+ Partials             4        3    -1     
Flag Coverage Δ
unittests 97.99% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

@chrisdicaprio chrisdicaprio changed the base branch from main to pre-release November 18, 2024 21:04
Copy link
Member

@chrisbc chrisbc left a comment

Choose a reason for hiding this comment

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

@chrisdicaprio this PR raised a few questions for me are we elevating more than we need to?? ... recall the work the Zoey / David did on the location_by_id function.

Maybe putting the some example docstrings to show how they're meant to be used will clarify this.

nzshm_common/location/__init__.py Outdated Show resolved Hide resolved
nzshm_common/location/location.py Outdated Show resolved Hide resolved
nzshm_common/location/location.py Outdated Show resolved Hide resolved
@chrisdicaprio
Copy link
Collaborator Author

I have removed an import from the top level __init__.py:

from .location import location

and added an import of useful functions to the location/init.py

from .location import get_location_list, get_location_list_names, get_locations, location_by_id

This allows the user to do:

>>> from nzshm_common.location import location_by_id

but no longer allows

>>> from nzshm_common import location
>>> location.LOCATION_LISTS

The intent is to elevate the user API to the nzshm_common.location package and hide attributes of nzshm_common.location.location that the users is meant to access via helper functions rather than directly.

Copy link
Member

@chrisbc chrisbc left a comment

Choose a reason for hiding this comment

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

Thanks @chrisdicaprio, looks great

@chrisdicaprio chrisdicaprio merged commit a0f90c8 into pre-release Nov 19, 2024
11 checks passed
@chrisdicaprio chrisdicaprio deleted the feature/53-odds-and-ends branch November 19, 2024 22:09
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.

odds and ends enhancements
2 participants