- Provide a dev shell.
- Provide a nix package.
- Provide a nix flake.
- Development environment based on direnv.
- Docs.
- Configure Gitpod to use direnv and nix.
- Configure Cachix out of the box, and document how to use it.
- Add direnv and nix to CI.
- Satisfy some linters that came from Precommix, even when Precommix was later discarded.
- Mark some tests as impure.
- Run only pure tests when building Copier with Nix.
- Add poetry loader to direnv.
- Update contribution guide.
Mkdocs uses `python-markdown`, and [they say](https://python-markdown.github.io/#differences):
> The syntax rules clearly state that when a list item consists of multiple paragraphs, “each subsequent paragraph in a list item must be indented by either 4 spaces or one tab” (emphasis added). However, many implementations do not enforce this rule and allow less than 4 spaces of indentation. The implementers of Python-Markdown consider it a bug to not enforce this rule.
As we were using 2 spaces for markdown files (which looks better in source code), some indented lists were not displaying properly in the docs page.
Thus I change the setting to 4 spaces. Prettier will now enforce them, and mkdocs will display things properly.
Continues the job started in #104:
- Configure more languages for VSCode to format on save.
- Recommend extensions for VSCode.
- Remove settings from `.prettierrc.yml` that are duplicated in `.editorconfig` (which prettier uses by default).
For those new to pre-commit, tl;dr:
- `pre-commit install` will enable a git hook to forbid committing violating code.
- If `git commit` fails, just `git commit -a` again.
This beautiful tool will convert all our source code to a pleasure to be read and written.
Some insights:
- `make install` now enables pre-commit by default.
- Important hooks:
- Black, the 21th century Python code autoformatter.
- isort, to sort imports automatically.
- mypy, which was also being used anyways.
- Prettier, for non-python files (markdown and YAML in this repo).
- Flake8 with bugbear, which reveals some extra coding mistakes.
- Other common checkers & fixers.
- Used as linter in travis.
- Replaced `make flake` for `make lint`.