@@ -99,7 +99,7 @@ folder with that name and generates everything inside it.
9999Copier asks a series of questions to configure your project. Each question
100100has a default value -- press Enter to accept it, or type your own answer.
101101```
102- Project name (e.g. inflation-analysis )
102+ Project name (e.g. inflation-db )
103103> inflation-analysis
104104
105105Python package name
@@ -112,10 +112,10 @@ Author email
112112> kyle.fe0212@gmail.com
113113
114114Python version
115- > 3.11
115+ > 3.13
116116
117117Short project description
118- > Modelling exchange rate pass-through to core inflation
118+ > Analysis of exchange rate pass-through to core inflation
119119
120120License (MIT / Apache-2.0 / Proprietary)
121121> MIT
@@ -146,7 +146,7 @@ Two of the prompts can be confusing at first:
146146the folder name, ` pyproject.toml ` , ` README.md ` , and documentation. It
147147typically uses hyphens as separators.
148148```
149- Example: inflation-db
149+ Example: inflation-analysis
150150```
151151
152152** Python package name** is the importable name of your package in Python
@@ -166,25 +166,150 @@ uses underscores (how Python refers to it).
166166
167167---
168168
169- ### Step 4 -- Set up your new project
169+ ### Step 4 -- Set up your virtual environment and install dependencies
170170
171- Navigate into your newly generated project folder and run the setup steps :
171+ After Copier generates your project, navigate into it and run:
172172``` bash
173173cd your-project-name
174-
175- # Install all dependencies into a local .venv folder
176174poetry install --with dev
175+ ```
176+
177+ This does three things:
178+
179+ 1 . Creates a ` .venv/ ` folder inside your project -- this is your virtual
180+ environment, an isolated Python installation specific to this project.
181+ Every project gets its own ` .venv/ ` so packages never conflict across
182+ projects.
183+
184+ 2 . Installs all packages listed in ` pyproject.toml ` into ` .venv/ ` .
185+
186+ 3 . Generates ` poetry.lock ` -- a file that pins the exact version of every
187+ package installed, including transitive dependencies. This ensures anyone
188+ else who clones the project gets identical installs. This file should be
189+ committed to Git.
190+
191+ After running ` poetry install ` , your project folder will contain:
192+ ```
193+ your-project-name/
194+ ├── .venv/ -- virtual environment (gitignored, never committed)
195+ ├── poetry.lock -- lockfile (committed to Git)
196+ ```
197+
198+ VS Code will detect ` .venv/ ` automatically and use it as the Python
199+ interpreter for the project.
200+
201+ ---
202+
203+ ## Default packages
204+
205+ Every project generated from this template includes a baseline set of
206+ packages that cover the most common development needs:
207+
208+ ### Data manipulation and analysis
209+ | Package | Purpose |
210+ | ---| ---|
211+ | numpy | Numerical computing, arrays, linear algebra |
212+ | pandas | DataFrames, tabular data manipulation |
213+ | scipy | Scientific computing, statistics, optimisation |
214+ | statsmodels | Statistical models and hypothesis testing |
215+ | scikit-learn | Machine learning models and utilities |
216+
217+ ### Visualisation
218+ | Package | Purpose |
219+ | ---| ---|
220+ | matplotlib | Core plotting library |
221+ | matplotlib-inline | Inline plot rendering in notebooks |
222+ | seaborn | Statistical visualisation built on matplotlib |
223+ | plotly | Interactive charts and dashboards |
224+
225+ ### Notebooks and kernels
226+ | Package | Purpose |
227+ | ---| ---|
228+ | ipykernel | Jupyter kernel support |
229+ | jupyter | Jupyter notebook environment |
230+ | jupyterlab | Modern Jupyter interface |
231+
232+ ### Spreadsheet and file handling
233+ | Package | Purpose |
234+ | ---| ---|
235+ | openpyxl | Read and write Excel files |
236+ | et-xmlfile | XML file handling (openpyxl dependency) |
237+ | fonttools | Font file handling |
238+ | packaging | Version and package utilities |
239+ | pyarrow | Apache Arrow, Parquet file support |
240+
241+ ### Utilities
242+ | Package | Purpose |
243+ | ---| ---|
244+ | loguru | Simple, powerful logging |
245+ | tqdm | Progress bars for loops |
246+ | rich | Rich text and formatting in the terminal |
247+ | python-dateutil | Extended date and time utilities |
248+
249+ ### Conditional packages (added based on your answers)
250+ | Package | Condition |
251+ | ---| ---|
252+ | duckdb | Added when ` use_duckdb = yes ` |
253+ | python-dotenv | Added when ` use_dotenv = yes ` |
254+ | nbstripout | Added when ` use_notebooks = yes ` |
255+ | mkdocs-material, mkdocstrings | Added when ` use_docs = yes ` |
256+
257+ ---
258+
259+ ## Adding packages to your project
260+
261+ The default packages cover common needs, but every project will require
262+ additional dependencies specific to what it does. Use Poetry to add them:
263+ ``` bash
264+ # Add a core dependency (used by the project itself)
265+ poetry add requests
266+ poetry add httpx
267+ poetry add sqlalchemy
268+
269+ # Add a dev-only dependency (only used during development)
270+ poetry add pytest-mock --group dev
271+ poetry add ipdb --group dev
272+
273+ # Add a docs dependency
274+ poetry add mkdocs-awesome-pages-plugin --group docs
275+ ```
276+
277+ When you run ` poetry add ` , Poetry automatically:
278+ - Adds the package to ` pyproject.toml `
279+ - Resolves a compatible version
280+ - Installs it into ` .venv/ `
281+ - Updates ` poetry.lock `
282+
283+ To remove a package:
284+ ``` bash
285+ poetry remove requests
286+ ```
287+
288+ To see all installed packages:
289+ ``` bash
290+ poetry show
291+ ```
292+
293+ ---
177294
178- # Install pre-commit hooks so checks run on every git commit
295+ ### Step 5 -- Install pre-commit hooks
296+ ``` bash
179297poetry run pre-commit install
298+ ```
180299
181- # Confirm everything is working
300+ This activates the pre-commit hooks so that every time you run ` git commit ` ,
301+ Ruff and Mypy run automatically and block the commit if there are any issues.
302+ You only need to run this once per project, after cloning or generating it.
303+
304+ ### Step 6 -- Confirm everything is working
305+ ``` bash
182306make ci
183307```
184308
185- If ` make ci ` passes with no errors, your project is fully set up.
309+ If this passes with no errors, your project is fully set up and ready for
310+ development.
186311
187- ### Step 5 -- Initialise Git and push to GitHub
312+ ### Step 7 -- Initialise Git and push to GitHub
188313``` bash
189314git init
190315git branch -m master main
@@ -215,7 +340,9 @@ your-project-name/
215340│ │ ├── bug_report.yml
216341│ │ └── feature_request.yml
217342│ └── PULL_REQUEST_TEMPLATE.md
343+ ├── .venv/ # virtual environment (auto-created, gitignored)
218344├── pyproject.toml # Poetry, Ruff, Mypy, pytest config
345+ ├── poetry.lock # exact dependency versions (commit this)
219346├── .pre-commit-config.yaml # pre-commit hooks
220347├── .gitignore
221348├── Makefile # shorthand commands
@@ -226,17 +353,94 @@ your-project-name/
226353
227354---
228355
229- ## Common commands (in generated projects)
356+ ## Makefile commands
357+
358+ The ` Makefile ` provides shorthand commands so you do not have to remember or
359+ type out full tool invocations. Instead of ` poetry run ruff check . ` you just
360+ run ` make lint ` .
230361
231- All projects include a ` Makefile ` with these shortcuts:
362+ ### Command reference
363+ ``` bash
364+ make install
365+ ```
366+ Runs ` poetry install --with dev ` . Use this when setting up the project for
367+ the first time, or after pulling changes that added new dependencies to
368+ ` pyproject.toml ` . It installs everything into ` .venv/ ` and updates
369+ ` poetry.lock ` .
232370``` bash
233- make install # install all dependencies via Poetry
234- make lint # run Ruff linter
235- make format # run Ruff formatter
236- make typecheck # run Mypy type checker
237- make test # run pytest with coverage report
238- make ci # run all of the above in sequence
371+ make lint
239372```
373+ Runs ` ruff check . ` . Scans all Python files for code quality issues --
374+ unused imports, bad patterns, style violations. Does not modify any files,
375+ only reports problems. Use this to see what needs fixing before committing.
376+ ``` bash
377+ make format
378+ ```
379+ Runs ` ruff format . ` . Automatically rewrites your Python files to conform
380+ to the project's style rules -- indentation, line length, quote style, etc.
381+ Run this before committing to ensure consistent formatting.
382+ ``` bash
383+ make typecheck
384+ ```
385+ Runs ` mypy src ` . Statically analyses your code for type errors without
386+ executing it. Catches bugs like passing the wrong type to a function before
387+ they cause a runtime failure. Run this after writing new code or updating
388+ function signatures.
389+ ``` bash
390+ make test
391+ ```
392+ Runs ` pytest ` with coverage reporting. Executes all tests in ` tests/unit/ `
393+ and ` tests/integration/ ` , prints which lines of code are not covered by
394+ tests, and fails if coverage drops below 80%. Run this to verify nothing is
395+ broken before committing or opening a PR.
396+ ``` bash
397+ make ci
398+ ```
399+ Runs lint, format check, typecheck, and test in sequence. This mirrors
400+ exactly what GitHub Actions runs on every push. If ` make ci ` passes locally,
401+ your push will pass CI. Run this before pushing to catch issues early.
402+
403+ ---
404+
405+ ### Daily development workflow
406+
407+ Here is how the Makefile commands fit into a typical development session:
408+
409+ ** Starting work**
410+ ``` bash
411+ # If dependencies have changed since you last worked on the project
412+ make install
413+ ```
414+
415+ ** While writing code**
416+ ``` bash
417+ # After writing a new function or module
418+ make typecheck # catch type errors immediately
419+
420+ # Before committing
421+ make format # auto-fix formatting
422+ make lint # check for any remaining issues
423+ make test # confirm nothing is broken
424+ ```
425+
426+ ** Before pushing or opening a PR**
427+ ``` bash
428+ # Run the full suite to confirm everything passes
429+ make ci
430+ ```
431+
432+ ** Typical commit rhythm**
433+ ``` bash
434+ make format # fix formatting automatically
435+ make ci # confirm everything passes
436+ git add .
437+ git commit -m " feat: describe what you did"
438+ git push
439+ ```
440+
441+ The pre-commit hooks will also run Ruff and Mypy automatically on
442+ ` git commit ` , so ` make format ` and ` make lint ` act as a first pass before
443+ the hooks fire.
240444
241445---
242446
0 commit comments