recursive-diff 1.2.0__tar.gz → 1.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. recursive_diff-1.3.0/.dprint.jsonc +35 -0
  2. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -1
  3. recursive_diff-1.3.0/.github/workflows/docs.yml +38 -0
  4. recursive_diff-1.3.0/.github/workflows/lint.yml +22 -0
  5. recursive_diff-1.3.0/.github/workflows/pytest.yml +74 -0
  6. recursive_diff-1.3.0/.github/workflows/wheels.yml +50 -0
  7. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/.gitignore +1 -0
  8. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/.readthedocs.yaml +5 -4
  9. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/HOW_TO_RELEASE +5 -7
  10. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/MANIFEST.in +0 -1
  11. recursive_diff-1.3.0/PKG-INFO +33 -0
  12. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/README.md +5 -4
  13. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/_static/style.css +4 -4
  14. recursive_diff-1.3.0/doc/_templates/layout.html +1 -0
  15. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/api.rst +2 -2
  16. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/conf.py +7 -9
  17. recursive_diff-1.3.0/doc/develop.rst +105 -0
  18. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/extend.rst +2 -2
  19. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/index.rst +11 -10
  20. recursive_diff-1.3.0/doc/installing.rst +38 -0
  21. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/ncdiff.rst +2 -0
  22. recursive_diff-1.3.0/doc/requirements.yml +20 -0
  23. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/whats-new.rst +19 -5
  24. recursive_diff-1.3.0/lefthook.yml +21 -0
  25. recursive_diff-1.3.0/pixi.lock +13168 -0
  26. recursive_diff-1.3.0/pyproject.toml +263 -0
  27. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/__init__.py +2 -2
  28. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/cast.py +27 -27
  29. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/dask_or_stub.py +1 -2
  30. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/ncdiff.py +3 -3
  31. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/proper_unstack.py +9 -6
  32. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/recursive_diff.py +86 -32
  33. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/recursive_eq.py +2 -2
  34. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/tests/__init__.py +20 -14
  35. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/tests/test_proper_unstack.py +13 -13
  36. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/tests/test_recursive_diff.py +69 -8
  37. recursive_diff-1.3.0/recursive_diff/tests/test_recursive_eq.py +18 -0
  38. recursive_diff-1.3.0/smoke_test.py +12 -0
  39. recursive_diff-1.2.0/.github/workflows/docs.yml +0 -47
  40. recursive_diff-1.2.0/.github/workflows/pre-commit.yml +0 -16
  41. recursive_diff-1.2.0/.github/workflows/pytest.yml +0 -123
  42. recursive_diff-1.2.0/.pre-commit-config.yaml +0 -27
  43. recursive_diff-1.2.0/PKG-INFO +0 -27
  44. recursive_diff-1.2.0/ci/requirements-docs.yml +0 -10
  45. recursive_diff-1.2.0/ci/requirements-latest.yml +0 -12
  46. recursive_diff-1.2.0/ci/requirements-minimal.yml +0 -17
  47. recursive_diff-1.2.0/ci/requirements-no_optionals.yml +0 -10
  48. recursive_diff-1.2.0/ci/requirements-upstream.yml +0 -19
  49. recursive_diff-1.2.0/doc/_templates/layout.html +0 -2
  50. recursive_diff-1.2.0/doc/installing.rst +0 -46
  51. recursive_diff-1.2.0/pyproject.toml +0 -133
  52. recursive_diff-1.2.0/recursive_diff/tests/test_recursive_eq.py +0 -32
  53. recursive_diff-1.2.0/recursive_diff.egg-info/PKG-INFO +0 -27
  54. recursive_diff-1.2.0/recursive_diff.egg-info/SOURCES.txt +0 -49
  55. recursive_diff-1.2.0/recursive_diff.egg-info/dependency_links.txt +0 -1
  56. recursive_diff-1.2.0/recursive_diff.egg-info/entry_points.txt +0 -2
  57. recursive_diff-1.2.0/recursive_diff.egg-info/not-zip-safe +0 -1
  58. recursive_diff-1.2.0/recursive_diff.egg-info/requires.txt +0 -3
  59. recursive_diff-1.2.0/recursive_diff.egg-info/top_level.txt +0 -1
  60. recursive_diff-1.2.0/setup.cfg +0 -4
  61. recursive_diff-1.2.0/setup.py +0 -3
  62. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/.gitattributes +0 -0
  63. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/LICENSE +0 -0
  64. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/doc/_static/.gitignore +0 -0
  65. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/py.typed +0 -0
  66. {recursive_diff-1.2.0 → recursive_diff-1.3.0}/recursive_diff/tests/test_ncdiff.py +0 -0
