Remove poetry #93019

Merged
Anna Sirota merged 27 commits from remove-poetry into main 2024-07-01 17:03:21 +02:00
5 changed files with 145 additions and 2137 deletions

View File

@ -19,21 +19,32 @@ this to downstream instead?".
# Development environment
To set up your development environment make sure you have valid version of
Python (check `pyproject.toml`) with [Poetry](https://python-poetry.org/)
installed on your `PATH` and then do the following in the root of the
repository:
Python (check `pyproject.toml`) and a `virtualenv`.
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.
# Make sure you have your database setup according to your settings.py
./manage.sh migrate # Update the schema.
./test.sh # Make sure the tests run.
./manage.py migrate # Create database tables and run migrations.
./manage.py test # Make sure the tests run.
```
# Testing
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
@ -43,5 +54,5 @@ are checked as part of `./test.sh`.
# Code Formatting
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
codebase run `poetry run black .`
formatting is checked as part of the tests in `./test.sh`. To reformat the whole
codebase run `black .`

View File

@ -1,5 +0,0 @@
#!/usr/bin/env sh
set -eux
cd "$(dirname $0)"
poetry run ./manage.py "$@"

2076
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,52 +1,130 @@
[tool.poetry]
[project]
name = "looper"
version = "3.3.3"
description = ""
version = "3.4.0"
description = "Billing system used in Blender Development Fund and Blender Studio website."
authors = [
"Francesco Siddi <francesco@blender.org>",
"Pablo Vazquez <venomgfx@gmail.com>",
"Sybren A. Stüvel <sybren@blender.org>",
"Anna Sirota <anna@blender.org>"
{name = "Francesco Siddi", email = "francesco@blender.org"},
{name = "Pablo Vazquez", email = "pablo@blender.org"},
{name = "Sem Mulder", email = "sem@mulderke.net"},
{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]
python = "^3.8"
geoip2 = "^3.0"
babel = "^2.6"
braintree = "4.17.1"
django = "3.2.* || 4.2.*"
django-countries = "^7.2.1"
python-dateutil = "^2.7"
requests = "^2.22"
attrs = "^19.3.0"
django-pipeline = "^3.1.0"
xhtml2pdf = "^0.2"
bleach = "^3.3.0"
colorhash = "^1.0.3"
python-stdnum = "^1.16"
zeep = "4.0.0"
django-nested-admin = "^4.0.2"
stripe = "7.1.0"
[project.optional-dependencies]
dev = [
"black==22.12.0",
"django-stubs-ext==0.7.0",
"django-stubs==1.13.1",
"factory-boy==3.3.0",
"faker==20.1.0",
"flake8-implicit-str-concat==0.1.0",
"flake8==3.9.2",
"ghp-import==2.1.0",
"importlib-metadata==6.0.0",
"jinja2==3.1.2",
"markdown==3.3.7",
"markupsafe==2.1.2",
"mccabe==0.6.1",
"mergedeep==1.3.4",
"mkdocs-material==4.6.3",
"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]
black = "^22.12"
mkdocs = "^1.0"
mkdocs-material = "^4.4"
django-stubs = "*"
responses = "^0.24.0"
flake8 = "^3.7.9"
flake8-implicit-str-concat = "^0.1.0"
psycopg2 = "*"
mypy = "^0.991"
factory-boy = "^3.0"
tblib = "3.0.0"
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["looper/*", "."]
include = ["looper*"]
exclude = ["looper_example_project", "example_app"]
[tool.setuptools.package-data]
"*" = ["*"]
[tool.black]
line-length = 100
target_version = ['py38']
skip_string_normalization = true
[build-system]
requires = ["poetry>=1.0"]
build-backend = "poetry.masonry.api"

View File

@ -1,7 +1,7 @@
#!/usr/bin/env sh
set -eux
env PYTHONPATH=. poetry run mypy --show-error-codes .
poetry run black --check .
poetry run flake8 --select ISC001 looper looper_example_project
poetry run ./manage.py test
PYTHONPATH=. mypy --show-error-codes .
black --check .
flake8 --select ISC001 looper looper_example_project
./manage.py test --parallel