Skip to content

Commit d354abf

Browse files
committed
Switch to modern GitHub actions
1 parent 1ec4ec0 commit d354abf

File tree

7 files changed

+58
-28
lines changed

7 files changed

+58
-28
lines changed

.github/actions/test/Dockerfile

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

.github/main.workflow

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

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.x'
16+
- name: Install build
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install build
20+
- name: Build distributions
21+
run: python -m build
22+
- name: Publish to PyPI
23+
uses: pypa/gh-action-pypi-publish@release/v1
24+
with:
25+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install .[test]
22+
- name: Test with pytest
23+
run: |
24+
pytest -vv --cov=modello

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pipenv install git+https://github.com/Code0x58/modello.git#egg=modello
4040
pip install --user git+https://github.com/Code0x58/modello.git#egg=modello
4141
```
4242

43-
Currently this requires Python 3.6+ but the version requirements can drop a couple of minor versions easily if there is interest. Python 2.7 isn't planned to be supported as the Modello class relies on [PEP-3115](https://www.python.org/dev/peps/pep-3115/).
43+
Currently this requires Python 3.8+ but the version requirements can drop a couple of minor versions easily if there is interest. Python 2.7 isn't planned to be supported as the Modello class relies on [PEP-3115](https://www.python.org/dev/peps/pep-3115/).
4444

4545

4646
## Development

modello.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class ModelloMeta(type):
9696
@classmethod
9797
def __prepare__(
9898
metacls, __name: str, __bases: typing.Tuple[type, ...], **kwds: typing.Any
99-
) -> typing.Mapping[str, typing.Any]:
99+
) -> typing.MutableMapping[str, typing.Any]:
100100
"""Return a ModelloMetaNamespace instead of a plain dict to accumlate attributes on."""
101101
return ModelloMetaNamespace(__name, __bases)
102102

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
tests_require=TEST_REQUIRES,
3434
extras_require={"test": TEST_REQUIRES},
3535
py_modules=["modello"],
36-
python_requires=">=3.3",
36+
python_requires=">=3.8",
3737
license="MIT",
3838
classifiers=dedent(
3939
"""
@@ -43,6 +43,12 @@
4343
License :: OSI Approved :: MIT License
4444
Operating System :: OS Independent
4545
Programming Language :: Python :: 3
46+
Programming Language :: Python :: 3 :: Only
47+
Programming Language :: Python :: 3.8
48+
Programming Language :: Python :: 3.9
49+
Programming Language :: Python :: 3.10
50+
Programming Language :: Python :: 3.11
51+
Programming Language :: Python :: 3.12
4652
"""
4753
)
4854
.strip()

0 commit comments

Comments
 (0)