recursive-diff 1.0.0__tar.gz → 1.2.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 (67) hide show
  1. recursive_diff-1.2.0/.gitattributes +2 -0
  2. recursive_diff-1.2.0/.github/PULL_REQUEST_TEMPLATE.md +3 -0
  3. recursive_diff-1.2.0/.github/workflows/docs.yml +47 -0
  4. recursive_diff-1.2.0/.github/workflows/pre-commit.yml +16 -0
  5. recursive_diff-1.2.0/.github/workflows/pytest.yml +123 -0
  6. recursive_diff-1.2.0/.gitignore +62 -0
  7. recursive_diff-1.2.0/.pre-commit-config.yaml +27 -0
  8. recursive_diff-1.2.0/.readthedocs.yaml +19 -0
  9. recursive_diff-1.2.0/HOW_TO_RELEASE +64 -0
  10. recursive_diff-1.2.0/MANIFEST.in +13 -0
  11. recursive_diff-1.2.0/PKG-INFO +27 -0
  12. recursive_diff-1.2.0/README.md +10 -0
  13. recursive_diff-1.2.0/ci/requirements-docs.yml +10 -0
  14. recursive_diff-1.2.0/ci/requirements-latest.yml +12 -0
  15. recursive_diff-1.2.0/ci/requirements-minimal.yml +17 -0
  16. recursive_diff-1.2.0/ci/requirements-no_optionals.yml +10 -0
  17. recursive_diff-1.2.0/ci/requirements-upstream.yml +19 -0
  18. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/conf.py +101 -101
  19. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/index.rst +33 -33
  20. recursive_diff-1.2.0/doc/installing.rst +46 -0
  21. recursive_diff-1.2.0/doc/whats-new.rst +45 -0
  22. recursive_diff-1.2.0/pyproject.toml +133 -0
  23. recursive_diff-1.2.0/recursive_diff/__init__.py +18 -0
  24. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff/cast.py +77 -72
  25. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff/dask_or_stub.py +2 -1
  26. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff/ncdiff.py +85 -50
  27. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff/proper_unstack.py +25 -15
  28. recursive_diff-1.2.0/recursive_diff/py.typed +0 -0
  29. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff/recursive_diff.py +175 -117
  30. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff/recursive_eq.py +8 -4
  31. recursive_diff-1.2.0/recursive_diff/tests/__init__.py +47 -0
  32. recursive_diff-1.2.0/recursive_diff/tests/test_ncdiff.py +192 -0
  33. recursive_diff-1.2.0/recursive_diff/tests/test_proper_unstack.py +121 -0
  34. recursive_diff-1.2.0/recursive_diff/tests/test_recursive_diff.py +858 -0
  35. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff/tests/test_recursive_eq.py +5 -4
  36. recursive_diff-1.2.0/recursive_diff.egg-info/PKG-INFO +27 -0
  37. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff.egg-info/SOURCES.txt +17 -3
  38. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff.egg-info/entry_points.txt +0 -1
  39. recursive_diff-1.2.0/recursive_diff.egg-info/not-zip-safe +1 -0
  40. recursive_diff-1.2.0/recursive_diff.egg-info/requires.txt +3 -0
  41. recursive_diff-1.2.0/setup.cfg +4 -0
  42. recursive_diff-1.2.0/setup.py +3 -0
  43. recursive_diff-1.0.0/MANIFEST.in +0 -6
  44. recursive_diff-1.0.0/PKG-INFO +0 -22
  45. recursive_diff-1.0.0/README.md +0 -5
  46. recursive_diff-1.0.0/doc/Makefile +0 -233
  47. recursive_diff-1.0.0/doc/installing.rst +0 -30
  48. recursive_diff-1.0.0/doc/whats-new.rst +0 -11
  49. recursive_diff-1.0.0/recursive_diff/__init__.py +0 -13
  50. recursive_diff-1.0.0/recursive_diff/tests/__init__.py +0 -46
  51. recursive_diff-1.0.0/recursive_diff/tests/test_ncdiff.py +0 -172
  52. recursive_diff-1.0.0/recursive_diff/tests/test_proper_unstack.py +0 -117
  53. recursive_diff-1.0.0/recursive_diff/tests/test_recursive_diff.py +0 -708
  54. recursive_diff-1.0.0/recursive_diff/version.py +0 -2
  55. recursive_diff-1.0.0/recursive_diff.egg-info/PKG-INFO +0 -22
  56. recursive_diff-1.0.0/recursive_diff.egg-info/requires.txt +0 -3
  57. recursive_diff-1.0.0/setup.cfg +0 -22
  58. recursive_diff-1.0.0/setup.py +0 -133
  59. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/LICENSE +0 -0
  60. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/_static/.gitignore +0 -0
  61. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/_static/style.css +0 -0
  62. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/_templates/layout.html +0 -0
  63. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/api.rst +0 -0
  64. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/extend.rst +0 -0
  65. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/doc/ncdiff.rst +0 -0
  66. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff.egg-info/dependency_links.txt +0 -0
  67. {recursive_diff-1.0.0 → recursive_diff-1.2.0}/recursive_diff.egg-info/top_level.txt +0 -0
