This repo used mainly as a submodule for the main repo and is pretty hard to work on outside of it. Therefore follow its setup section first to get the files.
While it is mainly used as a submodule, contributing code to this repo is easier with some local setup.
Assuming you are in the archiver
folder:
-
Create
config.py
file:cp config.py.example config.py cp redis_map.py.example redis_map.py
-
Create a virtual environment:
pip install virtualenv # install the package if it's not installed virtualenv --upgrade-embed-wheels # makes it easier to manage python versions virtualenv --python 3.8 venv
-
Activate the virtual environment:
source venv/bin/activate # venv\Scripts\activate on Windows
-
Install python packages:
pip install --requirement requirements.txt
-
Install
pre-commit
hooks:pre-commit install --install-hooks
This way you'll have all IDE juice while working on it as a submodule.
On windows install libmagic
DLL to not crash on debugging:
pip install python-magic-bin
Install the project inside your virtual environment for Run Python File in Terminal
command to work.
py -m pip install -e .
- Add an entry to the
.pre-commit-config.yaml
file - Update the hooks:
pre-commit autoupdate --freeze
- Install the hooks:
pre-commit install --install-hooks