xarray-binfile 0.1.0b0__tar.gz → 0.1.0b2__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 (79) hide show
  1. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.github/dependabot.yml +9 -0
  2. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.github/workflows/check-links.yaml +1 -1
  3. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.github/workflows/ci.yaml +23 -15
  4. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.github/workflows/docs.yaml +8 -5
  5. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.gitignore +4 -0
  6. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.pre-commit-config.yaml +7 -7
  7. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.vscode/settings.json +2 -1
  8. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/PKG-INFO +27 -14
  9. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/README.md +13 -4
  10. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/docs/_config.yml +20 -6
  11. xarray_binfile-0.1.0b2/docs/_toc.yml +24 -0
  12. xarray_binfile-0.1.0b2/docs/getting-started/about.md +29 -0
  13. xarray_binfile-0.1.0b2/docs/getting-started/installation.md +51 -0
  14. xarray_binfile-0.1.0b2/docs/intro.md +132 -0
  15. xarray_binfile-0.1.0b2/docs/references/api-reference.rst +28 -0
  16. xarray_binfile-0.1.0b2/docs/references/further-reading.md +34 -0
  17. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/docs/references/how-to-contribute.md +1 -1
  18. xarray_binfile-0.1.0b2/docs/tutorials/benchmarking.ipynb +222 -0
  19. xarray_binfile-0.1.0b2/docs/tutorials/examples.ipynb +277 -0
  20. xarray_binfile-0.1.0b2/docs/tutorials/parallel-and-larger-than-memory.ipynb +303 -0
  21. xarray_binfile-0.1.0b2/docs/tutorials/read.ipynb +248 -0
  22. xarray_binfile-0.1.0b2/docs/tutorials/write.ipynb +250 -0
  23. xarray_binfile-0.1.0b2/docs/usage/spec-getter-protocols.md +174 -0
  24. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/pyproject.toml +17 -15
  25. xarray_binfile-0.1.0b2/src/xarray_binfile/__init__.py +22 -0
  26. xarray_binfile-0.1.0b2/src/xarray_binfile/_version.py +24 -0
  27. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/read/array.py +48 -12
  28. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/read/entrypoint.py +1 -1
  29. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/read/file_metadata.py +22 -4
  30. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/tutorial/dataset_generator.py +13 -6
  31. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/tutorial/file_metadata.py +26 -4
  32. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/typing.py +1 -1
  33. xarray_binfile-0.1.0b2/src/xarray_binfile/write/accessor.py +117 -0
  34. xarray_binfile-0.1.0b2/src/xarray_binfile/write/file_metadata.py +62 -0
  35. xarray_binfile-0.1.0b2/tests/integration/test_indexing.py +62 -0
  36. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/tests/integration/test_load_dataset.py +0 -1
  37. xarray_binfile-0.1.0b2/tests/integration/test_roundtrip.py +44 -0
  38. xarray_binfile-0.1.0b2/tests/unit/read/test_array.py +178 -0
  39. xarray_binfile-0.1.0b2/tests/unit/read/test_entrypoint.py +64 -0
  40. xarray_binfile-0.1.0b2/tests/unit/tutorial/__init__.py +0 -0
  41. xarray_binfile-0.1.0b2/tests/unit/tutorial/test_file_metadata.py +22 -0
  42. xarray_binfile-0.1.0b2/tests/unit/write/__init__.py +0 -0
  43. xarray_binfile-0.1.0b2/tests/unit/write/test_accessor.py +97 -0
  44. xarray_binfile-0.1.0b0/docs/_toc.yml +0 -30
  45. xarray_binfile-0.1.0b0/docs/getting-started/about.md +0 -7
  46. xarray_binfile-0.1.0b0/docs/getting-started/dependencies.md +0 -31
  47. xarray_binfile-0.1.0b0/docs/getting-started/use-this-template.md +0 -85
  48. xarray_binfile-0.1.0b0/docs/intro.md +0 -85
  49. xarray_binfile-0.1.0b0/docs/references/api-reference.rst +0 -10
  50. xarray_binfile-0.1.0b0/docs/references/further-reading.md +0 -28
  51. xarray_binfile-0.1.0b0/docs/user-guide/ci-cd.md +0 -11
  52. xarray_binfile-0.1.0b0/docs/user-guide/documentation.md +0 -13
  53. xarray_binfile-0.1.0b0/docs/user-guide/tooling/codespell.md +0 -7
  54. xarray_binfile-0.1.0b0/docs/user-guide/tooling/index.md +0 -5
  55. xarray_binfile-0.1.0b0/docs/user-guide/tooling/mypy.md +0 -23
  56. xarray_binfile-0.1.0b0/docs/user-guide/tooling/pre-commit.md +0 -30
  57. xarray_binfile-0.1.0b0/docs/user-guide/tooling/pytest.md +0 -36
  58. xarray_binfile-0.1.0b0/docs/user-guide/tooling/ruff.md +0 -27
  59. xarray_binfile-0.1.0b0/docs/user-guide/tooling/zizmor.md +0 -16
  60. xarray_binfile-0.1.0b0/docs/user-guide/versioning-changelog.md +0 -8
  61. xarray_binfile-0.1.0b0/src/xarray_binfile/__init__.py +0 -3
  62. xarray_binfile-0.1.0b0/src/xarray_binfile/_version.py +0 -21
  63. xarray_binfile-0.1.0b0/src/xarray_binfile/write/accessor.py +0 -72
  64. xarray_binfile-0.1.0b0/src/xarray_binfile/write/file_metadata.py +0 -46
  65. xarray_binfile-0.1.0b0/tests/unit/read/test_array.py +0 -87
  66. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.github/release.yml +0 -0
  67. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/.vscode/extensions.json +0 -0
  68. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/LICENSE +0 -0
  69. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/docs/logo.png +0 -0
  70. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/docs/references/what-is-new.md +0 -0
  71. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/docs/references.bib +0 -0
  72. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/py.typed +0 -0
  73. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/read/__init__.py +0 -0
  74. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/tutorial/__init__.py +0 -0
  75. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/src/xarray_binfile/write/__init__.py +0 -0
  76. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/tests/__init__.py +0 -0
  77. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/tests/integration/__init__.py +0 -0
  78. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/tests/unit/__init__.py +0 -0
  79. {xarray_binfile-0.1.0b0 → xarray_binfile-0.1.0b2}/tests/unit/read/__init__.py +0 -0
