metamorph-mda-parser 0.0.1__tar.gz → 0.1.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 (31) hide show
  1. metamorph_mda_parser-0.1.0/.gitattributes +2 -0
  2. metamorph_mda_parser-0.1.0/.github/workflows/publish.yml +75 -0
  3. metamorph_mda_parser-0.1.0/.github/workflows/test.yml +42 -0
  4. metamorph_mda_parser-0.1.0/.gitignore +6 -0
  5. {metamorph_mda_parser-0.0.1 → metamorph_mda_parser-0.1.0}/LICENSE.txt +11 -11
  6. {metamorph_mda_parser-0.0.1 → metamorph_mda_parser-0.1.0}/PKG-INFO +12 -5
  7. {metamorph_mda_parser-0.0.1 → metamorph_mda_parser-0.1.0}/README.md +26 -25
  8. metamorph_mda_parser-0.1.0/pixi.lock +7804 -0
  9. metamorph_mda_parser-0.1.0/pyproject.toml +124 -0
  10. metamorph_mda_parser-0.1.0/src/metamorph_mda_parser/lark.py +36 -0
  11. metamorph_mda_parser-0.1.0/src/metamorph_mda_parser/nd.py +106 -0
  12. metamorph_mda_parser-0.1.0/src/metamorph_mda_parser/nd_grammar.lark +40 -0
  13. metamorph_mda_parser-0.1.0/src/metamorph_mda_parser/xarray.py +51 -0
  14. metamorph_mda_parser-0.1.0/tests/resources/data/sample_3ch_2pos_mixed-z.nd +21 -0
  15. metamorph_mda_parser-0.1.0/tests/resources/data/sample_3ch_2pos_mixed-z_w1Conf640_s1.tif +0 -0
  16. metamorph_mda_parser-0.1.0/tests/resources/data/sample_3ch_2pos_mixed-z_w1Conf640_s2.tif +0 -0
  17. metamorph_mda_parser-0.1.0/tests/resources/data/sample_3ch_2pos_mixed-z_w2Conf561_s1.stk +0 -0
  18. metamorph_mda_parser-0.1.0/tests/resources/data/sample_3ch_2pos_mixed-z_w2Conf561_s2.stk +0 -0
  19. metamorph_mda_parser-0.1.0/tests/resources/data/sample_3ch_2pos_mixed-z_w3Conf488_s1.stk +0 -0
  20. metamorph_mda_parser-0.1.0/tests/resources/data/sample_3ch_2pos_mixed-z_w3Conf488_s2.stk +0 -0
  21. {metamorph_mda_parser-0.0.1 → metamorph_mda_parser-0.1.0}/tests/resources/sample_2ch_75pos_361t.nd +93 -93
  22. metamorph_mda_parser-0.1.0/tests/resources/sample_4ch_1pos_1z.nd +14 -0
  23. {metamorph_mda_parser-0.0.1 → metamorph_mda_parser-0.1.0}/tests/resources/sample_4ch_4pos.nd +25 -25
  24. {metamorph_mda_parser-0.0.1 → metamorph_mda_parser-0.1.0}/tests/test_nd.py +96 -68
  25. metamorph_mda_parser-0.1.0/tests/test_xarray.py +25 -0
  26. metamorph_mda_parser-0.0.1/.github/workflows/test.yml +0 -42
  27. metamorph_mda_parser-0.0.1/.gitignore +0 -3
  28. metamorph_mda_parser-0.0.1/pyproject.toml +0 -83
  29. metamorph_mda_parser-0.0.1/src/metamorph_mda_parser/nd.py +0 -132
  30. metamorph_mda_parser-0.0.1/tests/__init__.py +0 -0
  31. {metamorph_mda_parser-0.0.1 → metamorph_mda_parser-0.1.0}/src/metamorph_mda_parser/__init__.py +0 -0
