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

Update infrastructure for linting and add for formatting Python files #62

Merged
merged 3 commits into from
Dec 20, 2023
Merged

Update infrastructure for linting and add for formatting Python files #62

merged 3 commits into from
Dec 20, 2023

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented Dec 20, 2023

Previously linting of the Python code was done in the "libraries/report-size-deltas workflow" GitHub Actions workflow.

This system is replaced by a dedicated workflow for detecting Python code problems, leaving the "libraries/report-size-deltas workflow" solely for running unit tests. A task is used, which will allow the contributor to run the same check locally via a common interface as done by the CI system.

Infrastructure for formatting the Python code, and enforcing compliance with the standardized formatting style is also added. Like the linting infrastructure, this is task-based.

The Taskfile contains convenience tasks that allow the contributor to run all tasks of a given type with a single
command:

- check: run all tasks that check for problems with the project
- fix: run all tasks that automatically fix problems with the project

Some task that were added to the file were appropriate for inclusion in these "umbrella" tasks, but were not added.
Previously linting of the Python code was done in the "libraries/report-size-deltas workflow" GitHub Actions workflow.

This system is replaced by a dedicated workflow for detecting Python code problems, leaving the
"libraries/report-size-deltas workflow" solely for running unit tests. A task is used, which will allow the contributor
to run the same check locally via a common interface as done by the CI system.

Infrastructure for formatting the Python code, and enforcing compliance with the standardized formatting style is also
added. Like the linting infrastructure, this is task-based.
With the exception of increasing the maximum line length from the antiquated default value, the default style of the
Black code formatter tool is used as standard in Arduino tooling projects.
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Dec 20, 2023
@per1234 per1234 self-assigned this Dec 20, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (40d17d7) 100.00% compared to head (85ab6a2) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #62   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          732       732           
=========================================
  Hits           732       732           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@per1234 per1234 merged commit 6e5e2cc into arduino:main Dec 20, 2023
17 checks passed
@per1234 per1234 deleted the update-python-infrastructure branch December 20, 2023 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants