Create a project specific conda environment (e.g. conda create -n myproject python=3.10) or use your conda base environment
Install lifedata in your environment via pip install lifedata
After lifedata installation use lifedata --help to get help for lifedata commands
Generate your LIFEDATA project by using the project template lifedata init <project instance name>
Further steps can be found in the project's README.
To create your local development environment (e.g. for integration with your IDE) run:
conda env createThis will create you a local environment called lifedata with all necessary dependencies installed.
To start the project related services run:
docker-compose upYou can then access the frontend at http://localhost:3000/ in your browser. The API is available at http://localhost:8000/ and is also proxied via the frontend (to avoid CORS issues).
Storybook can be accessed at http://localhost:3001
There are tests for the python code as well as tests for the TypeScript based frontend code.
To always keep the tests running and see if everything is still working as expected, run::
ptw
To run the tests once, just do: py.test
Run yarn test in the webui directory.
If you want to adjust the database tables, you also need to prepare a migration script using alembic in order to provide executable instructions on how to alter the database.
For most cases it's sufficient to change the table definitions in the code and then run::
docker-compose run --rm webapi alembic revision --autogenerate -m "your change message here"
Now inspect the auto generated file if everything is as it is supposed to be.
Then run alembic upgrade head in the api container to apply these changes to your local database.
coming soon
