Skip to content

Commit 96e90e2

Browse files
committed
feat: bulk initial commit
Tons of work and unfinished ideas that need done. Just getting code into the repo for now.
0 parents  commit 96e90e2

File tree

89 files changed

+6527
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+6527
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[56kyleoliver@gmail.com](mailto:56kyleoliver@gmail.com).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series of
86+
actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or permanent
93+
ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by
122+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
126+
[https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[mozilla coc]: https://github.com/mozilla/diversity
131+
[faq]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing to cookiecutter-robust-python
2+
3+
Thank you for considering contributing to the `cookiecutter-robust-python` template! We welcome contributions that help improve the template, keep its tooling current, and enhance its documentation.
4+
5+
By participating in this project, you are expected to uphold our [Code of Conduct](CODE_OF_CONDUCT.md).
6+
7+
## How to Contribute
8+
9+
There are several ways to contribute:
10+
11+
1. **Reporting Bugs:** If you find an issue with the template itself (e.g., it doesn't generate correctly, the generated project's workflow doesn't work on a specific OS, a tool is misconfigured), please open an issue on the [issue tracker](https://github.com/56kyle/cookiecutter-robust-python/issues). Provide clear steps to reproduce the bug.
12+
2. **Suggesting Enhancements:** Have an idea for a new feature, a different tool choice you think is better, or an improvement to the template structure or documentation? Open an issue on the [issue tracker](https://github.com/56kyle/cookiecutter-robust-python/issues) to discuss your suggestion. Clearly articulate the proposed change and the rationale behind it, ideally referencing the template's philosophy and criteria ([Template Philosophy](https://56kyle.github.io/cookiecutter-robust-python/philosophy.html), [Criteria for Tool Selection](https://56kyle.github.io/cookiecutter-robust-python/criteria.html)).
13+
3. **Submitting Code Contributions:** Ready to contribute code (e.g., fix a bug, implement a suggested enhancement, update a tool version)? Please fork the repository and submit a Pull Request.
14+
15+
## Setting Up Your Development Environment
16+
17+
Refer to the **[Getting Started: Contributing to the Template](https://56kyle.github.io/cookiecutter-robust-python/getting-started-template-contributing.html)** section in the template documentation for instructions on cloning the repository, installing template development dependencies (using uv), setting up the template's pre-commit hooks, and running template checks/tests.
18+
19+
## Contribution Workflow
20+
21+
1. **Fork** the repository and **clone** your fork.
22+
2. Create a **new branch** for your contribution based on the main branch. Use a descriptive name (e.g., `fix/ci-workflow-on-windows`, `feat/update-uv-version`).
23+
3. Set up your development environment following the [Getting Started](https://56kyle.github.io/cookiecutter-robust-python/getting-started-template-contributing.html) guide (clone, `uv sync`, `uvx nox -s pre-commit -- install`).
24+
4. Make your **code or documentation changes**.
25+
5. Ensure your changes adhere to the template's **code quality standards** (configured in the template's `.pre-commit-config.yaml`, `.ruff.toml`, etc.). The pre-commit hooks will help with this. Run `uvx nox -s lint`, `uvx nox -s check` in the template repository for more comprehensive checks.
26+
6. Ensure your changes **do not break existing functionality**. Run the template's test suite: `uvx nox -s test`. Ideally, add tests for new functionality or bug fixes.
27+
7. Ensure the **template documentation builds correctly** with your changes: `uvx nox -s docs`.
28+
8. Write clear, concise **commit messages** following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification where possible, especially for significant changes (fixes, features, chore updates, etc.).
29+
9. **Push** your branch to your fork.
30+
10. **Open a Pull Request** from your branch to the main branch of the main template repository. Provide a clear description of your changes. Link to any relevant issues.
31+
32+
## Updating Tool Evaluations
33+
34+
If your contribution involves updating a major tool version or suggesting a different tool entirely, you **must** update the relevant sections in the template's documentation (`docs/topics/` files) to reflect the changes in configuration, behavior, or re-justify the choice based on the current state of the tools and criteria. This is crucial for keeping the documentation accurate and useful over time.
35+
36+
## Communication
37+
38+
For questions or discussion about contributions, open an issue or a discussion on the [GitHub repository](https://github.com/56kyle/cookiecutter-robust-python).
39+
40+
---

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright © 2025 Kyle Oliver
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# cookiecutter-robust-python
2+
3+
A Python project template robust enough to follow up [cookiecutter-hypermodern-python]
4+
5+
# Why does this project exist?
6+
Unfortunately the [Hypermodern Python Cookiecutter] is no longer maintained nor modern.
7+
While it will always have a place in my heart, there have been far too many improvements in Python tooling to keep using it as is.
8+
9+
For a whle I maintained [a personal fork](https://github.com/56kyle/cookiecutter-hypermodern-python) that I would update, however when it came time to switch
10+
to new tooling such as [ruff], [uv], [maturin], etc, I found the process of updating the existing tooling to be extremly painful.
11+
12+
The [Hypermodern Python Cookiecutter] remains as a fantastic sendoff point for devs interested in building a 2021 style Python Package, but there were
13+
a handfull of issues with it that prevented it from being able to adapt to new Python developments over the years.
14+
15+
# Okay, so what's different this time?
16+
The [Robust Python Cookiecutter] exists to solve a few main concerns
17+
- [Template Update Propogation](#template-update-propogation)
18+
- [Project Domain Expansion](#project-domain-expansion)
19+
- [Documenting Tooling Decisions](#documenting-tooling-decisions)
20+
- [CI/CD Vendor Lock](#cicd-vendor-lock)
21+
- [Project Neglect](#project-neglect)
22+
23+
24+
## Template Update Propogation
25+
One of the main issues I encountered with [my personal fork] of the [Hypermodern Python Cookiecutter] was that any change
26+
I made to my repos would mean a later conflict if I tried to rerun [cookiecutter] to sync a change from a different project.
27+
28+
Thankfully [cruft] exists specifically to help with this issue. It enables us to periodically create PR's to add in any fixes
29+
the [Robust Python Cookiecutter] may have added.
30+
31+
Additionally, extra care is put in to use tooling specific config files whenever possible to help reduce merge conflicts occurring
32+
in the pyproject.toml.
33+
34+
35+
## Project Domain Expansion
36+
Now, I'm not one to advocate for mixing languages together in a project. However, there is a really unique case that has arisen with the creation of [maturin].
37+
38+
There are a plethora of great projects such as [ruff], [uv], [polars], [just], etc all making use of [maturin] to get the performance improvements of [rust] while
39+
submitting their package to both pypi and crates.io
40+
41+
Now, this definitely is not required by any means to make a good Python package, however this pattern only seems to be picking up momentum and has honestly been a massive boon
42+
to Python's ecosystem overall.
43+
44+
That being said, it's generally good practice to avoid the complexity of this dual language system unless you actually need the performance bump for your use case. However knowing ahead of time if performance
45+
will be an issue is rather tricky, and a much easier route is to just prepare as though you *might* swap to it some day.
46+
47+
The [Robust Python Cookiecutter] includes a `include_rust_extensions` flag that not only toggles [maturin] vs a traditional Python package,
48+
but that can be used in combination with [cruft] to swap to [maturin] at any time with just about no risk to CI/CD / etc.
49+
50+
Additionally, the [Robust Python Cookiecutter] is designed with both normal and [monorepos] in mind. So whether you need to just add
51+
a quick [rust] module for performance or you are trying to publish a series of crates and packages, either case will be handled using a setup inspired by [polars].
52+
53+
54+
55+
56+
57+
## Documenting Tooling Decisions
58+
One of the really stand out features of the [Hypermodern Python Cookiecutter] was its incredibly detailed documentation.
59+
It did a pretty great job of describing the tooling to use, but there was a distinct lack of ***why*** these decisions were made.
60+
61+
It may seem like a small detail, but detailing why a decision was made has an incredibly important effect on the maintainablity of the template.
62+
#### **It allows maintainers to check if a decision should change in one click.**
63+
Rather than having to go through a mini crusade to determine whether we use [poetry] or [uv], we can just point to the
64+
[existing reasoning](https://cookiecutter-robust-python.readthedocs.io/en/latest/topics/02_dependency_management.md#option-2--term--poetry) to see if it still is true or not.
65+
66+
Overall it's rather rare that people debate over tooling for no reason. Most things have merit in some cases, and a large goal of this template is identifying the tools that have the most merit in almost all cases.
67+
68+
## CI/CD Vendor Lock
69+
Now don't get me wrong, I love [github-actions] and do pretty much everything in my power to avoid [bitbucket-pipelines].
70+
However not all jobs have the luxury of github, and I would love to be able to just use the same template for both my personal and professional projects.
71+
72+
The [Robust Python Cookiecutter] focuses on being as modular as possible for areas that connect to the CI/CD pipeline. Additionally, there will always be either alternative
73+
CI/CD options or at a minimum basic examples of what the translated CI/CD pipeline would look like.
74+
75+
Finally the main reason that this task is even possible is that the [Robust Python Cookiecutter] mirrors all of the CI/CD steps in it's local dev tooling.
76+
The local [noxfile] is designed to match up directly with the CI/CD each step of the way.
77+
78+
The [Hypermodern Python Cookiecutter] did this where it could afford to also, however the lack of [uv] meant it would significantly increase CI/CD times if done everywhere.
79+
Thankfully now we can spin up a venv with a tiny fraction of the overhead that used to exist.
80+
81+
82+
## Project Neglect
83+
This is most certainly not a knock against claudio. The work they did on [cookiecutter-hypermodern-python] laid the way for countless other devs to start
84+
implementing best practices in their python packages.
85+
86+
However, Open Source work is draining, and is especially so for a project template including metacode.
87+
88+
I can guarantee that if the [Robust Python Cookiecutter] ever sees any amount of users I will immediately transfer it to an organization to enable at least a handful
89+
of trusted individuals to ensure the project is taken care of.
90+
91+
[bitbucket-pipelines]: https://support.atlassian.com/bitbucket-cloud/docs/write-a-pipe-for-bitbucket-pipelines/
92+
[cookiecutter-hypermodern-python]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
93+
[github-actions]: https://docs.github.com/en/actions
94+
[Hypermodern Python Cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
95+
[maturin]: https://github.com/PyO3/maturin
96+
[cookiecutter-robust-python]: https://github.com/56kyle/cookiecutter-robust-python
97+
[Robust Python Cookiecutter]: https://github.com/56kyle/cookiecutter-robust-python
98+
[ruff]: https://docs.astral.sh/ruff/
99+
[Rye]: https://rye.astral.sh/
100+
[uv]: https://docs.astral.sh/uv/
101+
102+

cookiecutter.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"project_name": "hypermodern-python",
3+
"package_name": "{{ cookiecutter.project_name.replace('-', '_') }}",
4+
"friendly_name": "{{ cookiecutter.project_name.replace('-', ' ').title() }}",
5+
"min_python_version": "3.9",
6+
"max_python_version": "3.12",
7+
"author": "Kyle Oliver",
8+
"email": "56kyleoliver@gmail.com",
9+
"github_user": "56kyle",
10+
"version": "0.0.0",
11+
"copyright_year": "{% now 'utc', '%Y' %}",
12+
"license": ["MIT", "Apache-2.0", "GPL-3.0"],
13+
"development_status": [
14+
"Development Status :: 1 - Planning",
15+
"Development Status :: 2 - Pre-Alpha",
16+
"Development Status :: 3 - Alpha",
17+
"Development Status :: 4 - Beta",
18+
"Development Status :: 5 - Production/Stable",
19+
"Development Status :: 6 - Mature",
20+
"Development Status :: 7 - Inactive"
21+
]
22+
}

docs/codeofconduct.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```{include} ../CODE_OF_CONDUCT.md
2+
3+
```

0 commit comments

Comments
 (0)