Skip to main content

"library for working with uncertain, fuzzy, or partially unknown dates and date intervals"

Project description

undate-python

All Contributors

undate is a python library for working with uncertain or partially known dates.

It was initially created as part of a DH-Tech hackathon in November 2022.


⚠️ WARNING: this is pre-alpha software and is NOT feature complete! Use with caution. ⚠️


License Documentation Status unit tests codecov Code style: black

All Contributors

Documentation

Project documentation is available on ReadTheDocs https://undate-python.readthedocs.io/en/latest/

License

This software is licensed under the Apache 2.0 License.

Installation

To install the most recent release from PyPI:

pip install undate

To install the latest development version from GitHub:

pip install git+https://github.com/dh-tech/undate-python.git@develop#egg=undate

To install a specific release or branch, run the following (replace [tag-name] with the tag or branch you want to install):

pip install git+https://github.com/dh-tech/undate-python.git@[tag-name]

Instructions to setup for development

Clone repo

$ git clone git@github.com:dh-tech/undate-python.git
cd undate-python

Setup and initialize git flow

This repository uses git-flow branching conventions:

  • main will always contain the most recent release
  • develop branch is the latest version of work in progress

Pull requests for new features should be made against the develop branch.

It is recommended to install git flow (on OSX, use brew or ports, e.g.: brew install git-flow; on Ubuntu/Debian, apt-get install git-flow) and then initialize it in this repository via git flow init and accept the defaults. Then you can use git flow feature start to create feature development branches.

Alternately, you can check out the develop branch (git checkout develop) and create your branches manually based on develop (git checkout -b feature/xxx-name).

Set up Python environment

Use a recent version of python 3.x; recommended to use a virtualenv, e.g.

python3 -m venv undate
source undate/bin/activate

Install the package

Install an editable version of the local package along with python dependencies needed for testing and development.

pip install -e ".[dev]"

Install pre-commit hooks

pre-commit install

Run unit tests

Tests can be run with either tox or pytest.

To run all the tests in a single test file, use pytest and specify the path to the test: pytest tests/test_dateformat/test_base.py

To test cases by name, use pytest: pytest -k test_str

Check python types

Python typing is currently only enforced by a CI check action using mypy. To run mypy locally, first install mypy and the necessary typing libraries:

pip install mypy
mypy --install-types

Once mypy is installed, run mypy src/ to check.

Create documentation

tox -e docs

Contributors

Cole Crawford
Cole Crawford

💻 👀 ⚠️
Rebecca Sutton Koeser
Rebecca Sutton Koeser

💻 👀 ⚠️ 📝 💡 📖 📦
Robert Casties
Robert Casties

🔣
Julia Damerow
Julia Damerow

💻 👀 ⚠️ 📋
Malte Vogl
Malte Vogl

💻 👀 ⚠️ 📖
Add your contributions

Related blog posts

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

undate-0.2.0.tar.gz (24.6 kB view hashes)

Uploaded Source

Built Distribution

undate-0.2.0-py3-none-any.whl (19.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page