@@ -0,0 +1,2 @@
1
+ # reduce the number of merge conflicts
2
+ doc/whats-new.rst merge=union
@@ -0,0 +1,3 @@
1
+ - [ ] Closes #xxxx
2
+ - [ ] Tests added / passed
3
+ - [ ] Passes `pre-commit run --all-files`
@@ -0,0 +1,47 @@
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
+ - name: Setup Conda Environment
21
+ uses: conda-incubator/setup-miniconda@v3
22
+ with:
23
+ miniforge-variant: Mambaforge
24
+ miniforge-version: latest
25
+ use-mamba: true
26
+ environment-file: ci/requirements-docs.yml
27
+ activate-environment: recursive_diff-docs
28
+
29
+ - name: Show conda options
30
+ run: conda config --show
31
+
32
+ - name: conda info
33
+ run: conda info
34
+
35
+ - name: conda list
36
+ run: conda list
37
+
38
+ - name: Install
39
+ run: python -m pip install --no-deps -e .
40
+
41
+ - name: Build docs
42
+ run: sphinx-build -n -j auto -b html -d build/doctrees doc build/html
43
+
44
+ - uses: actions/upload-artifact@v4
45
+ with:
46
+ name: recursive_diff-docs
47
+ path: build/html
@@ -0,0 +1,16 @@
1
+ name: Linting
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ['*']
8
+
9
+ jobs:
10
+ checks:
11
+ name: pre-commit hooks
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ - uses: pre-commit/action@v3.0.0
@@ -0,0 +1,123 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: ['*']
8
+
9
+ # When this workflow is queued, automatically cancel any previous running
10
+ # or pending jobs from the same branch
11
+ concurrency:
12
+ group: tests-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ defaults:
16
+ run:
17
+ shell: bash -l {0}
18
+
19
+ jobs:
20
+ build:
21
+ name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.requirements }}
22
+ runs-on: ${{ matrix.os }}-latest
23
+ strategy:
24
+ fail-fast: false
25
+ matrix:
26
+ os: [ubuntu]
27
+ python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
28
+ requirements: [latest]
29
+ include:
30
+ # Test on macos and windows (first and last version of python only)
31
+ - os: macos
32
+ python-version: '3.8'
33
+ requirements: latest
34
+ - os: macos
35
+ python-version: '3.12'
36
+ requirements: latest
37
+ - os: windows
38
+ python-version: '3.8'
39
+ requirements: latest
40
+ - os: windows
41
+ python-version: '3.12'
42
+ requirements: latest
43
+ # Test on minimal requirements
44
+ - os: ubuntu
45
+ python-version: '3.8'
46
+ requirements: minimal
47
+ - os: macos
48
+ python-version: '3.8'
49
+ requirements: minimal
50
+ - os: windows
51
+ python-version: '3.8'
52
+ requirements: minimal
53
+ # Test without any optional dependencies
54
+ - os: ubuntu
55
+ python-version: '3.8'
56
+ requirements: no_optionals
57
+ - os: ubuntu
58
+ python-version: '3.12'
59
+ requirements: no_optionals
60
+ - os: macos
61
+ python-version: '3.8'
62
+ requirements: no_optionals
63
+ - os: macos
64
+ python-version: '3.12'
65
+ requirements: no_optionals
66
+ - os: windows
67
+ python-version: '3.8'
68
+ requirements: no_optionals
69
+ - os: windows
70
+ python-version: '3.12'
71
+ requirements: no_optionals
72
+ # Test on nightly builds of requirements
73
+ - os: ubuntu
74
+ python-version: '3.12'
75
+ requirements: upstream
76
+
77
+ steps:
78
+ - name: Checkout
79
+ uses: actions/checkout@v4
80
+ with:
81
+ fetch-depth: 0
82
+
83
+ - name: Setup Conda Environment
84
+ uses: conda-incubator/setup-miniconda@v3
85
+ with:
86
+ miniforge-variant: Mambaforge
87
+ miniforge-version: latest
88
+ use-mamba: true
89
+ python-version: ${{ matrix.python-version }}
90
+ environment-file: ci/requirements-${{ matrix.requirements }}.yml
91
+ activate-environment: recursive_diff
92
+
93
+ - name: Install nightly builds
94
+ if: ${{ matrix.requirements == 'upstream' }}
95
+ run: |
96
+ # Pick up https://github.com/mamba-org/mamba/pull/2903
97
+ mamba install -n base 'mamba>=1.5.2'
98
+
99
+ mamba uninstall --force numpy pandas scipy pyarrow
100
+ python -m pip install --no-deps --pre --prefer-binary \
101
+ --extra-index-url https://pypi.fury.io/arrow-nightlies/ \
102
+ pyarrow
103
+ python -m pip install --no-deps --pre \
104
+ -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
105
+ numpy pandas scipy
106
+
107
+ - name: Show conda options
108
+ run: conda config --show
109
+
110
+ - name: conda info
111
+ run: conda info
112
+
113
+ - name: conda list
114
+ run: conda list
115
+
116
+ - name: Install
117
+ run: python -m pip install --no-deps -e .
118
+
119
+ - name: pytest
120
+ run: py.test --verbose --cov=recursive_diff --cov-report=xml
121
+
122
+ - name: codecov.io
123
+ uses: codecov/codecov-action@v3
@@ -0,0 +1,62 @@
1
+ *.pyc
2
+ __pycache__
3
+
4
+ # C extensions
5
+ *.so
6
+
7
+ # Packages
8
+ *.egg
9
+ *.egg-info
10
+ .eggs
11
+ dist
12
+ build
13
+ eggs
14
+ parts
15
+ var
16
+ sdist
17
+ develop-eggs
18
+ .installed.cfg
19
+ lib
20
+ lib64
21
+
22
+ # Installer logs
23
+ pip-log.txt
24
+
25
+ # Unit test / coverage reports
26
+ .coverage*
27
+ coverage.xml
28
+ .tox
29
+ nosetests.xml
30
+ .cache
31
+ .mypy_cache/
32
+ .ropeproject/
33
+ .tags*
34
+ .testmon*
35
+ .pytest_cache
36
+ dask-worker-space/
37
+
38
+ # asv environments
39
+ .asv
40
+
41
+ # Translations
42
+ *.mo
43
+
44
+ # Mr Developer
45
+ .mr.developer.cfg
46
+ .project
47
+ .pydevproject
48
+
49
+ # IDEs
50
+ .idea
51
+ *.swp
52
+ .DS_Store
53
+ .vscode/
54
+
55
+ # Sync tools
56
+ Icon*
57
+
58
+ .ipynb_checkpoints
59
+
60
+ doc/_build
61
+ Untitled.ipynb
62
+ htmlcov/
@@ -0,0 +1,27 @@
1
+ repos:
2
+ - repo: https://github.com/MarcoGorelli/absolufy-imports
3
+ rev: v0.3.1
4
+ hooks:
5
+ - id: absolufy-imports
6
+ name: absolufy-imports
7
+ - repo: https://github.com/psf/black
8
+ rev: 23.12.1
9
+ hooks:
10
+ - id: black
11
+ language_version: python3
12
+ args:
13
+ - --target-version=py38
14
+ - repo: https://github.com/astral-sh/ruff-pre-commit
15
+ rev: v0.1.14
16
+ hooks:
17
+ - id: ruff
18
+ args: ["--fix", "--show-fixes"]
19
+ - repo: https://github.com/pre-commit/mirrors-mypy
20
+ rev: v1.8.0
21
+ hooks:
22
+ - id: mypy
23
+ additional_dependencies:
24
+ # Typed libraries
25
+ - numpy
26
+ - pandas
27
+ - xarray
@@ -0,0 +1,19 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: mambaforge-22.9
7
+
8
+ conda:
9
+ environment: ci/requirements-docs.yml
10
+
11
+ python:
12
+ install:
13
+ - method: pip
14
+ path: .
15
+
16
+ sphinx:
17
+ builder: html
18
+ configuration: doc/conf.py
19
+ fail_on_warning: false
@@ -0,0 +1,64 @@
1
+ How to issue a release in 15 easy steps
2
+
3
+ Time required: about an hour.
4
+
5
+ 1. Ensure your main branch is synced to origin:
6
+ git pull origin main
7
+ 2. Look over whats-new.rst and the docs. Make sure "What's New" is complete
8
+ (check the date!) and add a brief summary note describing the release at the
9
+ top.
10
+ 3. If you have any doubts, run the full test suite one final time!
11
+ py.test
12
+ 4. On the main branch, commit the release in git:
13
+ git commit -a -m 'Release vX.Y.Z'
14
+ 5. Tag the release:
15
+ git tag -a vX.Y.Z -m 'vX.Y.Z'
16
+ 6. Push your changes to main:
17
+ git push origin main
18
+ git push origin --tags
19
+ 7. Update the stable branch (used by ReadTheDocs) and switch back to main:
20
+ git checkout stable
21
+ git rebase main
22
+ git push origin stable
23
+ git checkout main
24
+ It's OK to force push to 'stable' if necessary.
25
+ We also update the stable branch with `git cherrypick` for documentation
26
+ only fixes that apply the current released version.
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/*
32
+ 9. Add a section for the next release to doc/whats-new.rst.
33
+ 10. Commit your changes and push to main again:
34
+ git commit -a -m 'Revert to dev version'
35
+ git push origin main
36
+ You're done pushing to main!
37
+ 11. Issue the release on GitHub. Open https://github.com/crusaderky/recursive_diff/releases;
38
+ the new release should have automatically appeared. Otherwise, click on
39
+ "Draft a new release" and paste in the latest from whats-new.rst.
40
+ 12. Use twine to register and upload the release on pypi. Be careful, you can't
41
+ take this back!
42
+ twine upload dist/*
43
+ You will need to be listed as a package owner at
44
+ https://pypi.python.org/pypi/recursive_diff for this to work.
45
+ 13. Update the docs. Login to https://readthedocs.org/projects/recursive_diff/versions/
46
+ and switch your new release tag (at the bottom) from "Inactive" to "Active".
47
+ It should now build automatically.
48
+ Make sure that both the new tagged version and 'stable' build successfully.
49
+ 14. Update conda-forge.
50
+ 14a. Clone https://github.com/conda-forge/recursive_diff-feedstock
51
+ 14b. Update the version number and sha256 in meta.yaml.
52
+ You can calculate sha256 with
53
+ sha256sum dist/*
54
+ 14c. Double check dependencies in meta.yaml and update them to match pyproject.toml.
55
+ 14d. Submit a pull request.
56
+ 14e. Write a comment in the PR:
57
+ @conda-forge-admin, please rerender
58
+ Wait for the rerender commit (it may take a few minutes).
59
+ 14f. Wait for CI to pass and merge.
60
+ 14g. The next day, test the conda-forge release
61
+ conda search recursive_diff
62
+ conda create -n recursive_diff-test recursive_diff
63
+ conda list
64
+ python -m 'import recursive_diff'
@@ -0,0 +1,13 @@
1
+ include HOW_TO_RELEASE
2
+ include LICENSE
3
+ include *.md
4
+ include *.py
5
+ recursive-include ci *
6
+ recursive-include doc *
7
+ recursive-include recursive_diff *
8
+ prune doc/_build
9
+ global-exclude __pycache__
10
+ global-exclude *.pyc
11
+ global-exclude .DS_Store
12
+ global-exclude .ipynb_checkpoints
13
+ global-exclude dask-worker-space
@@ -0,0 +1,27 @@
1
+ Metadata-Version: 2.1
2
+ Name: recursive_diff
3
+ Version: 1.2.0
4
+ Summary: Recursively compare two Python data structures
5
+ Author-email: Guido Imperiale <crusaderky@gmail.com>
6
+ License: Apache
7
+ Project-URL: Homepage, https://github.com/crusaderky/recursive_diff
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.8
21
+ Description-Content-Type: text/x-rst
22
+ License-File: LICENSE
23
+ Requires-Dist: numpy>=1.16
24
+ Requires-Dist: pandas>=0.25
25
+ Requires-Dist: xarray>=0.12
26
+
27
+ Recursively compare two Python data structures
@@ -0,0 +1,10 @@
1
+ recursive_diff
2
+ =============
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)
5
+ [![pytest-badge](https://github.com/crusaderky/recursive_diff/actions/workflows/pytest.yml/badge.svg)](https://github.com/crusaderky/recursive_diff/actions)
6
+ [![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
+ Recursively compare two Python data structures
9
+
10
+ Full documentation at http://recursive_diff.readthedocs.io/
@@ -0,0 +1,10 @@
1
+ name: recursive_diff-docs
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - python=3.12
6
+ - sphinx
7
+ - sphinx_rtd_theme
8
+
9
+ - dask
10
+ - xarray
@@ -0,0 +1,12 @@
1
+ name: recursive_diff
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - pytest
6
+ - pytest-cov
7
+ - packaging
8
+
9
+ - xarray
10
+ - dask
11
+ - h5netcdf # NetCDF engine
12
+ - scipy # NetCDF engine
@@ -0,0 +1,17 @@
1
+ name: recursive_diff
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - pytest
6
+ - pytest-cov
7
+ - packaging
8
+
9
+ - dask=2.0
10
+ - numpy=1.16
11
+ - pandas=0.25
12
+ - xarray=0.12
13
+
14
+ # NetCDF engines
15
+ - scipy=1.3
16
+ - h5netcdf=0.7
17
+ - hdf5=1.10
@@ -0,0 +1,10 @@
1
+ name: recursive_diff
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - pytest
6
+ - pytest-cov
7
+ - packaging
8
+
9
+ - xarray
10
+ - pyarrow # Only needed to suppress warnings; remove when pandas 3.0 is released
@@ -0,0 +1,19 @@
1
+ name: recursive_diff
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - pytest
6
+ - pytest-cov
7
+ - packaging
8
+
9
+ - xarray
10
+ - dask
11
+ - h5netcdf # NetCDF engine
12
+ - scipy # NetCDF engine
13
+
14
+ - pip
15
+ - pip:
16
+ - git+https://github.com/dask/dask
17
+ - git+https://github.com/dask/distributed
18
+ - git+https://github.com/pydata/xarray
19
+ # numpy, pandas, pyarrow, and scipy are upgraded to nightly builds by pytest.yml