nigel-gott / spacepaperwork

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpacePaperwork

SpacePaperwork is an Eve Echoes loot tracker + profit splitter + alliance/corp management tool tightly integrated with Discord.

pre-commit.ci status CI

Pre-Requisites

  1. https://git-scm.com/book/en/v2/Getting-Started-Installing-Git/
  2. https://docs.docker.com/get-docker/
  3. https://docs.docker.com/compose/install/

Running For Local Development In Docker

  1. git clone https://github.com/nigel-gott/spacepaperwork.git && cd spacepaperwork
docker-compose -f local.yml up --build
  1. Visit your new site running at http://localhost:8000/
  2. Trigger any crons that need to be run (import market data, sync discord roles etc): ./docker_managepy.sh runcrons
  3. Get an interactive python shell into goosetools by ./docker_managepy.sh shell_plus
  4. Run non-integration tests ./tests.sh
  5. Run integration tests ./integration_test.sh
  6. Watch filesystem for changes and re-run non-integration tests when something changes ./test_watcher.sh
  7. Run pre-commit checks ./pre_commit_checks.sh

Running For Local Development using VirtualEnv

  1. git clone https://github.com/nigel-gott/spacepaperwork.git && cd spacepaperwork

  2. cp .env.local.example .env
    
  3. Edit .env to match your environment

  4. Install poetry dependencies:

    poetry install
    
  5. Activate virtual env:

    poetry shell
    
  6. Migrate the database:

    ./manage.py migrate
    
  7. load fixtures:

    ./manage.py loaddata goosetools/users/fixtures/dev.json
    
  8. Setup an initial organization:

    ./manage.py setup_tenants
    
  9. Run the server:

    ./manage.py runserver_plus
    
  10. Visit and Sign Up On http://localhost:8000/

  11. Import market data using:

    ./manage.py runjobs hourly
    
  12. Get an interactive python shell into spacepaperwork:

    ./manage.py shell_plus
    
  13. Run non-integration tests:

    pytest
    
  14. Run integration tests:

    ./integration_test.sh
    
  15. Watch filesystem for changes and re-run non-integration tests when something changes:

    ptw
    
  16. Run pre-commit checks:

    pre-commit run --all-files
    
  17. Install pre-commit checks:

    pre-commit install
    

Cron setup

Spacepaperwork runs various jobs at timed intervals such as market data import, repeating loot groups etc. You must run ./manage.py runcrons every 5 minutes for this to work. To do so I suggest you setup and use cron like so:

crontab -e
# Now edit and add the following lines:
*/5 * * * * TODO INSERT YOUR PYTHON EXEC HERE manage.py runcrons > /home/ubuntu/cronjob.log

About


Languages

Language:Python 59.9%Language:HTML 30.7%Language:JavaScript 4.9%Language:CSS 4.2%Language:Shell 0.3%Language:Dockerfile 0.1%