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

[MNT] pre-commit failing on main #1695

Closed
ewth opened this issue Oct 9, 2024 · 1 comment · Fixed by #1696
Closed

[MNT] pre-commit failing on main #1695

ewth opened this issue Oct 9, 2024 · 1 comment · Fixed by #1696
Labels
bug Something isn't working

Comments

@ewth
Copy link
Contributor

ewth commented Oct 9, 2024

Describe the bug

pre-commit is failing on main, rendering it effectively unusable for other branches created from main.

To Reproduce

$ git checkout main
Already on 'main'
Your branch is up to date with 'origin/main'.
$ git pull
Already up to date.
$ git reset --hard
HEAD is now at 53a1c41 [MNT] Relax `numpy` bound to `numpy<3.0.0` (#1624)
$ pre-commit run --all-files

Expected behavior

All pre-commit tests pass.

Additional context

pre-commit output:

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

examples/ar.py:88:56: E226 missing whitespace around arithmetic operator
print(f"Number of parameters in network: {deepar.size()/1e3:.1f}k")
                                                       ^
examples/nbeats.py:68:53: E226 missing whitespace around arithmetic operator
print(f"Number of parameters in network: {net.size()/1e3:.1f}k")
                                                    ^
examples/stallion.py:122:53: E226 missing whitespace around arithmetic operator
print(f"Number of parameters in network: {tft.size()/1e3:.1f}k")
                                                    ^
pytorch_forecasting/data/timeseries.py:106:28: E226 missing whitespace around arithmetic operator
                f"{na} ({na/tensor.size(0):.2%}) of {name} "
                           ^

isort....................................................................Passed
black....................................................................Passed
nbqa-black...............................................................Passed
nbqa-isort...............................................................Passed
nbqa-flake8..............................................................Failed
- hook id: nbqa-flake8
- exit code: 1

docs/source/tutorials/stallion.ipynb:cell_7:25:53: E226 missing whitespace around arithmetic operator
print(f"Number of parameters in network: {tft.size()/1e3:.1f}k")
                                                    ^
docs/source/tutorials/stallion.ipynb:cell_9:29:53: E226 missing whitespace around arithmetic operator
print(f"Number of parameters in network: {tft.size()/1e3:.1f}k")
                                                    ^

nbqa-check-ast...........................................................Passed

Versions
N/A

@ewth ewth added the bug Something isn't working label Oct 9, 2024
@github-project-automation github-project-automation bot moved this to Needs triage & validation in Bugfixing - pytorch-forecasting Oct 9, 2024
ewth added a commit to ewth/pytorch-forecasting that referenced this issue Oct 9, 2024
Cleaned up the offending items so `pre-commit` passes on main.

See sktime#1695
@ewth
Copy link
Contributor Author

ewth commented Oct 9, 2024

As this is related to development and not a bug within pytorch-forecasting per-se, I'm not sure if [BUG] is the correct type. I issued a PR to fix it which I changed to [MNT]. Anyone more familiar with the standards used here please feel free to adjust as necessary -- apologies if I'm creating additional work for anyone!

@ewth ewth changed the title [BUG] pre-commit failing on main [MNT] pre-commit failing on main Oct 9, 2024
@github-project-automation github-project-automation bot moved this from Needs triage & validation to Fixed/resolved in Bugfixing - pytorch-forecasting Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Fixed/resolved
Development

Successfully merging a pull request may close this issue.

1 participant