Skip to content

Introduce ruff and codespell, rework Github-Workflows, move packaging to pyproject.toml#59

Open
SmithChart wants to merge 14 commits intopengutronix:masterfrom
SmithChart:github-workflow
Open

Introduce ruff and codespell, rework Github-Workflows, move packaging to pyproject.toml#59
SmithChart wants to merge 14 commits intopengutronix:masterfrom
SmithChart:github-workflow

Conversation

@SmithChart
Copy link
Member

This is a rather heavy PR that tries to add a lot of current best practices to the flamingo code-base and repo. It does:

  • Introduce ruff as code formatter and linter
  • Introduce codepsell, to reduce the number of typos
  • Update the packaging-logic from setup.py to pyproject.toml
  • Drop tox for testing and use pytest directly
  • Drop the old Github actions and use more modern ones. Especially we are now using the pypi trusted publishers to publish our packages. But we also add Actions for ruff, codespell and pytest.

The Github-Workflows will be recreated in a later commit once packaging
and other refactoring has been completed.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Signed-off-by: Chris Fiege <cfi@pengutronix.de>
@SmithChart SmithChart marked this pull request as draft February 26, 2026 11:49
@jonrebm
Copy link
Contributor

jonrebm commented Mar 2, 2026

Suppose this resolves #58

@SmithChart
Copy link
Member Author

Suppose this resolves #58

Yes, I assume so.

@SmithChart SmithChart marked this pull request as ready for review March 3, 2026 07:02
Copy link
Member

@hnez hnez left a comment

Choose a reason for hiding this comment

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

A few suggestions

tox.ini Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Maybe also remove the mentions of tox in the Makefile in this commit?

Copy link
Member Author

Choose a reason for hiding this comment

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

This got detached from a code change or commit. Do you know where this belongs?

SmithChart and others added 9 commits March 11, 2026 08:36
These are fixes for ruff check findings that could not be applied
automatically.
These changes should be a no-op.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Signed-off-by: Chris Fiege <cfi@pengutronix.de>
The `pytest.py`-file inside the Flamingo-package only contains code
relevant for testing - and also fixtures used by the tests.

Let's move it into the `tests/`-directory and call it `conftest.py` as
it should be.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
This commit reintroduces Github workflows in more modern way.
Releases to pypi are now done using the "trusted publisher"-mechanism.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Co-authored-by: Leonard Göhrs <leonard@goehrs.eu>
BS4 suggests to use these new, different names. So let's comply and get
rid of the deprecation warnings during testing.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
Signed-off-by: Chris Fiege <cfi@pengutronix.de>
This commit moves to pyproject.toml for packaging of flamingo.
This commit intends to (mostly, see exception below) to only transfer
settings from the setup.py-world into the pyproject.toml without
any further functional changes.

The exception here is that the CLI-scripts get refactored from the
standalone directory `bin/` into the python package `flamingo/bin/`.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
At this point row has already been initialized as list and is only
changed using list.append().
This means we can safely drop the additional list() here.

Signed-off-by: Chris Fiege <cfi@pengutronix.de>
@SmithChart SmithChart requested a review from hnez March 11, 2026 07:46
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.

3 participants