Skip to content

Commit

Permalink
Merge branch 'master' into py312
Browse files Browse the repository at this point in the history
  • Loading branch information
CagtayFabry authored Aug 5, 2024
2 parents 1e23357 + beacb2e commit 609f86c
Show file tree
Hide file tree
Showing 29 changed files with 342 additions and 265 deletions.
20 changes: 0 additions & 20 deletions .flake8

This file was deleted.

2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ updates:
interval: "weekly"
day: "sunday"
timezone: "Europe/Berlin"
labels:
- "dependabot"
7 changes: 7 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .github/release.yml

changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
2 changes: 1 addition & 1 deletion .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.8.1
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-file: ./devtools/conda.recipe/build_env.yml
environment-name: build_env
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ jobs:
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.8.1
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-file: ./doc/rtd_environment.yml
environment-name: rtd
init-shell: >-
bash
powershell
cache-environment: true
cache-environment: false

- name: activate build env
run: micromamba activate rtd
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ jobs:
with:
fetch-depth: '0' # Fetch all history for all tags and branches

- uses: CagtayFabry/pydeps2env@main
- uses: CagtayFabry/pydeps2env@v1.1.0
with:
file: 'pyproject.toml'
files: 'pyproject.toml'
channels: 'conda-forge defaults'
extras: 'test vis media'
setup_requires: 'include'
build_system: 'include'

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.8.1
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:

- name: codecov.io
if: matrix.py == '3.10'
uses: codecov/codecov-action@v4.3.0
uses: codecov/codecov-action@v4.5.0

compat:
name: pytest
Expand All @@ -139,15 +139,15 @@ jobs:
with:
fetch-depth: '0' # Fetch all history for all tags and branches

- uses: CagtayFabry/pydeps2env@main
- uses: CagtayFabry/pydeps2env@v1.1.0
with:
file: 'pyproject.toml'
files: 'pyproject.toml'
channels: 'conda-forge defaults'
extras: 'test vis media'
setup_requires: 'include'
build_system: 'include'

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.8.1
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest_asdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
setup_requires: 'include'

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.8.1
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('./environment.yml') }}

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.8.1
uses: mamba-org/setup-micromamba@v1.9.0
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exclude: '.*.weldx$|.*.wx$|.*.asdf$'
repos:
# ----- general formatting -----
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
Expand All @@ -28,8 +28,8 @@ repos:
- mdformat-black
- mdformat-config
# ----- Python formatting -----
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.5
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
hooks:
# Run ruff linter.
- id: ruff
Expand All @@ -39,16 +39,16 @@ repos:
# Run ruff formatter.
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: 2.2.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.18
hooks:
- id: validate-pyproject
# ----- Jupyter Notebooks -----
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.5
rev: 1.8.7
hooks:
- id: nbqa-black
- id: nbqa-ruff # ruff handles isort
Expand All @@ -63,7 +63,7 @@ repos:
- --remove-kernel-metadata
# ----- spellchecking -----
- repo: https://github.com/codespell-project/codespell/
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
exclude: doc/src/legal-notice.md
Expand Down
81 changes: 81 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Exclude a variety of commonly ignored directories.
extend-exclude = [
"__init__.py",
"doc/src/conf.py",
]

# Same as Black.
line-length = 88
indent-width = 4

# Assume Python 3.9
target-version = "py39"


[lint]
# TODO: should be the following list, but Ruff does not yet impl all of them.
# W503,W504
# E203
# C408
ignore = [
"C408",
#"E203",
"E402",
#"W503",
#"W504",
"D203",
"D211",
"D213",
"UP006",
"UP007", # see ruff GH#4427
]
select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
#"D", # note: all relevant D's will be set by setting pydocstyle.convention=numpy!
"E", # pycodestyles
"F", # pyflakes
"W", # pycodestyle warnings
"UP", # pyupgrade
"T2", # flake8-print
"I001", # isort
"ICN", # import conventions, e.g. import numpy as np
#"B950", # not yet implemented by Ruff.
"RUF100", # ensure 'noqa' declarations are still valid.
]

[lint.extend-per-file-ignores]
# Allow pydocstyle violations in certain areas.
"**/{tests,tags,asdf,devtools}/**" = [
"D",
]
"conftest.py" = [
"D",
]
"doc/src/tutorials/*" = [
"D",
]
"doc/src/conf.py" = [
"E501", # ignore long lines.
"RUF100", # do no check if 'noqa' is needed (circular import workaround)
]
"**/{cli,tests,tutorials,devtools}/**/*{.py,ipynb}" = [
"T2",
] # Allow prints in certain areas.

