Follow the steps below to set up the project on your environment. If you run into any problems, feel free to leave a GitHub Issue or reach out to any of our communities above.
This guide targets a unix environment however it is possible to perform this setup on Windows by installing Cygwin here.
When installing Cygwin ensure you add the following packages in the setup wizard choosing the most up-to-date version for each:
- python3
- python3-devel
- pip3
- gcc-core
- libffi-devel
- make
- python38-wheel
- libintl-devel
Once installed use Cygwin for all your command-line operations.
This is because one of the dependencies, uWSGI, does not provide Windows support directly.
Set required environment variables:
# Valid values are development, local, postgres_local, production, or staging
export DJANGO_APPLICATION_ENVIRONMENT='local'
# 64 character signing key used to authenticate network requests
export NETWORK_SIGNING_KEY='6f812a35643b55a77f71c3b722504fbc5918e83ec72965f7fd33865ed0be8f81'
# A string with random chars
export SECRET_KEY='some random string'
Install Redis:
brew install redis
Create a virtual environment with Python 3.6 or higher.
Install required packages:
pip3 install -r requirements/local.txt
To initialize the project:
python3 manage.py migrate
python3 manage.py initialize_test_primary_validator -ip [IP ADDRESS]
Run Redis:
redis-server
Run Celery (run each as a separate process):
celery -A config.settings worker -l debug
celery -A config.settings worker -l debug --queue block_queue --pool solo
celery -A config.settings worker -l debug --queue confirmation_block_queue --pool solo
To monitor Celery tasks:
celery flower -A config.settings --address=127.0.0.1 --port=5555
Run:
docker-compose up # add -d to detach from donsole
To run all tests in parallel:
docker-compose run app pytest -n auto
# or
docker-compose exec app pytest # if docker-compose run is running
To monitor Celery tasks:
docker-compose exec celery celery flower -A config.settings --address=127.0.0.1 --port=5555
To watch log files:
tail -f logs/warning.log -n 10
To run all tests in parallel:
pytest -n auto
When adding a package, add to requirements/base.in
and then :
bash scripts/compile_requirements.sh
Join the community to stay updated on the most recent developments, project roadmaps, and random discussions about completely unrelated topics.
All donations will go to thenewboston to help fund the team to continue to develop the community and create new content.
Coin | Address |
---|---|
b6e21072b6ba2eae6f78bc3ade17f6a561fa4582d5494a5120617f2027d38797 | |
3GZYi3w3BXQfyb868K2phHjrS4i8LooaHh | |
0x0E38e2a838F0B20872E5Ff55c82c2EE7509e6d4A |
thenewboston is MIT licensed.