Skip to content

How to sync / apply script updates in pyproject.toml ? #2

@floschne

Description

@floschne
  • Date you used The Hatchlor: 07 March 2024
  • Cookiecutter version used, if any: N/A
  • Python version, if any: 3.10
  • Operating System: UNIX

Hi @FlorianWilhelm and first of all thanks for this amazing project template!

Maybe I missed it in the docs but I'm facing issues when I update script entries in pyproject.toml
E.g. let's say I have the following entry and a fresh hatch project (i.e., never ran hatch run ... or hatch env create)

[project.scripts]
fibonacci = "autorag.fibonacci:app"

When I run hatch env create && hatch run fibonacci 10 it correctly executes the script.

Now I want to change ,e.g., the name of the script:

[project.scripts]
print_fibonacci = "autorag.fibonacci:app"

When I run hatch env create && hatch run print_fibonacci 10 it prints /bin/sh: print_fibonacci: command not found. Also, when I look into the venv bin dir, I can see the old fibonacci but not the new print_fibonacci.

The only way I found to update and sync the env is to completely remove my venv dir and create the env from scratch.

Is this behaviour on purpose or did I miss something here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions