Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
version: 2
updates:
# Updates for main
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"

# Updates for support/v2 branch
- package-ecosystem: "pip"
directory: "/"
target-branch: "support/v2"
schedule:
interval: "weekly"
groups:
requirements:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "support/v2"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "*"
72 changes: 72 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: ${{ matrix.os }} / py${{ matrix.python }} / np${{ matrix.numpy }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python: ["3.11", "3.12", "3.13"]
numpy: ["1.26", "2.2"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Install Hatch
run: pip install hatch

- name: Run tests
run: hatch run test.py${{ matrix.python }}-${{ matrix.numpy }}:pytest tests/

test-upstream:
name: Test upstream dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install Hatch
run: pip install hatch

- name: Run tests with upstream dependencies
run: hatch run upstream:pytest tests/

test-complete:
name: All tests passed
if: always()
needs: [test, test-upstream]
runs-on: ubuntu-latest
steps:
- name: Check test matrix status
if: needs.test.result != 'success'
run: exit 1
- name: Check upstream test status
if: needs.test-upstream.result != 'success'
run: exit 1
33 changes: 0 additions & 33 deletions .github/workflows/tests.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,16 @@ dmypy.json

# Pyre type checker
.pyre/

# Automatically-generated version indicator
src/anscombe_transform/version.py

# OSX file system db
.DS_Store

# VSCode
.vscode/

# Example data
examples/*.zarr
examples/*.gif
50 changes: 50 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autoupdate_schedule: "monthly"
autofix_commit_msg: "style: pre-commit fixes"
autofix_prs: false
default_stages: [pre-commit, pre-push]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.1
hooks:
- id: ruff-check
args: ["--fix", "--show-fixes"]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ["-L", "fo,ihs,kake,te", "-S", "fixture"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
exclude: mkdocs.yml
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: mypy
files: src|tests
additional_dependencies:
- zarr>=3.1.2
- pytest==8.4.2

- repo: https://github.com/scientific-python/cookie
rev: 2025.05.02
hooks:
- id: sp-repo-review
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/numpy/numpydoc
rev: v1.9.0
hooks:
- id: numpydoc-validation
- repo: https://github.com/twisted/towncrier
rev: 25.8.0
hooks:
- id: towncrier-check
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.12"
jobs:
pre_build:
- |
if [ "$READTHEDOCS_VERSION_TYPE" != "tag" ];
then
towncrier build --version Unreleased --yes;
fi
build:
html:
- mkdocs build --strict --site-dir $READTHEDOCS_OUTPUT/html
mkdocs:
configuration: mkdocs.yml

python:
install:
- method: pip
path: .
extra_requirements:
- docs
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![PyPI version](https://badge.fury.io/py/anscombe-numcodecs.svg)](https://badge.fury.io/py/anscombe-numcodecs) ![tests](https://github.com/datajoint/anscombe-numcodecs/actions/workflows/tests.yaml/badge.svg)
[![PyPI version](https://badge.fury.io/py/anscombe-transform.svg)](https://badge.fury.io/py/anscombe-transform) ![tests](https://github.com/datajoint/anscombe-transform/actions/workflows/tests.yaml/badge.svg)

# Anscombe numcodecs

Expand All @@ -20,16 +20,16 @@ The codec is used in Zarr as a filter prior to compression.
Install via `pip`:

```
pip install anscombe-numcodecs
pip install anscombe-transform
```

### Developer installation

```
conda create -n anscombe_numcodecs python=3.xx
conda activate anscombe_numcodecs
git clone https://github.com/datajoint/anscombe-numcodecs.git
cd anscombe-numcodecs
conda create -n anscombe_transform python=3.xx
conda activate anscombe_transform
git clone https://github.com/datajoint/anscombe-transform.git
cd anscombe-transform
pip install -r requirements.txt
pip install -e .
```
Expand Down
Loading