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: update harness to eliminate I2041 flake8 errors #8960

Merged
merged 4 commits into from
Mar 28, 2024

Conversation

MikhailKardash
Copy link
Contributor

@MikhailKardash MikhailKardash commented Mar 6, 2024

Description

Update a lot of imports and variables to solve I2041 flake8 issues.

Test Plan

No testing required

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

MD-13

@cla-bot cla-bot bot added the cla-signed label Mar 6, 2024
Copy link

netlify bot commented Mar 6, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit dd6a59c
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6605d2e4b075a5000804ab13
😎 Deploy Preview https://deploy-preview-8960--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

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

Project coverage is 47.07%. Comparing base (2c7d2a1) to head (dd6a59c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8960      +/-   ##
==========================================
- Coverage   47.12%   47.07%   -0.05%     
==========================================
  Files        1153     1154       +1     
  Lines      142358   142272      -86     
  Branches     2421     2421              
==========================================
- Hits        67080    66979     -101     
- Misses      75088    75103      +15     
  Partials      190      190              
Flag Coverage Δ
backend 42.92% <ø> (-0.01%) ⬇️
harness 64.12% <80.75%> (-0.12%) ⬇️
web 38.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
harness/determined/cli/__init__.py 100.00% <100.00%> (ø)
harness/determined/cli/_declarative_argparse.py 97.24% <100.00%> (ø)
harness/determined/cli/_util.py 68.75% <100.00%> (+0.66%) ⬆️
harness/determined/cli/agent.py 24.50% <ø> (-0.74%) ⬇️
harness/determined/cli/checkpoint.py 21.42% <100.00%> (-1.11%) ⬇️
harness/determined/cli/command.py 42.85% <100.00%> (-2.60%) ⬇️
harness/determined/cli/job.py 20.83% <100.00%> (-2.14%) ⬇️
harness/determined/cli/master.py 25.53% <100.00%> (-3.04%) ⬇️
harness/determined/cli/oauth.py 37.50% <ø> (-2.50%) ⬇️
harness/determined/cli/resource_pool.py 31.25% <100.00%> (-2.09%) ⬇️
... and 103 more

... and 1 file with indirect coverage changes

@MikhailKardash MikhailKardash force-pushed the flake8_namespace_updates branch 5 times, most recently from 794a538 to d2d7755 Compare March 19, 2024 20:44
@MikhailKardash MikhailKardash marked this pull request as ready for review March 20, 2024 17:23
@MikhailKardash MikhailKardash requested a review from a team as a code owner March 20, 2024 17:23
@@ -5,27 +5,30 @@
import termcolor

from determined import cli

# avoid circular import
from determined.cli import _declarative_argparse as detparse
Copy link
Contributor

Choose a reason for hiding this comment

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

if I were making this PR I'd probably do as cli here so the usage looks the same as "standard" one, and then Ryan will look at it and say it's an awful idea and I'd have to change it to something like this. anyhow, disregard this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's a bit awkward. Another solution would be to refactor parts of this file into _declarative_argparse.py.

harness/determined/cli/proxy.py Outdated Show resolved Hide resolved
harness/determined/lightning/experimental.py Outdated Show resolved Hide resolved
harness/determined/profiler.py Outdated Show resolved Hide resolved
harness/tests/experiment/keras/test_keras_data.py Outdated Show resolved Hide resolved
@MikhailKardash MikhailKardash force-pushed the flake8_namespace_updates branch 2 times, most recently from b2a9771 to 0047fab Compare March 26, 2024 21:13
@MikhailKardash MikhailKardash changed the title chore: Flake8 namespace updates style: update harness to eliminate I2041 flake8 errors Mar 26, 2024
@MikhailKardash MikhailKardash force-pushed the flake8_namespace_updates branch 2 times, most recently from 435de3a to ad2e01d Compare March 27, 2024 22:45
Copy link
Contributor

@azhou-determined azhou-determined left a comment

Choose a reason for hiding this comment

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

👏 this is great

@MikhailKardash MikhailKardash force-pushed the flake8_namespace_updates branch 2 times, most recently from 62d8ad5 to 6301258 Compare March 28, 2024 16:48
@MikhailKardash MikhailKardash merged commit 8217508 into main Mar 28, 2024
69 of 81 checks passed
@MikhailKardash MikhailKardash deleted the flake8_namespace_updates branch March 28, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants