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

fix(github): Fix format code step in publish sources action. #286

Conversation

OmarAlJarrah
Copy link
Contributor

📝 Description

In the workflow for publishing generator sources, the order of execution for linting tools is changed.

The docformatter is now run before isort and black. The change aims to ensure consistent documentation formatting across the codebase before other linting tools are executed. This is necessary for maintaining the code cleanliness and readability.

🔗 Related Issues

…ion for linting tools is changed.

The docformatter is now run before isort and black. The change aims to ensure consistent documentation formatting across the codebase before other linting tools are executed. This is necessary for maintaining the code cleanliness and readability.
@OmarAlJarrah OmarAlJarrah requested a review from a team as a code owner November 28, 2023 12:12
Omar Al-Jarrah added 18 commits November 28, 2023 15:14
Removed conditional check for `production_release` in publishing sources. This is done to allow publishing of generated sources even in non-production releases for earlier validation and testing.
Modified the `docformatter` command used in the Github Workflow action -  generator-publish-sources.yaml by adding `--config pyproject.toml` flag to it. This change is made to include the configuration specified in pyproject.toml while formatting the release code, ensuring code consistency across the project.
Removed the `--black` flag from the `docformatter` command in the generator-publish-sources.yaml Github Workflow. This ensures the Python code formatter adheres more strictly to the configuration as specified in our project's pyproject.toml file, enhancing code consistency.
Added the `--black` flag to the `docformatter` command in the generator-publish-sources.yaml Github Workflow. This applies code auto-formatting according to Black's conventions, further enhancing code standardization across the project.
The command in the 'Format Code' step of our Github workflow has been updated to call the docformatter package as a python module. This change rectifies an issue where the docformatter couldn't be found when invoked via the sudo command, ensuring smooth execution of our code formatting in the future.
This reverts commit 1ef275f.
This reverts commit 7ec6992.
This reverts commit c5093e9.
…f execution for linting tools is changed."

This reverts commit 1fcfc8b.
The docformatter was removed from the generator-publish-sources.yaml due to its redundancy. The formatting had been already carried out using 'isort' and 'black', rendering the 'docformatter' unnecessary. This streamlines code formatting in the project.
@OmarAlJarrah OmarAlJarrah removed the WIP label Nov 28, 2023
@OmarAlJarrah OmarAlJarrah deleted the OmarAlJarrah/fix-publish-sources-action-format-code-step branch November 28, 2023 14:03
@OmarAlJarrah OmarAlJarrah restored the OmarAlJarrah/fix-publish-sources-action-format-code-step branch November 29, 2023 10:55
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.

1 participant