Prototype impementations for makespan project.
Note that just some algorithms implemented here will be ported to the main Rust project. This repository generally serves to analyze the minimum makespan problem and compare different approaches (mainly in terms of solution quality, performance is of secondary concern).
- Install GLPK system libraries (see GLPK section).
- Download and install Poetry. E.g.
pipx install poetry
. - Inside project directory use Python 3.8 environment:
poetry env use python3.6
. - Install project dependencies by running
poetry install
or update current ones withpoetry update
. - Install pre-commit by running
poetry run pre-commit install
.
There is also a convenience make target to setup the environment install all requirements:
make setup
Activate project environment by running
poetry shell
To be able to use GLPK in MILP formulation, install following system libraries.
sudo apt install -y libglpk-dev glpk-utils glpk-doc
It is advised to use following make targets during development.
make fmt
Again, find configuration for both tools in pyproject.toml
.
make lint
This command runs:
- Bunch of flakehell checks against code in
src/
. One can find config and tweak plugins inpyproject.toml
. - Runs mypy static type check on
src/
. Configuration is in defaultmypy.ini
.
make tests
Runs tests with doctests enabled and displays code coverage. Configuration can be tweaked in relevant sections of pyproject.toml
.
All lints and tests are also available via single command:
make check
Finally, initial setup installs pre-commit hooks (see .pre-commit-config.yaml
). One can run these hooks as follows:
pre-commit run --all-files