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

Delivery of compatibility for Flake8 from version 4 to the latest ver… #4

Merged
merged 8 commits into from
Nov 9, 2024

Conversation

pypros
Copy link

@pypros pypros commented Oct 27, 2024

  • Support for Flake8 from version >=4. The approach has been changed to ensure more stable plugin functionality. The implementation was modified too often, while the command-line interface remained largely the same. For this reason, it was decided not to rely heavily on the internal implementation or to do so minimally. This approach allowed for support of both the backward-compatible version and the new implementation of Flake8.

  • Ensuring backward compatibility for tests, as changes have been introduced starting from version 6.0.0.

  • The approach outlined above enables us to easily implement new features, as practically any flag can be passed to Flake8. It can be tagged with --flake8-{the-same-name-like-flake8}, through a very simple mechanism. This further demonstrates that this approach can be even more flexible. Within the plugin, we remove the prefix --flake8- and provide --{the-same-name-like-flake8} to argv. This makes it simple and easy to maintain.

  • An update has also been added to the documentation for developers, as this was lacking. This could encourage others to contribute code.

  • The appearance of the documentation after the changes.
    https://github.com/pypros/pytest-flake8/tree/update-flake8-compat-4.x-to-latest

@pypros pypros force-pushed the update-flake8-compat-4.x-to-latest branch from f936b50 to de55881 Compare October 28, 2024 06:36
README.rst Outdated
@@ -1,21 +1,31 @@
.. image:: https://img.shields.io/pypi/v/pytest-flake8.svg
.. image:: https://img.shields.io/pypi/v/pytest-flake8.svg?label=pytest-flake8
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to avoid changes to the badges here, as they're now managed upstream in jaraco/skeleton. If these changes are important, let's contribute them back to the skeleton. It's okay for a downstream project to have an extra badge, though.

Copy link
Author

Choose a reason for hiding this comment

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

Original view pytest-flake8 1.2.2:
image

Skeleton view master:
image

From current PR view:
image

I have made some changes because, as you may notice in the documentation for version 1.2.2, there is a blue underline (very tiny) appearing between the labels tests and Ruff. This issue is likely related to the SVG extension at the end. In the skeleton, it may be unnoticeable due to other styles being present so to enhance clarity and coherence for this project, I have added a label and made adjustments to ensure that the pages appear more consistent and user-friendly.

I haven't looked into the skeleton project. I made the changes with varying degrees of familiarity with HTML and by reviewing the badges. I would prefer to focus on delivering a functioning version of pytest-flake8, and I would like others to benefit from this as well. I also apologize in advance for my English, as it is not at the highest level, and I often hear from people that it sounds very harsh, which is not my intention.

Copy link
Author

Choose a reason for hiding this comment

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

Very strange situation, and it looks good on PyPI...

image

Copy link
Author

Choose a reason for hiding this comment

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

@jaraco do you know what might be causing these differences? Is there a difference in generating HTML and CSS from .rst files? Are there any other mechanisms involved?

Copy link
Author

Choose a reason for hiding this comment

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

@jaraco Do you have any suggestion in which direction we should go with this delivery?

Copy link
Member

Choose a reason for hiding this comment

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

I recognize the skeleton project isn't something that's familiar to everyone. It's a way of dealing with the common concerns of project management across projects.

The skeleton project itself is never released, so whatever rendering you see of the badges in skeleton is ignorable. What really matters is what is rendered for the downstream projects (after substituting real project names for concrete projects).

I'm aware there are some issues with the rendering of badges in some situations. I'm unwilling to "fix" the rendering of the badges for individual projects. If the issue can be fixed for all projects, I'm good with that, but it needs to happen in the skeleton. My recommendation - just revert all changes to the badges and instead contribute the same changes upstream in the skeleton. The only thing I'm likely to accept in this project is an additional badge that appears after the "skeleton" badge.

Copy link
Member

Choose a reason for hiding this comment

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

In other words, let's just revert these changes and deal with them separately, so they aren't blocking the other changes.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you.

README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
@jaraco jaraco force-pushed the update-flake8-compat-4.x-to-latest branch 2 times, most recently from 1eaa506 to aa4dfd9 Compare November 8, 2024 23:59
NEWS.rst Outdated Show resolved Hide resolved
@jaraco jaraco force-pushed the update-flake8-compat-4.x-to-latest branch from 05c69c2 to 7c68e65 Compare November 9, 2024 00:04
@jaraco jaraco merged commit 2c43c7a into coherent-oss:main Nov 9, 2024
13 checks passed
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.

2 participants