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

Added versions to the ruff and black linter actions #90

Conversation

jcadam14
Copy link
Contributor

Closes #89

Added versions to the linter actions. Since the pyproject.toml specifies distinct versions for each (instead of say ^24.1.0), I put the version equal to what is in the toml. Note that, as in the other stories referenced, the black linter supports the concept of capability versions. We're just not using itwith:
version: 0.0.278here.

Copy link

Coverage report

This PR does not seem to contain any modification to coverable code.

Copy link
Member

@hkeeler hkeeler left a comment

Choose a reason for hiding this comment

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

😕 This is annoying. I'm surprised these don't let you use whatever is in the local python environment, so it'd just use whatever is setup in poetry. But yeah, options seem like either latest or pinned versions. Makes me want to just run these commands ourselves and abandon these canned actions. But for now, yeah, I guess we just have to keep pyproject.toml and linters.yml in sync.

ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
version: 0.1.4
Copy link
Member

Choose a reason for hiding this comment

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

This is now 0.1.15.

ruff = "0.1.15"

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've changed things up taking your annoyance (which I agree with). I changed the linters to instead do what the pytest does: installs poetry and runs poetry run black\ruff instead of relying on actions of said libraries. I put the linters into their own group in poetry so that the linter action can do poetry install --only linters (to keep from unnecessarily installing packages it doesn't need). Give a look over of those changes. This keeps everything running off of one poetry pyproject.toml instead of having versions in two different places.

If we're good with this, I can write stories for the other repos to switch to the same linting actions.

@jcadam14 jcadam14 requested a review from hkeeler February 1, 2024 16:21
Copy link
Member

@hkeeler hkeeler left a comment

Choose a reason for hiding this comment

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

👍👍

@jcadam14 jcadam14 merged commit bb54431 into main Feb 2, 2024
5 checks passed
jcadam14 added a commit that referenced this pull request May 3, 2024
Closes #89 

Added versions to the linter actions. Since the pyproject.toml specifies
distinct versions for each (instead of say ^24.1.0), I put the version
equal to what is in the toml. Note that, as in the other stories
referenced, the black linter supports the concept of capability
versions. We're just not using itwith:
          version: 0.0.278here.
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.

Update linting actions to have defined versions for black and ruff
2 participants