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

ENH: Add type annotation information #31

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

jhlegarreta
Copy link
Contributor

@jhlegarreta jhlegarreta commented Dec 22, 2024

Add type annotation information: add the py.typed file.

Documentation:
https://typing.readthedocs.io/en/latest/spec/distributing.html#packaging-typed-libraries

@jhlegarreta
Copy link
Contributor Author

jhlegarreta commented Dec 22, 2024

@effigies as I did not see this in NiBabel wondering whether it is strictly necessary:
https://github.com/nipreps/nifreeze/pull/31/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R126

Copy link

codecov bot commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.84%. Comparing base (6b6ba70) to head (4644fd0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #31   +/-   ##
=======================================
  Coverage   65.84%   65.84%           
=======================================
  Files          18       18           
  Lines         931      931           
  Branches      119      119           
=======================================
  Hits          613      613           
  Misses        274      274           
  Partials       44       44           

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

@effigies
Copy link
Member

effigies commented Jan 7, 2025

File should go inside src/nifreeze, not src/. We use hatchling, so there's no need to configure setuptools. I don't think you'll need to do anything else but move the py.typed file.

@jhlegarreta jhlegarreta force-pushed the AddTypeAnnotationInfo branch from 4644fd0 to 4896453 Compare January 8, 2025 15:27
@jhlegarreta
Copy link
Contributor Author

File should go inside src/nifreeze, not src/. We use hatchling, so there's no need to configure setuptools. I don't think you'll need to do anything else but move the py.typed file.

Done.

@effigies
Copy link
Member

effigies commented Jan 8, 2025

Looks good:

󰅂 unzip -l dist/*.whl | grep -v .py$
     1:	Archive:  dist/nifreeze-25.0.0.dev9-py3-none-any.whl
     2:	  Length      Date    Time    Name
     3:	---------  ---------- -----   ----
    10:	        0  02-02-2020 00:00   nifreeze/py.typed
    30:	      941  02-02-2020 00:00   nifreeze/registration/config/b0-to-b0_level0.json
    31:	      895  02-02-2020 00:00   nifreeze/registration/config/dwi-to-b0_level0.json
    32:	      877  02-02-2020 00:00   nifreeze/registration/config/dwi-to-dwi_level0.json
    33:	      861  02-02-2020 00:00   nifreeze/registration/config/dwi-to-dwi_level1.json
    38:	     9171  02-02-2020 00:00   nifreeze-25.0.0.dev9.dist-info/METADATA
    39:	       87  02-02-2020 00:00   nifreeze-25.0.0.dev9.dist-info/WHEEL
    40:	       51  02-02-2020 00:00   nifreeze-25.0.0.dev9.dist-info/entry_points.txt
    41:	    10141  02-02-2020 00:00   nifreeze-25.0.0.dev9.dist-info/licenses/LICENSE
    42:	      240  02-02-2020 00:00   nifreeze-25.0.0.dev9.dist-info/licenses/NOTICE
    43:	     3351  02-02-2020 00:00   nifreeze-25.0.0.dev9.dist-info/RECORD
    44:	---------                     -------
    45:	   171957                     40 files

@effigies effigies merged commit d7170ca into nipreps:main Jan 8, 2025
6 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.

2 participants