-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch to `pyproject.toml * Add pytest-xdist as test dependency & improve GH Actions GH Actions: - Use more processes in xdist for speedup - Upload coverage to Codecov in separate job - Add build test - General * Support python 3. * Consolidate pytest & bandit configs into `pyproject.toml * Coverage: improve exclusions
- Loading branch information
Showing
10 changed files
with
233 additions
and
199 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
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,51 @@ | ||
name: Build | ||
|
||
# build the project whenever the configuration is changed | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
paths: | ||
- 'README.md' # check markdown is valid | ||
- 'MANIFEST.in' # check packaging | ||
- 'pyproject.toml' # check build config | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
FORCE_COLOR: 2 | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-latest'] | ||
python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
include: | ||
- os: 'macos-latest' | ||
python: '3.7' | ||
name: ${{ matrix.os }} py-${{ matrix.python }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Build | ||
uses: cylc/release-actions/build-python-package@v1 | ||
with: | ||
check-dependencies: false | ||
|
||
- name: Inspect | ||
run: | | ||
unzip -l dist/*.whl | tee files | ||
grep 'metomi/isodatetime/data.py' files | ||
grep 'metomi_isodatetime.*.dist-info/LICENSE' files | ||
# grep 'metomi/isodatetime/py.typed' files # (not yet added) |
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
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,104 @@ | ||
# Copyright (C) British Crown (Met Office) & Contributors. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
[build-system] | ||
requires = ["setuptools >= 49.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[project] | ||
name = "metomi-isodatetime" | ||
authors = [ | ||
{name = "Met Office", email = "[email protected]"} | ||
] | ||
description = "Python ISO 8601 date time parser and data model/manipulation utilities" | ||
license = {text = "LGPLv3"} | ||
readme = "README.md" | ||
keywords = ["isodatetime", "datetime", "iso8601", "date", "time", "parser"] | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Other Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3.7", | ||
"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", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Utilities" | ||
] | ||
dynamic = ["version"] | ||
|
||
|
||
[project.urls] | ||
Homepage = "https://github.com/metomi/isodatetime" | ||
Repository = "https://github.com/metomi/isodatetime" | ||
Changelog = "https://github.com/metomi/isodatetime/blob/master/CHANGES.md" | ||
|
||
|
||
[tool.setuptools] | ||
platforms = ["any"] | ||
|
||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "metomi.isodatetime.FULL_VERSION"} | ||
|
||
|
||
[tool.setuptools.packages.find] | ||
include = ["metomi*"] | ||
exclude = ["metomi.isodatetime.tests*"] | ||
|
||
|
||
[tool.setuptools.package-data] | ||
"metomi.isodatetime" = ["py.typed"] | ||
|
||
|
||
[project.scripts] | ||
isodatetime = "metomi.isodatetime.main:main" | ||
|
||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"coverage", | ||
"pytest>=6", | ||
"pytest-env", | ||
"pytest-cov", | ||
"pytest-xdist", | ||
"flake8", | ||
"bandit>=1.7.1", | ||
] | ||
all = [ | ||
"metomi-isodatetime[test]", | ||
] | ||
|
||
|
||
[tool.pytest.ini_options] | ||
addopts = "-v -s -ra --color=auto --doctest-glob='*.md' -m 'not slow'" | ||
markers = [ | ||
"slow: mark a test as slow - it will be skipped by default (use '-m \"slow or not slow\"' to run all tests)" | ||
] | ||
testpaths = [ | ||
"metomi/isodatetime/tests", | ||
"README.md", | ||
] | ||
|
||
|
||
[tool.bandit] | ||
exclude_dirs = ["metomi/isodatetime/tests"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.