Development¶
For software development purposes alexandria3k can also be installed and used through its Github repository, rather than as a Python package.
Installation¶
git clone https://github.com/dspinellis/alexandria3k.git
cd alexandra3k/src
pipenv install
CLI use while developing¶
# While in alexandria3k/src directory
# Install development dependencies
pipenv install --dev
# Launch a shell in the virtual environment
pipenv shell
# Navigate to the top directory
cd ..
# Run the CLI
bin/alexandria3k --help
Testing¶
Python unit and integration tests¶
# While in the top-level directory
python3 -m unittest discover
SQL unit tests¶
To run SQL unit tests install rdbunit and the SQLite command-line tool.
# While in the top-level directory
for t in tests/*.rdbu; do rdbunit --database=sqlite $t | sqlite3 ; done
Formatting¶
# While in the top-level directory
black -l 79 src/alexandria3k/*.py
Linting¶
# While in the top-level directory
python -m pylint src/alexandria3k/*.py
Building¶
# While in the top-level directory
python3 -m build