A multipurpose python flask API server and administration SPA
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.0 KiB

  1. # Corvus Server
  2. ## [API Documentation](https://warricksothr.gitlab.io/Corvus)
  3. ## Requirements
  4. * Python 3.6
  5. * Pipenv
  6. ## Installation
  7. ```bash
  8. git clone https://gitlab.com/WarrickSothr/Corvus.git
  9. cd Corvus/server
  10. pipenv install
  11. pipenv shell
  12. ```
  13. ## Configuration
  14. Specify a settings file
  15. ```bash
  16. export SERVER_SETTINGS='<path to settings python file>'
  17. ```
  18. ## Running
  19. ### Docker
  20. ```bash
  21. docker build -t corvus:local-test .
  22. docker run -d corvus:local-test
  23. ```
  24. ### Local Development Version
  25. Run a local version
  26. ```bash
  27. FLASK_APP=corvus:corvus flask db upgrade
  28. python manage.py user register-admin
  29. FLASK_APP=corvus:corvus flask run
  30. ```
  31. Set log level
  32. ```bash
  33. export SERVER_LOGLEVEL=DEBUG
  34. ```
  35. ## FAQ
  36. ## Development
  37. ```bash
  38. pipenv install --dev
  39. ```
  40. * Make changes
  41. * Add/Update tests
  42. ```bash
  43. ./run_tests
  44. ```
  45. * If everything passes follow contributing guide.
  46. ## Testing
  47. To run the pytests directly, use the following command
  48. ```bash
  49. PYTHONPATH=$(pwd) pipenv run py.test
  50. ```
  51. ## Contributing
  52. See ../CONTRIBUTING.md