We currently develop this package using Python 3.8.9, venv, pylint, flake8, pytest, pytest-cov, Black, isort, and other tools. This document should guide you to install and set up the devel environment on a new machine. It is not set in stone and is likely to evolve with the package.
Install Python 3.8.9, create a new virtual environment and activate it. Clone this repository and do editable pip
installation. Finally, install TensorFlow and PyTorch.
git clone [email protected]:ML-Bioinfo-CEITEC/genomic_benchmarks.git
cd genomic_benchmarks
pip install --editable .
pip install jupyter>=1.0.0
pip install papermill>=2.3.0
pip install tensorflow>=2.6.0
pip install tensorflow-addons
pip install typing-extensions --upgrade # fixing TF installation issue
pip install torch>=1.10.0
pip install torchtext
The package is distributed through The Python Package Index (PyPI): https://pypi.org/project/genomic-benchmarks/
Instruction to upload a new version of the package to PyPI:
- You mush have PyPI and be registered as admin of the package (ask the owner - currently Petr - to add you)
- Always push the new version to GitHub and run tests before pushing to PyPI. Make sure to increase the version number in setup.py.
- Remove
dist
subfolder if it exists and run the following
python setup.py sdist
twine upload dist/*
Install VS Code Python Extension: use Ctrl-Shift-x to open MarketPlace, search for Python Extension, and install it.
To select Python interpreter, activate Command Palette (Cmd-Shift-P
or View -> Command Palette
) and select Python: Select Interpreter
. You should see a virtual environment you created in previous step.
We use pylint
(PEP8) and flake8
. VS Code setting is provided in settings.json file.
If pylint
and flake8
were not yet installed in your Python environment, after restarting VS Code and opening any Python file, you should see the following dialog in the bottom right corner:
After clicking on Install buttons, linters will be automatically installed. To check that you have multiple linters selected, go to Command Palette (Cmd-Shift-P
or View -> Command Palette
), select Python: Select Linter
and you should get current: multiple selected
as below
We use black
and isort
to auto-format on Save
. VS Code setting is provided in settings.json file. (You will need to install those two packages.)
We use Python Docstring Generator extension to help us with writing useful and well formated documentation. Install this extension from VS Code Extensions Marketplace (Ctrl-Shift-x). VS Code settings are already provided in settings.json file. For now, we use numpydoc docstring format. Keyboard shortcut: Ctrl+Shift+2.