BlueBrain / nexus-forge

Building and Using Knowledge Graphs made easy
https://nexus-forge.readthedocs.io
GNU Lesser General Public License v3.0
38 stars 19 forks source link

pycodestyle #352

Closed ssssarah closed 9 months ago

ssssarah commented 9 months ago

Inspired by https://github.com/BlueBrain/nexus-forge/pull/237 , but on the more recent codebase.

codecov-commenter commented 9 months ago

Codecov Report

Attention: 138 lines in your changes are missing coverage. Please review.

Comparison is base (ab22a83) 74.30% compared to head (88cf0a9) 74.20%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #352 +/- ## ========================================== - Coverage 74.30% 74.20% -0.10% ========================================== Files 93 93 Lines 5934 5913 -21 ========================================== - Hits 4409 4388 -21 Misses 1525 1525 ``` | [Flag](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | `74.20% <59.17%> (-0.10%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | Coverage Δ | | |---|---|---| | [kgforge/core/\_\_init\_\_.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [kgforge/core/archetypes/mapper.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2FyY2hldHlwZXMvbWFwcGVyLnB5) | `69.69% <ø> (ø)` | | | [kgforge/core/commons/actions.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvYWN0aW9ucy5weQ==) | `93.75% <ø> (ø)` | | | [kgforge/core/commons/attributes.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvYXR0cmlidXRlcy5weQ==) | `72.22% <ø> (ø)` | | | [kgforge/core/commons/context.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvY29udGV4dC5weQ==) | `92.30% <100.00%> (ø)` | | | [kgforge/core/commons/dictionaries.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvZGljdGlvbmFyaWVzLnB5) | `72.72% <100.00%> (ø)` | | | [kgforge/core/commons/exceptions.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvZXhjZXB0aW9ucy5weQ==) | `100.00% <ø> (ø)` | | | [kgforge/core/commons/files.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvZmlsZXMucHk=) | `54.54% <100.00%> (ø)` | | | [kgforge/core/commons/formatter.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvZm9ybWF0dGVyLnB5) | `100.00% <ø> (ø)` | | | [kgforge/core/commons/query\_builder.py](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#diff-a2dmb3JnZS9jb3JlL2NvbW1vbnMvcXVlcnlfYnVpbGRlci5weQ==) | `81.25% <ø> (ø)` | | | ... and [47 more](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/352?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MFSY commented 9 months ago

Inspired by #237 , but on the more recent codebase. Running tox -e lint led to many warnings. This is just addressing some of them. Maybe running the command should be done as job systematically (as proposed in the previously mentioned MR).

Please add the job.

ssssarah commented 9 months ago

Inspired by #237 , but on the more recent codebase. Running tox -e lint led to many warnings. This is just addressing some of them. Maybe running the command should be done as job systematically (as proposed in the previously mentioned MR).

Please add the job.

I've just added the job in the github workflows, but it only runs pycodestyle because I've fixed all pycodestyle errors, but I haven't fixed all pylint errors, so if added the pylint one it would fail

crisely09 commented 9 months ago

It's fine with me. I will approve but let @MFSY have the last word.

ssssarah commented 9 months ago

Although I don't think it helps much, I've re-enabled pylint and added a threshold under which the job fails. The score should be above 8.5/10