[lint.pydocstyle]
convention = "numpy"

[lint.mccabe]
max-complexity = 15 # max branches inside a function.

[lint.isort]
known-first-party = [
"weldx",
]
required-imports = [
"from __future__ import annotations",
]

[lint.flake8-import-conventions]
extend-aliases = { xarray = "xr" }
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Release Notes

## 0.6.8 (unreleased)
## 0.6.9 (unreleased)

### Fixes

- rename (fix typo) argument to `lcs_child_in_parent` in `CoordinateSystemManager.add_cs` \[{pull}`936`\].
- replace usages of `pkg_resources` with `importlib.metadata` \[{pull}`941`\].
- replace usages of `copy_arrays` with `memmap` for `asdf>=3.1.0` \[{pull}`940`\].

### Dependencies

- pin `weldx-widgets>=0.2.3` for viz \[{pull}`939`\].
- pin `pint>=0.21` \[{pull}`941`\].

## 0.6.8 (07.06.2024)

### Changes

Expand All @@ -9,6 +22,7 @@
### Dependencies

- unpin nbval testing dependency.
- pin `python<3.12` \[{pull}`933`\].

## 0.6.7 (2023.08.24)

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# YAML 1.2
---
title: weldx
version: 0.6.7
date-released: 2023-08-24
version: 0.6.8
date-released: 2024-07-06
authors:
- affiliation: "Bundesanstalt für Materialforschung und -prüfung (BAM)"
email: cagtay.fabry@bam.de
Expand Down
11 changes: 9 additions & 2 deletions doc/json_mime_render_plugin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
[project]
name = "myst-nb-json-renderer"
version = "1"
[project.entry-points."myst_nb.mime_renderers"]
json_mime = "myst_nb_json_render_plugin:MimeRenderPlugin"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
entry-points."myst_nb.mime_renderers".json_mime = "myst_nb_json_render_plugin:MimeRenderPlugin"
12 changes: 6 additions & 6 deletions doc/rtd_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies:
- python=3.10
- setuptools_scm
# weldx base dependencies
- numpy>=1.18
- numpy>=1.18,<2
- pandas>=1.0
- xarray>=0.15
- pint>=0.11
Expand All @@ -21,16 +21,16 @@ dependencies:
- weldx_widgets>=0.2.1
# documentation
- docutils>=0.19
- sphinx>=4.1.1
- sphinx>=4.1.1,=7.2
- urllib3<2
#- jinja2=3.0
- sphinx-copybutton
- sphinx-copybutton=0.5
- pydata-sphinx-theme<0.15 # parallel-write-unsafe
- numpydoc>=0.5
- sphinx-autodoc-typehints>=1.21.8
- sphinx-autodoc-typehints>=1.21.8,=2.0
- typing_extensions
# pip packages
- pip
- pip:
- ../
- ./json_mime_render_plugin/
- weldx @ file:/../..//
- json_mime_render_plugin @ file:/..//json_mime_render_plugin
6 changes: 3 additions & 3 deletions doc/src/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data processing and visualization.
```{toctree}
:caption: Welding examples
:maxdepth: 1
:numbered: true
:numbered:
tutorials/01_01_introduction
tutorials/01_02_time_dependent_data
Expand All @@ -27,7 +27,7 @@ related tasks.
```{toctree}
:caption: Welding examples
:maxdepth: 1
:numbered: true
:numbered:
tutorials/welding_example_01_basics
tutorials/custom_metadata
Expand All @@ -45,7 +45,7 @@ The API tutorials provide more detailed usages and examples of core
```{toctree}
:caption: API tutorials
:maxdepth: 1
:numbered: true
:numbered:
tutorials/transformations_01_coordinate_systems
tutorials/transformations_02_coordinate_system_manager
Expand Down
2 changes: 1 addition & 1 deletion doc/src/tutorials/timeseries_01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also use `Quantites` with the appropriate dimension as Inputs for our interpolation:"
"We can also use `Quantities` with the appropriate dimension as Inputs for our interpolation:"
]
},
{
Expand Down
Loading

0 comments on commit 609f86c

Please sign in to comment.