You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
moving all the subfolders within {{ cookiecutter.repo_name }}/src into something like{{ cookiecutter.repo_name }}/src/{{ cookiecutter.repo_name.lower().replace(' ', '_').replace('-', '_' ) }}
Upvoting as this causes a bit of work every time I use the repo template.
Following the example in the python docs, I find the hatchling build with a pyproject.toml setup (no setup.* files) to be the most straightforward. Also to alter the src directory to src/package_name as in the docs example.
It might be useful to make the
src
package installable by adding asetup.py
file. Adding this could make it easier to publish packages on PyPI, and may also resolve some of the path issues that can occur when using Jupyter notebooks. Note you may need theautoreload
Jupyter extension to get all the latest local changes for a locally installed package.Some things to consider:
{{ cookiecutter.repo_name }}/src
into something like{{ cookiecutter.repo_name }}/src/{{ cookiecutter.repo_name.lower().replace(' ', '_').replace('-', '_' ) }}
{{ cookiecutter.repo_name }}/setup.py
; for examples see ONS Best Practice and Impact, or navdeep-G's one-e .
to{{ cookiecutter.repo_name }}/requirements.txt
{{ cookiecutter.repo_name }}/src
The text was updated successfully, but these errors were encountered: