Skip to content

Commit 800afb9

Browse files
authored
update project files (#1328)
2 parents fec440f + 984ffa2 commit 800afb9

39 files changed

+467
-519
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ end_of_line = lf
99
charset = utf-8
1010
max_line_length = 88
1111

12-
[*.{yml,yaml,json,js,css,html}]
12+
[*.{css,html,js,json,jsx,scss,ts,tsx,yaml,yml}]
1313
indent_size = 2

.flake8

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ about: Report a bug in Flask-SQLAlchemy (not SQLAlchemy, not other projects whic
44
---
55

66
<!--
7-
This issue tracker is a tool to address bugs in Flask-SQLAlchemy itself.
8-
Please use Pallets Discord or Stack Overflow for questions about your
9-
own code.
7+
This issue tracker is a tool to address bugs in Flask-SQLAlchemy itself. Please
8+
use GitHub Discussions or the Pallets Discord for questions about your own code.
109
1110
Ensure your issue is with Flask-SQLAlchemy and not SQLAlchemy itself.
1211

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Security issue
4-
5-
about: Do not report security issues publicly. Email our security contact.
6-
- name: Questions
7-
url: https://stackoverflow.com/questions/tagged/flask-sqlalchemy?tab=Frequent
8-
about: Search for and ask questions about your code on Stack Overflow.
9-
- name: Questions and discussions
3+
- name: Questions on Discussions
4+
url: https://github.com/pallets-eco/flask-sqlalchemy/discussions/
5+
about: Ask questions about your own code on the Discussions tab.
6+
- name: Questions on Chat
107
url: https://discord.gg/pallets
11-
about: Discuss questions about your code on our Discord chat.
8+
about: Ask questions about your own code on our Discord chat.

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ about: Suggest a new feature for Flask-SQLAlchemy
55

66
<!--
77
Replace this comment with a description of what the feature should do.
8-
Include details such as links relevant specs or previous discussions.
8+
Include details such as links to relevant specs or previous discussions.
99
-->
1010

1111
<!--
1212
Replace this comment with an example of the problem which this feature
13-
would resolve. Is this problem solvable without changes to Werkzeug,
13+
would resolve. Is this problem solvable without changes to Flask-SQLAlchemy,
1414
such as by subclassing or using an extension?
1515
-->

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ updates:
77
groups:
88
github-actions:
99
patterns:
10-
- "*"
10+
- '*'
1111
- package-ecosystem: pip
1212
directory: /requirements/
1313
schedule:
1414
interval: monthly
1515
groups:
1616
python-requirements:
1717
patterns:
18-
- "*"
18+
- '*'

.github/pull_request_template.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!--
22
Before opening a PR, open a ticket describing the issue or feature the
3-
PR will address. Follow the steps in CONTRIBUTING.rst.
3+
PR will address. An issue is not required for fixing typos in
4+
documentation, or other simple non-code changes.
45
56
Replace this comment with a description of the change. Describe how it
67
addresses the linked ticket.
@@ -9,22 +10,16 @@ addresses the linked ticket.
910
<!--
1011
Link to relevant issues or previous PRs, one per line. Use "fixes" to
1112
automatically close an issue.
12-
-->
1313
14-
- fixes #<issue number>
14+
fixes #<issue number>
15+
-->
1516

1617
<!--
17-
Ensure each step in CONTRIBUTING.rst is complete by adding an "x" to
18-
each box below.
18+
Ensure each step in CONTRIBUTING.rst is complete, especially the following:
1919
20-
If only docs were changed, these aren't relevant and can be removed.
20+
- Add tests that demonstrate the correct behavior of the change. Tests
21+
should fail without the change.
22+
- Add or update relevant docs, in the docs folder and in code.
23+
- Add an entry in CHANGES.rst summarizing the change and linking to the issue.
24+
- Add `.. versionchanged::` entries in any relevant code docs.
2125
-->
22-
23-
Checklist:
24-
25-
- [ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
26-
- [ ] Add or update relevant docs, in the docs folder and in code.
27-
- [ ] Add an entry in `CHANGES.rst` summarizing the change and linking to the issue.
28-
- [ ] Add `.. versionchanged::` entries in any relevant code docs.
29-
- [ ] Run `pre-commit` hooks and fix any issues.
30-
- [ ] Run `pytest` and `tox`, no tests failed.

.github/workflows/lock.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
name: 'Lock threads'
2-
# Lock closed issues that have not received any further activity for
3-
# two weeks. This does not close open issues, only humans may do that.
4-
# We find that it is easier to respond to new issues with fresh examples
5-
# rather than continuing discussions on old issues.
1+
name: Lock inactive closed issues
2+
# Lock closed issues that have not received any further activity for two weeks.
3+
# This does not close open issues, only humans may do that. It is easier to
4+
# respond to new issues with fresh examples rather than continuing discussions
5+
# on old issues.
66

77
on:
88
schedule:
99
- cron: '0 0 * * *'
10-
1110
permissions:
1211
issues: write
1312
pull-requests: write
14-
1513
concurrency:
1614
group: lock
17-
1815
jobs:
1916
lock:
2017
runs-on: ubuntu-latest
2118
steps:
22-
- uses: dessant/lock-threads@be8aa5be94131386884a6da4189effda9b14aa21
19+
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
2320
with:
2421
issue-inactive-days: 14
2522
pr-inactive-days: 14
23+
discussion-inactive-days: 14

.github/workflows/publish.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,42 @@ jobs:
99
outputs:
1010
hash: ${{ steps.hash.outputs.hash }}
1111
steps:
12-
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
13-
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1
12+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
13+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
1414
with:
1515
python-version: '3.x'
16-
cache: 'pip'
17-
cache-dependency-path: 'requirements/*.txt'
18-
- run: pip install build
16+
cache: pip
17+
cache-dependency-path: requirements*/*.txt
18+
- run: pip install -r requirements/build.txt
1919
# Use the commit date instead of the current date during the build.
2020
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
2121
- run: python -m build
2222
# Generate hashes used for provenance.
2323
- name: generate hash
2424
id: hash
2525
run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
26-
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
26+
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
2727
with:
2828
path: ./dist
2929
provenance:
30-
needs: ['build']
30+
needs: [build]
3131
permissions:
3232
actions: read
3333
id-token: write
3434
contents: write
3535
# Can't pin with hash due to how this workflow works.
36-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0
36+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
3737
with:
3838
base64-subjects: ${{ needs.build.outputs.hash }}
3939
create-release:
4040
# Upload the sdist, wheels, and provenance to a GitHub release. They remain
4141
# available as build artifacts for a while as well.
42-
needs: ['provenance']
42+
needs: [provenance]
4343
runs-on: ubuntu-latest
4444
permissions:
4545
contents: write
4646
steps:
47-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
47+
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
4848
- name: create release
4949
run: >
5050
gh release create --draft --repo ${{ github.repository }}
@@ -53,20 +53,21 @@ jobs:
5353
env:
5454
GH_TOKEN: ${{ github.token }}
5555
publish-pypi:
56-
needs: ['provenance']
56+
needs: [provenance]
5757
# Wait for approval before attempting to upload to PyPI. This allows reviewing the
5858
# files in the draft release.
59-
environment: 'publish'
59+
environment:
60+
name: publish
61+
url: https://pypi.org/project/Flask-SQLAlchemy/${{ github.ref_name }}
6062
runs-on: ubuntu-latest
6163
permissions:
6264
id-token: write
6365
steps:
64-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a
65-
# Try uploading to Test PyPI first, in case something fails.
66-
- uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e
66+
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
67+
- uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
6768
with:
6869
repository-url: https://test.pypi.org/legacy/
6970
packages-dir: artifact/
70-
- uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e
71+
- uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
7172
with:
7273
packages-dir: artifact/

.github/workflows/tests.yaml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,47 @@ on:
99
- '*.md'
1010
- '*.rst'
1111
pull_request:
12-
branches:
13-
- main
14-
- '*.x'
1512
paths-ignore:
1613
- 'docs/**'
1714
- '*.md'
1815
- '*.rst'
1916
jobs:
2017
tests:
21-
name: ${{ matrix.name }}
22-
runs-on: ubuntu-latest
18+
name: ${{ matrix.name || matrix.python }}
19+
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
2320
strategy:
2421
fail-fast: false
2522
matrix:
2623
include:
27-
- {name: '3.11', python: '3.11', tox: py311}
28-
- {name: 'Lowest', python: '3.11', tox: py311-min}
29-
- {name: '3.10', python: '3.10', tox: py310}
30-
- {name: '3.9', python: '3.9', tox: py39}
31-
- {name: '3.8', python: '3.8', tox: py38}
32-
- {name: 'Typing', python: '3.11', tox: typing}
24+
- {python: '3.12'}
25+
- {python: '3.11'}
26+
- {python: '3.10'}
27+
- {python: '3.9'}
28+
- {python: '3.8'}
29+
- {name: Minimum Versions, python: '3.11', tox: py-min}
3330
steps:
34-
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
35-
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1
31+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
32+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
3633
with:
3734
python-version: ${{ matrix.python }}
38-
cache: 'pip'
39-
cache-dependency-path: 'requirements/*.txt'
35+
allow-prereleases: true
36+
cache: pip
37+
cache-dependency-path: requirements*/*.txt
38+
- run: pip install tox
39+
- run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
40+
typing:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
44+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
45+
with:
46+
python-version: '3.x'
47+
cache: pip
48+
cache-dependency-path: requirements*/*.txt
4049
- name: cache mypy
41-
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
50+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
4251
with:
4352
path: ./.mypy_cache
44-
key: mypy|${{ matrix.python }}|${{ hashFiles('requirements/mypy.txt') }}
45-
if: matrix.tox == 'typing'
53+
key: mypy|${{ hashFiles('pyproject.toml') }}
4654
- run: pip install tox
47-
- run: tox r -e ${{ matrix.tox }}
55+
- run: tox run -e typing

0 commit comments

Comments
 (0)