stellar / django-polaris

An extendable Django app for building modular Stellar services
https://django-polaris.readthedocs.io
Apache License 2.0
94 stars 66 forks source link

refactor project structure for ease of development #623

Closed JakeUrban closed 2 years ago

JakeUrban commented 2 years ago

This PR significantly changes the code structure of the project in order to make contributing to the project easier.

The primary benefit is that contributors can now run the reference server using the adjacent polaris source code without docker. Contributors should be able to clone the repository, use the migrate and collectstatic commands to initialize the application, and runserver to stand up the reference server.

The second benefit is moving away from the legacy build system setuptools and using pipenv for dependency management to the new and unified python dependency/build system: poetry.

The Dockerfile and docker-compose.yml files have been updated to support the new structure, so using docker is still supported.

Running tests is also easier. You can now run pytest without the -c polaris/pytest.ini argument.

There are a few unrelated changes added in this PR as well, although I'm happy to move to a separate PR:

codecov-commenter commented 2 years ago

Codecov Report

Merging #623 (0c5bb70) into master (96186c5) will increase coverage by 0.36%. The diff coverage is 100.00%.

:exclamation: Current head 0c5bb70 differs from pull request most recent head a4b53cd. Consider uploading reports for the commit a4b53cd to get more accurate results

@@            Coverage Diff             @@
##           master     #623      +/-   ##
==========================================
+ Coverage   84.03%   84.39%   +0.36%     
==========================================
  Files          52       52              
  Lines        4377     4338      -39     
==========================================
- Hits         3678     3661      -17     
+ Misses        699      677      -22     
Impacted Files Coverage Δ
polaris/__init__.py 100.00% <ø> (ø)
polaris/cors.py 75.00% <ø> (ø)
polaris/exceptions.py 100.00% <ø> (ø)
polaris/integrations/__init__.py 94.59% <ø> (ø)
polaris/integrations/custody.py 37.90% <ø> (ø)
polaris/integrations/customers.py 100.00% <ø> (ø)
polaris/integrations/forms.py 74.64% <ø> (ø)
polaris/integrations/info.py 100.00% <ø> (ø)
polaris/integrations/quote.py 100.00% <ø> (ø)
polaris/integrations/rails.py 100.00% <ø> (ø)
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 96186c5...a4b53cd. Read the comment docs.

yuriescl commented 2 years ago

+1 for Poetry

stfung77 commented 2 years ago

just tried this on windows, definitely a lot easier to set up!