Skip to content

Commit 5628f0c

Browse files
authored
Feature/modern build 4 graphql2python (#24)
* Added contributing info * Added requirements generated by pip-tools * Updated license * New build system * Ruff fix * Format with black * Updated git workflow * Addded htmlcov to gitignore
1 parent d6b976d commit 5628f0c

36 files changed

+658
-982
lines changed

.github/workflows/check.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
python-version: [ "3.8", "3.9", "3.10" ]
16+
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
1717

1818
steps:
1919
- uses: actions/checkout@v3
@@ -23,15 +23,18 @@ jobs:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install package in dev mode
2525
run: |
26-
python -m pip install --upgrade pip
27-
python -m pip install -e ."[dev, test]"
26+
python -m pip install -r requirements/requirements-dev.txt
27+
python -m pip install -r requirements/requirements-test.txt
2828
- name: Code style check
2929
run: |
30-
python -m pylint --load-plugins pylint_pydantic --extension-pkg-whitelist='pydantic' graphql2python
31-
python -m mypy graphql2python
30+
make lint
31+
- name: Type check
32+
run: |
33+
make typecheck
3234
- name: Tests
3335
run: |
34-
python -m pytest tests/
36+
make testcov
3537
- name: Build package
3638
run: |
37-
python setup.py bdist_wheel
39+
pip install -U twine build packaging
40+
python -m build

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- name: Build
1515
run: |
16-
pip install wheel
17-
python setup.py bdist_wheel
16+
pip install -r requirements/requirements-dev.txt
17+
pip install -U twine build packaging
18+
python -m build
1819
- name: Publish a Python distribution to PyPI
1920
uses: pypa/gh-action-pypi-publish@v1.1.0
2021
with:

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/configure-pages@v2
3636
- name: Build docs
3737
run: |
38-
python -m pip install -e ."[dev, test]"
38+
python -m pip install -r requirements/requirements-docs.txt
3939
cd docs && make html
4040
- name: Upload artifact
4141
uses: actions/upload-pages-artifact@v1

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ __pycache__/
8484
*.py[cod]
8585
*$py.class
8686
*.egg-info/
87+
.mypy_cache/
88+
.ruff_cache/
89+
.pytest_cache/
90+
*htmlcov/
91+
.coverage
8792

8893
.env
8994
.venv
9095
env/
9196
venv/
92-
.mypy_cache/
9397
dist/

0 commit comments

Comments
 (0)