Skip to content

Commit

Permalink
Merge branch 'master' into update_rtd_env
Browse files Browse the repository at this point in the history
  • Loading branch information
CagtayFabry authored Mar 12, 2024
2 parents 11aa78e + a295ec9 commit b318b5b
Show file tree
Hide file tree
Showing 70 changed files with 313 additions and 204 deletions.
8 changes: 4 additions & 4 deletions .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.4.4
uses: mamba-org/setup-micromamba@v1.8.1
with:
environment-file: ./devtools/conda.recipe/build_env.yml
environment-name: build_env
Expand Down Expand Up @@ -77,12 +77,12 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v3
uses: actions/cache@v4
env:
# Increase this value to reset cache if ./setup.cfg has not changed
CACHE_NUMBER: 0
Expand All @@ -99,7 +99,7 @@ jobs:
run: |
python -m build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/citation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-cffconvert-0
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,7 +47,7 @@ jobs:
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.4.4
uses: mamba-org/setup-micromamba@v1.8.1
with:
environment-file: ./doc/rtd_environment.yml
environment-name: rtd
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Build docs
run: sphinx-build -W -n -b html -d build/doctrees doc/src build/html --keep-going -j 2 -D nb_execution_mode=${{ env.nb_execution_mode }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: |
always() && (
startsWith(github.ref, 'refs/tags/') ||
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}
Expand All @@ -47,7 +47,7 @@ jobs:
setup_requires: 'include'

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.4.4
uses: mamba-org/setup-micromamba@v1.8.1
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Upload Test Results
if: always() && (matrix.py == '3.10')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Unit Test Results
path: pytest.xml
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:

- name: codecov.io
if: matrix.py == '3.10'
uses: codecov/[email protected].4
uses: codecov/[email protected].5

compat:
name: pytest
Expand All @@ -147,7 +147,7 @@ jobs:
setup_requires: 'include'

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.4.4
uses: mamba-org/setup-micromamba@v1.8.1
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down
6 changes: 3 additions & 3 deletions .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.4.4
uses: mamba-org/setup-micromamba@v1.8.1
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down Expand Up @@ -71,10 +71,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Lint
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1
with:
extra_args: --all-files --show-diff-on-failure

Expand All @@ -42,14 +42,14 @@ jobs:
setup_requires: 'include'

- name: Cache mypy cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
./.mypy_cache
key: ${{ runner.os }}-${{ hashFiles('./environment.yml') }}

- name: Setup Conda Environment
uses: mamba-org/setup-micromamba@v1.4.4
uses: mamba-org/setup-micromamba@v1.8.1
with:
environment-file: ./environment.yml
environment-name: weldx
Expand Down
12 changes: 6 additions & 6 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.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
Expand All @@ -29,28 +29,28 @@ repos:
- mdformat-config
# ----- Python formatting -----
- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.1.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.2.0
hooks:
- id: ruff
args:
- --quiet
- --fix
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.14
rev: v0.16
hooks:
- id: validate-pyproject
# ----- Jupyter Notebooks -----
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
rev: 1.7.1
hooks:
- id: nbqa-black
- id: nbqa-ruff # ruff handles isort
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
# Release Notes

## 0.6.8 (unreleased)

### Changes

- use pandas.to_timedelta function to pass units to the TimeDeltaIndex object \[{pull}`918`\].

### Dependencies

- unpin nbval testing dependency.

## 0.6.7 (2023.08.24)

### Added

- added `weldx.exceptions` module with `WeldxException` \[{pull}`871`\] .
- added `weldx.exceptions` module with `WeldxException` \[{pull}`871`\].

### Fixes

Expand Down
1 change: 1 addition & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""PyTest configuration."""

import pytest

collect_ignore_glob = [
Expand Down
1 change: 1 addition & 0 deletions devtools/scripts/clean_notebooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Clean up jupyter notebooks in main directory."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions devtools/scripts/update_manifest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Update the manifest file with schema files found in this directory."""

from pathlib import Path

import yaml
Expand Down
1 change: 1 addition & 0 deletions doc/src/tutorials/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Common util functions used in weldx tutorials."""

from pathlib import Path

tutorials_dir = Path(__file__).parent.absolute()
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ requires-python = ">=3.9"
dependencies = [
"numpy >=1.20",
"asdf >=2.15.1",
"pandas >=1.0",
"pandas >=1.5",
"xarray >=2022.9.0",
"scipy >=1.6.2",
"sympy >=1.6",
Expand Down Expand Up @@ -125,6 +125,7 @@ filterwarnings = [
"ignore::DeprecationWarning:traittypes.*:",
"ignore:Passing method to :FutureWarning:xarray.*:",
"error::pint.UnitStrippedWarning",
#"error::FutureWarning", # todo: we want to enable this, as it notifies us about upcoming failures due to upstream changes.
]

[tool.coverage.run]
Expand Down
1 change: 1 addition & 0 deletions weldx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
asdf.validators
"""

# isort:skip_file
import warnings

Expand Down
1 change: 1 addition & 0 deletions weldx/asdf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This submodule contains ASDF related weldx extensions and schemas."""

# isort:skip_file

from weldx import tags # implement tags before the asdf extensions here just to be safe
Expand Down
1 change: 1 addition & 0 deletions weldx/asdf/cli/welding_schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""single_pass_weld schema."""

from __future__ import annotations

import sys
Expand Down
1 change: 1 addition & 0 deletions weldx/asdf/extension.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""ASDF-extensions for weldx types."""

from __future__ import annotations

from asdf.extension import ManifestExtension
Expand Down
11 changes: 4 additions & 7 deletions weldx/asdf/file.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""`WeldxFile` wraps creation and updating of ASDF files and underlying files."""

from __future__ import annotations

import copy
Expand Down Expand Up @@ -193,13 +194,10 @@ class WeldxFile(_ProtectedViewDict):
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
--- !core/asdf-1.1.0
asdf_library: !core/software-1.0.0 {...
name: asdf, version: ...}
asdf_library: !core/software-1.0.0 ...
history:
extensions:
- !core/extension_metadata-1.0.0
extension_class: asdf.extension.BuiltinExtension
software: !core/software-1.0.0 {name: asdf, version: ...}
...
name: CXCOMP
value: 42
<BLANKLINE>
Expand All @@ -214,8 +212,7 @@ def __init__(
write_kwargs: Mapping = None,
tree: Mapping = None,
sync: bool = True,
custom_schema: None
| (
custom_schema: None | (
types_path_like,
tuple[None, types_path_like],
) = None,
Expand Down
1 change: 1 addition & 0 deletions weldx/asdf/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for asdf files."""

from __future__ import annotations

from collections.abc import Callable, Hashable, Mapping, MutableMapping, Set
Expand Down
1 change: 1 addition & 0 deletions weldx/asdf/validators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""ASDF-validators for weldx types."""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions weldx/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Classes and functions to configure the WelDX package."""

from __future__ import annotations

from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions weldx/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define constants for global library use."""

from pathlib import Path as _Path

import pint
Expand Down
1 change: 1 addition & 0 deletions weldx/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Collection of common classes and functions."""

# isort:skip_file
from weldx.core.math_expression import MathematicalExpression
from weldx.core.generic_series import GenericSeries
Expand Down
1 change: 1 addition & 0 deletions weldx/core/generic_series.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains GenericSeries class."""

from __future__ import annotations

from collections.abc import Callable, Mapping
Expand Down
1 change: 1 addition & 0 deletions weldx/core/math_expression.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the MathematicalExpression class."""

from __future__ import annotations

from typing import Any, Union
Expand Down
1 change: 1 addition & 0 deletions weldx/core/spatial_series.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the SpatialSeries class."""

from __future__ import annotations

import pint
Expand Down
1 change: 1 addition & 0 deletions weldx/core/time_series.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains TimeSeries class."""

from __future__ import annotations

from typing import TYPE_CHECKING, Any
Expand Down
1 change: 1 addition & 0 deletions weldx/geometry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Provides classes to define lines and surfaces."""

from __future__ import annotations

import copy
Expand Down
2 changes: 1 addition & 1 deletion weldx/schemas/weldx.bam.de/weldx/time/time-0.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ examples:
values: !<asdf://weldx.bam.de/weldx/tags/time/datetimeindex-0.1.0>
start: !<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> '2021-01-01T00:00:00'
end: !<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> '2021-01-01T00:00:02'
freq: S
freq: s
min: !<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> '2021-01-01T00:00:00'
max: !<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> '2021-01-01T00:00:02'
reference_time: !<asdf://weldx.bam.de/weldx/tags/time/timestamp-0.1.0> '2021-01-01T00:00:00'
Expand Down
Loading

0 comments on commit b318b5b

Please sign in to comment.