Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pyproject.toml and remove setup.py #143

Merged
merged 30 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
45d45d7
Update pyproject.toml and remove setup.py
mavaylon1 Nov 27, 2023
83a8d7c
Update __init__.py
mavaylon1 Nov 27, 2023
0a8cfae
Delete versioneer.py
mavaylon1 Nov 27, 2023
906f5ec
Update .gitignore
mavaylon1 Nov 27, 2023
59b859e
Create .git_archival.txt
mavaylon1 Nov 27, 2023
44f55cd
Update .gitattributes
mavaylon1 Nov 27, 2023
4f8e76f
Create codespell.yml
mavaylon1 Nov 27, 2023
68a5aec
Create ruff.yml
mavaylon1 Nov 27, 2023
0a9e289
Update conf.py
mavaylon1 Nov 28, 2023
8d618b8
Update conf.py
mavaylon1 Nov 28, 2023
9d00e00
Update test_io_convert.py
mavaylon1 Nov 28, 2023
50e4c60
Update CHANGELOG.md
mavaylon1 Nov 28, 2023
ef71567
Update base_tests_zarrio.py
mavaylon1 Nov 28, 2023
2595874
Update test_fsspec_streaming.py
mavaylon1 Nov 28, 2023
2f09e7b
Update overview.rst
mavaylon1 Nov 28, 2023
112a24b
Update storage.rst
mavaylon1 Nov 28, 2023
f2e3e84
Update _version.py
mavaylon1 Nov 28, 2023
e22b9b0
Update utils.py
mavaylon1 Nov 28, 2023
b36725d
Update backend.py
mavaylon1 Nov 28, 2023
87aa1a1
Update backend.py
mavaylon1 Nov 28, 2023
f37b989
Update CHANGELOG.md
mavaylon1 Dec 5, 2023
0498bc0
Update pyproject.toml
mavaylon1 Dec 5, 2023
2165c60
Update pyproject.toml
rly Dec 5, 2023
778ac82
Update pyproject.toml
rly Dec 5, 2023
2683b57
Update pyproject.toml
mavaylon1 Dec 5, 2023
596d463
Delete setup.cfg
mavaylon1 Dec 5, 2023
df11057
Delete setup.py
mavaylon1 Dec 5, 2023
0a5df47
Delete src/hdmf_zarr/_version.py
rly Dec 5, 2023
e88ebb6
Merge branch 'dev' into toml
rly Dec 5, 2023
246f105
Delete .github/workflows/run_flake8.yml
mavaylon1 Dec 7, 2023
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
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/hdmf_zarr/_version.py export-subst
.git_archival.txt export-subst
14 changes: 14 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Codespell
on:
pull_request:
workflow_dispatch:

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
11 changes: 11 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Ruff
on: pull_request

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Run ruff
uses: chartboost/ruff-action@v1
30 changes: 0 additions & 30 deletions .github/workflows/run_flake8.yml

This file was deleted.

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

# DS_Store
.DS_Store

