Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions CI and modern config #44

Merged
merged 5 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
workflow_dispatch:
pull_request:

jobs:
python-unit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
defaults:
run:
working-directory: .

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]

- name: Run unit tests
run: |
pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/
# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
Expand Down
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ In development
--------------------------

* Breaking Changes: Rename project back to edtf from edtf2, after the merge of work form https://github.com/saw-leipzig/python-edtf/
* Breaking Changes: Drop support for Python 2 and Python 3 versions below 3.8. `v5` will support Python 3.8 to 3.12 at release.
* Switch from `tox` and `nose` to `pytest` for testing.
* Consolidate config and packaging from `setup.py` and `setup.cfg` to `pyproject.toml`.

5.0.0 (2023-10-04)
------------------
Expand Down
74 changes: 74 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[project]
name = "edtf"
version = "5.0.0"
dependencies = [
"python-dateutil",
"pyparsing",
"six"
]
description = "Python implementation of Library of Congress EDTF (Extended Date Time Format) specification"
requires-python = ">=3.8"
readme = {file = "README.txt", content-type = "text/markdown"}
authors = [
{ name = "The Interaction Consortium", email = "studio@interaction.net.au"},
{ name = "Alastair Weakley"},
{ name = "James Murty"},
{ name = "Mark Finger" },
{ name = "Sabine Müller" },
{ name = "Cole Crawford" }
]
maintainers = [
{ name = "The Interaction Consortium", email = "studio@interaction.net.au" }
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"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.optional-dependencies]
test = [
"django",
"pytest"
]

[project.urls]
homepage = "https://github.com/ixc/python-edtf"
issues = "https://github.com/ixc/python-edtf/issues"
repository = "https://github.com/ixc/python-edtf.git"
changelog = "https://github.com/ixc/python-edtf/blob/main/changelog.rst"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.wheel]
universal = false

[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4.0
env_list = py{38,39,310,311,312}
isolated_build = true
skip_missing_interpreters = True

[testenv]
deps =
pytest
django
commands = pytest
"""

[tool.pytest.ini_options]
python_files = ["tests.py", "test_*.py", "*_test.py", "*_tests.py"]
python_classes = ["Test*", "*Tests"]
python_functions = ["test_*"]
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

54 changes: 0 additions & 54 deletions setup.py

This file was deleted.

8 changes: 0 additions & 8 deletions tox.ini

This file was deleted.