Skip to content

Commit

Permalink
Merge pull request #697 from hakonanes/prepare-0.11.0-release
Browse files Browse the repository at this point in the history
Prepare for 0.11.0 release
  • Loading branch information
hakonanes authored Nov 9, 2024
2 parents 0321d87 + c6602b6 commit 01c116f
Show file tree
Hide file tree
Showing 304 changed files with 7,014 additions and 7,336 deletions.
121 changes: 0 additions & 121 deletions .all-contributorsrc

This file was deleted.

3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@
- [ ] New functions are imported in corresponding `__init__.py`.
- [ ] New features, API changes, and deprecations are mentioned in the unreleased
section in `CHANGELOG.rst`.
- [ ] New contributors are added to `release.py`, `.zenodo.json` and
`.all-contributorsrc` with the table regenerated.
- [ ] New contributors are added to `kikuchipy/__init__.py` and `.zenodo.json`.
4 changes: 2 additions & 2 deletions .github/workflows/perhaps_make_tagged_release_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

from outdated import check_outdated

with open("../../kikuchipy/release.py") as fid:
with open("../../src/kikuchipy/__init__.py") as fid:
for line in fid:
if line.startswith("version"):
if line.startswith("__version__"):
branch_version = line.strip().split(" = ")[-1][1:-1]

# Within a try/except because we don't want to throw the error if a new
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/perhaps_make_tagged_release_draft.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Perhaps make a tagged release

# Trigger workflow when commits to the main branch contain a change in the
# kikuchipy/release.py file. This is because this workflow should only run when a
# tagged release draft is to be made.
# Trigger workflow when commits to the main branch contain a change in
# the kikuchipy/__init__.py file. This is because this workflow should
# only run when a tagged release draft is to be made.
on:
push:
branches:
- main
paths:
- "kikuchipy/release.py"
- "src/kikuchipy/__init__.py"

jobs:
make-tagged-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- name: Set up Python ${{ runner.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install outdated
python -m pip install -U pip
python -m pip install outdated
- name: Check whether a tagged release draft should be made
run: |
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ on:
release:
types: [published]
workflow_dispatch:
workflow: "*"

jobs:
upload:
Expand All @@ -24,17 +23,17 @@ jobs:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
python -m pip install -U pip
python -m pip install build
- name: Build package
run: |
Expand All @@ -44,7 +43,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
with:
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 2 additions & 3 deletions .github/workflows/test_documentation_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
schedule:
- cron: '15 6 * * 1'
workflow_dispatch:
workflow: "*"

env:
MPLBACKEND: agg
Expand All @@ -14,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down
39 changes: 10 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- uses: isort/isort-action@master
with:
Expand All @@ -34,44 +34,25 @@ jobs:
run: |
black --diff --line-length 77 doc/tutorials/*.ipynb
# Make sure all necessary files are included in a release
manifest:
name: check manifest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install manifix
- name: Check MANIFEST.in file
run: |
python setup.py manifix
tests:
name: ${{ matrix.os }}-py${{ matrix.python-version }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
env:
MPLBACKEND: agg
PYTEST_ARGS: --pyargs kikuchipy --reruns 2 -n 2 --cov=kikuchipy
PYTEST_ARGS: --reruns 2 -n 2 --cov=kikuchipy
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11']
python-version: ['3.11', '3.12']
include:
- os: ubuntu-latest
python-version: 3.8
DEPENDENCIES: dask==2021.8.1 diffsims==0.5.2 hyperspy==1.7.3 matplotlib==3.5 numba==0.57 numpy==1.23.0 orix==0.12.1 pooch==1.3.0 pyebsdindex==0.2.0 scikit-image==0.21.0
python-version: '3.10'
DEPENDENCIES: dask==2021.8.1 diffsims==0.5.2 hyperspy>=2 matplotlib==3.5 numba==0.57 numpy==1.23.0 orix==0.12.1 pooch==1.3.0 pyebsdindex==0.2.0 scikit-image==0.21.0
LABEL: -oldest
- os: ubuntu-latest
python-version: 3.11
python-version: '3.12'
LABEL: -minimum_requirement
steps:
- uses: actions/checkout@v4
Expand All @@ -85,7 +66,7 @@ jobs:
shell: bash
run: |
pip install wheel
pip install -U -e .'[tests]'
pip install -U -e ".[tests,coverage]"
- name: Install oldest supported version
if: contains(matrix.LABEL, 'oldest')
Expand All @@ -96,15 +77,15 @@ jobs:
if: ${{ contains(matrix.LABEL, 'minimum_requirement') == false && matrix.os != 'macos-latest' }}
shell: bash
run: |
pip install -e .'[all]'
pip install -e ".[all]"
pip install pyopencl
- name: Install optional dependencies on macOS (without nlopt)
if: ${{ contains(matrix.LABEL, 'minimum_requirement') == false && matrix.os == 'macos-latest' }}
shell: bash
run: |
pip install -e .
pip install 'pyebsdindex[gpu]' pyvista
pip install "pyebsdindex[gpu]" pyvista
- name: Display Python, pip and package versions
run: |
Expand All @@ -127,7 +108,7 @@ jobs:
if: ${{ matrix.os == 'ubuntu-latest' }}
continue-on-error: true
run: |
xvfb-run pytest --doctest-modules --doctest-continue-on-failure --ignore-glob=kikuchipy/*/tests kikuchipy/*.py
xvfb-run pytest src --doctest-modules --doctest-continue-on-failure
- name: Run tests in a virtual X server environment on Ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ instance/
.scrapy

# Sphinx documentation
doc/build/
doc/_build/
doc/reference/generated/
doc/examples/
sg_execution_times.rst
Expand Down Expand Up @@ -105,15 +105,9 @@ ENV/

# Auto changing files
build/
src/

# Backport
.backportrc.json

# All Contributors CLI
node_modules/
package.json
package-lock.json

# Dask
dask-worker-space
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
repos:
# https://black.readthedocs.io/en/stable/index.html
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
language_version: python3.11
- id: black-jupyter
files: \.ipynb
args: [--line-length=77]
Expand Down
Loading

0 comments on commit 01c116f

Please sign in to comment.