Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.24.0 #307

Closed
wants to merge 11 commits into from
12 changes: 6 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Checkout source
uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.12'

- name: Validate the tag version against the package version
run: python .github/workflows/validate_release_tag.py $GITHUB_REF
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.12'

- name: Install Python dependencies
run: pip install -e .[pre-commit]
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
run: pip install -e .[tests]

- name: Run pytest
run: pytest -sv --cov=plumpy test
run: pytest -s --cov=plumpy tests

- name: Create xml coverage
run: coverage xml
Expand All @@ -109,10 +109,10 @@ jobs:
- name: Checkout source
uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.12'

- name: Install flit
run: pip install flit~=3.4
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: continuous-integration
name: ci

on: [push, pull_request]

Expand All @@ -9,10 +9,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.12'

- name: Install Python dependencies
run: pip install -e .[pre-commit]
Expand All @@ -26,6 +26,7 @@ jobs:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
fail-fast: false

services:
rabbitmq:
Expand All @@ -42,10 +43,10 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install python dependencies
run: pip install -e .[tests]
run: pip install .[tests]

- name: Run pytest
run: pytest -sv --cov=plumpy test
run: pytest -s --cov=plumpy tests/

- name: Create xml coverage
run: coverage xml
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/validate_release_tag.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
"""Validate that the version in the tag label matches the version of the package."""

import argparse
import ast
from pathlib import Path
Expand All @@ -17,8 +18,11 @@ def get_version_from_module(content: str) -> str:

try:
return next(
ast.literal_eval(statement.value) for statement in module.body if isinstance(statement, ast.Assign)
for target in statement.targets if isinstance(target, ast.Name) and target.id == '__version__'
ast.literal_eval(statement.value)
for statement in module.body
if isinstance(statement, ast.Assign)
for target in statement.targets
if isinstance(target, ast.Name) and target.id == '__version__'
)
except StopIteration as exception:
raise IOError('Unable to find the `__version__` attribute in the module.') from exception
Expand Down
61 changes: 25 additions & 36 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: trailing-whitespace
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/ikamensh/flynt/
rev: '0.77'
- repo: https://github.com/ikamensh/flynt/
rev: 1.0.1
hooks:
- id: flynt
- id: flynt
args: [--line-length=120, --fail-on-change]

- repo: https://github.com/pycqa/isort
rev: '5.12.0'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
hooks:
- id: isort
- id: ruff-format
exclude: &exclude_ruff >
(?x)^(
tests/.*|
)$

- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
name: yapf
types: [python]
args: ['-i']
additional_dependencies: ['toml']

- repo: https://github.com/PyCQA/pylint
rev: v2.15.8
hooks:
- id: pylint
language: system
exclude: >
(?x)^(
docs/source/conf.py|
test/.*|
)$
- id: ruff
exclude: *exclude_ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]

- repo: local
- repo: local
hooks:
- id: mypy
- id: mypy
name: mypy
entry: mypy
args: [--config-file=pyproject.toml]
Expand All @@ -49,6 +38,6 @@ repos:
require_serial: true
pass_filenames: true
files: >-
(?x)^(
src/.*py|
)$
(?x)^(
src/.*py|
)$
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## v0.23.0 - 2024-12-13

### Breaking changes
- All the `run()` methods across the interface are now asynchronous (async def).
- Changes from `Coroutine` to `Awaitable` in function signatures.

### Bug fixes
- Make `Waiting.resume()` idempotent (#285) [[20e5898]](https://github.com/aiidateam/plumpy/commit/20e5898e0c9037624988fe321e784f4fe38a2e8d)

### Devops
- Make `Process.run` async (#272) [[4611154]](https://github.com/aiidateam/plumpy/commit/4611154c76ac0991bcf7371b21488f4390648c28)
- Switch to ruff and other devops improvements (#289) [[55e05e9]](https://github.com/aiidateam/plumpy/commit/55e05e956c9715fb69785d83d0194b65811b4720)
- Bump Python version in CI: `3.8` to `3.12` (#304) [[bb32edb]](https://github.com/aiidateam/plumpy/commit/bb32edb8d61cbef6a85c8c4028331693eb462cd8)


## v0.22.3 - 2024-02-02

### Bug fixes
Expand Down Expand Up @@ -52,6 +67,15 @@ This release applies the fixes that were released on the support branch of `v0.2
- Update the `mypy` pre-commit dependency [[#246]](https://github.com/aiidateam/plumpy/pull/246)


## v0.21.11 - 2024-07-01

### Fixes
- Make `Waiting.resume()` idempotent [[a79497b]](https://github.com/aiidateam/plumpy/commit/a79497ba37cef7bc609cee90535ad86708fc48f9)

### Dependencies
- Add requirement `nbdime<4` [[94df0df]](https://github.com/aiidateam/plumpy/commit/94df0dfd0a3ea93174aa4de83ac5e06246350c27)


## v0.21.10 - 2023-11-13

### Dependencies
Expand Down
32 changes: 21 additions & 11 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@

import filecmp
import os
from pathlib import Path
import shutil
import subprocess
import sys
import tempfile
from pathlib import Path

import plumpy

Expand All @@ -32,8 +30,12 @@
master_doc = 'index'
language = None
extensions = [
'myst_nb', 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx',
'IPython.sphinxext.ipython_console_highlighting'
'myst_nb',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'IPython.sphinxext.ipython_console_highlighting',
]

# List of patterns, relative to source directory, that match files and
Expand All @@ -46,14 +48,14 @@

intersphinx_mapping = {
'python': ('https://docs.python.org/3.8', None),
'kiwipy': ('https://kiwipy.readthedocs.io/en/latest/', None)
'kiwipy': ('https://kiwipy.readthedocs.io/en/latest/', None),
}

myst_enable_extensions = ['colon_fence', 'deflist', 'html_image', 'smartquotes', 'substitution']
myst_url_schemes = ('http', 'https', 'mailto')
myst_substitutions = {
'rabbitmq': '[RabbitMQ](https://www.rabbitmq.com/)',
'kiwipy': '[kiwipy](https://kiwipy.readthedocs.io)'
'kiwipy': '[kiwipy](https://kiwipy.readthedocs.io)',
}
jupyter_execute_notebooks = 'cache'
execution_show_tb = 'READTHEDOCS' in os.environ
Expand Down Expand Up @@ -84,7 +86,7 @@
'use_issues_button': True,
'path_to_docs': 'docs',
'use_edit_page_button': True,
'extra_navbar': ''
'extra_navbar': '',
}

# API Documentation
Expand Down Expand Up @@ -112,9 +114,17 @@ def run_apidoc(app):
# this ensures that document rebuilds are not triggered every time (due to change in file mtime)
with tempfile.TemporaryDirectory() as tmpdirname:
options = [
'-o', tmpdirname,
str(package_dir), '--private', '--force', '--module-first', '--separate', '--no-toc', '--maxdepth', '4',
'-q'
'-o',
tmpdirname,
str(package_dir),
'--private',
'--force',
'--module-first',
'--separate',
'--no-toc',
'--maxdepth',
'4',
'-q',
]

os.environ['SPHINX_APIDOC_OPTIONS'] = 'members,special-members,private-members,undoc-members,show-inheritance'
Expand Down
Loading
Loading