@@ -0,0 +1,2 @@
1
+ # GitHub syntax highlighting
2
+ pixi.lock linguist-language=YAML linguist-generated=true
@@ -0,0 +1,75 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'metamorph-mda-parser-*'
7
+ branches:
8
+ - main
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ build:
15
+ name: Build wheel and source distribution
16
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
17
+ runs-on: ubuntu-latest
18
+
19
+ environment: release
20
+ permissions:
21
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
22
+
23
+ steps:
24
+ - name: Checkout code
25
+ uses: actions/checkout@v4
26
+ with:
27
+ fetch-depth: 0
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@v5
31
+ with:
32
+ python-version: '3.11'
33
+ cache: 'pip'
34
+
35
+ - name: Install dependencies
36
+ run: |
37
+ python -m pip install --upgrade pip
38
+ pip install hatch
39
+
40
+ - name: Build package
41
+ run: hatch build
42
+
43
+ - name: Test package
44
+ run: hatch test
45
+
46
+ - name: Upload artifacts
47
+ uses: actions/upload-artifact@v4
48
+ with:
49
+ name: python-artifacts
50
+ path: dist/*
51
+ if-no-files-found: error
52
+
53
+ publish:
54
+ name: Publish to PyPI
55
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
56
+ needs:
57
+ - build
58
+ runs-on: ubuntu-latest
59
+
60
+ permissions:
61
+ contents: write
62
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
63
+
64
+ steps:
65
+ - name: Download Python artifacts
66
+ uses: actions/download-artifact@v4
67
+ with:
68
+ name: python-artifacts
69
+ path: dist
70
+ - name: Add assets to release
71
+ uses: softprops/action-gh-release@v2
72
+ with:
73
+ files: dist/*
74
+ - name: Publish package distributions to PyPI
75
+ uses: pypa/gh-action-pypi-publish@v1.9.0
@@ -0,0 +1,42 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: test-${{ github.head_ref }}
11
+ cancel-in-progress: true
12
+
13
+ env:
14
+ PYTHONUNBUFFERED: "1"
15
+ FORCE_COLOR: "1"
16
+
17
+ jobs:
18
+ run:
19
+ name: ${{ matrix.pixi-environment }} - ${{ matrix.os }}
20
+ runs-on: ${{ matrix.os }}
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ os: [ubuntu-latest, windows-latest, macos-latest]
25
+ pixi-environment:
26
+ - py310-base
27
+ - py310-xarray
28
+ - py311-base
29
+ - py311-xarray
30
+ - py312-base
31
+ - py312-xarray
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+
35
+ - name: Set up Pixi
36
+ uses: prefix-dev/setup-pixi@v0.8.1
37
+ with:
38
+ cache: true
39
+ environments: ${{ matrix.pixi-environment }}
40
+
41
+ - name: Run tests
42
+ run: pixi run --environment ${{ matrix.pixi-environment }} test
@@ -0,0 +1,6 @@
1
+ dist
2
+ __pycache__
3
+ .coverage*
4
+ # pixi environments
5
+ .pixi
6
+ *.egg-info
@@ -1,11 +1,11 @@
1
- Copyright (c) 2024-present Jan Eglinger <jan.eglinger@fmi.ch>.
2
-
3
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
-
5
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
-
7
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
-
9
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
-
11
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1
+ Copyright (c) 2024-present Jan Eglinger <jan.eglinger@fmi.ch>.
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
+
5
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6
+
7
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+
9
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10
+
11
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: metamorph-mda-parser
3
- Version: 0.0.1
3
+ Version: 0.1.0
4
4
  Summary: Light-weight parsing of Metamorph/VisiView .nd files.
5
5
  Project-URL: Documentation, https://github.com/fmi-faim/metamorph-mda-parser#readme
6
6
  Project-URL: Issues, https://github.com/fmi-faim/metamorph-mda-parser/issues
@@ -10,21 +10,28 @@ License-Expression: BSD-3-Clause
10
10
  License-File: LICENSE.txt
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3.8
14
- Classifier: Programming Language :: Python :: 3.9
15
13
  Classifier: Programming Language :: Python :: 3.10
16
14
  Classifier: Programming Language :: Python :: 3.11
17
15
  Classifier: Programming Language :: Python :: 3.12
18
16
  Classifier: Programming Language :: Python :: Implementation :: CPython
19
17
  Classifier: Programming Language :: Python :: Implementation :: PyPy
20
- Requires-Python: >=3.8
18
+ Requires-Python: >=3.10
19
+ Requires-Dist: lark
21
20
  Requires-Dist: pandas
21
+ Requires-Dist: pydantic
22
+ Provides-Extra: xarray
23
+ Requires-Dist: dask; extra == 'xarray'
24
+ Requires-Dist: numpy<2; extra == 'xarray'
25
+ Requires-Dist: tifffile; extra == 'xarray'
26
+ Requires-Dist: xarray; extra == 'xarray'
27
+ Requires-Dist: zarr; extra == 'xarray'
22
28
  Description-Content-Type: text/markdown
23
29
 
24
30
  # metamorph-mda-parser
25
31
 
26
32
  [![PyPI - Version](https://img.shields.io/pypi/v/metamorph-mda-parser.svg)](https://pypi.org/project/metamorph-mda-parser)
27
33
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/metamorph-mda-parser.svg)](https://pypi.org/project/metamorph-mda-parser)
34
+ [![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)
28
35
 
29
36
  -----
30
37
 
@@ -1,25 +1,26 @@
1
- # metamorph-mda-parser
2
-
3
- [![PyPI - Version](https://img.shields.io/pypi/v/metamorph-mda-parser.svg)](https://pypi.org/project/metamorph-mda-parser)
4
- [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/metamorph-mda-parser.svg)](https://pypi.org/project/metamorph-mda-parser)
5
-
6
- -----
7
-
8
- Light-weight parsing of Metamorph/VisiView Multi Dimensional Acquisition .nd files.
9
-
10
- For the file format description, see: https://support.moleculardevices.com/s/article/MDA-file-formats
11
-
12
- **Table of Contents**
13
-
14
- - [Installation](#installation)
15
- - [License](#license)
16
-
17
- ## Installation
18
-
19
- ```console
20
- pip install metamorph-mda-parser
21
- ```
22
-
23
- ## License
24
-
25
- `metamorph-mda-parser` is distributed under the terms of the [BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html) license.
1
+ # metamorph-mda-parser
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/metamorph-mda-parser.svg)](https://pypi.org/project/metamorph-mda-parser)
4
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/metamorph-mda-parser.svg)](https://pypi.org/project/metamorph-mda-parser)
5
+ [![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)
6
+
7
+ -----
8
+
9
+ Light-weight parsing of Metamorph/VisiView Multi Dimensional Acquisition .nd files.
10
+
11
+ For the file format description, see: https://support.moleculardevices.com/s/article/MDA-file-formats
12
+
13
+ **Table of Contents**
14
+
15
+ - [Installation](#installation)
16
+ - [License](#license)
17
+
18
+ ## Installation
19
+
20
+ ```console
21
+ pip install metamorph-mda-parser
22
+ ```
23
+
24
+ ## License
25
+
26
+ `metamorph-mda-parser` is distributed under the terms of the [BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html) license.