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

Move calc_id into job.py #873

Merged
merged 2 commits into from
Dec 8, 2022
Merged

Move calc_id into job.py #873

merged 2 commits into from
Dec 8, 2022

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Dec 6, 2022

Description

Move hashing.calc_id into the job module. The parameter is also renamed from spec to statepoint to more accurately reflect its usage.

Motivation and Context

The id computed by hashing.calc_id is not a generic hash id. It is very specifically tied to the project-job-statepoint relationship that forms the core data model in signac. This move helps clarify that. Additionally, if we ever move to support more general file layouts, this move ensures that the calculated id is tightly coupled to the Job class.

Checklist:

@vyasr vyasr added this to the v2.0.0 milestone Dec 6, 2022
@vyasr vyasr requested review from a team as code owners December 6, 2022 05:27
@vyasr vyasr self-assigned this Dec 6, 2022
@vyasr vyasr requested review from tcmoore3 and tommy-waltmann and removed request for a team December 6, 2022 05:27
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #873 (9b4fca0) into master (3de5f48) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #873      +/-   ##
==========================================
- Coverage   86.53%   86.52%   -0.02%     
==========================================
  Files          41       40       -1     
  Lines        4531     4527       -4     
  Branches      901      901              
==========================================
- Hits         3921     3917       -4     
  Misses        429      429              
  Partials      181      181              
Impacted Files Coverage Δ
signac/job.py 89.93% <100.00%> (+0.19%) ⬆️
signac/project.py 89.96% <100.00%> (-0.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@bdice bdice left a comment

Choose a reason for hiding this comment

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

I kind of liked the shared hashing functionality being in its own module, but I don't feel strongly. I accept this.

@vyasr vyasr merged commit 3e0ca40 into master Dec 8, 2022
@vyasr vyasr deleted the refactor/hashing branch December 8, 2022 03:23
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.

3 participants