Skip to content

Commit

Permalink
Update docs, change optional deps group
Browse files Browse the repository at this point in the history
  • Loading branch information
rly committed Dec 18, 2024
1 parent bacaa31 commit 3e6d6a6
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 37 deletions.
10 changes: 4 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ Prepare for release of HDMF-Zarr [version]

### Before merging:
- [ ] Make sure all PRs to be included in this release have been merged to `dev`.
- [ ] Major and minor releases: Update package versions in `requirements.txt`, `requirements-dev.txt`,
`requirements-doc.txt`, and `requirements-opt.txt` to the latest versions,
and update dependency ranges in `pyproject.toml` and minimums in `requirements-min.txt` as needed.
Run `pip install pur && pur -r -d [requirements file]` to see which packages can be updated.
- [ ] Major and minor releases: Update dependency ranges in `pyproject.toml` and minimums in
`requirements-min.txt` as needed.
- [ ] Check legal file dates and information in `Legal.txt`, `license.txt`, `README.rst`, `docs/source/conf.py`,
and any other locations as needed
- [ ] Update `pyproject.toml` as needed
Expand All @@ -27,5 +25,5 @@ Prepare for release of HDMF-Zarr [version]
4. Either monitor [conda-forge/hdmf_zarr-feedstock](https://github.com/conda-forge/hdmf_zarr-feedstock) for the
regro-cf-autotick-bot bot to create a PR updating the version of HDMF to the latest PyPI release, usually within
24 hours of release, or manually create a PR updating `recipe/meta.yaml` with the latest version number
and SHA256 retrieved from PyPI > HDMF-Zarr > Download Files > View hashes for the `.tar.gz` file. Re-render and update
dependencies as needed.
and SHA256 retrieved from PyPI > HDMF-Zarr > Download Files > View hashes for the `.tar.gz` file. Re-render and
update the dependencies as needed.
3 changes: 1 addition & 2 deletions .github/workflows/HDMF_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:

- name: Install HDMF_Zarr Requirements
run: |
python -m pip install -r requirements-dev.txt -r requirements.txt
pip install .
python -m pip install ".[test]"
- name: Clone and Install HDMF Dev Branch
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/check_external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
- name: Install Sphinx dependencies and package
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-doc.txt -r requirements.txt -r requirements-opt.txt
python -m pip install .
python -m pip install ".[test,docs,full]"
- name: Check Sphinx external links
run: sphinx-build -W -b linkcheck ./docs/source ./test_build
23 changes: 12 additions & 11 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,30 @@ jobs:
with:
python-version: ${{ env.PYTHON }}

- name: Install dependencies
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-dev.txt -r requirements.txt
- name: Install optional dependencies
if: ${{ matrix.opt_req }}
run: python -m pip install -r requirements-opt.txt
- name: Install package
if: ! ${{ matrix.opt_req }}
run: |
python -m pip install .
python -m pip list
python -m pip install ".[test]"
- name: Install package with optional dependencies
if: ${{ matrix.opt_req }}
run: python -m pip install ".[test,full]"

- name: Run tests and generate coverage report
run: |
# coverage is configured in pyproject.toml
pytest --cov --cov-report=xml --cov-report=term # codecov uploader requires xml format
# codecov uploader requires xml format
python -m pip list
pytest --cov --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
file: ./coverage.xml
files: ./coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ formats: all
# Optionally set the version of Python and requirements required to build your docs
python:
install:
- path: .[docs,tqdm,fsspec,s3fs] # path to the package relative to the root
- path: .[docs,full] # path to the package relative to the root

# Optionally include all submodules
submodules:
Expand Down
16 changes: 8 additions & 8 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ For Developers
Install hdmf-zarr from GitHub
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The following illustrates how to install both ``hdmf`` and ``hdfm_zarr`` from GitHub
in a Conda environment. Normally we don't need to install ``hdmf`` directly, but until
``hdmf 3.4.0`` is released we need to use the ``dev`` version of ``hdmf``.
The following illustrates how to install both ``hdmf`` and ``hdmf_zarr`` from GitHub
in a Conda environment, with all of the optional, testing, and documentation dependencies
for hdmf-zarr. Normally, we don't need to install ``hdmf`` directly, but it is
often useful to use the ``dev`` branch of the ``hdmf`` GitHub repository.

.. code-block::
conda create --name hdmf-zarr-test python=3.9
conda activate hdmf-zarr-test
conda create --name hdmf-zarr-dev python=3.13
conda activate hdmf-zarr-dev
git clone --recurse-submodules https://github.com/hdmf-dev/hdmf.git
cd hdmf
Expand All @@ -41,12 +42,11 @@ in a Conda environment. Normally we don't need to install ``hdmf`` directly, but
git clone https://github.com/hdmf-dev/hdmf-zarr.git
cd hdmf-zarr
pip install -r requirements.txt -r requirements-dev.txt -r requirements-doc.txt
pip install -e .
pip install -e ".[all]"
.. note::

Depending on versions, it is possible that when installing ``hdmf-zarr`` that pip will
Depending on versions, it is possible that when installing ``hdmf-zarr``, that ``pip`` will
install HDMF directly from PyPI instead of using the development version of HDMF
that is already installed. In that case call ``pip uninstall hdmf`` and
go to the ``hdmf`` directory and run ``pip install -e .`` again
Expand Down
14 changes: 11 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ dependencies = [
dynamic = ["version"]

[project.optional-dependencies]
tqdm = ["tqdm>=4.41.0"]
fsspec = ["fsspec"]
s3fs = ["s3fs"]
# all optional dependencies
full = [
"tqdm>=4.41.0",
"fsspec",
"s3fs",
]

# development dependencies
test = [
Expand All @@ -54,6 +57,7 @@ test = [
"tox",
]

# documentation dependencies
docs = [
"matplotlib",
"sphinx>=4", # improved support for docutils>=0.17
Expand All @@ -62,6 +66,10 @@ docs = [
"sphinx-copybutton",
]

# all possible dependencies
all = ["hdmf-zarr[full,test,docs]"]


[project.urls]
"Homepage" = "https://github.com/hdmf-dev/hdmf-zarr"
"Bug Tracker" = "https://github.com/hdmf-dev/hdmf-zarr/issues"
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ commands = {[testenv]commands}

# Test with python 3.13 and all optional dependencies
[testenv:py313-optional]
extras = {[testenv]extras}, tqdm, fsspec, s3fs
extras = {[testenv]extras}, full
commands = {[testenv]commands}

# Test with python 3.13 and all optional dependencies, using pre-release versions
[testenv:py313-prerelease]
install_command =
python -m pip install -U --pre {opts} {packages}
extras = {[testenv]extras}, tqdm, fsspec, s3fs
extras = {[testenv]extras}, full
commands = {[testenv]commands}

# Test with python 3.9 and minimum dependencies
Expand Down Expand Up @@ -87,14 +87,14 @@ commands = {[testenv:gallery]commands}

# Test with python 3.13 and all optional dependencies
[testenv:gallery-py313-optional]
extras = {[testenv:gallery]extras}, tqdm, fsspec, s3fs
extras = {[testenv:gallery]extras}, full
commands = {[testenv:gallery]commands}

# Test with python 3.13 and all optional dependencies, using pre-release versions
[testenv:gallery-py313-prerelease]
install_command =
python -m pip install -U --pre {opts} {packages}
extras = {[testenv:gallery]extras}, tqdm, fsspec, s3fs
extras = {[testenv:gallery]extras}, full
commands = {[testenv:gallery]commands}

# Test with python 3.9 and minimum dependencies
Expand Down

0 comments on commit 3e6d6a6

Please sign in to comment.