@@ -8,11 +8,20 @@ updates:
8
8
  actions:
9
9
  patterns:
10
10
  - "*"
11
+ cooldown:
12
+ default-days: 7
11
13
  - package-ecosystem: "pip"
12
14
  directory: "/"
13
15
  schedule:
14
16
  interval: "weekly"
17
+ ignore:
18
+ - dependency-name: "jupyter-book"
19
+ update-types: ["version-update:semver-major"]
20
+ - dependency-name: "sphinx"
21
+ update-types: ["version-update:semver-major"]
15
22
  groups:
16
23
  pip-dependencies:
17
24
  patterns:
18
25
  - "*"
26
+ cooldown:
27
+ default-days: 7
@@ -17,7 +17,7 @@ jobs:
17
17
  check-links:
18
18
  runs-on: ubuntu-latest
19
19
  steps:
20
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
21
21
  with:
22
22
  persist-credentials: false
23
23
  - uses: gaurav-nelson/github-action-markdown-link-check@3c3b66f1f7d0900e37b71eca45b63ea9eedfce31 # 1.0.17
@@ -28,17 +28,25 @@ jobs:
28
28
  fail-fast: false
29
29
  matrix:
30
30
  os: [ubuntu-latest, windows-latest, macos-latest]
31
- python-version: ["3.10", "3.11", "3.12", "3.13"]
31
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
32
+ exclude:
33
+ - os: windows-latest
34
+ python-version: "3.15"
35
+ - os: macos-latest
36
+ python-version: "3.15"
32
37
  runs-on: ${{ matrix.os }}
38
+ # Python 3.15 is still a release candidate, so keep a single advisory job
39
+ continue-on-error: ${{ matrix.python-version == '3.15' }}
33
40
  steps:
34
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
35
42
  with:
36
43
  persist-credentials: false
37
44
 
38
45
  - name: Set up Python
39
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
46
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
40
47
  with:
41
48
  python-version: ${{ matrix.python-version }}
49
+ allow-prereleases: true
42
50
 
43
51
  - name: Install Hatch
44
52
  uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
