|
| 1 | +# {{ project_name }} |
| 2 | + |
| 3 | +{{ project_description }} |
| 4 | + |
| 5 | +## Summary |
| 6 | +Sets up a new development environment for a Mac or Linux (i.e., UNIX) box. |
| 7 | + |
| 8 | +**Table of Contents** |
| 9 | +* [{{ project_name }}](#{{ project_name | slugify }}) |
| 10 | + * [Summary](#summary) |
| 11 | + * [Setup](#setup) |
| 12 | + * [Minimum requirements](#minimum-requirements) |
| 13 | + * [Recommended requirements](#recommended-requirements) |
| 14 | + * [Development](#development) |
| 15 | + * [Devbox](#devbox) |
| 16 | + * [Taskfile](#taskfile) |
| 17 | +{% if python_package_command_line_name %} |
| 18 | + * [CLI Usage](#cli-usage) |
| 19 | +{% endif %} |
| 20 | + * [TODO](#todo) |
| 21 | + * [Further Reading](#further-reading) |
| 22 | + |
| 23 | +## Setup |
| 24 | +### Minimum requirements |
| 25 | +* [Python 3.11](https://www.python.org/downloads/) |
| 26 | + |
| 27 | +### Recommended requirements |
| 28 | +* [devbox](https://www.jetpack.io/devbox/docs/quickstart/) |
| 29 | +* [task](https://taskfile.dev/#/installation) |
| 30 | + |
| 31 | +## Development |
| 32 | +### Devbox |
| 33 | +Devbox takes care of setting up a dev environment automatically. |
| 34 | + |
| 35 | +Under the hood it uses [Nix Package Manager](https://search.nixos.org/packages). |
| 36 | + |
| 37 | +```bash |
| 38 | +# install devbox |
| 39 | +./bootstrap |
| 40 | + |
| 41 | +# enter dev environment w/deps |
| 42 | +devbox shell |
| 43 | + |
| 44 | +# run repl |
| 45 | +python |
| 46 | + |
| 47 | +# exit dev environment |
| 48 | +exit |
| 49 | + |
| 50 | +# run tests |
| 51 | +devbox run test |
| 52 | +``` |
| 53 | + |
| 54 | +### Taskfile |
| 55 | +```bash |
| 56 | +λ task |
| 57 | +task: Available tasks for this project: |
| 58 | +* checkbash: Check bash scripts |
| 59 | +* default: Default task |
| 60 | +* format: Run formatters |
| 61 | +* install: Install project dependencies |
| 62 | +* install-devbox: Install devbox |
| 63 | +* lint: Run linters |
| 64 | +* pre-commit: Run pre-commit hooks |
| 65 | +* pyclean: Remove .pyc and __pycache__ |
| 66 | +* test: Run tests |
| 67 | +``` |
| 68 | + |
| 69 | +{% if python_package_command_line_name %} |
| 70 | +### CLI Usage |
| 71 | +After installation, you can use the `{{ python_package_command_line_name }}` command: |
| 72 | + |
| 73 | +```bash |
| 74 | +# Show help |
| 75 | +{{ python_package_command_line_name }} --help |
| 76 | + |
| 77 | +# Run the main command |
| 78 | +{{ python_package_command_line_name }} run |
| 79 | +``` |
| 80 | +{% endif %} |
| 81 | + |
| 82 | +## TODO |
| 83 | +* [Open Issues](https://{{ repository_provider }}/{{ repository_namespace }}/{{ repository_name }}/issues) |
| 84 | +* QA [Ansible playbook](ansible/playbook.yml) |
| 85 | + * Test |
| 86 | + * macOS |
| 87 | + * Ubuntu |
| 88 | +* Write boilerplate pytest tests |
| 89 | +* CI/CD |
| 90 | + |
| 91 | +## Further Reading |
| 92 | +* [python](https://www.python.org/) |
| 93 | +* [asdf](https://asdf-vm.com/guide/getting-started.html#_2-download-asdf) |
| 94 | +* [poetry](https://python-poetry.org/docs/) |
| 95 | +* [docker-compose](https://docs.docker.com/compose/install/) |
| 96 | +* [pre-commit hooks](https://pre-commit.com/) |
0 commit comments