@@ -0,0 +1,35 @@
1
+ {
2
+ "json": {
3
+ "lineWidth": 88,
4
+ "array.preferSingleLine": true,
5
+ },
6
+ "markdown": {
7
+ "lineWidth": 88,
8
+ "emphasisKind": "asterisks",
9
+ },
10
+ "markup": {
11
+ "printWidth": 88,
12
+ },
13
+ "toml": {
14
+ "lineWidth": 88,
15
+ },
16
+ "yaml": {
17
+ "printWidth": 88,
18
+ "formatComments": true,
19
+ "braceSpacing": false,
20
+ },
21
+ "excludes": [
22
+ "**/*-lock.json",
23
+ "**/*.lock",
24
+ "**/node_modules/",
25
+ "dist/",
26
+ "doc/requirements.yml",
27
+ ],
28
+ "plugins": [
29
+ "https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
30
+ "https://plugins.dprint.dev/json-0.20.0.wasm",
31
+ "https://plugins.dprint.dev/markdown-0.19.0.wasm",
32
+ "https://plugins.dprint.dev/toml-0.7.0.wasm",
33
+ "https://plugins.dprint.dev/g-plane/markup_fmt-v0.22.0.wasm",
34
+ ],
35
+ }
@@ -1,3 +1,2 @@
1
1
  - [ ] Closes #xxxx
2
2
  - [ ] Tests added / passed
