ldcov 0.4.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 (91) hide show
  1. ldcov-0.4.0/.dockerignore +54 -0
  2. ldcov-0.4.0/.flake8 +18 -0
  3. ldcov-0.4.0/.github/workflows/ci.yml +90 -0
  4. ldcov-0.4.0/.github/workflows/publish.yml +47 -0
  5. ldcov-0.4.0/CHANGELOG.md +83 -0
  6. ldcov-0.4.0/Dockerfile +47 -0
  7. ldcov-0.4.0/LICENSE +21 -0
  8. ldcov-0.4.0/MANIFEST.in +21 -0
  9. ldcov-0.4.0/Makefile +42 -0
  10. ldcov-0.4.0/PKG-INFO +450 -0
  11. ldcov-0.4.0/README.md +413 -0
  12. ldcov-0.4.0/benchmarks/Dockerfile.benchmark +77 -0
  13. ldcov-0.4.0/benchmarks/README.md +224 -0
  14. ldcov-0.4.0/benchmarks/analyze_profiles.py +223 -0
  15. ldcov-0.4.0/benchmarks/benchmark_commits.sh +408 -0
  16. ldcov-0.4.0/benchmarks/compare_results.py +588 -0
  17. ldcov-0.4.0/benchmarks/generate_test_bgen.py +301 -0
  18. ldcov-0.4.0/benchmarks/run_benchmark.py +649 -0
  19. ldcov-0.4.0/examples/data/data +2 -0
  20. ldcov-0.4.0/examples/data/data.bcor +0 -0
  21. ldcov-0.4.0/examples/data/data.bcor.idx +0 -0
  22. ldcov-0.4.0/examples/data/data.bgen +0 -0
  23. ldcov-0.4.0/examples/data/data.bgen.bgi +0 -0
  24. ldcov-0.4.0/examples/data/data.ld +55 -0
  25. ldcov-0.4.0/examples/data/data.sample +5365 -0
  26. ldcov-0.4.0/examples/data/data.z +56 -0
  27. ldcov-0.4.0/ldcov/__init__.py +49 -0
  28. ldcov-0.4.0/ldcov/cli/__init__.py +3 -0
  29. ldcov-0.4.0/ldcov/cli/commands.py +310 -0
  30. ldcov-0.4.0/ldcov/cli/main.py +34 -0
  31. ldcov-0.4.0/ldcov/compute/__init__.py +10 -0
  32. ldcov-0.4.0/ldcov/compute/correlation.py +239 -0
  33. ldcov-0.4.0/ldcov/compute/covariate.py +315 -0
  34. ldcov-0.4.0/ldcov/compute/projection.py +335 -0
  35. ldcov-0.4.0/ldcov/io/__init__.py +14 -0
  36. ldcov-0.4.0/ldcov/io/bcor_file_handle.py +152 -0
  37. ldcov-0.4.0/ldcov/io/bcor_index.py +331 -0
  38. ldcov-0.4.0/ldcov/io/bcor_reader.py +794 -0
  39. ldcov-0.4.0/ldcov/io/bcor_writer.py +394 -0
  40. ldcov-0.4.0/ldcov/io/blockmatrix/__init__.py +6 -0
  41. ldcov-0.4.0/ldcov/io/blockmatrix/block_codec.py +48 -0
  42. ldcov-0.4.0/ldcov/io/blockmatrix/partitioner.py +40 -0
  43. ldcov-0.4.0/ldcov/io/blockmatrix/reader.py +62 -0
  44. ldcov-0.4.0/ldcov/io/correlation_io.py +380 -0
  45. ldcov-0.4.0/ldcov/io/covariate_loader.py +120 -0
  46. ldcov-0.4.0/ldcov/io/fs_utils.py +21 -0
  47. ldcov-0.4.0/ldcov/io/variant_index.py +50 -0
  48. ldcov-0.4.0/ldcov/ld_bm/__init__.py +5 -0
  49. ldcov-0.4.0/ldcov/ld_bm/cli.py +106 -0
  50. ldcov-0.4.0/ldcov/ld_bm/extract.py +300 -0
  51. ldcov-0.4.0/ldcov/utils/__init__.py +7 -0
  52. ldcov-0.4.0/ldcov/utils/categorical_utils.py +88 -0
  53. ldcov-0.4.0/ldcov/utils/region_utils.py +35 -0
  54. ldcov-0.4.0/ldcov/utils/variant_filter.py +179 -0
  55. ldcov-0.4.0/ldcov.egg-info/PKG-INFO +450 -0
  56. ldcov-0.4.0/ldcov.egg-info/SOURCES.txt +89 -0
  57. ldcov-0.4.0/ldcov.egg-info/dependency_links.txt +1 -0
  58. ldcov-0.4.0/ldcov.egg-info/entry_points.txt +2 -0
  59. ldcov-0.4.0/ldcov.egg-info/requires.txt +16 -0
  60. ldcov-0.4.0/ldcov.egg-info/scm_file_list.json +86 -0
  61. ldcov-0.4.0/ldcov.egg-info/scm_version.json +8 -0
  62. ldcov-0.4.0/ldcov.egg-info/top_level.txt +1 -0
  63. ldcov-0.4.0/pyproject.toml +84 -0
  64. ldcov-0.4.0/scripts/__init__.py +0 -0
  65. ldcov-0.4.0/scripts/make_bcor_idx.py +95 -0
  66. ldcov-0.4.0/scripts/make_bm_variant_index.py +110 -0
  67. ldcov-0.4.0/setup.cfg +4 -0
  68. ldcov-0.4.0/tests/conftest.py +319 -0
  69. ldcov-0.4.0/tests/helpers.py +77 -0
  70. ldcov-0.4.0/tests/test_bcor_file_handle.py +52 -0
  71. ldcov-0.4.0/tests/test_bcor_gcs.py +375 -0
  72. ldcov-0.4.0/tests/test_bcor_index.py +417 -0
  73. ldcov-0.4.0/tests/test_bcor_reader_subset.py +171 -0
  74. ldcov-0.4.0/tests/test_block_codec.py +49 -0
  75. ldcov-0.4.0/tests/test_blockmatrix_partitioner.py +38 -0
  76. ldcov-0.4.0/tests/test_blockmatrix_reader.py +57 -0
  77. ldcov-0.4.0/tests/test_categorical_utils.py +134 -0
  78. ldcov-0.4.0/tests/test_cli.py +496 -0
  79. ldcov-0.4.0/tests/test_compute.py +295 -0
  80. ldcov-0.4.0/tests/test_correlation_io.py +769 -0
  81. ldcov-0.4.0/tests/test_covariate.py +459 -0
  82. ldcov-0.4.0/tests/test_covariate_loader.py +189 -0
  83. ldcov-0.4.0/tests/test_fs_utils.py +88 -0
  84. ldcov-0.4.0/tests/test_ld_bm_cli.py +159 -0
  85. ldcov-0.4.0/tests/test_ld_bm_extract.py +190 -0
  86. ldcov-0.4.0/tests/test_ld_bm_gcs.py +41 -0
  87. ldcov-0.4.0/tests/test_ld_bm_s3.py +35 -0
  88. ldcov-0.4.0/tests/test_projection.py +247 -0
  89. ldcov-0.4.0/tests/test_region_utils.py +56 -0
  90. ldcov-0.4.0/tests/test_variant_filter.py +142 -0
  91. ldcov-0.4.0/tests/test_variant_index.py +50 -0
