Skip to content

Commit

Permalink
Chore/update deps (#72)
Browse files Browse the repository at this point in the history
* chore: Update pre-commits

* chore: Update tables, update Python to >=3.9,<3.13, update pyproject dev config

* chore: Install with all extras

* docs: Coverage badge

* docs: Update changelog

* chore: Github CI Python version in matrix

* fix: Typos in package name

* chore: Update CI

* chore: Update lock file

* chore: Python <3.12

* chore: Remove coverage files after testing

* chore: Update lock file

* fix: Do not use pipe types, to ensure backwards compatibility
  • Loading branch information
saattrupdan authored Mar 26, 2024
1 parent 04c997a commit 0344ba9
Show file tree
Hide file tree
Showing 9 changed files with 940 additions and 756 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,31 @@ name: CI

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main

jobs:

lint:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jpetrucciani/black-check@master
- uses: jpetrucciani/ruff-check@main

pytest:
pytest-linux:
if: github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
python-version: ["3.9", "3.10", "3.11"]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry
Expand All @@ -31,13 +37,10 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: "poetry"

- name: Install HDF5
run: sudo apt install --fix-missing libhdf5-serial-dev

- name: Install Dependencies
run: |
poetry env use "${{ matrix.python-version }}"
poetry install
poetry install --extras all
- name: Test with pytest
run: poetry run pytest --dist no -n 0
run: poetry run pytest
10 changes: 6 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
cache: "poetry"

- name: Install Dependencies
run: poetry install
run: |
poetry env use "${{ matrix.python-version }}"
poetry install --extras all
- name: Build documentation
run: |
poetry env use "3.10"
poetry env use "3.11"
poetry run pdoc --docformat google src/doubt -o docs
- name: Compress documentation
Expand Down
29 changes: 17 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
repos:
- repo: https://github.com/ambv/black
rev: 23.3.0
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: black
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
- id: python-use-type-annotations
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
hooks:
- id: flake8
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/kynan/nbstripout
rev: 0.6.0
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.9.0
hooks:
- id: mypy
args: [--install-types, --non-interactive, --ignore-missing-imports, --show-error-codes]

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## [Unreleased]
### Changed
- Updated `tables` dependency to v3.9.x, which fixes issues with installation of the
package. This requires Python 3.9 or above, however, so we require that here as well.


## [v5.1.0] - 2023-10-31
### Added
- The `Boot` class now has `save` and `load` methods, which uses `joblib` under the
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ______________________________________________________________________
[![Documentation](https://img.shields.io/badge/docs-passing-green)](https://saattrupdan.github.io/doubt/doubt.html)
[![License](https://img.shields.io/github/license/saattrupdan/doubt)](https://github.com/saattrupdan/doubt/blob/main/LICENSE)
[![LastCommit](https://img.shields.io/github/last-commit/saattrupdan/doubt)](https://github.com/saattrupdan/doubt/commits/main)
[![Code Coverage](https://img.shields.io/badge/Coverage-67%25-yellow.svg)](https://github.com/saattrupdan/doubt/tree/dev/tests)
[![Code Coverage](https://img.shields.io/badge/Coverage-66%25-yellow.svg)](https://github.com/saattrupdan/doubt/tree/dev/tests)
[![Conference](https://img.shields.io/badge/Conference-AAAI23-blue)](https://doi.org/10.1609/aaai.v37i12.26755)

A Python package to include prediction intervals in the predictions of machine
Expand Down
4 changes: 2 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ install: ## Install dependencies
@$(MAKE) setup-git

setup-poetry:
@poetry env use python3.10 && poetry install
@poetry env use python3.10 && poetry install --extras all

setup-environment-variables:
@poetry run python3.10 -m src.scripts.fix_dot_env_file
Expand Down Expand Up @@ -109,7 +109,7 @@ publish-minor: bump-minor publish ## Publish a minor version
publish-patch: bump-patch publish ## Publish a patch version

test: ## Run tests
@poetry run pytest && readme-cov
@poetry run pytest && readme-cov && rm .coverage*

tree: ## Print directory tree
@tree -a \
Expand Down
Loading

0 comments on commit 0344ba9

Please sign in to comment.