Comments (3)
Thanks @pawamoy and @yajo for providing these insights!
I'm leaning towards the solution using a single license file with Jinja2 conditions because I find it more self-contained. Another example of a project template using this approach is cookiecutter-django. The folder solution has advantages in maintainability and readability, but I'd rather not add more logic to the hooks, and the set of supported licenses won't change very often. That's my reasoning anyway, feel free to raise additional points.
Pull requests for this would be very welcome 😉
from cookiecutter-hypermodern-python.
Check out how I'm doing this in cookie-poetry.
I basically add a choice field in cookiecutter.json with all licenses, and a folder in the template with a file for each license that gets generated. In a post-hook, I copy the selected license to the right place and delete the whole licenses folder (now useless).
Maybe not the best method, but it works 🙂
I know @yajo is writing all the licenses text in a big file with Jinja2 conditions. The filename is templated as well.
from cookiecutter-hypermodern-python.
Yes, see https://github.com/Tecnativa/doodba-copier-template/blob/ab7a378e473ab3b15a5db811f33715024c9f2b44/%7B%25%20if%20project_license%20%25%7DLICENSE%7B%25%20endif%20%25%7D.jinja and the related stuff.
from cookiecutter-hypermodern-python.
Related Issues (20)
- EuroPython 2022 Talk about hypermodern python
- Proposal: using bandit directly instead of flake8-bandit HOT 1
- 'CPUDispatcher' object has no attribute '__globals__' for numba.njitted function and typeguard test
- `nox -s pre-commit -- install` fails on 3.11 HOT 2
- Use cookiecutter _copy_without_render for github actions yaml files. HOT 1
- Proposal: use ruff to replace flake8 and related extensions HOT 14
- Release `2022.6.3` contains default sphinx dependencies in pyproject.toml that cannot be resolved in `poetry update`.
- please add gitlab support
- Proposal: use new style of poetry dependency declarations HOT 1
- inconsistent pinning of installation packages; recommend no pinning
- stay hypermodern or stay with poetry? HOT 1
- readthedocs setup?
- Ignore the `tests` github action workflow if not necessary
- Poetry and monorepo projects
- [FR] Promote secretless publishing to PyPI HOT 1
- Safety Errors about Tornado < 6.3.2
- Nox `docs-build` Session Fails with ZoneInfo Error on Ubuntu HOT 1
- documentation on poetry install is out of date HOT 1
- Session safety failed.
- Github Action ERROR: Could not open requirements file: [Errno 2] No such file or directory: '.github/workflows/constraints.txt' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookiecutter-hypermodern-python.