A collection of scripts to extract structured data from utility bills.
poetry run process_utility_bill gas path/to/file.pdf [password]
poetry run process_utility_bill --help
Setup local repo with global tools, venv, and git hooks
cd $PROJECT_ROOT # project root
./scripts/setup_repo.sh
Using the virtual env in-project can be globally set with poetry config virtualenvs.in-project true
TODO: does the venv need to be activated if poetry commands are used?
- Activate an environment with the development python and tools:
poetry shell
- Run a tool from outside of the environment or a poetry script:
poetry run ...
poetry run pytests
to execute tests,
- Run build pipeline using
nox
Use-r
to minimize setup time by reusing the nox virtual environments for each session. - For all commands:
poetry list
andnox --list-sessions
Sublime Text
- SublimeLinter with linters
- LSP
- Python Black
- isort
- Markdown Preview
For the most part, the styles are enforced with tools integrated into pre-commit
.
docstring: google
Here are three useful guidelines about documenting test cases:
- State the expected behaviour and be specific about it.
- Omit everything that already follows from the fact that it is a test case. For example, avoid words like “test if”, “correctly”, “should”.
- Use “it” to refer to the system under test. There is no need to repeatedly name the function or class you are testing. (A better place for that is the docstring of the test module, or the test class if you use those.)