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

scheduler: resolve git references into revisions on submission #2296

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

charlesbaynham
Copy link
Contributor

@charlesbaynham charlesbaynham commented Dec 6, 2023

ARTIQ Pull Request

Description of Changes

Allow users to submit ARTIQ experiments with non-hash revisions.

Currently, the revision field for expid can be blank (results in the current HEAD) or set to a fully resolved git hash. This PR allows the user to use e.g. a branch or tag instead (like "my-working-branch"). The reference is expanded into a full git hash as usual for expid, so ends up in the HDF5 datasets etc like normal.

Related Issue

#1543

Type of Changes

Type
✨ New feature

Steps (Choose relevant, delete irrelevant before submitting)

All Pull Requests

  • Use correct spelling and grammar.
  • Update RELEASE_NOTES.rst if there are noteworthy changes, especially if there are changes to existing APIs.
  • Close/update issues.
  • Check the copyright situation of your changes and sign off your patches (git commit --signoff, see copyright).

Code Changes

  • Run flake8 to check code style (follow PEP-8 style). flake8 has issues with parsing Migen/gateware code, ignore as necessary.
  • Test your changes or have someone test them. Mention what was tested and how.
  • Add and check docstrings and comments
  • Check, test, and update the unittests in /artiq/test/ or gateware simulations in /artiq/gateware/test

Documentation Changes

  • Check, test, and update the documentation in doc/. Build documentation (cd doc/manual/; make html) to ensure no errors.

Git Logistics

  • Split your contribution into logically separate changes (git rebase --interactive). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.
  • Write short & meaningful commit messages. Review each commit for messages (git show). Format:
    topic: description. < 50 characters total.
    
    Longer description. < 70 characters per line
    

Licensing

See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.

@charlesbaynham charlesbaynham force-pushed the non-head-revs branch 2 times, most recently from e2894ee to 7b6dc00 Compare December 11, 2023 11:22
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't found a canonical term for something that can be either a reference or a revision, so I've just written it out here. Another option would be "refish" which is used by the libgit2 library:

https://github.com/libgit2/libgit2/blob/main/examples/common.c#L105C5-L116

...but not elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could also be "refish" in the GUI, but I think it's better to be explicit. Though I shortened "Revision" to "Rev" to avoid having the box take up too much space...

@charlesbaynham
Copy link
Contributor Author

@sbourdeauducq I've resolved conflicts with the latest master - would it be possible to merge this soon, before others arise? I think all the changes we've discussed are in.

@sbourdeauducq sbourdeauducq merged commit 669edf1 into m-labs:master Jan 10, 2024
@charlesbaynham charlesbaynham deleted the non-head-revs branch January 10, 2024 11:07
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