Skip to content

Commit

Permalink
Merge pull request #18 from DemocracyClub/upgrades20240924
Browse files Browse the repository at this point in the history
test on python 3.12, drop testing on python < 3.10
  • Loading branch information
chris48s committed Sep 25, 2024
2 parents 6851018 + 146d9da commit 0ed1f1e
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 52 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', ]
python-version: [ '3.10', '3.11', '3.12' ]
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install
run: pip install .
- name: Test
run: python run_tests.py
run: pip install .[development]

- name: Lint
run: |
ruff format . --check
ruff check .
- name: Test
run: |
python run_tests.py
python tests/data_schemas.py
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ Create and validate Democracy Club Election Identifiers.

---

[![Build Status](https://travis-ci.org/DemocracyClub/uk-election-ids.svg?branch=master)](https://travis-ci.org/DemocracyClub/uk-election-ids)
[![Coverage Status](https://coveralls.io/repos/github/DemocracyClub/uk-election-ids/badge.svg?branch=master)](https://coveralls.io/github/DemocracyClub/uk-election-ids?branch=master)
[![Run tests](https://github.com/DemocracyClub/uk-election-ids/actions/workflows/test.yml/badge.svg)](https://github.com/DemocracyClub/uk-election-ids/actions/workflows/test.yml)
![PyPI Version](https://img.shields.io/pypi/v/uk-election-ids.svg)
![License](https://img.shields.io/pypi/l/uk-election-ids.svg)
![Python Support](https://img.shields.io/pypi/pyversions/uk-election-ids.svg)
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)

* Installation: `pip install uk-election-ids`
* [Documentation](https://democracyclub.github.io/uk-election-ids/)
Expand Down
7 changes: 0 additions & 7 deletions build.sh

This file was deleted.

2 changes: 0 additions & 2 deletions dev-requirements.txt

This file was deleted.

17 changes: 9 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,24 @@ def _get_description():
long_description_content_type="text/markdown",
extras_require={
"testing": ["coveralls"],
"docs": [
"sphinx==7.1.2",
"sphinx_rtd_theme==2.0.0",
"ghp-import==2.1.0",
],
"development": [
"sphinx",
"sphinx_rtd_theme",
"ghp-import",
"pydantic",
"black==23.3.0",
"ruff==0.0.261",
"pydantic==1.10.18",
"pre-commit==3.5.0",
"ruff==0.3.7",
],
},
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
project_urls={
"Documentation": "https://democracyclub.github.io/uk-election-ids/",
Expand Down
11 changes: 6 additions & 5 deletions tests/data_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ def _recurse_defaults(d: dict):
_recurse_defaults(values["defaults"])
return values

# import ipdb; ipdb.set_trace()
# return super().validate(value)


if __name__ == "__main__":
data = Path(__file__).parent / "voting_systems.json"
data = (
Path(__file__).parent.parent
/ "uk_election_ids"
/ "data"
/ "voting_systems.json"
)
schema = VotingSystemSchema.parse_file(data)
VotingSystemSchema.validate(schema)
# print(schema)
1 change: 0 additions & 1 deletion tests/test_slugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class TestSlugify(TestCase):

"""
For this particular use-case, we are primarily concerned with
1. Slugging characters that appear in names of places in the UK sensibly
Expand Down
1 change: 0 additions & 1 deletion uk_election_ids/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class DataPackageParser:

"""
Parser which uses the data in datapackage.py to build
a dict of IdSpec() objects which describe what sort of
Expand Down

0 comments on commit 0ed1f1e

Please sign in to comment.