Some migrations require multiple steps. They are documented in the migrations/README.md
- create 2 x pyenv
pyenv virtualenv 3.9.2 qairon-3.9.2
pyenv virtualenv 3.9.2 qairon-dev-3.9.2
while installing modules you may get an error saying it can't find the postgres dev libraries, something about pkg_config. the postgres dev libraries may be in a proprietary directory, google is your friend
pyenv activate qairon-3.9.2
pip install -r requirements.txt
pyenv deactivate
pyenv activate qairon-dev-3.9.2
pip install -r dev_requirements.txt
for any invocation, cli or through IDE, running the server or db migrations, there need to be environment variables set to configure the db
export SQLALCHEMY_DATABASE_URI=postgresql://<user>:<password>@localhost:5432/qairon
default for local development
export SQLALCHEMY_DATABASE_URI=postgresql://qairon:qairon@localhost:5432/qairon
flask app
create the role w/password and db in postgres first that matches your sqlalchemy config
flask db upgrade
python setup.py clean build sdist upload -r local
#~/.pypirc
[distutils]
index-servers = local
[local]
repository: <appropriate URL here>
username: <redacted>
password: <redacted>
- start VPN your dev vpn
- pyenv activate <appropriate pyenv virtualenv here>
- export QAIRON_ENDPOINT=<appropriate URL here>
- Enjoy!
- Make sure to never have the package
qairon_qcli
installed in your runtime or else things will succeed that should fail. - There is both a bash shim
./qcli
and the actual script that gets packaged./qairon/qcli.py
that can be executed. - This bash shim is not packaged, it is a quick and dirty wrapper there for your convenience to be able to run the same
command,
qcli
, that you would normally run, as opposed toqcli.py
- once the
qairon_qcli
package is installed, you may
from qairon.qcli import CLIController as qcli