westerveltco / django-twc-package

A Django package template for The Westervelt Company
MIT License
4 stars 1 forks source link

Post generation tasks errors #135

Open joshuadavidthomas opened 1 week ago

joshuadavidthomas commented 1 week ago

Trying to update django-simple-nav to the newest release, I get these errors:

uv run --with pre-commit-uv pre-commit run --all-files
   Built django-simple-nav @ file:///var/home/josh/projects/django-simple-nav
Uninstalled 1 package in 0.51ms
Installed 1 package in 0.82ms
Installed 11 packages in 7ms
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check toml...............................................................Passed
check yaml...............................................................Passed
django-upgrade...........................................................Passed
ruff.....................................................................Passed
ruff-format.............................................................Skipped
blacken-docs.............................................................Passed
prettier.............................................(no files to check)Skipped
djLint formatting for Django.............................................Passed
djLint linting for Django................................................Passed
rustywind Tailwind CSS class linter......................................Passed
Pretty format TOML.......................................................Passed
Validate pyproject.toml..................................................Passed
just fmt
Wrote justfile to `/var/home/josh/projects/django-simple-nav/Justfile`
Wrote justfile to `/var/home/josh/projects/django-simple-nav/.just/copier.just`
Wrote justfile to `/var/home/josh/projects/django-simple-nav/.just/documentation.just`
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check toml...............................................................Passed
check yaml...............................................................Passed
django-upgrade...........................................................Passed
ruff.....................................................................Passed
ruff-format..............................................................Failed
- hook id: ruff-format
- files were modified by this hook

3 files reformatted, 23 files left unchanged

blacken-docs.............................................................Passed
prettier.............................................(no files to check)Skipped
djLint formatting for Django.............................................Passed
djLint linting for Django................................................Passed
rustywind Tailwind CSS class linter......................................Passed
Pretty format TOML.......................................................Passed
Validate pyproject.toml..................................................Passed
Pre-commit run on all files.
uv run --with pre-commit-uv pre-commit run --all-files
warning: `VIRTUAL_ENV=/var/home/josh/projects/django-simple-nav/.venv` does not match the project environment path `.venv` and will be ignored
Using CPython 3.13.0
Creating virtual environment at: .venv
   Built django-simple-nav @ file:///tmp/copier.main.new_copy.pk7e5ct5
░░░░░░░░░░░░░░░░░░░░ [0/36] Installing wheels...                                                                                        warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
         If the cache and target directories are on different filesystems, hardlinking may not be supported.
         If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 36 packages in 172ms
An error has occurred: FatalError: git failed. Is it installed, and are you in a Git repository directory?
Check the log at /var/home/josh/.cache/pre-commit/pre-commit.log
error: Recipe `lint` failed on line 29 with exit code 1
Traceback (most recent call last):
  File "/var/home/josh/projects/django-simple-nav/.venv/bin/copier", line 8, in <module>
    sys.exit(copier_app_run())
             ^^^^^^^^^^^^^^^^
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/plumbum/cli/application.py", line 640, in run
    inst, retcode = subapp.run(argv, exit=False)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/plumbum/cli/application.py", line 635, in run
    retcode = inst.main(*tailargs)
              ^^^^^^^^^^^^^^^^^^^^
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/cli.py", line 425, in main
    return _handle_exceptions(inner)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/cli.py", line 70, in _handle_exceptions
    method()
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/cli.py", line 415, in inner
    with self._worker(
         ^^^^^^^^^^^^^
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/main.py", line 228, in __exit__
    raise value
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/cli.py", line 423, in inner
    worker.run_update()
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/main.py", line 899, in run_update
    self._apply_update()
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/main.py", line 966, in _apply_update
    with replace(
         ^^^^^^^^
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/main.py", line 228, in __exit__
    raise value
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/main.py", line 974, in _apply_update
    new_worker.run_copy()
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/main.py", line 832, in run_copy
    self._execute_tasks(self.template.tasks)
  File "/var/home/josh/projects/django-simple-nav/.venv/lib/python3.12/site-packages/copier/main.py", line 323, in _execute_tasks
    subprocess.run(task_cmd, shell=use_shell, check=True, env=local.env)
  File "/var/home/josh/.local/share/uv/python/cpython-3.12.6-linux-x86_64-gnu/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'SKIP=ruff-format just lint' returned non-zero exit status 1.
error: Recipe `update` failed on line 31 with exit code 1
error: Recipe `update-all` failed on line 36 with exit code 1
joshuadavidthomas commented 1 week ago

It looks like the tasks are running twice? I mean, twice more than the two times they're already supposed to be running. You can see at the top that the two runs complete correctly, but then it tries again. That's when it errors.