Skip to content

Developper instructions

Florian Blanchet edited this page Apr 29, 2021 · 20 revisions

Clone

git clone https://github.com/NotANameServer/incipyt
cd incipyt

Setup virtual environment and incipyt package

python -m venv .env
source .env/bin/activate
python -m pip install --upgrade pip flit
python -m flit install --pth-file --deps develop

Setup pre-commit for formatter and linter

pre-commit install --install-hooks --overwrite

IMPORTANT: Run git commit from the virtual environment. You can test pre-commit with pre-commit run --all-files

Run formatter and linter on all project files

python -m black incipyt
python -m flakehell lint incipyt

VSCode recommended : .vscode/settings.json

{
    "python.analysis.completeFunctionParens": true,
    "python.autoComplete.addBrackets": true,
    "python.disableInstallationCheck": true,
    "editor.formatOnPaste": true,
    "editor.formatOnSave": true,
    "python.formatting.blackPath": ".env/bin/black",
    "python.formatting.provider": "black",
    "python.linting.flake8CategorySeverity.W": "Error",
    "python.linting.flake8Enabled": true,
    "python.linting.flake8Path": ".env/bin/flake8helled",
    "python.terminal.activateEnvInCurrentTerminal": true,
}
Clone this wiki locally