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

new local scheme of dirty-tag for developer installation #191

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

ericbuckley
Copy link
Collaborator

@ericbuckley ericbuckley commented Feb 4, 2025

Description

When we install RecordLinker into an environment, a version number is automatically calculated from git data using setuptools scm. If the HEAD is a version tag, then the version is automatically calculated to be that. In development environments, though, we take the last version and add a "post.0" to it, showing it's a new release post the last named one.

Additionally, we were previously calculating a timestamp to add to that "post.0" value based on when HEAD was committed. This worked most of the time, however if the developer has a dirty index, the wheel wouldn't build correctly. We don't need that, and it's fine if a developer tries to install / reinstall RecordLinker in an environment with a dirty index. So to get around that, we'll stop adding the timestamp to the end of "post.0" and instead just call it "post.0+dirty" (if the index is indeed dirty).

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

When we install RecordLinker into an environment, a version number is
automatically calculated from git data using setuptools scm. If the
HEAD is a version tag, then the version is automatcailly calculated to
be that.  In development environments though, we take the last version
and add a "post.0" to it, showing its a new release post the last named
one.

Additionally, we were previouslly calculating a timestamp to add to that
"post.0" value based on when HEAD was committed.  This worked most of
the time, however if the developer has a dirty index, the wheel wouldn't
build correctly.  We don't need that, and its fine if a developer tries
to install / reinstall RecordLinker in an environment with a dirty
index. So to get around that, we'll stop adding the timestamp to the end
of "post.0" and instead just call it "post.0+dirty" (if the index is
indeed dirty).
@ericbuckley ericbuckley self-assigned this Feb 4, 2025
@ericbuckley ericbuckley added the automation Automation of processes label Feb 4, 2025
@ericbuckley ericbuckley marked this pull request as ready for review February 4, 2025 03:19
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.51%. Comparing base (d76f725) to head (730a822).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #191   +/-   ##
=======================================
  Coverage   97.51%   97.51%           
=======================================
  Files          31       31           
  Lines        1486     1486           
=======================================
  Hits         1449     1449           
  Misses         37       37           

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

@ericbuckley ericbuckley merged commit 8ea5fda into main Feb 4, 2025
17 checks passed
@ericbuckley ericbuckley deleted the fix/new-version-scheme branch February 4, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Automation of processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants