Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update readme + template #421

Merged
merged 26 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7ed524d
fix: initial update to readme
ryankanno Jun 2, 2024
eed07f6
fix: cleaned up project readme.md
ryankanno Jun 2, 2024
2863080
fix: more tweaks
ryankanno Jun 2, 2024
7907f23
chore: title tweaks
ryankanno Jun 2, 2024
643493d
chore: move ticks into link
ryankanno Jun 2, 2024
46b4ccd
chore: added space between feature logo and title
ryankanno Jun 2, 2024
2dc4952
chore: added appropriate url for project/repo
ryankanno Jun 3, 2024
384202a
fix: added new secrets.baseline
ryankanno Jun 3, 2024
c9622a1
test: fixed readme.rst -> readme.md
ryankanno Jun 3, 2024
d6aac59
test: url tweak
ryankanno Jun 3, 2024
e125289
test: more url tweaks
ryankanno Jun 3, 2024
74f1e7a
test: cleaned up
ryankanno Jun 3, 2024
695f69e
chore: cleaned up template
ryankanno Jun 3, 2024
4cef556
chore: hack to get alignment working
ryankanno Jun 3, 2024
c45ebf4
docs: added cookiecutter/cruft headers
ryankanno Jun 3, 2024
e521ff8
docs: added spaces to readme templ
ryankanno Jun 3, 2024
d2b8412
docs: added twitter link, removed acknowledgements
ryankanno Jun 3, 2024
d699d25
docs: more tweaks
ryankanno Jun 3, 2024
3a00265
docs: added [ around bold w/ reference links
ryankanno Jun 3, 2024
e2f8a97
docs: moved poetry ahead
ryankanno Jun 3, 2024
ac51830
docs: updated template
ryankanno Jun 3, 2024
9d72d88
docs: removed >
ryankanno Jun 3, 2024
74e28c7
chore: removed email from readme
ryankanno Jun 3, 2024
bf68855
docs: updated cd contribution text
ryankanno Jun 3, 2024
7e74d0c
Merge branch 'main' into fix/updated-readme-and-template
ryankanno Jun 3, 2024
cde681b
fix: updated secrts.baseline
ryankanno Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.5.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
Expand All @@ -20,9 +20,15 @@
{
"name": "CloudantDetector"
},
{
"name": "DiscordBotTokenDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"name": "GitLabTokenDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
Expand All @@ -33,6 +39,9 @@
{
"name": "IbmCosHmacDetector"
},
{
"name": "IPPublicDetector"
},
{
"name": "JwtTokenDetector"
},
Expand All @@ -46,9 +55,15 @@
{
"name": "NpmDetector"
},
{
"name": "OpenAIDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "PypiTokenDetector"
},
{
"name": "SendGridDetector"
},
Expand All @@ -64,6 +79,9 @@
{
"name": "StripeDetector"
},
{
"name": "TelegramBotTokenDetector"
},
{
"name": "TwilioKeyDetector"
}
Expand All @@ -72,6 +90,10 @@
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": ".secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
Expand Down Expand Up @@ -105,5 +127,5 @@
}
],
"results": {},
"generated_at": "2022-08-06T00:23:45Z"
"generated_at": "2024-06-03T18:36:18Z"
}
136 changes: 97 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# cookiecutter-py
<h3 align="center">cookiecutter-py</h3>

🐍 Modern Python project Cookiecutter template
<div align="center">
<p>🐍 Modern Python project Cookiecutter template</p>
</div>

<div align="center">

[![GitHub Issues][github-issues-shield]][github-issues-url]
[![GitHub Pull Requests][github-prs-shield]][github-prs-url]
[![License][project-license-shield]][project-license-url]

</div>

<div align="center">

[**Explore the latest docs »**][project-docs]

</div>

---

