From ba08b157f3a9d3b1917d2b2a560fa98543630d1d Mon Sep 17 00:00:00 2001 From: David Lord Date: Sun, 16 Jun 2024 10:52:43 -0700 Subject: [PATCH] refresh --- .editorconfig | 2 +- .github/workflows/publish.yaml | 10 +++-- .github/workflows/tests.yaml | 18 ++++++--- .gitignore | 18 ++++----- .pre-commit-config.yaml | 2 +- pyproject.toml | 19 +++++---- requirements/build.txt | 12 ++++-- requirements/dev.txt | 72 +++++++++++++++++++++++----------- requirements/docs.txt | 26 +++++++----- requirements/tests.txt | 22 ++++++++--- requirements/typing.txt | 28 ++++++++----- tox.ini | 24 +++++++----- 12 files changed, 161 insertions(+), 92 deletions(-) diff --git a/.editorconfig b/.editorconfig index e32c802..2ff985a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,5 +9,5 @@ end_of_line = lf charset = utf-8 max_line_length = 88 -[*.{yml,yaml,json,js,css,html}] +[*.{css,html,js,json,jsx,scss,ts,tsx,yaml,yml}] indent_size = 2 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a5c5676..ecc7372 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -25,7 +25,6 @@ jobs: run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 with: - name: dist path: ./dist provenance: needs: [build] @@ -48,8 +47,9 @@ jobs: - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - name: create release run: > - gh release create --draft --repo ${{ github.repository }} ${{ github.ref_name }} *.intoto.jsonl/* dist/* - + gh release create --draft --repo ${{ github.repository }} + ${{ github.ref_name }} + *.intoto.jsonl/* artifact/* env: GH_TOKEN: ${{ github.token }} publish-pypi: @@ -58,10 +58,12 @@ jobs: # files in the draft release. environment: name: publish - url: https://pypi.org/project/Flask-Alembic/ + url: https://pypi.org/project/Flask-Alembic/${{ github.ref_name }} runs-on: ubuntu-latest permissions: id-token: write steps: - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14 + with: + packages-dir: artifact/ diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b5caeb6..e30f5eb 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -4,11 +4,19 @@ on: branches: - main - '*.x' + paths-ignore: + - 'docs/**' + - '*.md' + - '*.rst' pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + - '*.rst' jobs: tests: - name: ${{ matrix.python }} - runs-on: ubuntu-latest + name: ${{ matrix.name || matrix.python }} + runs-on: ${{ matrix.os || 'ubuntu-latest' }} strategy: fail-fast: false matrix: @@ -20,9 +28,9 @@ jobs: python-version: ${{ matrix.python }} allow-prereleases: true cache: pip - cache-dependency-path: requirements/*.txt + cache-dependency-path: requirements*/*.txt - run: pip install tox - - run: tox run -e py${{ matrix.python }} + - run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }} typing: runs-on: ubuntu-latest steps: @@ -31,7 +39,7 @@ jobs: with: python-version: '3.x' cache: pip - cache-dependency-path: requirements/*.txt + cache-dependency-path: requirements*/*.txt - name: cache mypy uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: diff --git a/.gitignore b/.gitignore index 39136db..62c1b88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,10 @@ -/.idea/ -/.vscode/ -/.venv*/ -/venv*/ +.idea/ +.vscode/ +.venv*/ +venv*/ __pycache__/ -/dist/ -/.coverage* -/htmlcov/ -/.tox/ -/docs/_build/ +dist/ +.coverage* +htmlcov/ +.tox/ +docs/_build/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0b0bdf9..9516587 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: monthly repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.7 + rev: v0.4.9 hooks: - id: ruff - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index a28f96a..676fbb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,19 +1,16 @@ [project] name = "Flask-Alembic" -version = "3.1.0" -description = "Flask extension to integrate Alembic with Flask-SQLAlchemy." +version = "3.1.0.dev" +description = "Integrate Alembic with Flask." readme = "README.md" license = { file = "LICENSE.txt" } -authors = [{name = "David Lord", email = "davidism@gmail.com"},] +authors = [{ name = "David Lord" }] +maintainers = [{ name = "Pallets", email = "contact@palletsprojects.com" }] classifiers = [ "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", "Framework :: Flask", - "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", "Programming Language :: Python", - "Topic :: Database", "Typing :: Typed", ] requires-python = ">=3.9" @@ -24,9 +21,11 @@ dependencies = [ ] [project.urls] +Donate = "https://palletsprojects.com/donate" Documentation = "https://flask-alembic.readthedocs.io" -Changes = "https://flask-alembic.readthedocs.io/changes/" -Source = "https://github.com/davidism/flask-alembic/" +Changes = "https://flask-alembic.readthedocs.io/page/changes/" +Source = "https://github.com/pallets-eco/flask-alembic/" +Chat = "https://discord.gg/pallets" [build-system] requires = ["flit_core<4"] @@ -56,11 +55,11 @@ strict = true [tool.pyright] pythonVersion = "3.9" include = ["src/flask_alembic", "tests"] +typeCheckingMode = "basic" [tool.ruff] src = ["src"] fix = true -unsafe-fixes = true show-fixes = true output-format = "full" diff --git a/requirements/build.txt b/requirements/build.txt index 6db0c14..49d231d 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,12 +1,18 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile build.in # build==1.2.1 # via -r build.in -packaging==23.2 +importlib-metadata==7.1.0 # via build -pyproject-hooks==1.0.0 +packaging==24.1 # via build +pyproject-hooks==1.1.0 + # via build +tomli==2.0.1 + # via build +zipp==3.19.2 + # via importlib-metadata diff --git a/requirements/dev.txt b/requirements/dev.txt index 0c43f85..cbd9ef6 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile dev.in @@ -13,7 +13,7 @@ asgiref==3.8.1 # -r tests.txt # -r typing.txt # flask -babel==2.14.0 +babel==2.15.0 # via # -r docs.txt # sphinx @@ -26,9 +26,9 @@ blinker==1.8.2 # -r tests.txt # -r typing.txt # flask -cachetools==5.3.2 +cachetools==5.3.3 # via tox -certifi==2024.2.2 +certifi==2024.6.2 # via # -r docs.txt # requests @@ -49,12 +49,17 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -docutils==0.20.1 +docutils==0.21.2 # via # -r docs.txt # myst-parser # sphinx -filelock==3.13.1 +exceptiongroup==1.2.1 + # via + # -r tests.txt + # -r typing.txt + # pytest +filelock==3.15.1 # via # tox # virtualenv @@ -79,7 +84,7 @@ greenlet==3.0.3 # -r tests.txt # -r typing.txt # sqlalchemy -identify==2.5.33 +identify==2.5.36 # via pre-commit idna==3.7 # via @@ -89,6 +94,13 @@ imagesize==1.4.1 # via # -r docs.txt # sphinx +importlib-metadata==7.1.0 + # via + # -r docs.txt + # -r tests.txt + # -r typing.txt + # flask + # sphinx iniconfig==2.0.0 # via # -r tests.txt @@ -99,7 +111,7 @@ itsdangerous==2.2.0 # -r tests.txt # -r typing.txt # flask -jinja2==3.1.3 +jinja2==3.1.4 # via # -r docs.txt # -r tests.txt @@ -119,7 +131,7 @@ markupsafe==2.1.5 # -r typing.txt # jinja2 # werkzeug -mdit-py-plugins==0.4.0 +mdit-py-plugins==0.4.1 # via # -r docs.txt # myst-parser @@ -135,12 +147,12 @@ mypy-extensions==1.0.0 # mypy myst-parser==3.0.1 # via -r docs.txt -nodeenv==1.8.0 +nodeenv==1.9.1 # via # -r typing.txt # pre-commit # pyright -packaging==23.2 +packaging==24.1 # via # -r docs.txt # -r tests.txt @@ -149,7 +161,7 @@ packaging==23.2 # pytest # sphinx # tox -platformdirs==4.2.0 +platformdirs==4.2.2 # via # tox # virtualenv @@ -161,16 +173,16 @@ pluggy==1.5.0 # tox pre-commit==3.7.1 # via -r dev.in -pygments==2.17.2 +pygments==2.18.0 # via # -r docs.txt # furo # sphinx pyproject-api==1.6.1 # via tox -pyright==1.1.365 +pyright==1.1.367 # via -r typing.txt -pytest==8.2.1 +pytest==8.2.2 # via # -r tests.txt # -r typing.txt @@ -179,7 +191,7 @@ pyyaml==6.0.1 # -r docs.txt # myst-parser # pre-commit -requests==2.32.0 +requests==2.32.3 # via # -r docs.txt # sphinx @@ -234,19 +246,30 @@ sqlalchemy[asyncio]==2.0.30 # -r typing.txt # flask-sqlalchemy # flask-sqlalchemy-lite -tox==4.15.0 +tomli==2.0.1 + # via + # -r docs.txt + # -r tests.txt + # -r typing.txt + # mypy + # pyproject-api + # pytest + # sphinx + # tox +tox==4.15.1 # via -r dev.in -typing-extensions==4.9.0 +typing-extensions==4.12.2 # via # -r tests.txt # -r typing.txt + # asgiref # mypy # sqlalchemy -urllib3==2.2.0 +urllib3==2.2.1 # via # -r docs.txt # requests -virtualenv==20.25.0 +virtualenv==20.26.2 # via # pre-commit # tox @@ -255,6 +278,9 @@ werkzeug==3.0.3 # -r tests.txt # -r typing.txt # flask - -# The following packages are considered to be unsafe in a requirements file: -# setuptools +zipp==3.19.2 + # via + # -r docs.txt + # -r tests.txt + # -r typing.txt + # importlib-metadata diff --git a/requirements/docs.txt b/requirements/docs.txt index 06f21e0..e25069d 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,20 +1,20 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile docs.in # alabaster==0.7.16 # via sphinx -babel==2.14.0 +babel==2.15.0 # via sphinx beautifulsoup4==4.12.3 # via furo -certifi==2024.2.2 +certifi==2024.6.2 # via requests charset-normalizer==3.3.2 # via requests -docutils==0.20.1 +docutils==0.21.2 # via # myst-parser # sphinx @@ -24,7 +24,9 @@ idna==3.7 # via requests imagesize==1.4.1 # via sphinx -jinja2==3.1.3 +importlib-metadata==7.1.0 + # via sphinx +jinja2==3.1.4 # via # myst-parser # sphinx @@ -34,21 +36,21 @@ markdown-it-py==3.0.0 # myst-parser markupsafe==2.1.5 # via jinja2 -mdit-py-plugins==0.4.0 +mdit-py-plugins==0.4.1 # via myst-parser mdurl==0.1.2 # via markdown-it-py myst-parser==3.0.1 # via -r docs.in -packaging==23.2 +packaging==24.1 # via sphinx -pygments==2.17.2 +pygments==2.18.0 # via # furo # sphinx pyyaml==6.0.1 # via myst-parser -requests==2.32.0 +requests==2.32.3 # via sphinx snowballstemmer==2.2.0 # via sphinx @@ -77,5 +79,9 @@ sphinxcontrib-qthelp==1.0.7 # via sphinx sphinxcontrib-serializinghtml==1.1.10 # via sphinx -urllib3==2.2.0 +tomli==2.0.1 + # via sphinx +urllib3==2.2.1 # via requests +zipp==3.19.2 + # via importlib-metadata diff --git a/requirements/tests.txt b/requirements/tests.txt index 26e14d0..f283af0 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile tests.in @@ -10,6 +10,8 @@ blinker==1.8.2 # via flask click==8.1.7 # via flask +exceptiongroup==1.2.1 + # via pytest flask[async]==3.0.3 # via # flask-sqlalchemy @@ -20,27 +22,35 @@ flask-sqlalchemy-lite==0.1.0 # via -r tests.in greenlet==3.0.3 # via sqlalchemy +importlib-metadata==7.1.0 + # via flask iniconfig==2.0.0 # via pytest itsdangerous==2.2.0 # via flask -jinja2==3.1.3 +jinja2==3.1.4 # via flask markupsafe==2.1.5 # via # jinja2 # werkzeug -packaging==23.2 +packaging==24.1 # via pytest pluggy==1.5.0 # via pytest -pytest==8.2.1 +pytest==8.2.2 # via -r tests.in sqlalchemy[asyncio]==2.0.30 # via # flask-sqlalchemy # flask-sqlalchemy-lite -typing-extensions==4.9.0 - # via sqlalchemy +tomli==2.0.1 + # via pytest +typing-extensions==4.12.2 + # via + # asgiref + # sqlalchemy werkzeug==3.0.3 # via flask +zipp==3.19.2 + # via importlib-metadata diff --git a/requirements/typing.txt b/requirements/typing.txt index e5008e0..b3990b3 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile typing.in @@ -10,6 +10,8 @@ blinker==1.8.2 # via flask click==8.1.7 # via flask +exceptiongroup==1.2.1 + # via pytest flask[async]==3.0.3 # via # flask-sqlalchemy @@ -20,11 +22,13 @@ flask-sqlalchemy-lite==0.1.0 # via -r typing.in greenlet==3.0.3 # via sqlalchemy +importlib-metadata==7.1.0 + # via flask iniconfig==2.0.0 # via pytest itsdangerous==2.2.0 # via flask -jinja2==3.1.3 +jinja2==3.1.4 # via flask markupsafe==2.1.5 # via @@ -34,26 +38,30 @@ mypy==1.10.0 # via -r typing.in mypy-extensions==1.0.0 # via mypy -nodeenv==1.8.0 +nodeenv==1.9.1 # via pyright -packaging==23.2 +packaging==24.1 # via pytest pluggy==1.5.0 # via pytest -pyright==1.1.365 +pyright==1.1.367 # via -r typing.in -pytest==8.2.1 +pytest==8.2.2 # via -r typing.in sqlalchemy[asyncio]==2.0.30 # via # flask-sqlalchemy # flask-sqlalchemy-lite -typing-extensions==4.9.0 +tomli==2.0.1 + # via + # mypy + # pytest +typing-extensions==4.12.2 # via + # asgiref # mypy # sqlalchemy werkzeug==3.0.3 # via flask - -# The following packages are considered to be unsafe in a requirements file: -# setuptools +zipp==3.19.2 + # via importlib-metadata diff --git a/tox.ini b/tox.ini index 842570a..058f68b 100644 --- a/tox.ini +++ b/tox.ini @@ -30,17 +30,21 @@ commands = deps = -r requirements/docs.txt commands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml +[testenv:update-pre_commit] +labels = update +deps = pre-commit +skip_install = true +commands = pre-commit autoupdate -j4 + [testenv:update-requirements] -deps = - pip-tools - pre-commit +base_python = 3.9 +labels = update +deps = pip-tools skip_install = true change_dir = requirements commands = - pre-commit autoupdate -j4 - pip-compile -U build.in - pip-compile -U docs.in - pip-compile -U tests.in - pip-compile -U tests-3.8.in - pip-compile -U typing.in - pip-compile -U dev.in + pip-compile build.in -q {posargs:-U} + pip-compile docs.in -q {posargs:-U} + pip-compile tests.in -q {posargs:-U} + pip-compile typing.in -q {posargs:-U} + pip-compile dev.in -q {posargs:-U}