Remove poetry #93019
29
DEVELOP.md
29
DEVELOP.md
@ -19,21 +19,32 @@ this to downstream instead?".
|
|||||||
# Development environment
|
# Development environment
|
||||||
|
|
||||||
To set up your development environment make sure you have valid version of
|
To set up your development environment make sure you have valid version of
|
||||||
Python (check `pyproject.toml`) with [Poetry](https://python-poetry.org/)
|
Python (check `pyproject.toml`) and a `virtualenv`.
|
||||||
installed on your `PATH` and then do the following in the root of the
|
|
||||||
repository:
|
Use your favourite way of setting up a `virtualenv`, e.g.:
|
||||||
```
|
```
|
||||||
poetry install # Install dependencies.
|
mkvirtualenv -a `pwd` looper -p /usr/bin/python3.10
|
||||||
|
```
|
||||||
|
|
||||||
|
Or simply use `venv` module directly:
|
||||||
|
```
|
||||||
|
python3.10 -m venv .venv ; source .venv/bin/activate
|
||||||
|
```
|
||||||
|
|
||||||
|
After `virtualenv` has been created and activated, continue with the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
pip install -e .[dev] # Install package and its development dependencies.
|
||||||
cp looper_example_project/settings.example.py looper_example_project/settings.py # Adjust settings.py as needed.
|
cp looper_example_project/settings.example.py looper_example_project/settings.py # Adjust settings.py as needed.
|
||||||
# Make sure you have your database setup according to your settings.py
|
# Make sure you have your database setup according to your settings.py
|
||||||
./manage.sh migrate # Update the schema.
|
./manage.py migrate # Create database tables and run migrations.
|
||||||
./test.sh # Make sure the tests run.
|
./manage.py test # Make sure the tests run.
|
||||||
```
|
```
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
|
||||||
Make sure your development environment is set up correctly and then run
|
Make sure your development environment is set up correctly and then run
|
||||||
`./test.sh` in the root of the repository.
|
`./manage.py test` in the root of the repository.
|
||||||
|
|
||||||
# Type Checking
|
# Type Checking
|
||||||
|
|
||||||
@ -43,5 +54,5 @@ are checked as part of `./test.sh`.
|
|||||||
# Code Formatting
|
# Code Formatting
|
||||||
|
|
||||||
We use [Black](https://black.readthedocs.io/en/stable/) to format code. Proper
|
We use [Black](https://black.readthedocs.io/en/stable/) to format code. Proper
|
||||||
formatting is checked as part of the tests in `/test.sh`. To reformat the whole
|
formatting is checked as part of the tests in `./test.sh`. To reformat the whole
|
||||||
codebase run `poetry run black .`
|
codebase run `black .`
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
set -eux
|
|
||||||
|
|
||||||
cd "$(dirname $0)"
|
|
||||||
poetry run ./manage.py "$@"
|
|
2076
poetry.lock
generated
2076
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
164
pyproject.toml
164
pyproject.toml
@ -1,52 +1,130 @@
|
|||||||
[tool.poetry]
|
[project]
|
||||||
name = "looper"
|
name = "looper"
|
||||||
version = "3.3.3"
|
version = "3.4.0"
|
||||||
description = ""
|
description = "Billing system used in Blender Development Fund and Blender Studio website."
|
||||||
authors = [
|
authors = [
|
||||||
"Francesco Siddi <francesco@blender.org>",
|
{name = "Francesco Siddi", email = "francesco@blender.org"},
|
||||||
"Pablo Vazquez <venomgfx@gmail.com>",
|
{name = "Pablo Vazquez", email = "pablo@blender.org"},
|
||||||
"Sybren A. Stüvel <sybren@blender.org>",
|
{name = "Sem Mulder", email = "sem@mulderke.net"},
|
||||||
"Anna Sirota <anna@blender.org>"
|
{name = "Sybren A. Stüvel", email = "sybren@blender.org"},
|
||||||
|
{name = "Anna Sirota", email = "anna@blender.org"},
|
||||||
|
{name = "Oleg Komarov", email = "oleg@blender.org"},
|
||||||
]
|
]
|
||||||
license = "GPL-3.0"
|
license = {text = "GPL-3.0"}
|
||||||
|
requires-python = "== 3.10.*"
|
||||||
|
dependencies = [
|
||||||
|
"appdirs==1.4.4",
|
||||||
|
"arabic-reshaper==3.0.0",
|
||||||
|
"asgiref==3.6.0",
|
||||||
|
"asn1crypto==1.5.1",
|
||||||
|
"attrs==19.3.0",
|
||||||
|
"babel==2.12.1",
|
||||||
|
"bleach==3.3.1",
|
||||||
|
"braintree==4.17.1",
|
||||||
|
"cached-property==1.5.2",
|
||||||
|
"certifi==2022.12.7",
|
||||||
|
"cffi==1.15.1",
|
||||||
|
"charset-normalizer==3.0.1",
|
||||||
|
"click==8.1.3",
|
||||||
|
"colorhash==1.2.1",
|
||||||
|
"cryptography==39.0.0",
|
||||||
|
"cssselect2==0.7.0",
|
||||||
|
"defusedxml==0.7.1",
|
||||||
|
"django-countries==7.5.1",
|
||||||
|
"django-nested-admin==4.0.2",
|
||||||
|
"django-pipeline==3.1.0",
|
||||||
|
"django==4.2.13",
|
||||||
|
"geoip2==3.0.0",
|
||||||
|
"html5lib==1.1",
|
||||||
|
"idna==3.4",
|
||||||
|
"isodate==0.6.1",
|
||||||
|
"lxml==4.9.2",
|
||||||
|
"maxminddb==2.2.0",
|
||||||
|
"oscrypto==1.3.0",
|
||||||
|
"packaging==23.0",
|
||||||
|
"pillow>=8.1.1",
|
||||||
|
"pycparser==2.21",
|
||||||
|
"pyhanko-certvalidator==0.20.1",
|
||||||
|
"pyhanko==0.17.0",
|
||||||
|
"pypdf==3.5.0",
|
||||||
|
"python-bidi==0.4.2",
|
||||||
|
"python-dateutil==2.8.2",
|
||||||
|
"python-monkey-business==1.0.0",
|
||||||
|
"python-stdnum==1.18",
|
||||||
|
"pytz-deprecation-shim==0.1.0.post0",
|
||||||
|
"pytz==2022.7.1",
|
||||||
|
"pyyaml==6.0",
|
||||||
|
"qrcode==7.4.2",
|
||||||
|
"reportlab~=3.6.9",
|
||||||
|
"requests-file==1.5.1",
|
||||||
|
"requests-toolbelt==0.10.1",
|
||||||
|
"requests==2.31.0",
|
||||||
|
"six==1.16.0",
|
||||||
|
"sqlparse==0.4.3",
|
||||||
|
"stripe==7.1.0",
|
||||||
|
"svglib==1.5.1",
|
||||||
|
"tinycss2==1.2.1",
|
||||||
|
"tqdm==4.64.1",
|
||||||
|
"typing-extensions==4.8.0",
|
||||||
|
"tzdata==2022.7",
|
||||||
|
"tzlocal==4.2",
|
||||||
|
"uritools==4.0.1",
|
||||||
|
"urllib3==1.26.14",
|
||||||
|
"webencodings==0.5.1",
|
||||||
|
"xhtml2pdf==0.2.9",
|
||||||
|
"zeep==4.0.0",
|
||||||
|
]
|
||||||
|
readme = {file = "README.md", content-type = "text/markdown"}
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[project.optional-dependencies]
|
||||||
python = "^3.8"
|
dev = [
|
||||||
geoip2 = "^3.0"
|
"black==22.12.0",
|
||||||
babel = "^2.6"
|
"django-stubs-ext==0.7.0",
|
||||||
braintree = "4.17.1"
|
"django-stubs==1.13.1",
|
||||||
django = "3.2.* || 4.2.*"
|
"factory-boy==3.3.0",
|
||||||
django-countries = "^7.2.1"
|
"faker==20.1.0",
|
||||||
python-dateutil = "^2.7"
|
"flake8-implicit-str-concat==0.1.0",
|
||||||
requests = "^2.22"
|
"flake8==3.9.2",
|
||||||
attrs = "^19.3.0"
|
"ghp-import==2.1.0",
|
||||||
django-pipeline = "^3.1.0"
|
"importlib-metadata==6.0.0",
|
||||||
xhtml2pdf = "^0.2"
|
"jinja2==3.1.2",
|
||||||
bleach = "^3.3.0"
|
"markdown==3.3.7",
|
||||||
colorhash = "^1.0.3"
|
"markupsafe==2.1.2",
|
||||||
python-stdnum = "^1.16"
|
"mccabe==0.6.1",
|
||||||
zeep = "4.0.0"
|
"mergedeep==1.3.4",
|
||||||
django-nested-admin = "^4.0.2"
|
"mkdocs-material==4.6.3",
|
||||||
stripe = "7.1.0"
|
"mkdocs==1.4.2",
|
||||||
|
"mypy-extensions==0.4.4",
|
||||||
|
"mypy==0.991",
|
||||||
|
"pathspec==0.10.3",
|
||||||
|
"platformdirs==2.6.2",
|
||||||
|
"psycopg2==2.9.5",
|
||||||
|
"pycodestyle==2.7.0",
|
||||||
|
"pyflakes==2.3.1",
|
||||||
|
"pygments==2.14.0",
|
||||||
|
"pymdown-extensions==9.9.2",
|
||||||
|
"pyyaml-env-tag==0.1",
|
||||||
|
"responses==0.25.3",
|
||||||
|
"tblib==3.0.0",
|
||||||
|
"tomli==2.0.1",
|
||||||
|
"types-pytz==2022.7.1.0",
|
||||||
|
"types-pyyaml==6.0.12.2",
|
||||||
|
"watchdog==2.3.1",
|
||||||
|
"zipp==3.15.0",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[build-system]
|
||||||
black = "^22.12"
|
requires = ["setuptools>=61"]
|
||||||
mkdocs = "^1.0"
|
build-backend = "setuptools.build_meta"
|
||||||
mkdocs-material = "^4.4"
|
|
||||||
django-stubs = "*"
|
[tool.setuptools.packages.find]
|
||||||
responses = "^0.24.0"
|
where = ["looper/*", "."]
|
||||||
flake8 = "^3.7.9"
|
include = ["looper*"]
|
||||||
flake8-implicit-str-concat = "^0.1.0"
|
exclude = ["looper_example_project", "example_app"]
|
||||||
psycopg2 = "*"
|
|
||||||
mypy = "^0.991"
|
[tool.setuptools.package-data]
|
||||||
factory-boy = "^3.0"
|
"*" = ["*"]
|
||||||
tblib = "3.0.0"
|
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
target_version = ['py38']
|
|
||||||
skip_string_normalization = true
|
skip_string_normalization = true
|
||||||
|
|
||||||
[build-system]
|
|
||||||
requires = ["poetry>=1.0"]
|
|
||||||
build-backend = "poetry.masonry.api"
|
|
||||||
|
8
test.sh
8
test.sh
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
env PYTHONPATH=. poetry run mypy --show-error-codes .
|
PYTHONPATH=. mypy --show-error-codes .
|
||||||
poetry run black --check .
|
black --check .
|
||||||
poetry run flake8 --select ISC001 looper looper_example_project
|
flake8 --select ISC001 looper looper_example_project
|
||||||
poetry run ./manage.py test
|
./manage.py test --parallel
|
||||||
|
Loading…
Reference in New Issue
Block a user