@@ -48,7 +56,7 @@ jobs:
48
56
  hatch run +py=${{ matrix.python-version }} test:extended --cov-report=xml:coverage.${{ matrix.os }}.${{ matrix.python-version }}.xml
49
57
 
50
58
  - name: Upload coverage data
51
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
59
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
52
60
  with:
53
61
  name: coverage-${{ matrix.os }}-${{ matrix.python-version }}
54
62
  path: coverage.*.xml
@@ -57,21 +65,21 @@ jobs:
57
65
  needs: test
58
66
  runs-on: ubuntu-latest
59
67
  steps:
60
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
68
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
61
69
  with:
62
70
  persist-credentials: false
63
- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
71
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
64
72
  with:
65
73
  python-version: "3.12"
66
74
  - name: Install Hatch
67
75
  uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
68
76
  - name: Build package
69
77
  run: hatch build
70
- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
78
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
71
79
  with:
72
80
  path: dist/*.tar.gz
73
81
  name: built-sdist
74
- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
82
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
75
83
  with:
76
84
  path: dist/*.whl
77
85
  name: built-bdist
@@ -83,19 +91,19 @@ jobs:
83
91
  permissions:
84
92
  contents: read
85
93
  steps:
86
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
94
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
87
95
  with:
88
96
  persist-credentials: false
89
97
  fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
90
98
 
91
99
  - name: Download coverage data
92
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
100
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
93
101
  with:
94
102
  pattern: coverage-*
95
103
  merge-multiple: true
96
104
 
97
105
  - name: SonarQube Scan
98
- uses: SonarSource/sonarqube-scan-action@2500896589ef8f7247069a56136f8dc177c27ccf # v5.2.0
106
+ uses: SonarSource/sonarqube-scan-action@713881670b6b3676cda39549040e2d88c70d582e # v8.2.0
99
107
  env:
100
108
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101
109
  SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -103,7 +111,7 @@ jobs:
103
111
  args: >
104
112
  -Dsonar.organization=fschuch
105
113
  -Dsonar.projectKey=fschuch_xarray-binfile
106
- -Dsonar.python.version=3.9,3.10,3.11,3.12,3.13
114
+ -Dsonar.python.version=3.10,3.11,3.12,3.13,3.14,3.15
107
115
  -Dsonar.sources=src/xarray_binfile
108
116
  -Dsonar.tests=tests
109
117
  -Dsonar.python.coverage.reportPaths=coverage.*.xml
@@ -121,14 +129,14 @@ jobs:
121
129
  permissions:
122
130
  id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
123
131
  steps:
124
- - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
132
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
125
133
  with:
126
134
  name: built-sdist
127
135
  path: dist
128
- - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
136
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
129
137
  with:
130
138
  name: built-bdist
131
139
  path: dist
132
140
 
133
141
  - name: Publish package distributions to PyPI
134
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
142
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
@@ -24,24 +24,27 @@ jobs:
24
24
  permissions:
25
25
  contents: read
26
26
  steps:
27
- - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
28
28
  with:
29
29
  persist-credentials: false
30
30
 
31
31
  - name: Set up Python
32
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
32
+ uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
33
33
  with:
34
34
  python-version: "3.13"
35
35
 
36
36
  - name: Install Hatch
37
37
  uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc
38
38
 
39
+ - name: Install Graphviz
40
+ run: sudo apt-get update && sudo apt-get install --yes graphviz
41
+
39
42
  - name: Build the book
40
43
  env:
41
44
  SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ github.token }}
42
45
  run: hatch run docs:build
43
46
 
44
- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
47
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
45
48
  with:
46
49
  path: build/
47
50
  name: documentation
@@ -53,14 +56,14 @@ jobs:
53
56
  permissions:
54
57
  contents: write
55
58
  steps:
56
- - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
59
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
57
60
  with:
58
61
  path: build/
59
62
  name: documentation
60
63
 
61
64
  # Push the book's HTML to github-pages
62
65
  - name: GitHub Pages action
63
- uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
66
+ uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
64
67
  with:
65
68
  github_token: ${{ secrets.GITHUB_TOKEN }}
66
69
  publish_dir: build/_build/html
@@ -48,6 +48,7 @@ coverage.xml
48
48
  *.cover
49
49
  *.py,cover
50
50
  .hypothesis/
51
+ .benchmarks/
51
52
  .pytest_cache/
52
53
  cover/
53
54
 
@@ -72,6 +73,9 @@ instance/
72
73
  docs/_build/
73
74
  docs/conf.py
74
75
 
76
+ # Dask task-graph artifact written by .visualize() during notebook execution
77
+ docs/tutorials/mydask.*
78
+
75
79
  # PyBuilder
76
80
  .pybuilder/
77
81
  target/
@@ -2,7 +2,7 @@ default_language_version:
2
2
  python: python
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
- rev: v5.0.0
5
+ rev: v6.0.0
6
6
  hooks:
7
7
  - id: check-added-large-files
8
8
  - id: check-case-conflict
@@ -17,7 +17,7 @@ repos:
17
17
  - id: mixed-line-ending
18
18
  - id: trailing-whitespace
19
19
  - repo: https://github.com/astral-sh/ruff-pre-commit
20
- rev: v0.12.3
20
+ rev: v0.15.20
21
21
  hooks:
22
22
  # Run the linter.
23
23
  - id: ruff
@@ -27,28 +27,28 @@ repos:
27
27
  - id: ruff-format
28
28
  types_or: [python, pyi, jupyter]
29
29
  - repo: https://github.com/pre-commit/mirrors-mypy
30
- rev: v1.16.1
30
+ rev: v2.1.0
31
31
  hooks:
32
32
  - id: mypy
33
33
  exclude: docs/conf.py
34
34
  - repo: https://github.com/codespell-project/codespell
35
- rev: v2.4.1
35
+ rev: v2.4.2
36
36
  hooks:
37
37
  - id: codespell
38
38
  additional_dependencies:
39
39
  - tomli
40
40
  - repo: https://github.com/executablebooks/mdformat
41
- rev: 0.7.22
41
+ rev: 1.0.0
42
42
  hooks:
43
43
  - id: mdformat
44
44
  additional_dependencies:
45
45
  [mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
46
46
  - repo: https://github.com/kynan/nbstripout
47
- rev: 0.8.1
47
+ rev: 0.9.1
48
48
  hooks:
49
49
  - id: nbstripout
50
50
  - repo: https://github.com/woodruffw/zizmor-pre-commit
51
- rev: v1.11.0
51
+ rev: v1.26.1
52
52
  hooks:
53
53
  - id: zizmor
54
54
 
@@ -23,5 +23,6 @@
23
23
  },
24
24
  "cSpell.enabled": true,
25
25
  "cSpell.language": "en",
26
- "python.envFile": "${workspaceFolder}/.venv/xarray-binfile"
26
+ "python.envFile": "${workspaceFolder}/.venv/xarray-binfile",
27
+ "python.testing.pytestPath": "${workspaceFolder}/.venv/xarray-binfile/bin/pytest"
27
28
  }
@@ -1,17 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xarray-binfile
3
- Version: 0.1.0b0
3
+ Version: 0.1.0b2
4
4
  Summary: Read and write raw binary files using the familiar interface from the Xarray library
5
5
  Project-URL: Source, https://github.com/fschuch/xarray-binfile
6
6
  Project-URL: Tracker, https://github.com/fschuch/xarray-binfile/issues
7
- Project-URL: Changelog, https://fschuch.github.io/xarray-binfile/references/what-is-new.html
8
- Project-URL: Documentation, https://fschuch.github.io/xarray-binfile/
7
+ Project-URL: Changelog, https://docs.fschuch.com/xarray-binfile/references/what-is-new.html
8
+ Project-URL: Documentation, https://docs.fschuch.com/xarray-binfile/
9
9
  Author-email: fschuch <me@fschuch.com>
10
10
  License-Expression: MIT
11
11
  License-File: LICENSE
12
- Classifier: Development Status :: 4 - Beta
12
+ Classifier: Development Status :: 5 - Production/Stable
13
13
  Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: MIT License
15
14
  Classifier: Operating System :: OS Independent
16
15
  Classifier: Programming Language :: Python
17
16
  Classifier: Programming Language :: Python :: 3
@@ -19,14 +18,20 @@ Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Programming Language :: Python :: 3.15
22
23
  Requires-Python: >=3.10
23
24
  Requires-Dist: dask>=2024.0.0
25
+ Requires-Dist: numpy>=1.24
24
26
  Requires-Dist: xarray>=2024.1.0
27
+ Provides-Extra: benchmarks
28
+ Requires-Dist: pytest-memray>=1.7.0; (sys_platform != 'win32') and extra == 'benchmarks'
25
29
  Provides-Extra: docs
26
- Requires-Dist: docutils==0.21.2; extra == 'docs'
30
+ Requires-Dist: graphviz>=0.20.3; extra == 'docs'
27
31
  Requires-Dist: jupyter-book==1.0.4.post1; extra == 'docs'
32
+ Requires-Dist: matplotlib>=3.9.0; extra == 'docs'
28
33
  Requires-Dist: sphinx-autobuild==2024.10.3; extra == 'docs'
29
- Requires-Dist: sphinx-github-changelog==1.7.1; extra == 'docs'
34
+ Requires-Dist: sphinx-github-changelog==1.7.2; extra == 'docs'
30
35
  Requires-Dist: sphinx==7.4.7; extra == 'docs'
31
36
  Provides-Extra: tests
32
37
  Requires-Dist: coverage[toml]>=7.5.3; extra == 'tests'
@@ -34,18 +39,17 @@ Requires-Dist: hypothesis>=6.130.4; extra == 'tests'
34
39
  Requires-Dist: pre-commit>=3.5.0; extra == 'tests'
35
40
  Requires-Dist: pytest-benchmark>=5.1.0; extra == 'tests'
36
41
  Requires-Dist: pytest-cov>=5.0.0; extra == 'tests'
37
- Requires-Dist: pytest-memray>=1.7.0; (sys_platform != 'win32') and extra == 'tests'
38
42
  Requires-Dist: pytest>=8.2.2; extra == 'tests'
39
43
  Provides-Extra: tests-extra
40
- Requires-Dist: pytest-randomly==3.16.0; extra == 'tests-extra'
41
- Requires-Dist: pytest-rerunfailures==15.1; extra == 'tests-extra'
44
+ Requires-Dist: pytest-randomly==4.1.0; extra == 'tests-extra'
45
+ Requires-Dist: pytest-rerunfailures==16.3; extra == 'tests-extra'
42
46
  Requires-Dist: pytest-xdist==3.8.0; extra == 'tests-extra'
43
47
  Description-Content-Type: text/markdown
44
48
 
45
49
  # Xarray-binfile
46
50
 
47
51
  <p align="center">
48
- <a href="https://github.com/fschuch/xarray-binfile"><img src="https://raw.githubusercontent.com/fschuch/xarray-binfile/refs/heads/main/docs/logo.png" alt="Wizard template logo" width="320"></a>
52
+ <a href="https://github.com/fschuch/xarray-binfile"><img src="https://raw.githubusercontent.com/fschuch/xarray-binfile/refs/heads/main/docs/logo.png" alt="Xarray-binfile logo" width="320"></a>
49
53
  </p>
50
54
  <p align="center">
51
55
  <em>Custom Xarray file engine to handle raw binary files</em>
@@ -61,8 +65,8 @@ ______________________________________________________________________
61
65
  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fschuch_xarray-binfile&metric=coverage)](https://sonarcloud.io/summary/new_code?id=fschuch_xarray-binfile)
62
66
  [![CodeFactor](https://www.codefactor.io/repository/github/fschuch/xarray-binfile/badge)](https://www.codefactor.io/repository/github/fschuch/xarray-binfile)
63
67
 
64
- <!-- - Docs:
65
- [![Docs](https://github.com/fschuch/xarray-binfile/actions/workflows/docs.yaml/badge.svg?branch=main)](https://docs.fschuch.com/xarray-binfile) -->
68
+ - Docs:
69
+ [![Docs](https://github.com/fschuch/xarray-binfile/actions/workflows/docs.yaml/badge.svg?branch=main)](https://docs.fschuch.com/xarray-binfile)
66
70
 
67
71
  - Package:
68
72
  [![PyPI - Version](https://img.shields.io/pypi/v/xarray-binfile.svg?logo=pypi&label=PyPI)](https://pypi.org/project/xarray-binfile/)
@@ -80,7 +84,16 @@ ______________________________________________________________________
80
84
 
81
85
  ## Overview
82
86
 
83
- Xarray-binfile is a Python package designed to extend the capabilities of Xarray, a powerful library for working with labeled multi-dimensional arrays. This package provides a custom file engine specifically for reading and writing raw binary files, enabling users to leverage Xarray's data structures while working with binary data formats.
87
+ Xarray-binfile is a Python package that integrates raw binary files with xarray. You provide the metadata that describes each binary file, and the package exposes those files through xarray datasets and data arrays with optional lazy chunking through Dask.
88
+
89
+ The package was first designed around binary outputs from the Fortran framework [2DECOMP&FFT](https://github.com/2decomp-fft/2decomp-fft) and the CFD solver [Xcompact3d](https://github.com/xcompact3d/Incompact3d), which is built on top of it. It is not limited to those ecosystems and can be used with any raw binary convention once the corresponding metadata mapping is provided.
90
+
91
+ It is aimed at workflows where raw binary files are part of an existing convention, such as simulation outputs or NumPy `.tofile()` dumps. Once opened, the data can be indexed, reduced, plotted, and computed with the usual xarray and Dask APIs.
92
+
93
+ See the documentation for end-to-end examples covering lazy loading, Dask-backed computations, task-graph visualization, writing derived results back to `.bin` files, parallel and larger-than-memory workflows, benchmarking on your own data, batch dtype conversion, probe time-series export to CSV, and quick matplotlib plots.
94
+
95
+ > [!CAUTION]
96
+ > Raw binary files are machine- and convention-dependent. Differences such as little-endian vs big-endian byte order, word size, record layout, and memory ordering can change how bytes should be interpreted. Always verify dtype and endianness when sharing files across machines or toolchains.
84
97
 
85
98
  ## Copyright and License
86
99
 
@@ -1,7 +1,7 @@
1
1
  # Xarray-binfile
2
2
 
3
3
  <p align="center">
4
- <a href="https://github.com/fschuch/xarray-binfile"><img src="https://raw.githubusercontent.com/fschuch/xarray-binfile/refs/heads/main/docs/logo.png" alt="Wizard template logo" width="320"></a>
4
+ <a href="https://github.com/fschuch/xarray-binfile"><img src="https://raw.githubusercontent.com/fschuch/xarray-binfile/refs/heads/main/docs/logo.png" alt="Xarray-binfile logo" width="320"></a>
5
5
  </p>
6
6
  <p align="center">
7
7
  <em>Custom Xarray file engine to handle raw binary files</em>
@@ -17,8 +17,8 @@ ______________________________________________________________________
17
17
  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=fschuch_xarray-binfile&metric=coverage)](https://sonarcloud.io/summary/new_code?id=fschuch_xarray-binfile)
18
18
  [![CodeFactor](https://www.codefactor.io/repository/github/fschuch/xarray-binfile/badge)](https://www.codefactor.io/repository/github/fschuch/xarray-binfile)
19
19
 
20
- <!-- - Docs:
21
- [![Docs](https://github.com/fschuch/xarray-binfile/actions/workflows/docs.yaml/badge.svg?branch=main)](https://docs.fschuch.com/xarray-binfile) -->
20
+ - Docs:
21
+ [![Docs](https://github.com/fschuch/xarray-binfile/actions/workflows/docs.yaml/badge.svg?branch=main)](https://docs.fschuch.com/xarray-binfile)
22
22
 
23
23
  - Package:
24
24
  [![PyPI - Version](https://img.shields.io/pypi/v/xarray-binfile.svg?logo=pypi&label=PyPI)](https://pypi.org/project/xarray-binfile/)
@@ -36,7 +36,16 @@ ______________________________________________________________________
36
36
 
37
37
  ## Overview
38
38
 
39
- Xarray-binfile is a Python package designed to extend the capabilities of Xarray, a powerful library for working with labeled multi-dimensional arrays. This package provides a custom file engine specifically for reading and writing raw binary files, enabling users to leverage Xarray's data structures while working with binary data formats.
39
+ Xarray-binfile is a Python package that integrates raw binary files with xarray. You provide the metadata that describes each binary file, and the package exposes those files through xarray datasets and data arrays with optional lazy chunking through Dask.
40
+
41
+ The package was first designed around binary outputs from the Fortran framework [2DECOMP&FFT](https://github.com/2decomp-fft/2decomp-fft) and the CFD solver [Xcompact3d](https://github.com/xcompact3d/Incompact3d), which is built on top of it. It is not limited to those ecosystems and can be used with any raw binary convention once the corresponding metadata mapping is provided.
42
+
43
+ It is aimed at workflows where raw binary files are part of an existing convention, such as simulation outputs or NumPy `.tofile()` dumps. Once opened, the data can be indexed, reduced, plotted, and computed with the usual xarray and Dask APIs.
44
+
45
+ See the documentation for end-to-end examples covering lazy loading, Dask-backed computations, task-graph visualization, writing derived results back to `.bin` files, parallel and larger-than-memory workflows, benchmarking on your own data, batch dtype conversion, probe time-series export to CSV, and quick matplotlib plots.
46
+
47
+ > [!CAUTION]
48
+ > Raw binary files are machine- and convention-dependent. Differences such as little-endian vs big-endian byte order, word size, record layout, and memory ordering can change how bytes should be interpreted. Always verify dtype and endianness when sharing files across machines or toolchains.
40
49
 
41
50
  ## Copyright and License
42
51
 
@@ -1,10 +1,10 @@
1
1
  # Book settings
2
2
  # Learn more at https://jupyterbook.org/customize/config.html
3
3
 
4
- title: The Wizard Template for Python Projects
4
+ title: Xarray-binfile
5
5
  author: Felipe N. Schuch
6
6
  copyright: "2025"
7
- description: A general-purpose template that aims to provide a magical start to any Python project
7
+ description: Read and write raw binary files using the familiar interface from the Xarray library
8
8
  logo: logo.png
9
9
 
10
10
  # Force re-execution of notebooks on each build.
@@ -37,6 +37,7 @@ html:
37
37
  use_edit_page_button: true
38
38
  use_issues_button: true
39
39
  use_repository_button: true
40
+ announcement: Found a problem with a file layout or metadata convention? Please report it on GitHub.
40
41
 
41
42
  sphinx:
42
43
  extra_extensions:
@@ -48,14 +49,31 @@ sphinx:
48
49
  #https://github.com/executablebooks/jupyter-book/issues/1950#issuecomment-1454801479
49
50
  suppress_warnings: ["mystnb.unknown_mime_type"]
50
51
 
52
+ # allow_errors: false only reports failed cells as warnings; this makes
53
+ # a notebook execution error abort the build with a non-zero exit code
54
+ nb_execution_raise_on_error: true
55
+
51
56
  intersphinx_mapping:
52
57
  python:
53
58
  - "https://docs.python.org/3"
54
59
  - null
60
+ numpy:
61
+ - "https://numpy.org/doc/stable/"
62
+ - null
63
+ xarray:
64
+ - "https://docs.xarray.dev/en/stable/"
65
+ - null
66
+ dask:
67
+ - "https://docs.dask.org/en/stable/"
68
+ - null
55
69
 
56
70
  napoleon_include_special_with_doc: true
57
71
  napoleon_google_docstring: true
58
72
  napoleon_numpy_docstring: false
73
+ # Render "Attributes:" sections as :ivar: fields instead of .. attribute::
74
+ # directives, so they do not clash with the members autodoc documents
75
+ # (which raises "duplicate object description" warnings otherwise)
76
+ napoleon_use_ivar: true
59
77
 
60
78
  html_theme_options:
61
79
  icon_links:
@@ -67,7 +85,3 @@ sphinx:
67
85
  url: "https://github.com/fschuch/xarray-binfile/releases"
68
86
  icon: "https://img.shields.io/github/v/release/fschuch/xarray-binfile?style=social"
69
87
  type: "url"
70
- - name: "Use this Template"
71
- url: "https://github.com/new?template_name=xarray-binfile&template_owner=fschuch"
72
- icon: "https://img.shields.io/badge/Use_this_Template-%23447CAA?style=social&logo=github"
73
- type: "url"
@@ -0,0 +1,24 @@
1
+ # Table of contents
2
+ # Learn more at https://jupyterbook.org/customize/toc.html
3
+
4
+ format: jb-book
5
+ root: intro
6
+ parts:
7
+ - caption: Getting Started
8
+ chapters:
9
+ - file: getting-started/about.md
10
+ - file: getting-started/installation.md
11
+ - caption: Usage
12
+ chapters:
13
+ - file: usage/spec-getter-protocols.md
14
+ - file: tutorials/read.ipynb
15
+ - file: tutorials/write.ipynb
16
+ - file: tutorials/parallel-and-larger-than-memory.ipynb
17
+ - file: tutorials/benchmarking.ipynb
18
+ - file: tutorials/examples.ipynb
19
+ - caption: References
20
+ chapters:
21
+ - file: references/further-reading.md
22
+ - file: references/api-reference.rst
23
+ - file: references/how-to-contribute.md
24
+ - file: references/what-is-new.md
@@ -0,0 +1,29 @@
1
+ # About
2
+
3
+ Xarray-binfile is an xarray backend for raw binary files. It is designed for workflows where the bytes on disk are simple and efficient, but the metadata needed to interpret them lives outside the file itself.
4
+
5
+ The first target use case was binary outputs produced in workflows around the Fortran framework [2DECOMP&FFT](https://github.com/2decomp-fft/2decomp-fft) and the CFD solver [Xcompact3d](https://github.com/xcompact3d/Incompact3d). Even so, the backend is not tied to those projects and can be adapted to any compatible raw binary naming and metadata convention.
6
+
7
+ Typical examples include:
8
+
9
+ - output from Fortran or C/C++ simulation codes
10
+ - binary dumps created with `numpy.ndarray.tofile`
11
+ - one-file-per-variable or one-file-per-timestep layouts from CFD and scientific computing pipelines
12
+
13
+ The package integrates with xarray in two directions:
14
+
15
+ - reading through `xr.open_dataset(..., engine="binfile")` and `xr.open_mfdataset(..., engine="binfile")`
16
+ - writing through the `.binary_engine.to_file(...)` accessor on `xarray.DataArray` and `xarray.Dataset`
17
+
18
+ The read engine is registered automatically with xarray as a plugin entry point. The write accessors become available as soon as `xarray_binfile` (or any of its modules) is imported.
19
+
20
+ Xarray-binfile focuses on translating between raw binary files and xarray objects. Once the data is open, standard xarray and Dask operations apply:
21
+
22
+ - coordinate-based indexing with `.sel(...)`
23
+ - positional indexing with `.isel(...)`
24
+ - grouped and labeled reductions such as `.mean(...)`
25
+ - lazy loading and parallel execution with Dask until `.compute()` or `.load()` is called
26
+
27
+ The tutorials in this documentation show the backend in that larger ecosystem instead of treating it as a standalone file reader.
28
+
29
+ For broader coverage of analysis, visualization, and distributed execution, see the [xarray documentation](https://docs.xarray.dev) and the [Dask documentation](https://docs.dask.org).
@@ -0,0 +1,51 @@
1
+ # Installation
2
+
3
+ As a Python package, `xarray-binfile` can be installed with pip from PyPI or directly from GitHub. The package depends on both xarray and Dask at runtime, because its primary workflow is lazy, chunked access to raw binary datasets.
4
+
5
+ You can use your preferred environment management tool, activate an existing environment, and then install the package with pip:
6
+
7
+ ```bash
8
+ pip install xarray-binfile
9
+ ```
10
+
11
+ The command above installs the latest release from PyPI. To reproduce an environment later, pin the exact version you need by adding a version specifier, for example `pip install "xarray-binfile==X.Y.Z"`.
12
+
13
+ You can also use any dependency management tool that supports pip-style dependencies, such as Poetry, Hatch, uv, or Conda:
14
+
15
+ ::::{tab-set}
16
+
17
+ :::{tab-item} `requirements.txt`
18
+
19
+ ```text
20
+ xarray-binfile
21
+ ```
22
+
23
+ :::
24
+
25
+ :::{tab-item} `pyproject.toml`
26
+
27
+ ```toml
28
+ [project]
29
+ dependencies = [
30
+ "xarray-binfile",
31
+ ]
32
+ ```
33
+
34
+ :::
35
+
36
+ :::{tab-item} `environment.yml`
37
+
38
+ ```yaml
39
+ name: xarray-binfile-example
40
+ channels:
41
+ - conda-forge
42
+ dependencies:
43
+ - python=3.12
44
+ - pip
45
+ - pip:
46
+ - xarray-binfile
47
+ ```
48
+
49
+ :::
50
+
51
+ ::::