Skip to content

Commit

Permalink
Merge pull request #54 from Becksteinlab/doc-updates
Browse files Browse the repository at this point in the history
Updating documentation and cleaning up unused files
  • Loading branch information
ljwoods2 authored Jul 20, 2024
2 parents 9318ecd + c99c2fd commit 4366f59
Show file tree
Hide file tree
Showing 28 changed files with 462 additions and 3,224 deletions.
126 changes: 126 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Build and upload to PyPI

on:
pull_request:
branches:
- "package-*"
push:
branches:
- "package-*"
tags:
- "package-*"
release:
types:
- published

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


defaults:
run:
shell: bash -l {0}


jobs:
build_wheels:
if: github.repository == 'Becksteinlab/zarrtraj'
name: Build wheels
runs-on: ${{ matrix.buildplat[0] }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
buildplat:
- [ubuntu-22.04, manylinux_x86_64, x86_64]
- [macos-11, macosx_*, x86_64]
- [windows-2019, win_amd64, AMD64]
- [macos-14, macosx_*, arm64]
python: ["cp310", "cp311", "cp312"]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.19.2

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
CIBW_ARCHS: ${{ matrix.buildplat[2] }}
CIBW_BUILD_VERBOSITY: 1

- name: upload artifacts
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package')) ||
(github.event_name == 'release' && github.event.action == 'published')
uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl

build_sdist:
if: github.repository == 'Becksteinlab/zarrtraj'
name: build package source distribution
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- name: upload artifacts
if: |
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package')) ||
(github.event_name == 'release' && github.event.action == 'published')
uses: actions/upload-artifact@v4
with:
path: ./dist/*.tar.gz
retention-days: 7

upload_testpypi_zarrtraj:
if: github.repository == 'Becksteinlab/zarrtraj' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/package'))
name: testpypi_upload_zarrtraj
environment:
name: publisher
url: https://test.pypi.org/p/zarrtraj
permissions:
id-token: write
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- name: upload_source_and_wheels
uses: pypa/[email protected]
with:
skip-existing: true
repository-url: https://test.pypi.org/legacy/

upload_pypi_zarrtraj:
if: |
github.repository == 'Becksteinlab/zarrtraj' &&
(github.event_name == 'release' && github.event.action == 'published')
name: pypi_upload_zarrtraj
environment:
name: publisher
url: https://pypi.org/p/zarrtraj
permissions:
id-token: write
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- name: upload_source_and_wheels
uses: pypa/[email protected]
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ The rules for this file:
* YYYY-MM-DD date format (following ISO 8601)
* accompany each entry with github issue/PR number (Issue #xyz)
-->
## [0.2.0]


### Authors
- ljwoods2

### Added
- Rewrite of repository, zarrtraj supports reading H5MD-formatted files

### Fixed


### Changed


### Deprecated
- Proprietary zarrtraj format no longer supported

## [0.1.0]

Expand Down
68 changes: 6 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,70 +21,14 @@ zarrtraj
[url_license]: https://www.gnu.org/licenses/gpl-2.0
[url_mda]: https://www.mdanalysis.org

This is a kit that provides the ability to read and write trajectory data in the Zarr file format. For more information on the format and usage,
see the [zarrtraj documentation](https://zarrtraj.readthedocs.io/en/latest/index.html)
This is an MDAKit that provides the ability to read and write H5MD-formatted trajectory data into MDAnalysis using Zarr.
Zarrtraj can read local H5MD files, H5MD files in S3 buckets, and files served via http or https.
It can read both [H5MD-formatted files stored in hdf5](https://www.nongnu.org/h5md/h5md.html) and [H5MD-formatted files stored
in Zarr](https://zarrtraj.readthedocs.io/en/latest/zarrmd-file-spec/v0.1.0.html) (.zarrmd files).

zarrtraj is bound by a [Code of Conduct](https://github.com/Becksteinlab/zarrtraj/blob/main/CODE_OF_CONDUCT.md).

### Installation

To build zarrtraj from source,
we highly recommend using virtual environments.
If possible, we strongly recommend that you use
[Anaconda](https://docs.conda.io/en/latest/) as your package manager.
Below we provide instructions both for `conda` and
for `pip`.

#### With conda

Ensure that you have [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) installed.

Create a virtual environment and activate it:

```
conda create --name zarrtraj
conda activate zarrtraj
```

Install the development and documentation dependencies:

```
conda env update --name zarrtraj --file devtools/conda-envs/test_env.yaml
conda env update --name zarrtraj --file docs/requirements.yaml
```

Build this package from source:
For more information on installation and usage, see the [zarrtraj documentation](https://zarrtraj.readthedocs.io/en/latest/index.html)

```
pip install -e .
```

If you want to update your dependencies (which can be risky!), run:

```
conda update --all
```

And when you are finished, you can exit the virtual environment with:

```
conda deactivate
```

#### With pip

To build the package from source, run:

```
pip install .
```

If you want to create a development environment, install
the dependencies required for tests and docs with:

```
pip install ".[test,doc]"
```
zarrtraj is bound by a [Code of Conduct](https://github.com/Becksteinlab/zarrtraj/blob/main/CODE_OF_CONDUCT.md).

### Copyright

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/reader_bms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
Development:
asv run -q -v -e <commit> > bm.log &
asv run -q -v -e <branch>^! > bm.log &
Full run:
asv run -v -e <commit> > bm.log &
asv run -v -e <branch>^! > bm.log &
4. To publish, use
Expand Down
8 changes: 2 additions & 6 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ dependencies:
- zarr>=2.11.0
- kerchunk>=0.2.6
- h5py>=3.11.0
- dask

### AWS dependencies ###
# AWS reading/writing
- s3fs=2024.3.0
- s3fs>=2024.3.0
- aiobotocore=2.12.1
- botocore>=1.34.41,<1.34.52
- boto3>=1.9.201
# AWS testing
- moto=5.0.3
- moto>=5.0.3

### General testing ###
- MDAnalysisTests>=2.7.0
Expand All @@ -30,9 +29,6 @@ dependencies:
- pytest-cov>=4.1.0
- codecov

### Notebooks ###
- jupyter


# Pip-only installs
# - pip:
Expand Down
Loading

0 comments on commit 4366f59

Please sign in to comment.