Dev zone/Reports
The Nasqueron internal reports repository is a monorepo containing SQL queries and tools to produce reports about Nasqueron internal data.
Python tools
Configure PYTHONPATH
Python allows to develop several packages at the same time providing all the src/ folders to your PYTHONPATH variables.
First, ensure you don't have any module installed through .whl running pip freeze
. If you see something like nasqueron-reports==0.1.0
, it comes from package auto detection and it's fine and will use your local code. What is not fine is a long line with wheel archive.
Then, include every tools/*/src include in your path. The environment script takes care of that.
Environment script
You can use this environment configuration script for sh, bash and zsh:
#!/bin/sh
export DB_USERNAME=someuser
export DB_PASSWORD=somepass
export VAULT_ADDR=https://localhost:8200
# -------------------------------------------------------------
# Python paths
#
# Modules are in tools/*/src
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
current_dir=$(pwd)
full_path=""
# shellcheck disable=SC2044
for dir in $(find tools -type d -name src); do
if [ "$full_path" = "" ]; then
export full_path="$current_dir/$dir"
else
export full_path="$full_path:$current_dir/$dir"
fi
done
if [ "$PYTHONPATH" != "$full_path" ]; then
if [ "$PYTHONPATH" = "" ]; then
export PYTHONPATH="$full_path"
else
export PYTHONPATH="$PYTHONPATH:$full_path"
fi
fi
If you call it .env, you can use source .env
, but your IDE could complain it contains shell stuff. Override file type as shell script or save it under another name.