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

docs: improve README #204

Merged
merged 8 commits into from
Nov 15, 2023
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ To create a new Python project with this template:

1. Install the latest [Cruft](https://github.com/cruft/cruft) and [Cookiecutter](https://github.com/cookiecutter/cookiecutter) in your [Python environment](https://github.com/pyenv/pyenv-virtualenv) with:
```sh
pip install --upgrade cruft>=2.12.0 cookiecutter>=2.1.1
pip install --upgrade "cruft>=2.12.0" "cookiecutter>=2.1.1"
```
2. Create a new repository and clone it locally.
3. In the directory that contains the cloned repository, run:
2. Create a new repository for your Python project, then clone it locally.
3. Run the following command in the parent directory of the cloned repository to apply the Poetry Cookiecutter template:
```sh
cruft create -f https://github.com/radix-ai/poetry-cookiecutter
```
4. _Optional:_ if your repository name differs from your project's slugified name, you will need to copy the scaffolded project into the repository with:
4. _Optional:_ if your repository name differs from your project's slugified package name (see `package_name` in the [Template parameters](https://github.com/radix-ai/poetry-cookiecutter#-template-parameters) below), you will need to copy the scaffolded project into the repository with:
```sh
cp -r {package-name}/ {repository-name}/
```
Expand All @@ -58,13 +58,13 @@ To update your Python project with the latest template:

| Parameter | Description |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `package_name` <br> "Spline Reticulator" | The name of the package. Will be slugified to `snake_case` for importing and `kebab-case` for installing. |
| `package_name` <br> "Spline Reticulator" | The name of the package. Will be slugified to `snake_case` for importing and `kebab-case` for installing. For example, `My Package` will be `my_package` for importing and `my-package` for installing. |
| `package_description` <br> "A Python package that reticulates splines." | A single-line description of the package. |
| `package_url` <br> "https://github.com/user/spline-reticulator" | The URL to the package's repository. |
| `author_name` <br> "John Smith" | The full name of the primary author of the package. |
| `author_email` <br> "[email protected]" | The email address of the primary author of the package. |
| `python_version` <br> "3.8" | The minimum Python version that the package requires. |
| `docker_image` <br> "python:$PYTHON_VERSION-slim" | The base Docker image to use for the Dev Container and application. The $PYTHON_VERSION build argument is equal to the `python_version` value by default, but may be overridden when building the image to test different Python versions. If CUDA support is required, you may use [radixai/python-gpu:$PYTHON_VERSION-cuda11.8](https://github.com/radix-ai/python-gpu)). |
| `docker_image` <br> "python:$PYTHON_VERSION-slim" | The base Docker image to use for the Dev Container and application. The $PYTHON_VERSION build argument is equal to the `python_version` value by default, but may be overridden when building the image to test different Python versions. If CUDA support is required, you may use [radixai/python-gpu:$PYTHON_VERSION-cuda11.8](https://github.com/radix-ai/python-gpu). |
| `development_environment` <br> ["simple", "strict"] | Whether to configure the development environment with a focus on simplicity or with a focus on strictness. In strict mode, additional [Ruff rules](https://beta.ruff.rs/docs/rules/) are added, and tools such as [Mypy](https://github.com/python/mypy) and [Pytest](https://github.com/pytest-dev/pytest) are set to strict mode. |
| `with_conventional_commits` <br> ["0", "1"] | If "1", [Commitizen](https://github.com/commitizen-tools/commitizen) will verify that your commits follow the [Conventional Commits](https://www.conventionalcommits.org/) standard. In return, `cz bump` may be used to automate [Semantic Versioning](https://semver.org/) and [Keep A Changelog](https://keepachangelog.com/). |
| `with_fastapi_api` <br> ["0", "1"] | If "1", [FastAPI](https://github.com/tiangolo/fastapi) is added as a run time dependency, FastAPI API stubs and tests are added, a `poe api` command for serving the API is added, and an `app` stage that packages the API is added to the Dockerfile. Additionally, the CI workflow will push the application as a Docker image instead of publishing the Python package. |
Expand Down