-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
Migrate to pyproject.toml + cleanup #1158
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
af1b79a
Migrate to pyproject.toml + cleanup
Saransh-cpp c1f488d
Remove more instances of python setup.py ...
Saransh-cpp be962cc
release.rst entry
Saransh-cpp 12a4fd9
Move changes to unreleased section
Saransh-cpp 739775c
Remove pre-commit checks from workflows
Saransh-cpp aa85bcb
Update `jupyter` dependencies
Saransh-cpp 0664212
Lower pin setuptools
Saransh-cpp 1347ce5
Document installing `build`
Saransh-cpp 056a194
Add docs for twine and pre-commit
Saransh-cpp 0a394ac
Add pre-commit badge to readme.
joshmoore 45cd3dc
add .readthedocs.yaml
joshmoore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,9 @@ zarr/version.py | |
# emacs | ||
*~ | ||
|
||
# VSCode | ||
.vscode/ | ||
|
||
# test data | ||
#*.zarr | ||
#*.zip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
tools: | ||
python: "3.9" | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
python: | ||
install: | ||
- requirements: requirements_rtfd.txt | ||
- method: pip | ||
path: . |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,14 +179,33 @@ also collected automatically via the Codecov service, and total | |
coverage over all builds must be 100% (although individual builds | ||
may be lower due to Python 2/3 or other differences). | ||
|
||
Code standards | ||
~~~~~~~~~~~~~~ | ||
Code standards - using pre-commit | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
All code must conform to the PEP8 standard. Regarding line length, lines up to 100 | ||
characters are allowed, although please try to keep under 90 wherever possible. | ||
Conformance can be checked by running:: | ||
|
||
$ python -m flake8 --max-line-length=100 zarr | ||
``Zarr`` uses a set of ``pre-commit`` hooks and the ``pre-commit`` bot to format, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💯 |
||
type-check, and prettify the codebase. ``pre-commit`` can be installed locally by | ||
running:: | ||
|
||
$ python -m pip install pre-commit | ||
|
||
The hooks can be installed locally by running:: | ||
|
||
$ pre-commit install | ||
|
||
This would run the checks every time a commit is created locally. These checks will also run | ||
on every commit pushed to an open PR, resulting in some automatic styling fixes by the | ||
``pre-commit`` bot. The checks will by default only run on the files modified by a commit, | ||
but the checks can be triggered for all the files by running:: | ||
|
||
$ pre-commit run --all-files | ||
|
||
If you would like to skip the failing checks and push the code for further discussion, use | ||
the ``--no-verify`` option with ``git commit``. | ||
|
||
|
||
|
||
Test coverage | ||
~~~~~~~~~~~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,80 @@ | ||
[build-system] | ||
requires = ["setuptools>=40.8.0", "wheel"] | ||
requires = ["setuptools>=40.8.0", "setuptools-scm", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[project] | ||
name = "zarr" | ||
description = "An implementation of chunked, compressed, N-dimensional arrays for Python" | ||
readme = { file = "README.md", content-type = "text/markdown" } | ||
maintainers = [ | ||
{ name = "Alistair Miles", email = "[email protected]" } | ||
] | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
'asciitree', | ||
'numpy>=1.7', | ||
'fasteners', | ||
'numcodecs>=0.10.0', | ||
] | ||
dynamic = [ | ||
"version", | ||
] | ||
classifiers = [ | ||
'Development Status :: 6 - Mature', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Information Technology', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Operating System :: Unix', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
] | ||
|
||
[project.optional-dependencies] | ||
jupyter = [ | ||
'notebook', | ||
'ipytree>=0.2.2', | ||
'ipywidgets>=8.0.0', | ||
] | ||
|
||
[project.urls] | ||
"Bug Tracker" = "https://github.com/zarr-developers/zarr-python/issues" | ||
Changelog = "https://zarr.readthedocs.io/en/stable/release.html" | ||
Discussions = "https://github.com/zarr-developers/zarr-python/discussions" | ||
Documentation = "https://zarr.readthedocs.io/" | ||
Homepage = "https://github.com/zarr-developers/zarr-python" | ||
|
||
|
||
[tool.setuptools] | ||
packages = ["zarr", "zarr._storage", "zarr.tests"] | ||
|
||
[tool.setuptools_scm] | ||
version_scheme = "guess-next-dev" | ||
local_scheme = "dirty-tag" | ||
write_to = "zarr/version.py" | ||
|
||
[tool.mypy] | ||
python_version = "3.8" | ||
ignore_missing_imports = true | ||
follow_imports = "silent" | ||
|
||
[tool.pytest.ini_options] | ||
doctest_optionflags = [ | ||
"NORMALIZE_WHITESPACE", | ||
"ELLIPSIS", | ||
"IGNORE_EXCEPTION_DETAIL", | ||
] | ||
addopts = [ | ||
"--durations=10", | ||
] | ||
filterwarnings = [ | ||
"error:::zarr.*", | ||
"ignore:Not all N5 implementations support blosc compression.*:RuntimeWarning", | ||
"ignore:PY_SSIZE_T_CLEAN will be required.*:DeprecationWarning", | ||
"ignore:The loop argument is deprecated since Python 3.8.*:DeprecationWarning", | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these perform the style fixes for us after pushing a PR? If so, that's great 😄
Though we probably want to document this behavior somewhere so users know about this. Maybe in the contributor guide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! But the maintainers should install the
precommit.ci
app (https://github.com/marketplace/pre-commit-ci) for Zarr's GH repository.I'll document it in the contributor guide.