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

linting checks can be done via pre-commit #263

Closed
prjemian opened this issue Oct 6, 2023 · 6 comments · Fixed by #272
Closed

linting checks can be done via pre-commit #263

prjemian opened this issue Oct 6, 2023 · 6 comments · Fixed by #272
Labels
Milestone

Comments

@prjemian
Copy link
Contributor

prjemian commented Oct 6, 2023

          Maybe all these checks can be done via pre-commit as we started doing for other projects?

https://github.com/NSLS-II/scientific-python-cookiecutter/blob/main/%7B%7B%20cookiecutter.repo_name%20%7D%7D/.github/workflows/pre-commit.yml

Originally posted by @mrakitin in #261 (comment)

@prjemian prjemian added this to the v1.1 milestone Oct 6, 2023
@prjemian prjemian added the task label Oct 6, 2023
@prjemian prjemian modified the milestones: v1.2, v1.1 Oct 10, 2023
@prjemian
Copy link
Contributor Author

Note from pre-commit/action:

this action is in maintenance-only mode and will not be accepting new features.

generally you want to use pre-commit.ci which is faster and has more features.

prjemian added a commit that referenced this issue Oct 17, 2023
prjemian added a commit that referenced this issue Oct 17, 2023
@prjemian
Copy link
Contributor Author

... proceeding anyway ...

@prjemian
Copy link
Contributor Author

Copy .pre-commit-config.yaml file from tiled. Since unit tests have been passing before this branch, comment out parts so that tests pass now as well.

prjemian added a commit that referenced this issue Oct 17, 2023
@prjemian
Copy link
Contributor Author

It is known that versioneer.py is a problem file for style and lint tests. Since this is slated for removal in #267, let's not get too excited about it here.

prjemian added a commit that referenced this issue Oct 17, 2023
prjemian added a commit that referenced this issue Oct 17, 2023
prjemian added a commit that referenced this issue Oct 17, 2023
@prjemian
Copy link
Contributor Author

prjemian commented Oct 17, 2023

Notes about commented tests:

test file(s) that fail the test
end-of-file-fixer docs/source/engine.rst, docs/source/_static/issue-155.ipynb, docs/source/util.rst, pyproject.toml, github_deploy_key_bluesky_bluesky_github_io.enc, docs/source/context.rst, docs/source/calc.rst
trailing-whitespace docs/source/engine.rst, docs/source/examples/notebooks/resources/LNO_LAO_s14.dat, docs/Makefile, docs/source/util.rst, docs/source/context.rst, docs/source/calc.rst, docs/source/sample.rst
flake8 docs/source/conf.py
isort versioneer.py, setup.py, hkl/util.py, hkl/user.py, hkl/tests/test_util.py, hkl/tests/test_user.py, hkl/tests/test_tardis.py, hkl/tests/test_save_restore_UB.py, ... (isort not used on this package ... yet)
black versioneer.py, hkl/_version.py, .pre-commit-config.yaml

prjemian added a commit that referenced this issue Oct 17, 2023
@mrakitin
Copy link
Member

I tend to ignore some files/dirs for pre-commit, something like versioneer.py and docs/source/conf.py can be safely ignored by the tool.
Some details are discussed here: https://stackoverflow.com/questions/61032281/exclude-some-files-on-running-black-using-pre-commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants