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

Replace "volid" with "vol_id" throughout ORANGE #1486

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

elliottbiondo
Copy link
Contributor

@elliottbiondo elliottbiondo commented Nov 5, 2024

This MR updates all files within ORANGE to use the form "vol_id" for variable names instead of "volid", for consistency with other opaque IDs such as universe_id, transform_id, level_id, etc.

@elliottbiondo elliottbiondo requested a review from sethrj November 5, 2024 16:19
Copy link

github-actions bot commented Nov 5, 2024

Test summary

 4 209 files   6 475 suites   4m 49s ⏱️
 1 624 tests  1 595 ✅ 29 💤 0 ❌
21 433 runs  21 353 ✅ 80 💤 0 ❌

Results for commit d4e5746.

♻️ This comment has been updated with latest results.

@elliottbiondo elliottbiondo force-pushed the vol_id branch 2 times, most recently from e8807d0 to fa61437 Compare November 5, 2024 19:10
@elliottbiondo elliottbiondo changed the title Use vol_id throughout for consistency Replace "volid" with "vol_id" throughout ORANGE Nov 5, 2024
@elliottbiondo
Copy link
Contributor Author

@sethrj RTR

Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Looks great. Do you want to do the same for univ_id, trans_id, ...? I think it would be a nice touch. Also like we have uid in there, there are a couple of vid for vol_id.

@elliottbiondo
Copy link
Contributor Author

Yeah I can do that too. I wasn't sure how far too go. I am thinking:

surf_id,
trans_id,
univ_id,

but only for local variable names. If I start changing APIs (geo.volume_id() to geo.vol_id()) the changes become more invasive. I also don't want to mess but the .jsons.

@sethrj
Copy link
Member

sethrj commented Nov 6, 2024

Yes, agreed. I think it's ok (and often better?) for API names to be spelled out. In fact, I read/saw recently a guideline that said the more global an identifier's scope, the longer/more descriptive the name should be; and conversely very local variables can be very short (think i in an inner loop, or v for volume id in a 3-line loop).

@sethrj sethrj added minor Minor internal changes or fixes orange Work on ORANGE geometry engine labels Nov 9, 2024
@sethrj
Copy link
Member

sethrj commented Dec 16, 2024

@elliottbiondo Were you planning to update the other IDs before merging this, or should we defer that?

@elliottbiondo
Copy link
Contributor Author

@sethrj yes, I will update all of these. It will probably be easier to start from fresh main branch at this point. You can close this if you'd prefer for me to start a new MR rather than force-pushing here.

@sethrj
Copy link
Member

sethrj commented Dec 17, 2024

I think we can make an exception and force-push 😉 if you wanted to be really fancy you could make a new temporary branch with git fetch upstream; git checkout -b temp upstream/develop; make your global upates there, and then return to the original branch with git checkout vol_id and make a "pretend" conflict-free merge by

git reset --hard $(git commit-tree -p HEAD -p upstream/develop -m "Merge upstream" temp^{tree})

Then you'd be more easily able to see if you accidentally reverted something.

@sethrj sethrj marked this pull request as draft January 3, 2025 15:44
@elliottbiondo
Copy link
Contributor Author

@sethrj I think this is ready to review, but I am not sure if the Docker build failure is real?

@sethrj sethrj marked this pull request as ready for review January 9, 2025 16:58
@sethrj
Copy link
Member

sethrj commented Jan 9, 2025

The "failure" is just because when a PR is draft, it skips docker builds to save compute time. There is a "ready to review" button at the bottom when it's in draft form. I'll update to develop and that'll trigger the full CI.

Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Minor internal changes or fixes orange Work on ORANGE geometry engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants