Skip to content

Commit

Permalink
Remove usage example from doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
thodson-usgs committed May 2, 2024
1 parent c44c949 commit a21144c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 34 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Set up Conda
uses: conda-incubator/[email protected]
with:
channels: conda-forge
python-version: ${{ matrix.python-version }}
channels: conda-forge
python-version: ${{ matrix.python-version }}

- name: Show info about `base` environment
shell: "bash -l {0}"
Expand All @@ -50,7 +50,7 @@ jobs:
run: |
conda activate env
export DISABLE_NUMCODECS_AVX2=""
python -m pip install -v -e .[test,test_extras,doctest,msgpack,zfpy,pcodec]
python -m pip install -v -e .[test,test_extras,msgpack,zfpy,pcodec]
- name: List installed packages
shell: "bash -l {0}"
Expand All @@ -73,8 +73,8 @@ jobs:
- uses: codecov/codecov-action@v3
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
14 changes: 7 additions & 7 deletions .github/workflows/ci-osx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Set up Conda
uses: conda-incubator/[email protected]
with:
channels: conda-forge
python-version: ${{ matrix.python-version }}
channels: conda-forge
python-version: ${{ matrix.python-version }}

- name: Show info about `base` environment
shell: "bash -l {0}"
Expand All @@ -50,7 +50,7 @@ jobs:
run: |
conda activate env
export DISABLE_NUMCODECS_AVX2=""
python -m pip install -v -e .[test,test_extras,doctest,msgpack,zfpy,pcodec]
python -m pip install -v -e .[test,test_extras,msgpack,zfpy,pcodec]
- name: List installed packages
shell: "bash -l {0}"
Expand All @@ -67,8 +67,8 @@ jobs:
- uses: codecov/codecov-action@v3
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
14 changes: 7 additions & 7 deletions .github/workflows/ci-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Set up Conda
uses: conda-incubator/[email protected]
with:
channels: conda-forge
python-version: ${{ matrix.python-version }}
channels: conda-forge
python-version: ${{ matrix.python-version }}

- name: Set up `env`
shell: "bash -l {0}"
Expand All @@ -42,7 +42,7 @@ jobs:
shell: "bash -l {0}"
run: |
conda activate env
python -m pip install -v -e .[test,test_extras,doctest,msgpack,zfpy,pcodec]
python -m pip install -v -e .[test,test_extras,msgpack,zfpy,pcodec]
- name: List installed packages
shell: "bash -l {0}"
Expand All @@ -59,8 +59,8 @@ jobs:
- uses: codecov/codecov-action@v3
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
14 changes: 7 additions & 7 deletions numcodecs/bitinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class BitInfo(BitRound):
been quantized creating erroneous results, which is apparent in
the output. Do not use with quantized data in practice.
>>> import xarray as xr
>>> ds = xr.tutorial.open_dataset("air_temperature")
>>> from numcodecs import Blosc, BitInfo
>>> compressor = Blosc(cname="zstd", clevel=3)
>>> filters = [BitInfo(info_level=0.99)]
>>> encoding = {"air": {"compressor": compressor, "filters": filters}}
>>> _ = ds.to_zarr('xbit.zarr', mode="w", encoding=encoding)
import xarray as xr
ds = xr.tutorial.open_dataset("air_temperature")
from numcodecs import Blosc, BitInfo
compressor = Blosc(cname="zstd", clevel=3)
filters = [BitInfo(info_level=0.99)]
encoding = {"air": {"compressor": compressor, "filters": filters}}
ds.to_zarr('xbit.zarr', mode="w", encoding=encoding)
"""

codec_id = 'bitinfo'
Expand Down
6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ test = [
test_extras = [
"importlib_metadata",
]
doctest = [
"xarray",
"pooch",
"netCDF4",
"zarr",
]
msgpack = [
"msgpack",
]
Expand Down

0 comments on commit a21144c

Please sign in to comment.