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

Support "onbuild" step when using Hatch #53

Merged
merged 10 commits into from
Dec 14, 2023
Merged

Support "onbuild" step when using Hatch #53

merged 10 commits into from
Dec 14, 2023

Conversation

jwodder
Copy link
Owner

@jwodder jwodder commented Nov 5, 2023

Closes #54.

Blocked by pypa/hatch#1030.

This is a breaking change to the custom methods API, as the build_dir argument to "onbuild" methods has been replaced with a FileProvider ABC.

To do:

  • Set next version to 3.0.0
  • Update docs on writing a custom "onbuild" method
    • Add docstrings to all classes (abstract & concrete) in onbuild.py
  • Update the "Configuration" docs page for using onbuild with Hatch
  • Warn if [tool.versioningit.onbuild] is defined when using Hatch
  • More tests:
    • Test file providers in isolation
    • Test that [tool.versioningit.onbuild] is ignored & warned on when using Hatch

@jwodder jwodder added enhancement New feature or request therefor breaking change Introduction of an incompatible API change blocked Cannot be implemented until something else happens step:onbuild Relating to the "onbuild" step builder:hatch Integration with Hatch build backend in progress Currently under development labels Nov 5, 2023
@jwodder jwodder mentioned this pull request Nov 5, 2023
Copy link

codecov bot commented Nov 5, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (d9bc4c5) 97.58% compared to head (ba530a7) 97.67%.

Files Patch % Lines
src/versioningit/hatch.py 95.45% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
+ Coverage   97.58%   97.67%   +0.08%     
==========================================
  Files          17       17              
  Lines        1119     1246     +127     
  Branches      181      211      +30     
==========================================
+ Hits         1092     1217     +125     
- Misses         14       15       +1     
- Partials       13       14       +1     

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

@jwodder jwodder removed the in progress Currently under development label Nov 5, 2023
Base automatically changed from hatch to master November 19, 2023 13:18
@jwodder jwodder force-pushed the onbuild branch 2 times, most recently from decafad to ec482e7 Compare November 19, 2023 14:15
@jwodder jwodder added the method API Relating to the APIs for creating custom methods label Dec 6, 2023
@jwodder jwodder self-assigned this Dec 11, 2023
@jwodder jwodder removed the blocked Cannot be implemented until something else happens label Dec 13, 2023
@jwodder jwodder marked this pull request as ready for review December 13, 2023 23:29
@jwodder jwodder merged commit 1bc3347 into master Dec 14, 2023
97 checks passed
@jwodder jwodder deleted the onbuild branch December 14, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Introduction of an incompatible API change builder:hatch Integration with Hatch build backend enhancement New feature or request therefor method API Relating to the APIs for creating custom methods step:onbuild Relating to the "onbuild" step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support "onbuild" step in Hatch
1 participant