# Version
_version.py
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Enhancements
* Added a new default to consolidate metadata in order more efficeintly traverse storage contents. @mavaylon1 [#142](https://github.com/hdmf-dev/hdmf-zarr/pull/142)
* Fix linking for FSSpec and support passing of `storage_options` required reading data from S3 #138. @alejoe91 [#120](https://github.com/hdmf-dev/hdmf-zarr/pull/138)
* Updated versioning to hatch-vcs and deprecated setup.py in full transition to `pyproject.toml`. @mavaylon1 [#143](https://github.com/hdmf-dev/hdmf-zarr/pull/143)

## 0.4.0 (October 3, 2023)

Expand Down Expand Up @@ -65,7 +66,7 @@
links/reference when moving Zarr files @oruebel [#46](https://github.com/hdmf-dev/hdmf-zarr/pull/46)
* Fixed bugs in requirements defined in setup.py @oruebel [#46](https://github.com/hdmf-dev/hdmf-zarr/pull/46)
* Fixed bug regarding Sphinx external links @mavaylon1 [#53](https://github.com/hdmf-dev/hdmf-zarr/pull/53)
* Updated gallery tests to use test_gallery.py and necessary package dependcies
* Updated gallery tests to use test_gallery.py and necessary package dependencies
@mavaylon1 [#53](https://github.com/hdmf-dev/hdmf-zarr/pull/53)
* Updated dateset used in conversion tutorial, which caused warnings
@oruebel [#56](https://github.com/hdmf-dev/hdmf-zarr/pull/56)
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
# This lets us ensure that the source package is imported, and that its
# version is used.
sys.path.insert(0, os.path.join(project_root, 'src'))
from hdmf_zarr._version import get_versions

import hdmf_zarr

# -- Autodoc configuration -----------------------------------------------------
autoclass_content = 'both'
Expand All @@ -46,9 +46,9 @@
author = 'Oliver Ruebel, Matthew Avaylon'

# The short X.Y version.
version = '{}'.format(get_versions()['version'])
version = hdmf_zarr.__version__
# The full version, including alpha/beta/rc tags.
release = '{}'.format(get_versions()['version'])
release = hdmf_zarr.__version__

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/source/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Supported features
- Iterative data write using :py:class:`~hdmf.data_utils.AbstractDataChunkIterator`
- Parallel write with :py:class:`~hdmf.data_utils.GenericDataChunkIterator` (since v0.4)
- Lazy load of datasets
- Lazy load of datasets containing object refernces (since v0.4)
- Lazy load of datasets containing object references (since v0.4)

Known Limitations
-----------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/storage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ as JSON. Each dict (i.e., element) in the list defines a link, with each dict co
pointing to an object within the same Zarr file, the value of source will be ``"."``. For external
links that point to object in another Zarr file, the value of source will be the path to
the other Zarr file relative to the root path of the Zarr file containing the link.
* ``path`` : Path to the linked object within the Zarr file idenfied by the ``source`` key
* ``path`` : Path to the linked object within the Zarr file identified by the ``source`` key
* ``object_id``: Object id of the reference object. May be None in case the referenced object
does not have an assigned object_id (e.g., in the case we reference a dataset with a fixed
name but without and assigned ``data_type`` (or ``neurodata_type`` in the case of NWB).
Expand Down
107 changes: 107 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,87 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "hdmf_zarr"
authors = [
{ name="Oliver Ruebel", email="[email protected]" },
{ name="Matthew Avaylon", email="[email protected]" },
]
description = "A package defining a Zarr I/O backend for HDMF"
readme = "README.rst"
requires-python = ">=3.8"
license = {text = "BSD"}
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: BSD License",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: Unix",
"Topic :: Scientific/Engineering :: Medical Science Apps."
]
dependencies = [
'hdmf>=3.9.0',
'zarr>=2.11.0',
'numpy>=1.24',
'numcodecs>=0.9.1',
'numcodecs==0.11.0',
'pynwb>=2.5.0',
'threadpoolctl>=3.1.0',
]
dynamic = ["version"]

[project.optional-dependencies]
tqdm = ["tqdm>=4.41.0"]
fsspec = ["fsspec"]
s3fs = ["s3fs"]

[project.urls]
"Homepage" = "https://github.com/hdmf-dev/hdmf-zarr"
"Bug Tracker" = "https://github.com/hdmf-dev/hdmf-zarr/issues"

[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
# this file is created/updated when the package is installed and used in
# src/hdmf_zarr/__init__.py to set `hdmf_zarr.__version__`
# this allows the version to be accessible from python
version-file = "src/hdmf_zarr/_version.py"

[tool.hatch.build.targets.sdist]
exclude = [".git_archival.txt"]

[tool.hatch.build.targets.wheel]
packages = ["src/hdmf_zarr"]

[tool.pytest.ini_options]
addopts = "--cov --cov-report html"

[tool.codespell]
skip = "htmlcov,.git,.mypy_cache,.pytest_cache,.coverage,*.pdf,*.svg,venvs,.tox,./docs/_build/*,*.ipynb"
ignore-words-list = "datas"

[tool.coverage.run]
branch = true
source = ["src/"]
omit = [
"src/hdmf_zarr/_due.py",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@abstract"
]

[tool.black]
line-length = 120
target-version = ['py38']
Expand Down Expand Up @@ -25,3 +109,26 @@ force-exclude = '''
/docs/*
)\
'''

[tool.ruff]
select = ["E", "F", "T100", "T201", "T203"]
exclude = [
".git",
".tox",
"__pycache__",
"build/",
"dist/",
"docs/source/conf.py",
"src/hdmf_zarr/_due.py",
"docs/source/tutorials/",
"docs/_build/",
]
line-length = 120

[tool.ruff.per-file-ignores]
"docs/gallery/*" = ["E402", "T201"]
"src/*/__init__.py" = ["F401"]
"test_gallery.py" = ["T201"]

[tool.ruff.mccabe]
max-complexity = 17
27 changes: 0 additions & 27 deletions setup.cfg

This file was deleted.

79 changes: 0 additions & 79 deletions setup.py

This file was deleted.

12 changes: 9 additions & 3 deletions src/hdmf_zarr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
from .utils import ZarrDataIO
from .nwb import NWBZarrIO

from ._version import get_versions # noqa: E402
__version__ = get_versions()['version']
del get_versions
try:
# see https://effigies.gitlab.io/posts/python-packaging-2023/
from ._version import __version__
except ImportError: # pragma: no cover
# this is a relatively slower method for getting the version string
from importlib.metadata import version # noqa: E402

__version__ = version("hdmf")
del version

# Duecredit definitions
from ._due import due, BibTeX # noqa: E402
Expand Down
Loading
Loading