@@ -0,0 +1,54 @@
1
+ # Dockerignore for multi-stage benchmark builds
2
+ # This allows .git directory to be included in the build context
3
+ # so we can checkout specific commits
4
+
5
+ # Exclude common unnecessary files
6
+ __pycache__/
7
+ *.pyc
8
+ *.pyo
9
+ *.pyd
10
+ .Python
11
+ *.so
12
+ *.egg
13
+ *.egg-info/
14
+ dist/
15
+ build/
16
+ *.log
17
+ .coverage
18
+ .pytest_cache/
19
+ .tox/
20
+ .env
21
+ .venv/
22
+ venv/
23
+ ENV/
24
+
25
+ # Exclude build artifacts
26
+ *.o
27
+ *.a
28
+ *.dylib
29
+ *.dll
30
+ *.exe
31
+
32
+ # Exclude IDE files
33
+ .vscode/
34
+ .idea/
35
+ *.swp
36
+ *.swo
37
+ *~
38
+ .DS_Store
39
+
40
+ # Exclude documentation builds
41
+ docs/_build/
42
+ docs/_static/
43
+ docs/_templates/
44
+
45
+ # Exclude test data and results
46
+ benchmark_results/
47
+ benchmark_results_*/
48
+ benchmark_logs/
49
+ test_data/large_*.bgen
50
+ test_data/large_*.bgen.bgi
51
+ *.bcor
52
+
53
+ # DO NOT exclude .git - we need it for checking out commits
54
+ # !.git/
ldcov-0.4.0/.flake8 ADDED
@@ -0,0 +1,18 @@
1
+ [flake8]
2
+ max-line-length = 100
3
+ # E203 (whitespace before ':') and W503 (line break before binary operator) conflict
4
+ # with black's formatting. E501 line length is owned by `black --check` (line-length 100);
5
+ # black leaves only unsplittable strings/comments over the limit. F824: intentional globals.
6
+ extend-ignore = E203, W503, E501, F824
7
+ exclude =
8
+ .git,
9
+ __pycache__,
10
+ build,
11
+ dist,
12
+ *.egg-info,
13
+ .venv,
14
+ venv,
15
+ benchmarks
16
+ per-file-ignores =
17
+ # Package __init__ files re-export public API; unused imports are intentional.
18
+ __init__.py:F401
@@ -0,0 +1,90 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, master ]
6
+ pull_request:
7
+ branches: [ main, master ]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0 # Required for setuptools_scm
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+
26
+ - name: Install dependencies
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ # Installs ldcov plus its lazybgen dependency (prebuilt PyPI wheel)
30
+ pip install -e .[dev]
31
+
32
+ - name: Lint with flake8
33
+ run: |
34
+ # stop the build if there are Python syntax errors or undefined names
35
+ flake8 ldcov --count --select=E9,F63,F7,F82 --show-source --statistics
36
+ # exit-zero treats all errors as warnings
37
+ flake8 ldcov --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
38
+
39
+ - name: Check formatting with black
40
+ run: |
41
+ black --check ldcov
42
+
43
+ - name: Test with pytest
44
+ run: |
45
+ pytest tests/ --cov=ldcov --cov-report=xml --cov-report=term
46
+
47
+ - name: Upload coverage to Codecov
48
+ uses: codecov/codecov-action@v4
49
+ with:
50
+ file: ./coverage.xml
51
+ flags: unittests
52
+ name: codecov-umbrella
53
+ fail_ci_if_error: false
54
+
55
+ build:
56
+ runs-on: ubuntu-latest
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ with:
60
+ fetch-depth: 0 # Required for setuptools_scm
61
+
62
+ - name: Set up Python
63
+ uses: actions/setup-python@v5
64
+ with:
65
+ python-version: '3.11'
66
+
67
+ - name: Install build tooling
68
+ run: |
69
+ python -m pip install --upgrade pip
70
+ pip install build twine
71
+
72
+ - name: Build package
73
+ run: |
74
+ python -m build
75
+
76
+ - name: Check package with twine
77
+ run: |
78
+ twine check dist/*
79
+
80
+ - name: Verify install in a clean environment
81
+ run: |
82
+ # Test in a temp dir so the source tree doesn't shadow the installed package
83
+ TEMP_DIR=$(mktemp -d)
84
+ cd "$TEMP_DIR"
85
+ python -m venv test_env
86
+ source test_env/bin/activate
87
+ pip install "${{ github.workspace }}"/dist/*.whl
88
+ python -c "import ldcov; print('✓ ldcov imported successfully')"
89
+ python -c "import lazybgen; print('✓ lazybgen', lazybgen.__version__)"
90
+ deactivate
@@ -0,0 +1,47 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch: # build the distributions on demand without publishing
7
+
8
+ jobs:
9
+ build:
10
+ name: Build sdist + wheel
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0 # full history so setuptools_scm sees the tag
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: '3.11'
20
+
21
+ - name: Build
22
+ run: |
23
+ python -m pip install --upgrade pip build twine
24
+ python -m build
25
+ twine check dist/*
26
+
27
+ - uses: actions/upload-artifact@v4
28
+ with:
29
+ name: dist
30
+ path: dist/*
31
+
32
+ publish:
33
+ name: Publish to PyPI
34
+ needs: build
35
+ runs-on: ubuntu-latest
36
+ # Only publish when a GitHub Release is published (not on workflow_dispatch).
37
+ if: github.event_name == 'release'
38
+ environment: pypi
39
+ permissions:
40
+ id-token: write # OIDC for trusted publishing (no API token needed)
41
+ steps:
42
+ - uses: actions/download-artifact@v4
43
+ with:
44
+ name: dist
45
+ path: dist
46
+
47
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,83 @@
1
+ # Changelog
2
+
3
+ All notable changes to **ldcov** are documented here. The format is based on
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project follows
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (0.x: minor versions may
6
+ make breaking changes while the API stabilizes).
7
+
8
+ Versions are derived from git tags via `setuptools_scm`; see the "Versioning" note
9
+ at the bottom.
10
+
11
+ ## [0.4.0] - 2026-06-24
12
+
13
+ First release on PyPI: `pip install ldcov`.
14
+
15
+ ### Changed
16
+ - **BGEN reading now uses the standalone [`lazybgen`](https://pypi.org/project/lazybgen/)
17
+ package** instead of a vendored C++/Cython reader. lazybgen ships prebuilt binary
18
+ wheels (Linux manylinux/musllinux, macOS arm64, CPython 3.9–3.13), so ldcov is now
19
+ pure Python and needs no C/C++ toolchain or CMake to install. The `load_bgen` API
20
+ and behavior are unchanged.
21
+ - `__version__` is derived from the installed package metadata (was hardcoded).
22
+
23
+ ### Fixed
24
+ - **Long-format LD files (`.ld` / `.ld.gz` / `.ld.bgz`) now round-trip correctly**
25
+ (to the `%.6f` text precision of the writer). Previously `load_correlation_matrix`
26
+ could not read back what `save_correlation_matrix` wrote: the `#`-prefixed header was
27
+ discarded (raising `KeyError`), multiallelic variants sharing chrom/pos/rsid collapsed
28
+ into one row, string metadata such as chromosome `"01"` was coerced to integers, and
29
+ `.bgz` files failed to decompress. The writer also now stores the matrix diagonal, so
30
+ non-unit diagonals (covariate-adjusted LD) and single-variant metadata are preserved.
31
+ - `standardize_genotypes(scale=False)` no longer raises `UnboundLocalError`.
32
+ - Covariate provenance metadata records the actual package version, not a literal.
33
+
34
+ ### Removed
35
+ - The vendored BGEN reader (`ldcov/io/bgen/`, zlib-ng/zstd submodules, `setup.py`),
36
+ now provided by lazybgen. The `tqdm` dependency (unused) was dropped.
37
+
38
+ ## [0.3.0] - 2026-06-20
39
+
40
+ ### Added
41
+ - **Hail BlockMatrix LD extraction (`--ld-bm`)**: read a partial submatrix of a Hail
42
+ `BlockMatrix` LD store (e.g. gnomAD on GCS, Pan-UKB on AWS S3) in pure Python (no
43
+ Hail/Spark) and export `.bcor` / `.npz`, selected by region, z-file, or index range.
44
+ - Pre-computed Parquet variant indexes for the supported LD stores, and the
45
+ `make_bm_variant_index` builder.
46
+
47
+ ### Changed
48
+ - Faster `.bcor` subset reads; vectorized mean imputation, FWL projection, and the
49
+ long-format LD writer.
50
+
51
+ ## [0.2.0] - 2026-04-26
52
+
53
+ ### Added
54
+ - **`.bcor.idx` index format**, auto-emitted alongside `.bcor` outputs, for O(1) rsid
55
+ lookups and partial reads (including over GCS) without scanning metadata.
56
+ - GCS-aware `BcorReader` with partial reads by rsid.
57
+ - `make_bcor_idx` tool to index existing `.bcor` files.
58
+
59
+ ### Fixed
60
+ - Correctly detect string columns under pandas `future.infer_string` mode.
61
+
62
+ ## [0.1.0] - 2025-12-05
63
+
64
+ ### Added
65
+ - Initial release: efficient linkage-disequilibrium computation with Frisch–Waugh–Lovell
66
+ covariate adjustment for BGEN data; `matrix` / `long` / `bcor` output formats;
67
+ pre-computed projection matrices; and direct reads from Google Cloud Storage.
68
+
69
+ ---
70
+
71
+ ## Versioning
72
+
73
+ The package version is computed at build time from the latest git tag by
74
+ `setuptools_scm` (no version string is committed). Tagging `vX.Y.Z` and building
75
+ produces version `X.Y.Z`; commits after a tag get a development version like
76
+ `X.Y.(Z+1).devN+g<hash>`. `ldcov.__version__` reads this from the installed package
77
+ metadata (`importlib.metadata`), falling back to `0.0.0+unknown` when run from an
78
+ unbuilt source tree.
79
+
80
+ [0.4.0]: https://github.com/mkanai/ldcov/releases/tag/v0.4.0
81
+ [0.3.0]: https://github.com/mkanai/ldcov/releases/tag/v0.3.0
82
+ [0.2.0]: https://github.com/mkanai/ldcov/releases/tag/v0.2.0
83
+ [0.1.0]: https://github.com/mkanai/ldcov/releases/tag/v0.1.0
ldcov-0.4.0/Dockerfile ADDED
@@ -0,0 +1,47 @@
1
+ # ldcov Dockerfile
2
+ # ldcov is pure Python; its BGEN reader (lazybgen) installs from a prebuilt PyPI
3
+ # wheel, so no C/C++ toolchain is needed at install time.
4
+ FROM python:3.11-slim
5
+
6
+ # Runtime utilities: wget/tar to fetch bgenix, OpenBLAS for optimized linear
7
+ # algebra.
8
+ RUN apt-get update && apt-get install -y \
9
+ wget \
10
+ tar \
11
+ libopenblas-dev \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Install bgenix from Oxford (used to create .bgi indices for BGEN files)
15
+ RUN wget -q https://www.chg.ox.ac.uk/~gav/resources/bgen_v1.1.4-Ubuntu16.04-x86_64.tgz -O /tmp/bgen.tgz && \
16
+ tar -xzf /tmp/bgen.tgz -C /tmp && \
17
+ cp /tmp/bgen_v1.1.4-Ubuntu16.04-x86_64/bgenix /usr/local/bin/ && \
18
+ chmod +x /usr/local/bin/bgenix && \
19
+ rm -rf /tmp/bgen.tgz /tmp/bgen_v1.1.4-Ubuntu16.04-x86_64
20
+
21
+ WORKDIR /app
22
+ COPY . .
23
+
24
+ RUN pip install --upgrade pip setuptools wheel
25
+
26
+ # Install ldcov (pulls the lazybgen wheel from PyPI) with dev extras
27
+ RUN pip install -e .[dev] -v 2>&1 | tee /tmp/build.log && \
28
+ python -c "import ldcov; print('ldcov installed at:', ldcov.__file__)" && \
29
+ python -c "import lazybgen; print('lazybgen', lazybgen.__version__)"
30
+
31
+ # Verify numpy is using OpenBLAS
32
+ RUN python -c "import numpy; numpy.show_config()" | grep -i blas || true
33
+
34
+ # Run tests to verify the build (skip integration tests that need cloud access)
35
+ RUN pytest -v -m "not integration" tests/ || true
36
+
37
+ ENV PYTHONUNBUFFERED=1
38
+ ENV OMP_NUM_THREADS=4
39
+ ENV MKL_NUM_THREADS=4
40
+ ENV NUMEXPR_NUM_THREADS=4
41
+ ENV OPENBLAS_NUM_THREADS=4
42
+
43
+ # Create directory for test data
44
+ RUN mkdir -p /data
45
+
46
+ # Default command
47
+ CMD ["pytest", "-v"]
ldcov-0.4.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Masahiro Kanai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ include LICENSE
2
+ include README.md
3
+ include CHANGELOG.md
4
+ include pyproject.toml
5
+ include MANIFEST.in
6
+ include Makefile
7
+
8
+ # Include tests in the sdist
9
+ recursive-include tests *.py
10
+
11
+ # Exclude compiled files and build artifacts
12
+ global-exclude *.pyc
13
+ global-exclude *.pyo
14
+ global-exclude *.so
15
+ global-exclude __pycache__
16
+ global-exclude .git
17
+ global-exclude .gitignore
18
+ global-exclude .github
19
+ global-exclude build
20
+ global-exclude dist
21
+ global-exclude *.egg-info
ldcov-0.4.0/Makefile ADDED
@@ -0,0 +1,42 @@
1
+ .PHONY: clean lint format test coverage dist install
2
+
3
+ # Default target
4
+ all: clean lint test coverage
5
+
6
+ # Clean build files
7
+ clean:
8
+ rm -rf build/
9
+ rm -rf dist/
10
+ rm -rf *.egg-info
11
+ rm -rf ldcov.egg-info/
12
+ find . -name __pycache__ -exec rm -rf {} +
13
+ find . -name "*.pyc" -delete
14
+ find . -name "*.pyo" -delete
15
+ find . -name ".coverage" -delete
16
+ find . -name "coverage.xml" -delete
17
+ find . -name ".pytest_cache" -exec rm -rf {} +
18
+
19
+ # Lint code
20
+ lint:
21
+ flake8 ldcov tests
22
+ black --check ldcov tests
23
+
24
+ # Format code
25
+ format:
26
+ black ldcov tests
27
+
28
+ # Run tests
29
+ test:
30
+ pytest tests/
31
+
32
+ # Run tests with coverage
33
+ coverage:
34
+ pytest --cov=ldcov tests/ --cov-report=xml
35
+
36
+ # Build distribution packages
37
+ dist: clean
38
+ python -m build
39
+
40
+ # Install for development
41
+ install:
42
+ pip install -e .[dev]