diff --git a/.circleci/config.yml b/.circleci/config.yml index b62af55d..c95daa0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,21 +1,149 @@ version: 2.1 -workflows: - build-deploy: - jobs: - - build - - approval: - type: approval - requires: - - build +orbs: + python: circleci/python@2.1.1 + +executors: + app-executor: + docker: + - image: cimg/python:3.11 + # @ 13-Sep-23: + # ubuntu 22.04.2 LTS | python3 3.11.5 | poetry 1.6.1 + working_directory: ~/app + +aliases: + - &install-dependencies + run: + name: Install dependencies + command: poetry install + + - &install-dev-dependencies + run: + name: Install dev dependencies + command: poetry install --only dev + + - &install-test-dependencies + run: + name: Install test dependencies + command: poetry install --only test + + - &build-project + run: + name: Build Project + command: poetry install jobs: + requirements: + executor: app-executor + steps: + - checkout + - python/install-packages: + pkg-manager: poetry + - run: + name: Requirements check + command: | + python -V + poetry -V + + lint: + # executor: app-executor + executor: &python-executor + name: python/default + tag: "3.11" + steps: + - checkout + - *install-dev-dependencies + - run: &git-diff-py-files + name: List added, copied, modified, and renamed *py files + command: git diff --name-only --diff-filter=ACMR origin/main | grep -E "(.py$)" > diff.txt || true + - run: + name: Ruff linting + command: poetry run ruff check --config=pyproject.toml . &> lint_checks.txt || true + - run: + name: Diff-based ruff + command: &display-lint-errors | + grep -Ff diff.txt lint_checks.txt > lint_errors.txt || true + if [ -s lint_errors.txt ]; then + cat lint_errors.txt + printf 'Run the following command to fix your branch:\n make fixes' + exit 1 + fi + + format: + # executor: app-executor + executor: *python-executor + steps: + - checkout + - *install-dev-dependencies + - run: *git-diff-py-files + - run: + name: Black style formatting + command: | + python -V + poetry -V + poetry run black . --check --diff --color --config=pyproject.toml &> lint_checks.txt || true + - run: + name: Diff-based black + command: *display-lint-errors + + test: + # executor: app-executor + executor: *python-executor + steps: + - checkout + - python/install-packages: + pkg-manager: poetry + - run: + name: Unit testing + command: | + python -V + poetry -V + build: - docker: - - image: cimg/python:3.11.5 + executor: app-executor steps: - checkout + - *install-dependencies - run: - name: Ruff linting and Black formatting + name: Build command: | + python -V poetry -V + +workflows: + ci: + jobs: + - requirements: + name: Validate requirements + filters: &ci-filter + branches: + ignore: main + tags: + ignore: /.*/ + + - lint: + name: Ruff linting + filters: *ci-filter + requires: + - Validate requirements + + - format: + name: Black formatting + filters: *ci-filter + requires: + - Validate requirements + + - test: + name: Unit testing + filters: *ci-filter + requires: + - Ruff linting + - Black formatting + + build: + jobs: + - build + - approval: + type: approval + requires: + - build diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml index 2a19d77f..742732c5 100644 --- a/.github/workflows/auto-assign.yml +++ b/.github/workflows/auto-assign.yml @@ -1,11 +1,17 @@ -name: Auto Assign Issues and PRs +name: assign issues and prs + on: issues: types: [opened] pull_request: types: [opened] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ASSIGNEE: ${{ vars.DEFAULT_ISSUE_ASSIGNEE }} + jobs: - auto-assign: + auto_assign: runs-on: ubuntu-latest permissions: issues: write @@ -14,5 +20,5 @@ jobs: - uses: pozil/auto-assign-issue@v1 with: abortIfPreviousAssignees: true - repo-token: ${{ secrets.GITHUB_TOKEN }} - assignees: ${{ vars.DEFAULT_ISSUE_ASSIGNEE }} + repo-token: GITHUB_TOKEN + assignees: ASSIGNEE diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 0fc53324..5d5fa6ce 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -1,12 +1,15 @@ -name: Bump version +name: bump version on: push: branches: - - master + - main + +env: + PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} jobs: - bump-version: + bump_version: if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }} runs-on: ubuntu-latest name: "Bump version and create changelog with commitizen" @@ -14,10 +17,10 @@ jobs: - name: Check out uses: actions/checkout@v3 with: - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + token: PERSONAL_ACCESS_TOKEN fetch-depth: 0 - name: Create bump and changelog uses: commitizen-tools/commitizen-action@master with: - github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + github_token: PERSONAL_ACCESS_TOKEN \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index beeacf7b..4fd04683 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,41 +1,98 @@ -name: CI -on: - pull_request: - push: - branches-ignore: main +name: ci + +on: [push, pull_request] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + jobs: - lint-ruff: + requirements: + # Ubunty latest @ 13-Sep-23: + # Ubuntu 22.04.3 LTS | Python 3.10.12 | Pipx 1.2.0 | No poetry | PostgreSQL 14.9 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: python -m pipx install poetry + - name: Set up Python version from Poetry config + uses: actions/setup-python@v4 + with: + python-version-file: 'pyproject.toml' + cache: 'poetry' # caching poetry dependencies + # Warning: poetry cache is not found + - name: Requirements check + run: poetry install --no-interaction + + lint: runs-on: ubuntu-latest + needs: [requirements] steps: - - uses: actions/checkout@v3 - # - name: Set up Python 3.11 - # uses: actions/setup-python@v4 - # with: - # python-version: 3.11 + - uses: actions/checkout@v4 + - run: python -m pipx install poetry + - name: Set up Python version from Poetry config + uses: actions/setup-python@v4 + with: + python-version-file: 'pyproject.toml' + cache: 'poetry' # caching poetry dependencies + # Warning: poetry cache is not found + - run: poetry install --only dev --no-interaction - name: Ruff linting uses: chartboost/ruff-action@v1 with: - args: check --config=pyproject.toml --verbose - # run: | - # python -m pip install --upgrade pip - # python -m pip install poetry - # poetry install - check-black: + args: --config=pyproject.toml + + format: runs-on: ubuntu-latest + needs: [requirements] steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.11 + - uses: actions/checkout@v4 + - run: python -m pipx install poetry + - name: Set up Python version from Poetry config uses: actions/setup-python@v4 with: - python-version: 3.11 - - name: Black formatting + python-version-file: 'pyproject.toml' + cache: 'poetry' # caching poetry dependencies + # Warning: poetry cache is not found + - run: poetry install --only dev --no-interaction + - name: Black style formatting uses: psf/black@stable with: - options: --color --config=pyproject.toml --verbose - # run: | - # python -m pip install --upgrade pip - # python -m pip install poetry - # poetry install --only dev - # poetry run black . + options: --check --diff --color --config=pyproject.toml # env: # CHANGED_FILES: ${{ steps.file_changes.outputs.added_modified }} + + test: + runs-on: ubuntu-latest + needs: [lint, format] + steps: + - uses: actions/checkout@v4 + - run: python -m pipx install poetry + - name: Set up Python version from Poetry config + uses: actions/setup-python@v4 + with: + python-version-file: 'pyproject.toml' + cache: 'poetry' # caching poetry dependencies + # Warning: poetry cache is not found + - run: poetry install --only dev --no-interaction + - name: Unit testing + run: | + python -V + poetry -V + # poetry run pytest + + build: + runs-on: ubuntu-latest + needs: [test] + steps: + - uses: actions/checkout@v4 + - run: python -m pipx install poetry + - name: Set up Python version from Poetry config + uses: actions/setup-python@v4 + with: + python-version-file: 'pyproject.toml' + cache: 'poetry' # caching poetry dependencies + # Warning: poetry cache is not found + - run: poetry install + - name: Build + run: | + python -V + poetry -V diff --git a/.github/workflows/pr-on-push.yaml b/.github/workflows/pr-on-push.yaml index 3e88b60a..212a5e0f 100644 --- a/.github/workflows/pr-on-push.yaml +++ b/.github/workflows/pr-on-push.yaml @@ -1,8 +1,12 @@ -name: Create or update a pull request on push -on: - push: - branches-ignore: - - main +name: pull request on push + +on: [push] + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ASSIGNEE: ${{ vars.DEFAULT_ISSUE_ASSIGNEE }} + REVIEWER: ${{ vars.DEFAULT_PR_REVIEWER }} + jobs: create_pull_request: runs-on: ubuntu-latest @@ -12,12 +16,12 @@ jobs: id: open-pr uses: devops-infra/action-pull-request@v0.5.5 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: GITHUB_TOKEN target_branch: main title: "[#] : PLACEHOLDER TITLE" template: ".github/PULL_REQUEST_TEMPLATE.md" - reviewer: ${{ vars.DEFAULT_PR_REVIEWER }} - assignee: ${{ vars.DEFAULT_PR_ASSIGNEE }} + reviewer: REVIEWER + assignee: ASSIGNEE draft: true #label: "auto-pr" # Comma-separated list (no spaces) #milestone: "Milestone 1" # Milestone name diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b7dc0915..1c1c0f55 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,25 +1,8 @@ -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks - ---- - -default_install_hook_types: - # - commit-msg - # - post-checkout - # - post-commit - # - post-rewrite - # - post-merge - - pre-commit - # - pre-push - # - prepare-commit-msg default_language_version: - python: python3.11 -default_stages: - - commit - # - push - # - merge-commit + python: python3.11 exclude: .*migrations\/.*|.git minimum_pre_commit_version: 3.2.1 +default_stages: [commit, push] repos: # Automatically fix issues @@ -36,14 +19,6 @@ repos: additional_dependencies: - tomli - # ## Poetry - # - repo: https://github.com/python-poetry/poetry - # rev: 1.6.0 - # hooks: - # - id: poetry-check - # - id: poetry-lock - # - id: poetry-install - ## Markdown - repo: https://github.com/frnmst/md-toc rev: 8.2.0 @@ -129,13 +104,6 @@ repos: hooks: - id: pyproject-fmt - - repo: https://github.com/rstcheck/rstcheck - rev: v6.2.0 - hooks: - - id: rstcheck - additional_dependencies: - - tomli==2.0.1 - # formatter and linter for HTML templates - repo: https://github.com/Riverside-Healthcare/djLint rev: v1.32.1 @@ -143,24 +111,28 @@ repos: - id: djlint-django - repo: https://github.com/bridgecrewio/checkov.git - rev: 2.4.32 + rev: 2.4.33 hooks: - id: checkov - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.287 + rev: v0.0.289 hooks: - id: ruff args: [ --config=pyproject.toml, - --verbose ] - - repo: https://github.com/psf/black + - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.9.1 hooks: - id: black - args: [--config=pyproject.toml] + args: [ + --check, + --diff, + --color, + --config=pyproject.toml + ] - repo: https://github.com/adamchainz/blacken-docs rev: 1.16.0 @@ -182,19 +154,6 @@ repos: hooks: - id: gitlint -# - repo: https://github.com/pre-commit/mirrors-mypy -# rev: v1.5.1 -# hooks: -# - id: mypy -# exclude: ^tests/ -# args: [ -# --strict, -# --config-file=pyproject.toml -# ] -# additional_dependencies: -# - pytest==7.1.2 - ci: - autoupdate_schedule: weekly - autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks - autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate + autofix_prs: false + autofix_commit_msg: 🎨 [pre-commit.ci] auto fixes from pre-commit.com hooks diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2d55dccc..1d0a7ea8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,7 +12,9 @@ build: python: "3.11" jobs: post_create_environment: - - pip install poetry + - python -V + - python -m pip install --upgrade pip + - python -m pip install poetry - poetry config virtualenvs.create false post_install: - poetry install --only docs diff --git a/ch02-hello/django_project/settings/__init__.py b/ch02-hello/django_project/settings/__init__.py new file mode 100644 index 00000000..802db43f --- /dev/null +++ b/ch02-hello/django_project/settings/__init__.py @@ -0,0 +1,4 @@ +from .django import * +from .environment import * +from .project import * +from .third_party import * diff --git a/ch02-hello/django_project/settings/django.py b/ch02-hello/django_project/settings/django.py new file mode 100644 index 00000000..849d5129 --- /dev/null +++ b/ch02-hello/django_project/settings/django.py @@ -0,0 +1,111 @@ +""" +Django settings for django_project project. + +Generated by 'django-admin startproject' using Django 4.2.4. + +For more information on this file, see +https://docs.djangoproject.com/en/4.2/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/4.2/ref/settings/ +""" +from .environment import env + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ + +# GENERAL +# ------------------------------------------------------------------------------ +# https://docs.djangoproject.com/en/dev/ref/settings +DEBUG = env.bool("DEBUG", default=False) +TEMPLATE_DEBUG = DEBUG +SECRET_KEY = env.str("SECRET_KEY") +ALLOWED_HOSTS = env.list("ALLOWED_HOSTS", default=[]) + +# Application definition + +INSTALLED_APPS = [ + "django.contrib.admin", + "django.contrib.auth", + "django.contrib.contenttypes", + "django.contrib.sessions", + "django.contrib.messages", + "django.contrib.staticfiles", +] + +MIDDLEWARE = [ + "django.middleware.security.SecurityMiddleware", + "django.contrib.sessions.middleware.SessionMiddleware", + "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", + "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", + "django.middleware.clickjacking.XFrameOptionsMiddleware", +] + +ROOT_URLCONF = "django_project.urls" + +TEMPLATES = [ + { + "BACKEND": "django.template.backends.django.DjangoTemplates", + "DIRS": [], + "APP_DIRS": True, + "OPTIONS": { + "context_processors": [ + "django.template.context_processors.debug", + "django.template.context_processors.request", + "django.contrib.auth.context_processors.auth", + "django.contrib.messages.context_processors.messages", + ], + }, + }, +] + +WSGI_APPLICATION = "django_project.wsgi.application" + + +# Database +# ------------------------------------------------------------------------------ + +DATABASES = {"default": env.db("DATABASE_URL")} + +# Password validation +# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", + }, + { + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/4.2/topics/i18n/ + +LANGUAGE_CODE = "en-us" + +TIME_ZONE = "UTC" + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/4.2/howto/static-files/ + +STATIC_URL = env.str("STATIC_URL", default="static/") + +# Default primary key field type +# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field + +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" diff --git a/ch02-hello/django_project/settings/environment.py b/ch02-hello/django_project/settings/environment.py new file mode 100644 index 00000000..67af0201 --- /dev/null +++ b/ch02-hello/django_project/settings/environment.py @@ -0,0 +1,15 @@ +import os + +import environ + +env = environ.Env( + # set casting, default value + DEBUG=(bool, False) +) +env.prefix = "DJANGO_" + +site_root = environ.Path(__file__) - 3 # Root of the project + +env_file = site_root(".env") +if os.path.exists(env_file): # pragma: no cover + environ.Env.read_env(env_file=env_file) diff --git a/ch02-hello/django_project/settings/project.py b/ch02-hello/django_project/settings/project.py new file mode 100644 index 00000000..e69de29b diff --git a/ch02-hello/django_project/settings/third_party.py b/ch02-hello/django_project/settings/third_party.py new file mode 100644 index 00000000..e69de29b diff --git a/ch02-hello/poetry.lock b/ch02-hello/poetry.lock index f955b7ce..e3a8018c 100644 --- a/ch02-hello/poetry.lock +++ b/ch02-hello/poetry.lock @@ -16,13 +16,13 @@ tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] [[package]] name = "django" -version = "4.2.4" +version = "4.2.5" description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." optional = false python-versions = ">=3.8" files = [ - {file = "Django-4.2.4-py3-none-any.whl", hash = "sha256:860ae6a138a238fc4f22c99b52f3ead982bb4b1aad8c0122bcd8c8a3a02e409d"}, - {file = "Django-4.2.4.tar.gz", hash = "sha256:7e4225ec065e0f354ccf7349a22d209de09cc1c074832be9eb84c51c1799c432"}, + {file = "Django-4.2.5-py3-none-any.whl", hash = "sha256:b6b2b5cae821077f137dc4dade696a1c2aa292f892eca28fa8d7bfdf2608ddd4"}, + {file = "Django-4.2.5.tar.gz", hash = "sha256:5e5c1c9548ffb7796b4a8a4782e9a2e5a3df3615259fc1bfd3ebc73b646146c1"}, ] [package.dependencies] @@ -64,4 +64,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "42f7d00604b90e91d1e107b843e74ef3d3434daf84f01a24e72283b12c99a5f3" +content-hash = "6b68b91ea4c452eaed288484a915a24de90c518ea2ccbee1c279ba89f114c050" diff --git a/ch02-hello/pyproject.toml b/ch02-hello/pyproject.toml index 5d36b51a..fb8aa249 100644 --- a/ch02-hello/pyproject.toml +++ b/ch02-hello/pyproject.toml @@ -8,7 +8,7 @@ license = "MIT" [tool.poetry.dependencies] python = "^3.11" -django = "4.2.4" +django = "4.2.5" [build-system] build-backend = "poetry.core.masonry.api" diff --git a/poetry.lock b/poetry.lock index 4c99ab82..85a71492 100644 --- a/poetry.lock +++ b/poetry.lock @@ -106,17 +106,6 @@ files = [ {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, ] -[[package]] -name = "cfgv" -version = "3.4.0" -description = "Validate configuration and produce human readable error messages." -optional = false -python-versions = ">=3.8" -files = [ - {file = "cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9"}, - {file = "cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560"}, -] - [[package]] name = "charset-normalizer" version = "3.2.0" @@ -240,17 +229,6 @@ files = [ [package.extras] graph = ["objgraph (>=1.7.2)"] -[[package]] -name = "distlib" -version = "0.3.7" -description = "Distribution utilities" -optional = false -python-versions = "*" -files = [ - {file = "distlib-0.3.7-py2.py3-none-any.whl", hash = "sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057"}, - {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, -] - [[package]] name = "django" version = "4.2.5" @@ -298,35 +276,6 @@ files = [ {file = "docutils-0.18.1.tar.gz", hash = "sha256:679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06"}, ] -[[package]] -name = "filelock" -version = "3.12.3" -description = "A platform independent file lock." -optional = false -python-versions = ">=3.8" -files = [ - {file = "filelock-3.12.3-py3-none-any.whl", hash = "sha256:f067e40ccc40f2b48395a80fcbd4728262fab54e232e090a4063ab804179efeb"}, - {file = "filelock-3.12.3.tar.gz", hash = "sha256:0ecc1dd2ec4672a10c8550a8182f1bd0c0a5088470ecd5a125e45f49472fac3d"}, -] - -[package.extras] -docs = ["furo (>=2023.7.26)", "sphinx (>=7.1.2)", "sphinx-autodoc-typehints (>=1.24)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.3)", "diff-cover (>=7.7)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)", "pytest-timeout (>=2.1)"] - -[[package]] -name = "identify" -version = "2.5.27" -description = "File identification library for Python" -optional = false -python-versions = ">=3.8" -files = [ - {file = "identify-2.5.27-py2.py3-none-any.whl", hash = "sha256:fdb527b2dfe24602809b2201e033c2a113d7bdf716db3ca8e3243f735dcecaba"}, - {file = "identify-2.5.27.tar.gz", hash = "sha256:287b75b04a0e22d727bc9a41f0d4f3c1bcada97490fa6eabb5b28f0e9097e733"}, -] - -[package.extras] -license = ["ukkonen"] - [[package]] name = "idna" version = "3.4" @@ -519,20 +468,6 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] -[[package]] -name = "nodeenv" -version = "1.8.0" -description = "Node.js virtual environment builder" -optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" -files = [ - {file = "nodeenv-1.8.0-py2.py3-none-any.whl", hash = "sha256:df865724bb3c3adc86b3876fa209771517b0cfe596beff01a92700e0e8be4cec"}, - {file = "nodeenv-1.8.0.tar.gz", hash = "sha256:d51e0c37e64fbf47d017feac3145cdbb58836d7eee8c6f6d3b6880c5456227d2"}, -] - -[package.dependencies] -setuptools = "*" - [[package]] name = "packaging" version = "23.1" @@ -570,24 +505,6 @@ files = [ docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] -[[package]] -name = "pre-commit" -version = "3.4.0" -description = "A framework for managing and maintaining multi-language pre-commit hooks." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pre_commit-3.4.0-py2.py3-none-any.whl", hash = "sha256:96d529a951f8b677f730a7212442027e8ba53f9b04d217c4c67dc56c393ad945"}, - {file = "pre_commit-3.4.0.tar.gz", hash = "sha256:6bbd5129a64cad4c0dfaeeb12cd8f7ea7e15b77028d985341478c8af3c759522"}, -] - -[package.dependencies] -cfgv = ">=2.0.0" -identify = ">=1.0.0" -nodeenv = ">=0.11.1" -pyyaml = ">=5.1" -virtualenv = ">=20.10.0" - [[package]] name = "psycopg2-binary" version = "2.9.7" @@ -728,65 +645,6 @@ files = [ [package.dependencies] pylint = ">=1.7" -[[package]] -name = "pyyaml" -version = "6.0.1" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.6" -files = [ - {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, - {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, - {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, - {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, - {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, - {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, - {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, - {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, - {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, - {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, - {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, - {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, - {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, -] - [[package]] name = "requests" version = "2.31.0" @@ -834,22 +692,6 @@ files = [ {file = "ruff-0.0.286.tar.gz", hash = "sha256:f1e9d169cce81a384a26ee5bb8c919fe9ae88255f39a1a69fd1ebab233a85ed2"}, ] -[[package]] -name = "setuptools" -version = "68.2.0" -description = "Easily download, build, install, upgrade, and uninstall Python packages" -optional = false -python-versions = ">=3.8" -files = [ - {file = "setuptools-68.2.0-py3-none-any.whl", hash = "sha256:af3d5949030c3f493f550876b2fd1dd5ec66689c4ee5d5344f009746f71fd5a8"}, - {file = "setuptools-68.2.0.tar.gz", hash = "sha256:00478ca80aeebeecb2f288d3206b0de568df5cd2b8fada1209843cc9a8d88a48"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] - [[package]] name = "snowballstemmer" version = "2.2.0" @@ -1087,26 +929,6 @@ secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17. socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] -[[package]] -name = "virtualenv" -version = "20.24.5" -description = "Virtual Python Environment builder" -optional = false -python-versions = ">=3.7" -files = [ - {file = "virtualenv-20.24.5-py3-none-any.whl", hash = "sha256:b80039f280f4919c77b30f1c23294ae357c4c8701042086e3fc005963e4e537b"}, - {file = "virtualenv-20.24.5.tar.gz", hash = "sha256:e8361967f6da6fbdf1426483bfe9fca8287c242ac0bc30429905721cefbff752"}, -] - -[package.dependencies] -distlib = ">=0.3.7,<1" -filelock = ">=3.12.2,<4" -platformdirs = ">=3.9.1,<4" - -[package.extras] -docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] - [[package]] name = "wrapt" version = "1.15.0" @@ -1194,4 +1016,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "a3bc7cc7ff61d8cb15c5739256f19d492c35e25866fc16a57f49600d3650a625" +content-hash = "82824c40d622370e7b96fd0b364af3236d040787b5bf62ba61a5576829c84dfe" diff --git a/pyproject.toml b/pyproject.toml index fcabc099..1334de39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,8 +13,10 @@ psycopg2-binary = "^2.9.7" django = "^4.2.4" django-environ = "^0.10.0" +[tool.poetry.group.dev] +optional = true + [tool.poetry.group.dev.dependencies] -pre-commit = "^3.3.3" black = "^23.7.0" ruff = "^0.0.286" pylint-django = "^2.5.3"