fpgmaas / cookiecutter-poetry

A modern cookiecutter template for Python projects that use Poetry for dependency management
https://fpgmaas.github.io/cookiecutter-poetry/
MIT License
359 stars 55 forks source link

Bugfixes for EOF, whitespace, and prettier checks. #120

Closed pboulos closed 2 weeks ago

pboulos commented 1 month ago

PR Checklist

Description of changes

When running CI, we observe the following errors due to linting.

πŸš€ Checking Poetry lock file consistency with 'pyproject.toml': Running poetry lock --check
All set!
πŸš€ Linting code: Running pre-commit
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier:prettier@3.0.3.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-prettier.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
check for case conflicts.................................................Passed
check for merge conflicts................................................Passed
check toml...............................................................Passed
check yaml...............................................................Passed
fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing LICENSE

trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing .github/workflows/on-release-main.yml

ruff.....................................................................Passed
ruff-format..............................................................Passed
prettier.................................................................Failed
- hook id: prettier
- files were modified by this hook

README.md
.github/actions/setup-poetry-env/action.yml
.github/workflows/main.yml
.github/workflows/on-release-main.yml
mkdocs.yml

make: *** [Makefile:13: check] Error 1
Error: Process completed with exit code 2.

This PR applies some formatting changes across the repo such that these tests are now passed in the initial commit. This appears to be related to https://github.com/fpgmaas/cookiecutter-poetry/issues/96 and https://github.com/fpgmaas/cookiecutter-poetry/pull/97.

Changes include:

These changes should not change any user behaviour apart from allowing the CI to pass first time without any user modification.

pboulos commented 3 weeks ago

@fpgmaas I wanted to ask if you could take a look at this. They've been errors that I've been encountering while using this template that I've needed to manually fix before using it every time; I thought it would be useful to make the PR for others to benefit from.

fpgmaas commented 3 weeks ago

@fpgmaas I wanted to ask if you could take a look at this. They've been errors that I've been encountering while using this template that I've needed to manually fix before using it every time; I thought it would be useful to make the PR for others to benefit from.

hanks for the contribution, and sorry for the late response! I was on holiday the past three weeks. I left one small comment; I'm happy to merge the PR after that is processed.