Commit f52a140f authored by Yunus Sevinchan's avatar Yunus Sevinchan
Browse files

Merge branch 'address-test-warnings' into 'main'

Address warnings and improve maintainability

See merge request !375
parents c7b0850e 8b4c1b1f
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -52,6 +52,15 @@ variables:

# -- Checks -------------------------------------------------------------------

# Fast syntax check using py_compile
check:syntax:
  stage: check
  image: python:3.10
  script:
    - find dantro -name "*.py" -exec python -m py_compile {} \;


# Run pre-commit hooks on all files
check:hooks:
  stage: check
  before_script:
+18 −7
Original line number Diff line number Diff line
# pre-commit configuration for dantro
---
repos:
  # Manually run this every now and again .....................................
  # Command:  pre-commit run --all-files --hook-stage manual
  # Manual stage ..............................................................
  # To run the whole manual stage:
  #
  #   pre-commit run --all-files --hook-stage manual
  #

  # Run if desiring to make use of newer language features
  # Automatic upgrade of Python syntax
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.19.0
    rev: v3.21.0
    hooks:
    - id: pyupgrade
      name: upgrade python syntax
@@ -15,9 +18,17 @@ repos:
        - --py37-plus
      stages: [manual]


  # Default pre-commit hooks ..................................................
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.8.4
    hooks:
      - id: ruff
        name: ruff linting (conservative)
        args: [--exit-non-zero-on-fix, --fix]

  - repo: https://github.com/timothycrosley/isort
    rev: 5.13.2
    rev: 7.0.0
    hooks:
      - id: isort
        name: sort imports
@@ -26,7 +37,7 @@ repos:
        args: [--project=dantro]

  - repo: https://github.com/psf/black
    rev: 24.10.0
    rev: 25.9.0
    hooks:
      - id: black
        name: black code formatting
@@ -38,7 +49,7 @@ repos:
        name: check RST backticks

  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    rev: v6.0.0
    hooks:
      - id: end-of-file-fixer
        name: fix end of files
+9 −1
Original line number Diff line number Diff line
@@ -3,7 +3,15 @@
`dantro` aims to adhere to [semantic versioning](https://semver.org/).  
However, given the rather burst-like development on this package, features are often released immediately, sometimes also as a "patch" (`+0.0.1`) release.

## v0.21.1 🚧
## v0.21.2 🚧
...

#### Internal
- !375 Addresses several warnings in tests and elsewhere, mostly related to upstream packages.
- !375 Adds the `ruff` linter as a pre-commit hook and applies suggested fixes (for a subset of warnings).


## v0.21.1
- !372 adds the `title_kwargs` argument to `.plot.facet_grid`, allowing to control the `template`, `maxchar`, and other properties of the [xarray `FacetGrid` titles](https://docs.xarray.dev/en/stable/generated/xarray.plot.FacetGrid.set_titles.html).

#### Internal
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ an automated sequence of predefined, configurable operations.
See :ref:`the user manual <welcome>` for more information.
"""

__version__ = "0.21.1"
__version__ = "0.21.2b0"
"""Package version"""

# Set up the root logger such that the logging configuration is applied
+1 −1
Original line number Diff line number Diff line
@@ -24,5 +24,5 @@ def _deepcopy(obj: Any) -> Any:
    """
    try:
        return _pickle.loads(_pickle.dumps(obj))
    except:
    except Exception:
        return copy.deepcopy(obj)
Loading