Skip to content

Commit eb37d35

Browse files
authored
bump sqlalchemy to >2.0 (#7)
- Migrate sqlalchemy to 2.0 but not yet supported for the development version (2.1) - Sync tests and pre-commit configuration with the rest of the biocpy packages - Minor edits to tests
1 parent 51b2f76 commit eb37d35

18 files changed

Lines changed: 114 additions & 44 deletions

.github/workflows/pypi-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ jobs:
4848
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
4949
with:
5050
user: __token__
51-
password: ${{ secrets.PYPI_PASSWORD }}
51+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/pypi-test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ jobs:
1313
build:
1414

1515
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
1619

20+
name: Python ${{ matrix.python-version }}
1721
steps:
1822
- uses: actions/checkout@v2
19-
- name: Set up Python 3.9
23+
- name: Setup Python
2024
uses: actions/setup-python@v2
2125
with:
22-
python-version: 3.9
26+
python-version: ${{ matrix.python-version }}
27+
cache: 'pip'
2328
- name: Install dependencies
2429
run: |
2530
python -m pip install --upgrade pip
@@ -32,4 +37,4 @@ jobs:
3237
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3338
- name: Test with tox
3439
run: |
35-
tox
40+
tox

.pre-commit-config.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
exclude: '^docs/conf.py'
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.6.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: check-added-large-files
9+
- id: check-ast
10+
- id: check-json
11+
- id: check-merge-conflict
12+
- id: check-xml
13+
- id: check-yaml
14+
- id: debug-statements
15+
- id: end-of-file-fixer
16+
- id: requirements-txt-fixer
17+
- id: mixed-line-ending
18+
args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
19+
20+
- repo: https://github.com/PyCQA/docformatter
21+
rev: v1.7.5
22+
hooks:
23+
- id: docformatter
24+
additional_dependencies: [tomli]
25+
args: [--in-place, --wrap-descriptions=120, --wrap-summaries=120]
26+
# --config, ./pyproject.toml
27+
28+
- repo: https://github.com/psf/black
29+
rev: 24.4.0
30+
hooks:
31+
- id: black
32+
language_version: python3
33+
34+
- repo: https://github.com/astral-sh/ruff-pre-commit
35+
# Ruff version.
36+
rev: v0.3.7
37+
hooks:
38+
- id: ruff
39+
args: [--fix, --exit-non-zero-on-fix]
40+
41+
## If like to embrace black styles even in the docs:
42+
# - repo: https://github.com/asottile/blacken-docs
43+
# rev: v1.13.0
44+
# hooks:
45+
# - id: blacken-docs
46+
# additional_dependencies: [black]
47+
48+
## Check for misspells in documentation files:
49+
# - repo: https://github.com/codespell-project/codespell
50+
# rev: v2.2.5
51+
# hooks:
52+
# - id: codespell

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Contributors
22

33
* Jayaram Kancherla <jayaram.kancherla@gmail.com>
4-
* Max Hargreaves <max_hargreaves@outlook.com>
4+
* Max Hargreaves <max_hargreaves@outlook.com>

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Version 0.1 (development)
44

5-
- Initial release
5+
- Initial release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Package is published to [PyPI](https://pypi.org/project/pyBiocFileCache/)
1616
pip install pybiocfilecache
1717
```
1818

19-
#### Initialize a cache directory
19+
#### Initialize a cache directory
2020

2121
```
2222
from pybiocfilecache import BiocFileCache

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
furo
12
# Requirements file for ReadTheDocs, check .readthedocs.yml.
23
# To build the module reference correctly, make sure every external package
34
# under `install_requires` in `setup.cfg` is also listed here!
45
# sphinx_rtd_theme
56
recommonmark
67
sphinx>=3.2.1
7-
furo

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,18 @@ build-backend = "setuptools.build_meta"
66
[tool.setuptools_scm]
77
# See configuration details in https://github.com/pypa/setuptools_scm
88
version_scheme = "no-guess-dev"
9+
10+
[tool.ruff]
11+
line-length = 120
12+
src = ["src"]
13+
exclude = ["tests"]
14+
extend-ignore = ["F821"]
15+
16+
[tool.ruff.pydocstyle]
17+
convention = "google"
18+
19+
[tool.ruff.per-file-ignores]
20+
"__init__.py" = ["E402", "F401"]
21+
22+
[tool.black]
23+
force-exclude = "__init__.py"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ package_dir =
4747
# For more information, check out https://semver.org/.
4848
install_requires =
4949
importlib-metadata; python_version<"3.8"
50-
sqlalchemy>=1.4,<2.0
50+
sqlalchemy>=2,<2.1
5151

5252
[options.packages.find]
5353
where = src

setup.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
"""
2-
Setup file for pyBiocFileCache.
3-
Use setup.cfg to configure your project.
1+
"""Setup file for pyBiocFileCache. Use setup.cfg to configure your project.
42
5-
This file was generated with PyScaffold 4.1.
6-
PyScaffold helps you to put up the scaffold of your new Python project.
7-
Learn more under: https://pyscaffold.org/
3+
This file was generated with PyScaffold 4.1.
4+
PyScaffold helps you to put up the scaffold of your new Python project.
5+
Learn more under: https://pyscaffold.org/
86
"""
7+
98
from setuptools import setup
109

1110
if __name__ == "__main__":

0 commit comments

Comments
 (0)