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

Review Linting #224

Merged
merged 13 commits into from
Jun 30, 2024
Merged

Review Linting #224

merged 13 commits into from
Jun 30, 2024

Conversation

fkuehlein
Copy link
Collaborator

the idea is to drop global disables of Pylint flags in pyproject.toml where possible.

This PR contains the most straightforward cases, but more work needs to be done. I would argue to keep

disable = ["duplicate-code", "invalid-name", "fixme", "missing-docstring", "no-else-return"]

for now.

Thus, "arguments-differ", "no-member" and "no-name-in-module" are yet to be re-enabled and respective cases fixed (see e.g. #222 concerning "no-member").

- remove unused variables
- correct `no-member` where straightforward,
  keep disable for later review of remaining cases
- as `degrees` argument was overridden by `self.degree`,
  but should use `self.indegree` or `self.outdegree` respectively
- renamed `degrees` -> `degree`
- went unnoticed because SmallTestNetwork is undirected
  and pylint flag `unused-argument` was globally disabled
- and a remaining case of `unused-variable`
- rename `degrees` -> `degree`
- `unsubscriptable object`: useless suppression
- `arguments-out-of-order`: false positive, disabled locally
- `keyword-arg-before-vararg`: disabled locally, as respective
  methods follow the igraph methods they are wrapping.
  (doesn't mean igraph syntax isn't problematic though)
Copy link

codecov bot commented May 21, 2024

Codecov Report

Attention: Patch coverage is 71.69811% with 15 lines in your changes missing coverage. Please review.

Project coverage is 68.63%. Comparing base (3079fda) to head (ba83d3e).

Files Patch % Lines
src/pyunicorn/core/network.py 68.57% 11 Missing ⚠️
src/pyunicorn/core/geo_network.py 75.00% 1 Missing ⚠️
src/pyunicorn/core/netcdf_dictionary.py 0.00% 1 Missing ⚠️
...pyunicorn/funcnet/coupling_analysis_pure_python.py 80.00% 1 Missing ⚠️
src/pyunicorn/timeseries/surrogates.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
+ Coverage   66.94%   68.63%   +1.68%     
==========================================
  Files          44       44              
  Lines        6151     6138      -13     
==========================================
+ Hits         4118     4213      +95     
+ Misses       2033     1925     -108     

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

@fkuehlein fkuehlein added the maintenance something should be improved or is outdated label May 21, 2024
- `GrowPreferentially_old()`, `GrowPreferentially()`
  and `GrowWeights()`
- minor linting in `GrowPreferentially_old()`
- to conform with `scipy>=1.14`, namely
  substitute deprecated shorthand `*_matrix.A`
  with `*_matrix.toarray()`
- skip `test_GrowPreferentially_old()`,
  because it will curiously cause builds to time out.
- skip `test_GrowPreferentially()` with `nsi=False`,
  as it will erraneously run into and endless while loop
  causing builds to time out.
- add FIXMEs at potentially endless while loops
- reduce n_nodes on remaining `Grow*` tests
@fkuehlein fkuehlein merged commit d63cbb7 into master Jun 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance something should be improved or is outdated
Projects
None yet
1 participant