|
6 anni fa | |
---|---|---|
doc | 7 anni fa | |
tracim | 6 anni fa | |
.coveragerc | 7 anni fa | |
.gitignore | 7 anni fa | |
.travis.yml | 7 anni fa | |
CHANGES.txt | 7 anni fa | |
MANIFEST.in | 7 anni fa | |
README.md | 6 anni fa | |
development.ini.sample | 7 anni fa | |
production.ini | 7 anni fa | |
pytest.ini | 7 anni fa | |
setup.py | 7 anni fa |
This code is Work in progress. Not usable at all for production.
Backend source code of tracim v2, using Pyramid Framework.
on Debian Stretch (9) :
sudo apt install git
sudo apt install python3 python-virtualenv python3-dev python-pip
git clone https://github.com/tracim/tracim_backend.git
Go to tracim subdirectory:
cd tracim
Create a Python virtual environment:
python3 -m venv env
Activate it in your terminal session (all tracim command execution must be executed under this virtual environment):
source env/bin/activate
Upgrade packaging tools:
pip install --upgrade pip setuptools
Install the project in editable mode with its testing requirements :
pip install -e ".[testing]"
If you want to use postgresql, mysql or other databases than the default one: sqlite, you need to install python driver for those databases that are supported by sqlalchemy.
For postgreSQL and mySQL, those are shortcuts to install Tracim with test and specific driver.
For PostgreSQL:
pip install -e ".[testing,postgresql]"
For mySQL:
pip install -e ".[testing,mysql]"
Create configuration file for a development environment:
cp development.ini.base development.ini
Initialize the database using tracimcli tool
tracimcli db init
Run your project:
pserve development.ini
Run your project's tests:
pytest
Run mypy checks:
mypy --ignore-missing-imports --disallow-untyped-defs tracim
Run pep8 checks:
pep8 tracim
Tracim_backend give access to a REST API in /api/v2. This API is auto-documented with Hapic. The specification is accessible when you run Tracim, go to /api/v2/doc .
For example, with default config:
# run tracim
pserve development.ini
# launch your favorite web-browser
firefox http://localhost:6543/api/v2/doc/