-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from JPchico/sqalchemy2.x
Adding support for sqlalchemy 2.x
- Loading branch information
Showing
18 changed files
with
1,096 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
|
||
name: CD | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
strategy: | ||
matrix: | ||
python: ["3.8"] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: "Install dependencies" | ||
run: sudo apt-get -y install graphviz | ||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python }}-tests-${{ hashFiles('**/setup.json') }} | ||
restore-keys: pip-${{ matrix.python }}-tests- | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Make sure virtualevn>20 is installed, which will yield newer pip and possibility to pin pip version. | ||
run: pip install virtualenv>20 | ||
- name: Install Tox | ||
run: pip install tox | ||
- name: Run pre-commit in Tox | ||
run: tox -e pre-commit | ||
test: | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
python: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: "Install dependencies" | ||
run: sudo apt-get -y install graphviz | ||
- uses: actions/[email protected] | ||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python }}-tests-${{ hashFiles('**/setup.json') }} | ||
restore-keys: pip-${{ matrix.python }}-tests- | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Make sure virtualevn>20 is installed, which will yield newer pip and possibility to pin pip version. | ||
run: pip install virtualenv>20 | ||
- name: Install Tox | ||
run: pip install tox | ||
- name: "Test with tox" | ||
run: | | ||
tox -e py${{ matrix.python }} -- tests/ --cov=./sqlalchemy_schemadisplay --cov-append --cov-report=xml --cov-report=term-missing | ||
release: | ||
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags')" | ||
runs-on: "ubuntu-latest" | ||
needs: "test" | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
|
||
- name: "Install dependencies" | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: "Build" | ||
run: | | ||
python -m build | ||
git status --ignored | ||
- name: "Publish" | ||
uses: "pypa/gh-action-pypi-publish@release/v1" | ||
with: | ||
user: "__token__" | ||
password: "${{ secrets.TEST_PYPI_API_TOKEN }}" | ||
repository_url: "https://test.pypi.org/legacy/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
strategy: | ||
matrix: | ||
python: ["3.8"] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: "Install dependencies" | ||
run: sudo apt-get -y install graphviz | ||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python }}-tests-${{ hashFiles('**/setup.json') }} | ||
restore-keys: pip-${{ matrix.python }}-tests- | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Make sure virtualevn>20 is installed, which will yield newer pip and possibility to pin pip version. | ||
run: pip install virtualenv>20 | ||
- name: Install Tox | ||
run: pip install tox | ||
- name: Run pre-commit in Tox | ||
run: tox -e pre-commit | ||
test: | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
python: ["3.8", "3.9", "3.10"] | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: "Install dependencies" | ||
run: sudo apt-get -y install graphviz | ||
- uses: actions/[email protected] | ||
- name: Cache python dependencies | ||
id: cache-pip | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ matrix.python }}-tests-${{ hashFiles('**/setup.json') }} | ||
restore-keys: pip-${{ matrix.python }}-tests- | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Make sure virtualevn>20 is installed, which will yield newer pip and possibility to pin pip version. | ||
run: pip install virtualenv>20 | ||
- name: Install Tox | ||
run: pip install tox | ||
- name: "Test with tox" | ||
run: | | ||
tox -e py${{ matrix.python }} -- tests/ --cov=./sqlalchemy_schemadisplay --cov-append --cov-report=xml --cov-report=term-missing |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/.coverage | ||
/dist/ | ||
/htmlcov/ | ||
.vscode/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Install pre-commit hooks via | ||
# pre-commit install | ||
exclude: > | ||
(?x)^(tests/) | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-json | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.31.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py38-plus] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
[build-system] | ||
requires = ["flit_core >=3.4,<4"] | ||
build-backend = "flit_core.buildapi" | ||
|
||
[project] | ||
name = "sqlalchemy_schemadisplay" | ||
dynamic = ["version", "description"] | ||
authors = [{name = "Florian Schulze", email = "[email protected]"}] | ||
readme = "README.rst" | ||
license = {file = "LICENSE"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Database :: Front-Ends", | ||
"Operating System :: OS Independent" | ||
] | ||
keywords = ["aiida", "workflows", "lammps"] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
'setuptools', | ||
'sqlalchemy>=2.0,<3', | ||
'pydot', | ||
'Pillow' | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/fschulze/sqlalchemy_schemadisplay/blob/master/README.rst" | ||
Source = "https://github.com/fschulze/sqlalchemy_schemadisplay" | ||
|
||
[project.optional-dependencies] | ||
testing = [ | ||
"attrs>=17.4.0", | ||
"pgtest", | ||
"pytest", | ||
"pytest-cov", | ||
"coverage", | ||
"pytest-timeout", | ||
"pytest-regressions" | ||
] | ||
|
||
pre-commit = [ | ||
"pre-commit", | ||
"tox>=3.23.0", | ||
"virtualenv>20" | ||
] | ||
|
||
[tool.flit.module] | ||
name = "sqlalchemy_schemadisplay" | ||
|
||
[tool.flit.sdist] | ||
exclude = [ | ||
"docs/", | ||
"tests/", | ||
] | ||
|
||
[tool.coverage.run] | ||
# Configuration of [coverage.py](https://coverage.readthedocs.io) | ||
# reporting which lines of your plugin are covered by tests | ||
source=["sqlalchemy_schemadisplay"] | ||
|
||
[tool.isort] | ||
skip = ["venv"] | ||
# Force imports to be sorted by module, independent of import type | ||
force_sort_within_sections = true | ||
# Group first party and local folder imports together | ||
no_lines_before = ["LOCALFOLDER"] | ||
|
||
# Configure isort to work without access to site-packages | ||
known_first_party = ["sqlalchemy_schemadisplay"] | ||
|
||
[tool.tox] | ||
legacy_tox_ini = """ | ||
[tox] | ||
envlist = pre-commit,py{3.8,3.9,3.10} | ||
requires = virtualenv >= 20 | ||
isolated_build = True | ||
[testenv] | ||
commands = pytest {posargs} | ||
extras = testing | ||
[testenv:pre-commit] | ||
allowlist_externals = bash | ||
commands = bash -ec 'pre-commit run --all-files || ( git diff; git status; exit 1; )' | ||
extras = | ||
pre-commit | ||
tests | ||
[flake8] | ||
max-line-length = 140 | ||
import-order-style = edited | ||
[pycodestyle] | ||
max-line-length = 140 | ||
""" |
Oops, something went wrong.