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

style: reformat unit test modules #125

Merged

Conversation

deliaBlue
Copy link
Collaborator

@deliaBlue deliaBlue commented Nov 21, 2023

This PR closes #120 .

All the unit test scripts are now passing the flake8 analysis. To do so, two __init__.py have been added (one in the scripts/ directory and one in the scripts/test/ one) and the module imports are now made using relative paths.

The pytest call has now an extra parameter to ensure the correct import of the modules and test files.

Moreover, a extra static code analysis test using black has been added to the CI-

@deliaBlue deliaBlue requested a review from uniqueg November 21, 2023 19:24
@deliaBlue deliaBlue self-assigned this Nov 21, 2023
@deliaBlue deliaBlue linked an issue Nov 21, 2023 that may be closed by this pull request
@deliaBlue
Copy link
Collaborator Author

By ignoring the error E402, all python scripts failed the static code analysis.
After fixing them, an extra error is add to be ignore, error W504.

This error does not allow to break a line after/before an arithmetic operator enabling the possibility of concatenating strings in different lines (which avoids having >79 char long lines).

.github/workflows/tests.yml Outdated Show resolved Hide resolved
scripts/filter_multimappers.py Outdated Show resolved Hide resolved
scripts/mirna_quantification.py Outdated Show resolved Hide resolved
@uniqueg uniqueg changed the title style: change unit test scripts for flake8 style: reformat unit test modules Nov 30, 2023
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

Nice :)

@deliaBlue deliaBlue merged commit 618e082 into dev Dec 3, 2023
8 checks passed
@deliaBlue deliaBlue deleted the 120-refactor-static-code-analysis-for-the-unit-test-scripts branch December 3, 2023 22:03
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.

refactor: static-code analysis for the unit test scripts
2 participants