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

stickler-ci is shutting down #1722

Closed
kandersolar opened this issue May 3, 2023 · 8 comments · Fixed by #1786
Closed

stickler-ci is shutting down #1722

kandersolar opened this issue May 3, 2023 · 8 comments · Fixed by #1786

Comments

@kandersolar
Copy link
Member

kandersolar commented May 3, 2023

It seems the stickler-ci service is shutting down: https://stickler-ci.com/shutting-down

Stickler CI will remain available in a read only fashion until June 30 2023.. After that, login will cease to work and the site will fall off the internet.

That website seems to suggest that it should still be working for the moment, but @AdamRJensen noticed that it's not reporting a status to #1395, so it might be inactive already for us.

Thinking about how we might replace it: instead of using an external service, pvanalytics and twoaxistracking both DIY with a custom flake8 action. This approach doesn't comment in-line like stickler does, which is a downside especially for new contributors. Probably there are nicer pre-built linter services we could switch to.

@mikofski
Copy link
Member

mikofski commented May 3, 2023

Pycodestyle returns line item results we could pipe that to an artifact. No preference between this and flake8

i also notice there are many GitHub actions for python code style checking. IDK if any will offer the same level of feedback, but maybe?

@kandersolar
Copy link
Member Author

it's not reporting a status to #1395, so it might be inactive already for us.

Well I see it's running on other PRs now. Not sure why it's not running on #1395. Anyway I guess we don't have to replace it immediately.

@adriesse
Copy link
Member

adriesse commented May 5, 2023

It seems the stickler-ci service is shutting down

Yay, no more annoying stickler error messages!! :)

@wholmgren
Copy link
Member

I'm ok with the custom action, but my preference is to embrace the dark side and go black. I don't expect consensus on this and I'm not going to push it today. I just want to use this opportunity to plant a seed in your minds :) See details below for our new AI overlord's vision of a world in black

(Verse 1)
Imagine there's no clutter, no messy code to see,
No tangled lines to fix, just pure simplicity.
Imagine all the spaces, just erased with a tap,
You may say I'm a dreamer, but I'm not the only one.

(Chorus)
I hope someday you'll join us,
And the world will be bug-free,
With the black formatter, it's easy,
To code in harmony.

(Verse 2)
Imagine there's no tabs, only indents in our code,
No more endless debates, over style choices bestowed.
Imagine all the programmers, working hand in hand,
You may say I'm a dreamer, but I'm not the only one.

(Chorus)
I hope someday you'll join us,
And the world will be bug-free,
With the black formatter, it's easy,
To code in harmony.

(Bridge)
You may say I'm obsessed, with formatting rules so strict,
But I believe in consistency, it's a programming pick.
I hope someday you'll see, the beauty that it brings,
A world of clean code, where simplicity sings.

(Verse 3)
Imagine no more wasted time, fixing formatting woes,
No more endless scrolling, to find what we suppose.
Imagine all the coders, focusing on what truly matters,
You may say I'm a dreamer, but I'm not the only one.

(Chorus)
I hope someday you'll join us,
And the world will be bug-free,
With the black formatter, it's easy,
To code in harmony.

(Outro)
Imagine a world of code, where order reigns supreme,
No more tangled spaghetti, just a programmer's dream.
You may say I'm a dreamer, but I'm not the only one,
With the black formatter, we can make it all come undone.

@AdamRJensen
Copy link
Member

I'm ok with the custom action, but my preference is to embrace the dark side and go black. I don't expect consensus on this and I'm not going to push it today. I just want to use this opportunity to plant a seed in your minds :) See details below for our new AI overlord's vision of a world in black

There are some things that Black doesn't do it seems: e.g., flagging unused variables or imports

@wholmgren
Copy link
Member

Good point Adam. We can use one or more of black, ruff, flake8, isort, pydocstyle, etc. metpy's multi-tool linting workflow looks interesting in part because they're piping the output of the linters into reviewdog. Unidata/MetPy#2967 suggests that their goal is to consolidate most linting into ruff as it gains more features.

@mikofski
Copy link
Member

mikofski commented Jul 8, 2023

I’m curious if anyone investigated just using an off the shelf marketplace action like the ones I linked in this comment before writing custom code in #1786 that we’ll have to maintain?

@reepoi
Copy link
Contributor

reepoi commented Jul 12, 2023

I looked at the flake8 options in the actions marketplace and felt they don't contribute much toward writing a CI workflow that only lints changed lines. There appear to be two kinds of flake8 actions available on the marketplace. The first kind installs and runs flake8 using any custom arguments we provide, and then captures flake8's output to create annotations on the pull request. The second kind only sets up the tool that captures flake8's output for annotations and requires us to install and run flake8. To use these actions, we need to write a workflow file in this repository that calls them, and it is only a few more lines of code to reimplement their functionality ourselves.

The first kind of action does not support linting changed lines only. The easiest way to lint changed lines is to pipe the output of git diff to flake8 --diff. If the action calls flake8 for us, I don't know how to pipe the git diff output to it. Next, the --diff option was removed in flake8 v6, so we would need to be able to control the version of flake8 that the action uses.

The second kind of action does so little that reimplementing its functionality is more maintainable. All the implementation details are in one place. The implementation is writing a JSON file that defines how flake8's output should be mapped to annotations and then registering this JSON file with the CI workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants