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

PR to support a more flexible camera naming. #16

Merged
merged 13 commits into from
Jul 29, 2024

Conversation

slactjohnson
Copy link
Contributor

Description

Modify the btms to use a new property of the btms_config.SourcePosition class, introduced in this PR on pcdsdevices: pcdshub/pcdsdevices#1265

Motivation and Context

closes #15

How Has This Been Tested?

Tested interactively in the laser hall.

Where Has This Been Documented?

This PR.

@tangkong
Copy link
Contributor

tangkong commented Jul 29, 2024

The version handling here broke for some reason, which is why the CI is failing

@tangkong
Copy link
Contributor

This might be related to the comment zach made in #9 about _version.py being auto-generated and not being needed to be tracked in the repository.

Our cookiecutter is setup to have a version.py file (no underscore) instead of _version.py (with underscore). Can you try changing the name of that, and modifying __init__.py to match the cookiecutter version?

@tangkong
Copy link
Contributor

tangkong commented Jul 29, 2024

Playing around with this locally, I think this breaks because the tag format is not recognized by setuptools_scm. The prepended R breaks the tag parsing.

> /cds/group/pcds/pyps/conda/py39/envs/pcds-5.8.4/lib/python3.9/site-packages/setuptools_scm/version.py(210)meta()
    208     node_date: date | None = None,
    209 ) -> ScmVersion:
--> 210     parsed_version = _parse_tag(tag, preformatted, config)
    211     log.info("version %s -> %s", tag, parsed_version)
    212     assert parsed_version is not None, "Can't parse version %s" % tag

ipdb> tag
'R1.0.0'

ipdb> _parse_tag('1.0.0', preformatted, config)
<Version('1.0.0')>

Are we committed to RX.X.X as the tag format? Or could we use 1.0.0?

@slactjohnson
Copy link
Contributor Author

slactjohnson commented Jul 29, 2024

If prefixing with 'R' is problematic, then I'm happy to change it. I just used the 'Rx.y.z' format because that's historically how we've tagged our IOC releases. We can still name the release directory "R.x.y.z" if we want.

@tangkong
Copy link
Contributor

Unfortunately the 'Rx.y.z' format isn't seen anywhere else from what I've seen. Changing the release tag format is the best path forward for this python repo at least.

For the purposes of this PR, we can ignore the CI and bypass the checks

@slactjohnson
Copy link
Contributor Author

Thanks! I'll make this ready for review then and make a new tag without the 'R' after the merge.

@slactjohnson slactjohnson marked this pull request as ready for review July 29, 2024 17:53
@tangkong tangkong requested a review from ZLLentz July 29, 2024 18:10
@tangkong
Copy link
Contributor

Requesting a review from @ZLLentz to double check my opinion on the tag / versioning issue

MANIFEST.in Outdated Show resolved Hide resolved
conda-recipe/meta.yaml Outdated Show resolved Hide resolved
slactjohnson and others added 2 commits July 29, 2024 11:23
Co-authored-by: Robert Tang-Kong <35379409+tangkong@users.noreply.github.com>
Co-authored-by: Robert Tang-Kong <35379409+tangkong@users.noreply.github.com>
@ZLLentz
Copy link
Member

ZLLentz commented Jul 29, 2024

RE: tag/versioning issue, python has a strict, explicit spec for version identifiers. Details here: https://packaging.python.org/en/latest/specifications/version-specifiers

Summary:

  • Things like 1.2.0 are allowed
  • Lots of specifiers and guidance for pre-releases, alpha versions, etc.
  • If you put a letter before your version number, it must be a lowercase v

Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

You should add this file exactly as-is: https://github.com/pcdshub/pcdsdevices/blob/master/pcdsdevices/version.py

To act as version proxy between installed/dev versions

pyproject.toml Outdated
@@ -23,7 +23,7 @@ file = "LICENSE.md"
[project.scripts]

[tool.setuptools_scm]
write_to = "btms_ui/_version.py"
Copy link
Member

Choose a reason for hiding this comment

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

This change should be undone

@ZLLentz
Copy link
Member

ZLLentz commented Jul 29, 2024

The core change here is 👍 just the packaging stuff

ZLLentz
ZLLentz previously approved these changes Jul 29, 2024
Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

I think everything is good here, if you merge and tag we can see if the tag build has similar issues or not

tangkong
tangkong previously approved these changes Jul 29, 2024
Copy link
Contributor

@tangkong tangkong left a comment

Choose a reason for hiding this comment

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

👍

@slactjohnson slactjohnson dismissed stale reviews from tangkong and ZLLentz via fee433a July 29, 2024 18:54
@slactjohnson
Copy link
Contributor Author

Thanks. It seems like I do not possess the power to merge without approving review and passing tests

@ZLLentz ZLLentz merged commit 010e3ba into pcdshub:master Jul 29, 2024
2 of 11 checks passed
@tangkong
Copy link
Contributor

tangkong commented Jul 29, 2024

Builds after the new, compliant tag name look good. Now only failing on a pypi / conda deployment we haven't setup 🎉

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.

Make Camera Devices More General
3 participants