-
Notifications
You must be signed in to change notification settings - Fork 4
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
Setup standard ECS GH workflows #9
Conversation
We transitioned to pyproject.toml for specifying test dependencies at some point. Try adding something like this to https://github.com/pcdshub/atef/blob/11b15c01dfafd9fe3c6d5ea39afd5844c071c339/pyproject.toml#L39-L40 |
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools AddFileFromTemplate
Performed by pcds-migration-tools GitHubActionsMigration
Performed by pcds-migration-tools UpdateSphinx
Performed by pcds-migration-tools RunPyupgrade
Performed by pcds-migration-tools UpdateCondaRecipe
Performed by pcds-migration-tools RunPycln
Performed by pcds-migration-tools PrecommitAutoupdate
Performed by pcds-migration-tools RunPrecommit
Wow, that's a lot of commits and a well earned "all checks have passed" |
Thanks! I'd appreciate a once over if you can to see if there's anything weird or missing in the CI. It passes, but that doesn't mean it's correct... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good on the whole, hard fought green checkmarks.
The builds/tests seem to be running as intended. Now it's just up to you to write tests that mean something.
@@ -1,6 +1,6 @@ | |||
[run] | |||
source = | |||
btms_ui | |||
btms-ui |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your experience here is why I dislike using dashes at all in package names
@@ -34,8 +32,8 @@ def __init__( | |||
self, | |||
x: float = 0.0, | |||
y: float = 0.0, | |||
channel_x: Optional[str] = None, | |||
channel_y: Optional[str] = None, | |||
channel_x: str | None = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This syntax was introduced in py3.10, though the from __future__ import annotations
lets you use it. I tend to not use it to be safe, but it's fine here it seems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one of the linters asks you to change everything to this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly none of the packages I work on do this yet 😆
|
||
{% set data = load_setup_py_data() %} | ||
|
||
{% set package_name = "btms_ui" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that both the package name and import name are btms_ui
, we might consider renaming the repo and folder structure to use underscores to be consistent
@@ -1,4 +1,3 @@ | |||
from . import _version | |||
__version__ = _version.get_versions()['version'] | |||
from ._version import __version__ # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be missing when running interactively since it's generated by setuptools_scm later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't say I fully understand here, but it's working interactively on my clone. Once this is merged I can set up a clean clone and test that it still works interactively, and if not set up a new issue/PR to resolve that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't compare 1:1 with any other repo but to my eyes everything here looks correct aside from the thing that might ImportError
for dev clones
pyproject.toml
Outdated
description = "Beam Transport Motion System GUI and python code" | ||
dynamic = [ "version", "readme", "dependencies", "optional-dependencies",] | ||
keywords = [] | ||
name = "btms-ui" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conflicts with the conda package name being btms_ui
. The builds confirm this:
- pip:
btms-ui 0.1.dev135+g9befb1c.d20240717
- conda:
btms_ui 0.1.dev135+g9befb1c py_0 local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated pyproject.toml to be consistent now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, one last nitpick then I think we're good to merge this and tackle any followup bugs after.
These migration diffs are always hard to parse. Luckily the green check is a good indicator of success
Co-authored-by: Robert Tang-Kong <35379409+tangkong@users.noreply.github.com>
@tangkong I've committed your suggestion to fix README.rst, but now it requires a review again. Can you approve when you get a chance so I can merge? |
Thank you! |
Description
Adds in standard ECS GH workflows.
Motivation and Context
Closes #8
How Has This Been Tested?
Will hopefully be tested when the workflows run on this PR....