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

CI cleanup and general maintenance #121

Merged
merged 8 commits into from Feb 24, 2023

Conversation

maxfischer2781
Copy link
Member

@maxfischer2781 maxfischer2781 commented Feb 17, 2023

This PR makes adjustment for general maintenance and to keep CI going. Major changes include:

  • all Static Checks passing
  • switch to PEP 526 annotations (i.e. use a: SomeType = ... instead of a = ... # type: SomeType)
  • run CI regularly
    • The cron 0 10 * * 3 is "10:00 every Wednesday"

There are no outwards facing functional changes.

I've added comments on this PR where fixes aren't obvious, mostly relating to specific flake8 checks.

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Base: 92.73% // Head: 92.73% // No change to project coverage 👍

Coverage data is based on head (2bea92b) compared to base (9eed470).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #121   +/-   ##
=======================================
  Coverage   92.73%   92.73%           
=======================================
  Files          34       34           
  Lines        1143     1143           
  Branches      166      166           
=======================================
  Hits         1060     1060           
  Misses         60       60           
  Partials       23       23           
Impacted Files Coverage Δ
src/cobald/controller/relative_supply.py 86.36% <ø> (ø)
src/cobald/daemon/config/mapping.py 97.00% <ø> (ø)
src/cobald/daemon/runners/meta_runner.py 92.50% <ø> (ø)
src/cobald/interfaces/_proxy.py 88.00% <ø> (ø)
src/cobald/controller/stepwise.py 76.66% <100.00%> (ø)
src/cobald/daemon/runners/asyncio_runner.py 97.82% <100.00%> (ø)
src/cobald/daemon/runners/base_runner.py 95.55% <100.00%> (ø)
src/cobald/daemon/runners/service.py 90.90% <100.00%> (ø)
src/cobald/decorator/logger.py 100.00% <100.00%> (ø)
src/cobald/interfaces/_composite.py 100.00% <100.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@maxfischer2781 maxfischer2781 marked this pull request as ready for review February 17, 2023 15:34
@@ -5,19 +5,15 @@


class TestRelativeSupplyController(object):
def test_low_scale(self):
def test_parameter_verification(self):
Copy link
Member Author

Choose a reason for hiding this comment

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

I combined these three test cases into one as before reading all of them it wasn't clear to me what each one tested. The new name hopefully makes this clearer.

@@ -1,6 +1,6 @@
[flake8]
statistics = True
max-line-length = 80
ignore = E501, B008, B011, W503
ignore = E501, B008, B011, W503, B905
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -34,7 +34,8 @@ def runners(self):
DeprecationWarning(
"Accessing 'MetaRunner.runners' directly is deprecated. "
"Use register_payload or run_payload with the correct flavour instead."
)
),
stacklevel=2,
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed according to flake8-bugbear:

B028: No explicit stacklevel keyword argument found. The warn method from the warnings module uses a stacklevel of 1 by default. This will only show a stack trace for the line on which the warn method is called. It is therefore recommended to use a stacklevel of 2 or greater to provide more information to the user.

@maxfischer2781 maxfischer2781 requested review from a team, giffels and rfvc and removed request for a team February 17, 2023 15:43
Copy link
Member

@giffels giffels left a comment

Choose a reason for hiding this comment

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

Could you take a look and my inline comment. Otherwise it LGTM!

src/cobald/decorator/logger.py Outdated Show resolved Hide resolved
Copy link
Member

@giffels giffels left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution.

@maxfischer2781 maxfischer2781 merged commit 9fe2e33 into master Feb 24, 2023
@maxfischer2781 maxfischer2781 mentioned this pull request Jul 26, 2023
@maxfischer2781 maxfischer2781 deleted the maintenance/checks_20230217 branch January 17, 2024 15:01
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.

None yet

3 participants