-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move tox config into setup.cfg #58 (#59) * Move tox config into setup.cfg #58 Adds a comment documenting everywhere to update python versions when supported versions change * Use tox interpolation syntax and declare dependencies once * Add documentation build to check workflow * Include docs deps in dev deps * Configure tox and github actions to use the same base python version * Python 3.10, not 3.1 GitHub Actions 🙄 * Added label field to UndateInterval, added repr methods, and tests. (#52) * Added label field to UndateInterval, added repr methods, and tests. * Added variable documentation for labels. * dynamically import dateformatter subclasses (#50) * Use pkgutils to dynamically import dateformat formatter subclasses * Adjust formatter import and test to confirm we only import once * Add pytest-ordering dependency to tox * Use python3.8 compatible caching * Add pytest-ordering to tox coverage deps * Create python-publish.yml * Add docs build directory to gitignore * Prep for initial publication on PyPI * Update formatting * Adjust requirement reference syntax * Revise project metadata and tox install commands * Update for formatting & display on PyPI * Add a change log * Add readthedocs badge and link, add placeholder text in docs intro --------- Co-authored-by: Julia Damerow <[email protected]>
- Loading branch information
Showing
17 changed files
with
253 additions
and
91 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,39 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
- name: Build package | ||
run: python -m build | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
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 |
---|---|---|
|
@@ -24,6 +24,7 @@ wheels/ | |
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
docs/_build/ | ||
|
||
# Environments | ||
.tox | ||
|
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,6 @@ | ||
# Change Log | ||
|
||
## 0.1 | ||
|
||
Pre-alpha version with preliminary `Undate` and `UndateInterval` classes | ||
with support for ISO8601 date format |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[pytest] | ||
markers = | ||
last: run marked tests after all others | ||
last: run marked tests after all others | ||
first: run marked tests before all others |
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 |
---|---|---|
@@ -1,34 +1,46 @@ | ||
[metadata] | ||
name = undate | ||
version = attr: undate.__version__ | ||
author = 'DHTech' | ||
author_email = '[email protected]' | ||
description = "library for working with uncertain, fuzzy, or " | ||
+ "partially unknown dates and date intervals" | ||
author = DHTech | ||
author_email = "[email protected]" | ||
description = "library for working with uncertain, fuzzy, or partially unknown dates and date intervals" | ||
long_description = file: README.md | ||
license="Apache License, Version 2.0", | ||
license="Apache License, Version 2.0" | ||
long_description_content_type = text/markdown | ||
url = https://github.com/dh-tech/hackathon-2022 | ||
url = https://github.com/dh-tech/undate-python | ||
project_urls = | ||
Project Home = https://dh-tech.github.io | ||
Project Home = https://github.com/dh-tech/undate-python | ||
Bug Tracker = https://github.com/dh-tech/undate-python/issues | ||
keywords = "dates dating uncertainty uncertain-dates unknown partially-known digital-humanities" | ||
classifiers = | ||
Development Status :: 2 - Pre-Alpha | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: 3.11 | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: Apache Software License | ||
Operating System :: OS Independent | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
Topic :: Utilities | ||
Typing :: Typed | ||
|
||
# When supported python versions change, update all the following places: | ||
# - classifiers | ||
# - minimum version required in python_requires | ||
# - tox envlist | ||
# - gh-actions | ||
# - python versions in matrix config in unit_tests.yml | ||
|
||
[options] | ||
package_dir = | ||
= src | ||
packages = find: | ||
python_requires = >=3.8 | ||
install_requires = | ||
python-dateutil | ||
|
||
[options.extras_require] | ||
all = | ||
%(dev)s | ||
|
@@ -37,13 +49,61 @@ dev = | |
black>=22.10.0 | ||
pre-commit>=2.20.0 | ||
tox | ||
sphinx | ||
twine | ||
wheel | ||
pytest-cov | ||
build | ||
%(docs)s | ||
test = | ||
pytest>=7.2 | ||
pytest-ordering | ||
pytest-cov | ||
docs = | ||
sphinx | ||
sphinx_rtd_theme | ||
m2r2 | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
[tox:tox] | ||
envlist = py38, py39, py310, py311 | ||
isolated_build = True | ||
|
||
[gh-actions] | ||
python = | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 | ||
|
||
[pytest] | ||
minversion = 6.0 | ||
addopts = -ra -q | ||
testpaths = | ||
tests | ||
|
||
[testenv] | ||
deps = | ||
-e ./[test] | ||
commands = pytest {posargs} | ||
|
||
[testenv:flake8] | ||
deps = | ||
flake8 | ||
commands = | ||
flake8 --ignore=E501,E402,F401 src/undate/ tests/ | ||
|
||
[testenv:coverage] | ||
deps = | ||
-e ./[test] | ||
commands = | ||
pytest --cov=./ --cov-report=xml | ||
|
||
[testenv:docs] | ||
description = invoke sphinx-build to build the HTML docs | ||
# NOTE: base python should match whatever we're using in GitHub Actions | ||
basepython = python3.10 | ||
deps = | ||
-e ./[docs] | ||
commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" --color -W -bhtml {posargs} | ||
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))' |
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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.1.0.dev" | ||
__version__ = "0.1.0" |
Oops, something went wrong.