Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 2.32 KB

README.md

File metadata and controls

73 lines (49 loc) · 2.32 KB

GitHub license Build status Github Code scanning Codacy Badge Total alerts Known Vulnerabilities

Development environment

On any OS, install git and docker. Then :

Install

# Download camptocamp.org source code :
git clone https://github.com/c2corg/v6_api
cd v6_api

Run

# the very first call may be quite long, (15 minutes, depending of your bandwith)
# time to make a coffee
docker-compose up

❤️ http://localhost:6543 ❤️

Press CTRL+C to terminate it.

Run the background jobs and syncer scripts

In distinct terminals:

docker-compose exec api make -f config/docker-dev run-background-jobs
docker-compose exec api make -f config/docker-dev run-syncer

Check code quality

In another terminal (docker-compose up must be running) :

./scripts/lint.sh

Run test suite

In another terminal (docker-compose up must be running) :

# full tests, take a while
./scripts/test.sh

# If you need to test a specific point: 
./scripts/test.sh c2corg_api/tests/models/test_book.py

# or:
./scripts/test.sh c2corg_api/tests/models/test_book.py::TestBook

# or even:
./scripts/test.sh c2corg_api/tests/models/test_book.py::TestBook::test_to_archive

Note: if you're using MinGW on Windows, be sure to prefix the command with MSYS_PATH_NOCONV=1

Useful links in wiki

Full info about development environment