@@ -15,63 +15,6 @@ Straight forward to use!
1515
1616** Kind of...**
1717
18- While this is the way I usually start my Python project setup this is far from
19- the only way to do things. I invite you to use my template. I also challenge
20- you to craft the structure that works both for your project and you, creating
21- your own template. The amount of learning in doing so is well worth the effort.
22-
23- ---
24-
25- ### Quick setup:
26-
27- Clone the repo or click the "Use this template" button in GitHub
28-
29- If you clone the repo instead of using it as a template; be sure to delete the
30- ` .git ` folder and run ` git init ` before making any changes.
31-
32- Run the ` init_template.py ` script found in the root of the repo. You will be
33- prompted for details and the steps listed below completed for you. You may then
34- delete the ` init_template.py ` file, commit all changes, and dev on.
35-
36- ---
37-
38- ### What to change for manual setup:
39-
40- - Remove the following place-holder files:
41- - ` src/module_name/sample_data `
42- - ` src/module_name/sample.py `
43- - ` tests/test_sample.py `
44- - Raname ` src/module_name ` to the desired project name
45- - Update ` pyproject.toml ` :
46- - ` [project] ` section:
47- - ` name ` , ` version ` , ` description ` , ` authors `
48- - ` [project.urls] `
49- - Update github homepage values
50- - ` [tool.coverage.run] `
51- - ` source_pkgs ` : Update to reflect new ` module_name ` and any additional
52- modules
53- - Update ` README.md ` - Badges:
54- - Update owner and repo name of urls for ` pre-commit.ci ` badge
55- - Update owner and repo name of urls for ` python tests ` badge
56- - Update ` README.md ` - Content:
57- - Replace title and this setup information
58- - Under ** Local developer installation**
59- - Replace ` {{ORG_NAME}} ` with github name
60- - Replace ` {{REPO_NAME}} ` with repo name
61- - Project dependences:
62- - Dependency files are located in ` requirements/ `
63- - Edit the ` requirents*.in ` file with unpinned dependencies
64- - Run ` make update-dev ` or ` pip-compile requirements/[requirement*.in] ` to update
65- - Run ` make install-dev ` or `python -m pip install --update -r requirements/[ requirement* .txt]
66-
67- ### Why ` src/ ` structure:
68-
69- The benefit I get from this project structure comes from testing. The ` src/ `
70- structure forces us to test on the installed version of the modules within
71- ` site-packages/ ` and not our local code. Even though these files are symlinked
72- in most cases with the dev install, the calls and import references are the
73- same. This ensures we are testing on what will be setup in the not-my machine.
74-
7518---
7619
7720# Local developer installation
@@ -128,13 +71,7 @@ call the version of the interpreter used to create the `venv`
12871Install editable library and development requirements:
12972
13073``` console
131- # Update pip and tools
132- $ python -m pip install --upgrade pip pip-tools
133-
134- # Install editable version of library
135- $ python -m pip install --editable .
136- $ python -m pip install -r requirements/requirements-dev.txt
137- $ python -m pip install -r requirements/requirements-test.txt
74+ $ python -m pip install --editable .[dev,test]
13875```
13976
14077Install pre-commit [ (see below for details)] ( #pre-commit ) :
@@ -208,7 +145,6 @@ Makefile.
208145
209146| PHONY | Description |
210147| -------------- | ------------------------------------------------------------------------------------------ |
211- | ` init ` | Update pip to newest version |
212148| ` install ` | install the project |
213149| ` install-dev ` | install development/test requirements and project as editable install |
214150| ` upgrade-dev ` | update all dependencies, regenerate requirements.txt (disabled by default) |
0 commit comments