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

Use functions instead of methods for the interface functions #334

Merged
merged 15 commits into from
Jan 1, 2024

Conversation

ajfriend
Copy link
Contributor

@ajfriend ajfriend commented Jan 1, 2024

This PR:

  • Define H3 API functions directly in their __init__.py (which is a shared identical symlinked file), using a relative import of _convert.py to distinguish the different APIs. This change should be invisible to end users.
  • Uses lazy imports for numpy so that h3.api.numpy_int can be imported even if numpy isn't installed (but errors if you try to run a function that needs numpy)

After this PR:

Copy link

codecov bot commented Jan 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (831d50b) 100.00% compared to head (f841381) 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##            master      #334    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           18        10     -8     
  Lines          513       324   -189     
==========================================
- Hits           513       324   -189     

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

@ajfriend ajfriend marked this pull request as draft January 1, 2024 19:19
@ajfriend ajfriend marked this pull request as ready for review January 1, 2024 22:29
@ajfriend ajfriend merged commit 158f52d into master Jan 1, 2024
37 checks passed
@ajfriend ajfriend deleted the aj/interfaces branch January 1, 2024 23:15
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