Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
run: pip install -e ".[dev]"
if: steps.python-cache.outputs.cache-hit != 'true'

# check code style
- name: Run black
run: black src --check --diff
# check with ruff
- name: Run ruff
run: ruff check

# check docs
- name: Check that documentation can be built
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we switched to 3.12 as the default for the check workflow, we should probably use that as COV_PYTHON_VERSION here too?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - should we add 3.13 to this?

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
# python version used to calculate and submit code coverage
COV_PYTHON_VERSION: "3.11"
COV_PYTHON_VERSION: "3.12"

jobs:
python-unit:
Expand Down
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
files: \.py
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: black
- id: ruff
args: [ --select, I, --fix, --exit-non-zero-on-fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
Expand All @@ -14,7 +16,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [types-python-dateutil]
additional_dependencies: [numpy]
1 change: 1 addition & 0 deletions .pythonversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Python 3.12.7
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ We use [All Contributors](https://allcontributors.org/) because we recognize tha

### Related blog posts

- [by Rebecca Sutton Koeser](#blog-rlskoeser)
(blog-rlskoeser)=
#### [by Rebecca Sutton Koeser](#blog-rlskoeser)
- [Join me for a DHTech hackathon? It’s an un-date!](https://dh-tech.github.io/blog/2023-02-09-hackathon-summary/) 2023-02-09 on DHTech blog
14 changes: 8 additions & 6 deletions DEVELOPER_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ If you cannot or prefer not to install git flow, you can do the equivalent manua

### Create a Python virtual environment

Use a recent version of python 3. We highly recommend using a python virtualenv, e.g.
Use a recent version of python 3 (we recommend 3.12). If you use [pyenv](https://github.com/pyenv/pyenv), run `pyenv install` to get the current recommended python version for development (specified in `.pythonversion`).

We highly recommend using a python virtualenv to isolate dependencies, e.g.
```
python3 -m venv undate
source undate/bin/activate
python3 -m venv .venv
source .venv/bin/activate
```

### Install local version of undate with development python dependencies
Expand All @@ -47,12 +49,12 @@ pip install -e ".[dev]"

### Install pre-commit hooks

We use [pre-commit](https://pre-commit.com/) for automated checks and consistent formatting. If you're planning to contribute, please install these when you set up your local development.

```sh
pre-commit install
```

We use [pre-commit](https://pre-commit.com/) for automated checks and consistent formatting. If you're planning to contribute, please install these when you set up your local development.

## Tests, documentation, and other checks

### Running unit tests
Expand All @@ -65,7 +67,7 @@ To test cases by method name, use `-k`: `pytest -k test_str`

### Check python types

Python typing is currently enforced on pull requests as part of a GitHub Actions Continuous Integration check using `mypy`.
Python typing is currently enforced on pull requests as part of a GitHub Actions Continuous Integration check using `mypy` and via pre-commit hook.

To check types locally:
1. Install the necessary typing libraries (first run only):
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It was initially created as part of a [DH-Tech](https://dh-tech.github.io/) hack
[![Documentation Status](https://readthedocs.org/projects/undate-python/badge/?version=latest)](https://undate-python.readthedocs.io/en/latest/?badge=latest)
[![unit tests](https://github.com/dh-tech/undate-python/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/dh-tech/undate-python/actions/workflows/unit_tests.yml)
[![codecov](https://codecov.io/gh/dh-tech/undate-python/branch/main/graph/badge.svg?token=GE7HZE8C9D)](https://codecov.io/gh/dh-tech/undate-python)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](CONTRIBUTORS.md)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@
}

# turn on relative links; make sure both github and sphinx links work
m2r_parse_relative_links = True
myst_enable_extensions = ["linkify"]
Loading
Loading