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 code-style rules #215

Merged
merged 24 commits into from
Apr 5, 2024
Merged

Update code-style rules #215

merged 24 commits into from
Apr 5, 2024

Conversation

ghiggi
Copy link
Collaborator

@ghiggi ghiggi commented Apr 2, 2024

Prework

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and communicate accordingly:

The PR fulfills these requirements:

  • It's submitted to the branch named as follow :
    • Add a reader: reader-<institute>-<campaign>
    • Fix a bug: bugfix-<some_key>-<word>
    • Improve the doc: doc-<some_key>-<word>
    • Add a new feature: feature-<some_key>-<word>
    • Refactor some code: refactor-<some_key>-<word>
    • Optimize some code: optimize-<some_key>-<word>
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • Don't forget to link PR to issue if you are solving one.
  • All tests are passing.
  • New/updated tests are included

Summary

Add new code-style rules to improve code quality.

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 93.54839% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 96.67%. Comparing base (2a15749) to head (a4adb18).

Files Patch % Lines
disdrodb/api/io.py 46.15% 7 Missing ⚠️
disdrodb/api/path.py 50.00% 1 Missing ⚠️
disdrodb/l0/l0_processing.py 91.66% 1 Missing ⚠️
disdrodb/l0/l0a_processing.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
+ Coverage   96.59%   96.67%   +0.08%     
==========================================
  Files          57       57              
  Lines        3960     3906      -54     
==========================================
- Hits         3825     3776      -49     
+ Misses        135      130       -5     

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

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: OK

View detailed results in CodeScene

@coveralls
Copy link
Collaborator

coveralls commented Apr 2, 2024

Coverage Status

coverage: 96.4% (+0.08%) from 96.323%
when pulling a4adb18 on refactor-code-style
into 2a15749 on main.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 10 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

disdrodb/l0/routines.py Show resolved Hide resolved
disdrodb/l0/routines.py Show resolved Hide resolved
disdrodb/l0/scripts/disdrodb_run_l0.py Show resolved Hide resolved
disdrodb/l0/scripts/disdrodb_run_l0b.py Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 13 findings(s) ✅
  • Affected Hotspots: 3 files(s) 🔥

View detailed results in CodeScene

disdrodb/metadata/checks.py Show resolved Hide resolved
disdrodb/metadata/checks.py Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 14 findings(s) ✅
  • Affected Hotspots: 3 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 14 findings(s) ✅
  • Affected Hotspots: 3 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 14 findings(s) ✅
  • Affected Hotspots: 3 files(s) 🔥

View detailed results in CodeScene

disdrodb/l0/l0_processing.py Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 14 findings(s) ✅
  • Affected Hotspots: 3 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 18 findings(s) ✅
  • Affected Hotspots: 6 files(s) 🔥

View detailed results in CodeScene

disdrodb/l0/l0_processing.py Show resolved Hide resolved
disdrodb/l0/l0_processing.py Show resolved Hide resolved
disdrodb/tests/test_l0/test_cmd_processing.py Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 18 findings(s) ✅
  • Affected Hotspots: 6 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 20 findings(s) ✅
  • Affected Hotspots: 6 files(s) 🔥

View detailed results in CodeScene

disdrodb/api/create_directories.py Show resolved Hide resolved
disdrodb/api/create_directories.py Show resolved Hide resolved
disdrodb/l0/l0_processing.py Show resolved Hide resolved
disdrodb/l0/l0_processing.py Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 20 findings(s) ✅
  • Affected Hotspots: 6 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 20 findings(s) ✅
  • Affected Hotspots: 6 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 4 findings(s) 🚩
  • Improving Code Health: 20 findings(s) ✅
  • Affected Hotspots: 6 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 37 findings(s) 🚩
  • Improving Code Health: 19 findings(s) ✅
  • Affected Hotspots: 5 files(s) 🔥

View detailed results in CodeScene

disdrodb/l0/l0_processing.py Show resolved Hide resolved
disdrodb/l0/readers/BRAZIL/CHUVA_LPM.py Show resolved Hide resolved
disdrodb/l0/readers/BRAZIL/CHUVA_OTT.py Show resolved Hide resolved
disdrodb/l0/readers/NCAR/VORTEX_SE_2016_P1.py Show resolved Hide resolved
disdrodb/l0/readers/NETHERLANDS/DELFT.py Show resolved Hide resolved
disdrodb/l0/readers/SPAIN/SBEGUERIA.py Show resolved Hide resolved
disdrodb/l0/readers/ARM/ARM_LPM.py Show resolved Hide resolved
Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 37 findings(s) 🚩
  • Improving Code Health: 19 findings(s) ✅
  • Affected Hotspots: 5 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 37 findings(s) 🚩
  • Improving Code Health: 19 findings(s) ✅
  • Affected Hotspots: 3 files(s) 🔥

View detailed results in CodeScene

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

  • Declining Code Health: 36 findings(s) 🚩
  • Improving Code Health: 18 findings(s) ✅
  • Affected Hotspots: 3 files(s) 🔥

View detailed results in CodeScene



def available_stations(
product,
data_sources=None,
campaign_names=None,
station_names=None,

Choose a reason for hiding this comment

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

ℹ Getting worse: Excess Number of Function Arguments
available_stations increases from 5 to 6 arguments, threshold = 4

@ghiggi ghiggi merged commit c712cb2 into main Apr 5, 2024
27 of 29 checks passed
@ghiggi ghiggi deleted the refactor-code-style branch April 5, 2024 12:00
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.

2 participants