Expand All @@ -11,7 +27,10 @@ integrations to help facilitate writing quality Python code.
This modern Python [Cookiecutter](https://github.com/audreyr/cookiecutter)
template is the tool that will help you do just that.

## Features
---

<!-- FEATURES -->
## ✨ Features

- [`poetry`](https://poetry.eustace.io) to manage dependencies
- [`structlog`](https://www.structlog.org/en/stable) for logging
Expand Down Expand Up @@ -51,58 +70,61 @@ template is the tool that will help you do just that.
- [`trufflehog`](https://raw.githubusercontent.com/ryankanno/cookiecutter-py/main/%7B%7Bcookiecutter.package_name%7D%7D/.github/workflows/trufflehog.yml)
- optional [`direnv`](https://github.com/direnv/direnv) .envrc (with pyenv layout)

## Installation
<!-- GETTING STARTED -->
## 🚀 Getting Started

### Cookiecutter
### Prerequisites

Install [Cookiecutter](https://cookiecutter.readthedocs.io/en/latest/installation.html)

```bash
pip install cookiecutter
# poetry add cookiecutter
```sh
poetry add cookiecutter
# pip install cookiecutter
# pipenv install cookiecutter
```

After installing Cookiecutter, create the project:
**Optional**: Install [Cruft](https://github.com/cruft/cruft)

```bash
cookiecutter gh:ryankanno/cookiecutter-py
```sh
poetry add cruft
# pip install cruft
# pipenv install cruft
```
**Note**: If you want to use the auto approve / merge Dependabot workflow, make
sure to create tags `major`, `minor`, `patch` so that Dependabot can tag its
PRs. The workflow won't merge anything with a `major` tag.

### Cruft
## 🛠️ Usage

Install [Cruft](https://github.com/cruft/cruft)
### Cookiecutter

```bash
pip install cruft
# poetry add cruft
# pipenv install cruft
```sh
cookiecutter gh:ryankanno/cookiecutter-py
```

After installing Cruft, create the project:
**Note**: If you want to use the auto approve / merge Dependabot workflow, make
sure to create tags `major`, `minor`, `patch` so that Dependabot can tag its
PRs. The workflow won't merge anything with a `major` tag.

### Cruft (Optional)

```bash
```sh
cruft create https://github.com/ryankanno/cookiecutter-py/
```

## Details
<!-- DETAILS -->
## 🔍 Details

Coming soon to a README near you!

### Docker

To build the container:

```bash
```sh
DOCKER_BUILDKIT=1 docker build .
```

To run the container (if you've installed the defaults):

```bash
```sh
docker run <image_id or tag> python -m surf.surf
```

Expand All @@ -112,20 +134,56 @@ If you enable the PyPi workflow, versioning will happen via [`dunamai`](https://

If instead, you prefer to version your package, please do it via ```poetry version $(dunamai from any)``` as recommended in their [documentation](https://github.com/mtkennerly/dunamai#user-content-integration).

## TODO
<!-- ROADMAP -->
## 🚧 Roadmap

See the [open issues](https://github.com/ryankanno/cookiecutter-py/issues) for a list of proposed features (and known issues).

<!-- TODO -->
## ☑️ TODO

- [ ] add mutmut example to template
- [ ] add hypothesis example to template
- [ ] add licenses
- [ ] add typeguard
- [ ] version releases
- [ ] update docs
- [ ] include cookiecutter var descriptions
- [ ] update default/initial template doc structure
- [ ] add publish docs workflow
- [ ] investigate uv
- [ ] plan for 1.0

<!-- CONTRIBUTING -->
## 🤝 Contributing

Contributions are very much appreciated.

1. Fork the project
2. Create your feature branch (`git checkout -b feature/new-cookiecutter-feature`)
3. Commit your changes (`git commit -m 'Added a new feature'`)
4. Push to the feature branch (`git push origin feature/new-cookiecutter-feature`)
5. Open a PR! 🎆

<!-- LICENSE -->
## 📝 License

Distributed under the MIT License. See [`LICENSE`](https://github.com/ryankanno/cookiecutter-py/blob/main/LICENSE) for more information.

<!-- CONTACT -->
## 📫 Contact

Ryan Kanno - [@ryankanno][twitter-ryankanno-url]

- add mutmut example to template
- add hypothesis example to template
- add licenses
- add typeguard
- version releases
- update docs
- include cookiecutter var descriptions
- update default/initial template doc structure
- add publish docs workflow
- investigate uv
- plan for 1.0
Project Link: [https://github.com/ryankanno/cookiecutter-py][project-url]

## License

MIT. See [LICENSE](https://github.com/ryankanno/cookiecutter-py/blob/main/LICENSE) for deets.
[project-url]: https://github.com/ryankanno/cookiecutter-py
[project-docs]: https://ryankanno.github.io/cookiecutter-py/latest
[project-license-shield]: https://img.shields.io/github/license/ryankanno/cookiecutter-py
[project-license-url]: https://github.com/ryankanno/cookiecutter-py/blob/main/LICENSE
[github-issues-shield]: https://img.shields.io/github/issues/ryankanno/cookiecutter-py
[github-issues-url]: https://github.com/ryankanno/cookiecutter-py/issues
[github-prs-shield]: https://img.shields.io/github/issues-pr/ryankanno/cookiecutter-py
[github-prs-url]: https://github.com/ryankanno/cookiecutter-py/pulls
[twitter-ryankanno-url]: https://twitter.com/ryankanno
2 changes: 1 addition & 1 deletion tests/test_cookiecutter_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
'HISTORY.rst',
'LICENSE',
'Justfile',
'README.rst',
'README.md',
'/docs/Makefile',
'/docs/conf.py',
'/docs/index.rst',
Expand Down
103 changes: 103 additions & 0 deletions {{cookiecutter.package_name}}/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<h3 align="center">{{cookiecutter.project_name}}</h3>

<div align="center">
<p>{{ cookiecutter.project_short_description }}</p>
</div>

<div align="center">

[![GitHub Issues][github-issues-shield]][github-issues-url]
[![GitHub Pull Requests][github-prs-shield]][github-prs-url]
[![License][project-license-shield]][project-license-url]

</div>

<div align="center">

[**Explore the latest docs »**][project-docs-url]

</div>

---

Detailed description about {{ cookiecutter.project_name }} goes here.

---

<!-- FEATURES -->
## ✨ Features

<!-- GETTING STARTED -->
## 🚀 Getting Started

### Prerequisites

* [poetry](https://python-poetry.org/docs/#installing-with-the-official-installer)
```sh
curl -sSL https://install.python-poetry.org | python3 -
```

### Installation

1. Clone the repo
```sh
git clone {{ cookiecutter.project_url }}.git
```
2. Install
```sh
poetry install
```

<!-- USAGE EXAMPLES -->
## 🛠️ Usage

Show a few examples of how a project is to be used.

_For more examples, please refer to the [documentation][project-docs-url]_

<!-- ROADMAP -->
## 🚧 Roadmap

See the [open issues][github-issues-url] for a list of proposed features (and known issues).

<!-- TODO -->
## ☑️ TODO
- [ ] TODO 1

<!-- CONTRIBUTING -->
## 🤝 Contributing

Contributions are very much appreciated.

1. Fork the project
2. Create your feature branch (`git checkout -b feature/new-{{cookiecutter.project_url.split('/')[-1]}}-feature`)
3. Commit your changes (`git commit -m 'Added a new feature to {{cookiecutter.project_url.split('/')[-1]}}'`)
4. Push to the feature branch (`git push origin feature/new-{{cookiecutter.project_url.split('/')[-1]}}-feature`)
5. Open a PR! 🎆

<!-- LICENSE -->
## 📝 License

Distributed under the {{ cookiecutter.project_license }} License. See [`LICENSE`][project-license-url] for more information.

<!-- CONTACT -->
## 📫 Contact

{{ cookiecutter.author_name }}

Project Link: [{{ cookiecutter.project_url }}][project-url]

<!-- ACKNOWLEDGEMENTS -->
## 🙏 Acknowledgements

Anyone you'd like to thank?

<!-- MARKDOWN REFERENCE LINKS -->
[project-url]: {{ cookiecutter.project_url }}
[project-docs-url]: https://{{ cookiecutter.project_url.split('/')[-2] }}.github.io/{{ cookiecutter.project_url.split('/')[-1] }}/latest
[project-license-shield]: https://img.shields.io/github/license/{{ cookiecutter.project_url.split('/')[-2] }}/{{ cookiecutter.project_url.split('/')[-1] }}
[project-license-url]: {{ cookiecutter.project_url }}/blob/main/LICENSE
[github-issues-shield]: https://img.shields.io/github/issues/{{ cookiecutter.project_url.split('/')[-2] }}/{{ cookiecutter.project_url.split('/')[-1] }}
[github-issues-url]: https://github.com/{{ cookiecutter.project_url.split('/')[-2] }}/{{ cookiecutter.project_url.split('/')[-1] }}/issues
[github-prs-shield]: https://img.shields.io/github/issues-pr/{{ cookiecutter.project_url.split('/')[-2] }}/{{ cookiecutter.project_url.split('/')[-1] }}
[github-prs-url]: https://github.com/{{ cookiecutter.project_url.split('/')[-2] }}/{{ cookiecutter.project_url.split('/')[-1] }}/pulls
Loading