3
- - [ ] Passes `pre-commit run --all-files`
@@ -0,0 +1,38 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+
9
+ defaults:
10
+ run:
11
+ shell: bash -l {0}
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+
20
+ - uses: prefix-dev/setup-pixi@v0.8.10
21
+ with:
22
+ pixi-version: v0.56.0
23
+ cache: true
24
+ environments: docs
25
+
26
+ - name: Regenerate readthedocs environment
27
+ run: pixi run doc-requirements
28
+
29
+ - name: Check that readthedocs environment is up to date in git
30
+ run: git diff --exit-code doc/requirements.yml
31
+
32
+ - name: Build docs
33
+ run: pixi run -e docs docs
34
+
35
+ - uses: actions/upload-artifact@v4
36
+ with:
37
+ name: recursive-diff-docs
38
+ path: build/html
@@ -0,0 +1,22 @@
1
+ name: Linting
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+
9
+ jobs:
10
+ checks:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: prefix-dev/setup-pixi@v0.8.10
15
+ with:
16
+ pixi-version: v0.56.0
17
+ cache: true
18
+ environments: lint
19
+ - name: Run linters
20
+ run: pixi run lint
21
+ - name: Check for changed files after linting
22
+ run: git diff --exit-code
@@ -0,0 +1,74 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+ workflow_dispatch: # allows you to trigger manually
9
+
10
+ # When this workflow is queued, automatically cancel any previous running
11
+ # or pending jobs from the same branch
12
+ concurrency:
13
+ group: pytest-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ defaults:
17
+ run:
18
+ shell: bash -l {0}
19
+
20
+ jobs:
21
+ test:
22
+ name: ${{ matrix.os }} ${{ matrix.environment }}
23
+ runs-on: ${{ matrix.os }}
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ os:
28
+ - ubuntu-latest # x86-64
29
+ - ubuntu-24.04-arm # ARM
30
+ - macos-15-intel # x86-64
31
+ - macos-latest # ARM
32
+ - windows-latest # x86-64
33
+ environment:
34
+ - smoke
35
+ - mindeps
36
+ - no-optional
37
+ - py39
38
+ - py311
39
+ - py314
40
+ include:
41
+ - os: ubuntu-latest
42
+ environment: upstream
43
+ - os: ubuntu-latest
44
+ environment: nogil
45
+
46
+ steps:
47
+ - name: Checkout
48
+ uses: actions/checkout@v4
49
+
50
+ - name: Disregard pixi.lock (upstream only)
51
+ if: matrix.environment == 'upstream' || matrix.environment == 'nogil'
52
+ run: rm pixi.lock
53
+
54
+ - uses: prefix-dev/setup-pixi@v0.8.10
55
+ with:
56
+ pixi-version: v0.56.0
57
+ environments: ${{ matrix.environment }}
58
+ cache: ${{ matrix.environment != 'upstream' && matrix.environment != 'nogil' }}
59
+ locked: ${{ matrix.environment != 'upstream' && matrix.environment != 'nogil' }}
60
+
61
+ - name: Smoke test
62
+ run: pixi run -e ${{ matrix.environment }} smoke-test
63
+
64
+ - name: pytest with coverage
65
+ if: matrix.environment != 'nogil' && matrix.environment != 'smoke'
66
+ run: pixi run -e ${{ matrix.environment }} coverage
67
+
68
+ - name: Free-threading stress test
69
+ if: matrix.environment == 'nogil'
70
+ run: pixi run -e nogil tests --parallel-threads=4
71
+
72
+ - name: codecov.io
73
+ if: matrix.environment != 'nogil' && matrix.environment != 'smoke'
74
+ uses: codecov/codecov-action@v5
@@ -0,0 +1,50 @@
1
+ name: Wheels
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ["*"]
8
+
9
+ defaults:
10
+ run:
11
+ shell: bash -l {0}
12
+
13
+ jobs:
14
+ build:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0 # Fetch full git history for hatch-vcs
21
+ fetch-tags: true # Fetch tags for hatch-vcs
22
+
23
+ - uses: prefix-dev/setup-pixi@v0.8.10
24
+ with:
25
+ pixi-version: v0.56.0
26
+ cache: true
27
+ environments: dist
28
+
29
+ - name: Build sdist and wheels
30
+ run: pixi run dist
31
+
32
+ - name: Set up Python
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version: "3.14"
36
+
37
+ - name: Install wheel
38
+ run: pip install dist/*.whl
39
+
40
+ - name: Smoke test
41
+ working-directory: /tmp
42
+ run: |
43
+ cp ${{ github.workspace }}/smoke_test.py .
44
+ python smoke_test.py
45
+
46
+ - uses: actions/upload-artifact@v4
47
+ with:
48
+ name: dist
49
+ path: dist/*
50
+ if-no-files-found: error
@@ -60,3 +60,4 @@ Icon*
60
60
  doc/_build
61
61
  Untitled.ipynb
62
62
  htmlcov/
63
+ .~lock.*
@@ -6,14 +6,15 @@ build:
6
6
  python: mambaforge-22.9
7
7
 
8
8
  conda:
9
- environment: ci/requirements-docs.yml
9
+ environment: doc/requirements.yml
10
10
 
11
11
  python:
12
- install:
13
- - method: pip
14
- path: .
12
+ install:
13
+ - method: pip
14
+ path: .
15
15
 
16
16
  sphinx:
17
17
  builder: html
18
18
  configuration: doc/conf.py
19
+ # This is deliberately laxer than the setting in CI
19
20
  fail_on_warning: false
@@ -8,7 +8,7 @@ Time required: about an hour.
8
8
  (check the date!) and add a brief summary note describing the release at the
9
9
  top.
10
10
  3. If you have any doubts, run the full test suite one final time!
11
- py.test
11
+ pixi run tests
12
12
  4. On the main branch, commit the release in git:
13
13
  git commit -a -m 'Release vX.Y.Z'
14
14
  5. Tag the release:
@@ -25,10 +25,7 @@ Time required: about an hour.
25
25
  We also update the stable branch with `git cherrypick` for documentation
26
26
  only fixes that apply the current released version.
27
27
  8. Build and test the release package
28
- python -m pip install --upgrade build twine
29
- rm -rf dist
30
- python -m build
31
- python -m twine check dist/*
28
+ pixi run dist
32
29
  9. Add a section for the next release to doc/whats-new.rst.
33
30
  10. Commit your changes and push to main again:
34
31
  git commit -a -m 'Revert to dev version'
@@ -39,7 +36,7 @@ Time required: about an hour.
39
36
  "Draft a new release" and paste in the latest from whats-new.rst.
40
37
  12. Use twine to register and upload the release on pypi. Be careful, you can't
41
38
  take this back!
42
- twine upload dist/*
39
+ pixi run twine-upload
43
40
  You will need to be listed as a package owner at
44
41
  https://pypi.python.org/pypi/recursive_diff for this to work.
45
42
  13. Update the docs. Login to https://readthedocs.org/projects/recursive_diff/versions/
@@ -60,5 +57,6 @@ Time required: about an hour.
60
57
  14g. The next day, test the conda-forge release
61
58
  conda search recursive_diff
62
59
  conda create -n recursive_diff-test recursive_diff
60
+ conda activate recursive_diff-test
63
61
  conda list
64
- python -m 'import recursive_diff'
62
+ python -c 'import recursive_diff'
@@ -2,7 +2,6 @@ include HOW_TO_RELEASE
2
2
  include LICENSE
3
3
  include *.md
4
4
  include *.py
5
- recursive-include ci *
6
5
  recursive-include doc *
7
6
  recursive-include recursive_diff *
8
7
  prune doc/_build
@@ -0,0 +1,33 @@
1
+ Metadata-Version: 2.4
2
+ Name: recursive_diff
3
+ Version: 1.3.0
4
+ Summary: Recursively compare two Python data structures
5
+ Project-URL: homepage, https://github.com/crusaderky/recursive_diff
6
+ Project-URL: issues, https://github.com/crusaderky/recursive_diff/issues
7
+ Project-URL: documentation, https://recursive-diff.readthedocs.io/
8
+ Project-URL: changelog, https://recursive-diff.readthedocs.io/en/latest/whats-new.html
9
+ Author-email: Guido Imperiale <crusaderky@gmail.com>
10
+ License: Apache
11
+ License-File: LICENSE
12
+ Keywords: diff,pandas,recursive,xarray
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
26
+ Classifier: Topic :: Scientific/Engineering
27
+ Requires-Python: >=3.9
28
+ Requires-Dist: numpy>=1.23
29
+ Requires-Dist: pandas>=1.5
30
+ Requires-Dist: xarray>=2023.8.0
31
+ Description-Content-Type: text/plain
32
+
33
+ Recursively compare two Python data structures
@@ -1,10 +1,11 @@
1
- recursive_diff
2
- =============
1
+ # recursive_diff
2
+
3
3
  [![doc-badge](https://github.com/crusaderky/recursive_diff/actions/workflows/docs.yml/badge.svg)](https://github.com/crusaderky/recursive_diff/actions)
4
- [![pre-commit-badge](https://github.com/crusaderky/recursive_diff/actions/workflows/pre-commit.yml/badge.svg)](https://github.com/crusaderky/recursive_diff/actions)
4
+ [![lint-badge](https://github.com/crusaderky/recursive_diff/actions/workflows/lint.yml/badge.svg)](https://github.com/crusaderky/recursive_diff/actions)
5
+ [![wheels-badge](https://github.com/crusaderky/recursive_diff/actions/workflows/wheels.yml/badge.svg)](https://github.com/crusaderky/recursive_diff/actions)
5
6
  [![pytest-badge](https://github.com/crusaderky/recursive_diff/actions/workflows/pytest.yml/badge.svg)](https://github.com/crusaderky/recursive_diff/actions)
6
7
  [![codecov-badge](https://codecov.io/gh/crusaderky/recursive_diff/branch/main/graph/badge.svg)](https://codecov.io/gh/crusaderky/recursive_diff/branch/main)
7
8
 
8
9
  Recursively compare two Python data structures
9
10
 
10
- Full documentation at http://recursive_diff.readthedocs.io/
11
+ Full documentation at http://recursive-diff.readthedocs.io/
@@ -1,15 +1,15 @@
1
1
  @import url("theme.css");
2
2
 
3
- .wy-side-nav-search>a img.logo,
4
- .wy-side-nav-search .wy-dropdown>a img.logo {
5
- width: 12rem
3
+ .wy-side-nav-search > a img.logo,
4
+ .wy-side-nav-search .wy-dropdown > a img.logo {
5
+ width: 12rem;
6
6
  }
7
7
 
8
8
  .wy-side-nav-search {
9
9
  background-color: #eee;
10
10
  }
11
11
 
12
- .wy-side-nav-search>div.version {
12
+ .wy-side-nav-search > div.version {
13
13
  display: none;
14
14
  }
15
15
 
@@ -0,0 +1 @@
1
+ {% extends "!layout.html" %} {% set css_files = css_files + ["_static/style.css"] %}
@@ -1,5 +1,5 @@
1
- Python API
2
- **********
1
+ API Reference
2
+ =============
3
3
 
4
4
  .. autofunction:: recursive_diff.recursive_diff
5
5
 
@@ -1,5 +1,3 @@
1
- from __future__ import annotations
2
-
3
1
  # documentation build configuration file, created by
4
2
  # sphinx-quickstart on Thu Feb 6 18:57:54 2014.
5
3
  #
@@ -19,7 +17,7 @@ import recursive_diff
19
17
 
20
18
  print("python exec:", sys.executable)
21
19
  print("sys.path:", sys.path)
22
- print("TEMPLATE version: ", recursive_diff.__version__)
20
+ print("recursive_diff version: ", recursive_diff.__version__)
23
21
 
24
22
 
25
23
  # -- General configuration ------------------------------------------------
@@ -39,8 +37,8 @@ extensions = [
39
37
  ]
40
38
 
41
39
  extlinks = {
42
- "issue": ("https://github.com/crusaderky/recursive_diff/issues/%s", "#"),
43
- "pull": ("https://github.com/crusaderky/recursive_diff/pull/%s", "#"),
40
+ "issue": ("https://github.com/crusaderky/recursive_diff/issues/%s", "#%s"),
41
+ "pull": ("https://github.com/crusaderky/recursive_diff/pull/%s", "#%s"),
44
42
  }
45
43
 
46
44
  autosummary_generate = True
@@ -59,7 +57,7 @@ master_doc = "index"
59
57
 
60
58
  # General information about the project.
61
59
  project = "recursive_diff"
62
- copyright = "2018-%s, recursive_diff Developers" % datetime.datetime.now().year
60
+ copyright = f"2018-{datetime.datetime.now().year}, recursive_diff Developers"
63
61
 
64
62
  # The version info for the project you're documenting, acts as replacement for
65
63
  # |version| and |release|, also used in various other places throughout the
@@ -200,7 +198,7 @@ html_last_updated_fmt = today_fmt
200
198
  # html_file_suffix = None
201
199
 
202
200
  # Output file base name for HTML help builder.
203
- htmlhelp_basename = "recursive_diffdoc"
201
+ htmlhelp_basename = "recursive_diff_doc"
204
202
 
205
203
 
206
204
  # -- Options for LaTeX output ---------------------------------------------
@@ -296,11 +294,11 @@ texinfo_documents = [
296
294
  # texinfo_no_detailmenu = False
297
295
 
298
296
 
299
- # Example configuration for intersphinx: refer to the Python standard library.
297
+ # Configuration for intersphinx
300
298
  intersphinx_mapping = {
301
299
  "python": ("https://docs.python.org/3/", None),
302
300
  "dask": ("https://docs.dask.org/en/latest/", None),
303
301
  "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
304
302
  "numpy": ("https://docs.scipy.org/doc/numpy/", None),
305
- "xarray": ("https://xarray.pydata.org/en/stable/", None),
303
+ "xarray": ("https://docs.xarray.dev/en/stable/", None),
306
304
  }
@@ -0,0 +1,105 @@
1
+ Development Guidelines
2
+ ======================
3
+
4
+
5
+ Reporting issues
6
+ ----------------
7
+
8
+ If you find a bug or want to suggest a new feature, please report it on the
9
+ `GitHub issues page <https://github.com/crusaderky/recursive_diff/issues>`_.
10
+
11
+ Before you report an issue, please check if it can still be reproduced with the
12
+ latest version of this software.
13
+
14
+ For bug reports, please include the following information:
15
+
16
+ - A description of the bug
17
+ - The expected behavior
18
+ - The actual behavior
19
+ - Steps to reproduce the bug (preferably with a minimal example)
20
+ - Any relevant error messages or stack traces
21
+
22
+
23
+ Deploying a development environment
24
+ -----------------------------------
25
+
26
+ 1. Clone this repository with git:
27
+
28
+ .. code-block:: bash
29
+
30
+ git clone git@github.com:crusaderky/recursive_diff.git
31
+ cd recursive_diff
32
+
33
+ 2. `Install pixi <https://pixi.sh/latest/#installation>`_
34
+ 3. To keep a fork in sync with the upstream source:
35
+
36
+ .. code-block:: bash
37
+
38
+ cd recursive_diff
39
+ git remote add upstream git@github.com:crusaderky/recursive_diff.git
40
+ git remote -v
41
+ git fetch -a upstream
42
+ git checkout main
43
+ git pull upstream main
44
+ git push origin main
45
+
46
+
47
+ Test
48
+ ----
49
+
50
+ Test using pixi:
51
+
52
+ .. code-block:: bash
53
+
54
+ pixi run tests
55
+
56
+ Test with coverage:
57
+
58
+ .. code-block:: bash
59
+
60
+ pixi run coverage
61
+
62
+ Test with coverage and open HTML report in your browser:
63
+
64
+ .. code-block:: bash
65
+
66
+ pixi run open-coverage
67
+
68
+
69
+ Code Formatting
70
+ ---------------
71
+
72
+ This project uses several code linters (ruff, mypy, etc.), which are enforced by
73
+ CI. Developers should run them locally before they submit a PR, through the single
74
+ command
75
+
76
+ .. code-block:: bash
77
+
78
+ pixi run lint
79
+
80
+ Optionally, you may wish to run the linters automatically every time you make a
81
+ git commit. This can be done by running:
82
+
83
+ .. code-block:: bash
84
+
85
+ pixi run install-git-hooks
86
+
87
+ Now the code linters will be run each time you commit changes.
88
+ You can skip these checks with ``git commit --no-verify`` or with
89
+ the short version ``git commit -n``.
90
+
91
+
92
+ Documentation
93
+ -------------
94
+
95
+ Build the documentation in ``build/html`` using pixi:
96
+
97
+ .. code-block:: bash
98
+
99
+ pixi run docs
100
+
101
+ Build the documentation and open it in your browser:
102
+
103
+ .. code-block:: bash
104
+
105
+ pixi run open-docs
@@ -1,5 +1,5 @@
1
1
  Extending recursive_diff/recursive_eq
2
- *************************************
2
+ =====================================
3
3
 
4
4
  Without any changes, :func:`~recursive_diff.recursive_diff` and
5
5
  :func:`~recursive_diff.recursive_eq` can compare arbitrary objects using the
@@ -43,4 +43,4 @@ collections, will be recursively descended into::
43
43
 
44
44
  >>> list(recursive_diff(
45
45
  ... Rectangle(1, 2), Rectangle(1.1, 2.7), abs_tol=.5))
46
- ['[h]: 2.0 != 2.7 (abs: 7.0e-01, rel: 3.5e-01)']
46
+ ['[h]: 2.0 != 2.7 (abs: 7.0e-01, rel: 3.5e-01)']
@@ -1,11 +1,11 @@
1
1
  recursive_diff: Compare two Python data structures
2
- **************************************************
2
+ ==================================================
3
3
  JSON, YAML and msgpack are massively popular formats used to represent nested data. A
4
4
  problem arises when you want to compare two large JSON data structures, because the `==`
5
5
  operator will tell you if the two structures differ *somewhere*, but won't tell you
6
6
  where*. Additionally, if the structures contain floating-point numbers, == won't allow
7
7
  to set a tolerance: 1.00000000000001 is different from 1.0, which is majorly problematic
8
- as floating point arithmetics are naturally characterised by noise around the 15th
8
+ as floating point arithmetic is naturally characterised by noise around the 15th
9
9
  decimal position (the size of the double-precision mantissa). Tests on floating point
10
10
  numbers are typically performed with :func:`math.isclose` or :func:`numpy.isclose`,
11
11
  which however are not usable if the numbers to be tested lie deep inside a nested
@@ -30,7 +30,7 @@ directories full of NetCDF files, as long as they can be loaded with
30
30
  :func:`xarray.open_dataset`.
31
31
 
32
32
  Examples
33
- ========
33
+ --------
34
34
 
35
35
  .. code::
36
36
 
@@ -82,19 +82,20 @@ py.test output::
82
82
  [foo][2][0]: one != two
83
83
 
84
84
  Index
85
- =====
85
+ -----
86
86
 
87
87
  .. toctree::
88
88
 
89
89
  installing
90
- whats-new
91
- extend
92
90
  api
91
+ extend
93
92
  ncdiff
93
+ develop
94
+ whats-new
94
95
 
95
96
 
96
97
  Credits
97
- =======
98
+ -------
98
99
  - recursive_diff, recursive_eq and ncdiff were originally developed by
99
100
  Legal & General and released to the open source community in 2018.
100
101
  - All boilerplate is from
@@ -102,11 +103,11 @@ Credits
102
103
  which in turn is from `xarray`_.
103
104
 
104
105
  License
105
- =======
106
+ -------
106
107
 
107
- recursive_diff is available under the open source `Apache License`_.
108
+ This software is available under the open source `Apache License`_.
108
109
 
109
110
  .. _numpy: http://www.numpy.org
110
111
  .. _pandas: https://pandas.pydata.org
111
- .. _xarray: http://xarray.pydata.org
112
+ .. _xarray: https://docs.xarray.dev
112
113
  .. _Apache License: http://www.apache.org/licenses/LICENSE-2.0.html
@@ -0,0 +1,38 @@
1
+ Installation
2
+ ============
3
+
4
+ Required dependencies
5
+ ---------------------
6
+
7
+ - `xarray <http://xarray.pydata.org/>`__
8
+ - For :doc:`ncdiff`: one or more NetCDF engines;
9
+ see :func:`xarray.open_dataset`
10
+
11
+
12
+ Installing with conda
13
+ ---------------------
14
+
15
+ .. code-block:: bash
16
+
17
+ conda install recursive_diff
18
+
19
+
20
+ Installing with pip
21
+ -------------------
22
+
23
+ .. code-block:: bash
24
+
25
+ pip install recursive-diff
26
+
27
+
28
+ .. _mindeps_policy:
29
+
30
+ Minimum dependency versions
31
+ ---------------------------
32
+
33
+ This project adopts a rolling policy based on `SPEC 0
34
+ <https://scientific-python.org/specs/spec-0000/>`_ regarding the minimum
35
+ supported version of its dependencies.
36
+
37
+ You can see the actual minimum tested versions in `pyproject.toml
38
+ <https://github.com/crusaderky/recursive_diff/blob/main/pyproject.toml>`_.
@@ -2,6 +2,7 @@ ncdiff
2
2
  ======
3
3
  Compare either two NetCDF files or all NetCDF files in two directories.
4
4
 
5
+
5
6
  Usage
6
7
  -----
7
8
  ::
@@ -58,6 +59,7 @@ This has the big advantage of simplicity, but a few disadvantages:
58
59
  See also `xarray#2039 <https://github.com/pydata/xarray/issues/2039>`_.
59
60
  - Huge RAM usage in case of monolithic variables
60
61
 
62
+
61
63
  Further limitations
62
64
  -------------------
63
65
  - Won't compare NetCDF settings, e.g. store version, compression,