-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
168 additions
and
226 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Based on the workflow from https://github.com/biotite-dev/biotite/ | ||
# contributed by Daniel Farrell (danpf) and published under the same license | ||
|
||
name: "CI & CD" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
release: | ||
types: | ||
- published | ||
|
||
env: | ||
CIBW_BUILD: cp39-* cp310-* cp311-* | ||
CIBW_ARCHS_LINUX: "x86_64" | ||
CIBW_ARCHS_MACOS: "x86_64 arm64" | ||
CIBW_ARCHS_WINDOWS: "x86 AMD64" | ||
# Skip musllinux because it takes too long to compile on GHA | ||
# since it is emulated. (6+ hours) | ||
# *note* most of the build time is actually numpy for musllinux | ||
CIBW_SKIP: "*musllinux* *-manylinux_i686 *-musllinux_i686 *-win32 pp*" | ||
CIBW_TEST_EXTRAS: test | ||
CIBW_TEST_COMMAND: pytest {project} --durations=50 | ||
CIBW_DEPENDENCY_VERSIONS: "pinned" | ||
# Runtime too long due to architecture emulation | ||
CIBW_TEST_SKIP: "*-macosx_arm64" | ||
|
||
|
||
jobs: | ||
test-and-build: | ||
name: "Build & Test" | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, windows-2019, macos-11] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
|
||
- name: Build & (optionally) test wheels | ||
uses: pypa/cibuildwheel@v2.12.1 | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: ./wheelhouse/*.whl | ||
if-no-files-found: error | ||
|
||
|
||
make-sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Build source distribution | ||
run: pipx run build --sdist | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist/*.tar.gz | ||
if-no-files-found: error | ||
|
||
|
||
make-doc: | ||
name: Build documentation | ||
|
||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: hydride | ||
auto-update-conda: true | ||
python-version: '3.11' | ||
- name: Installing dependencies | ||
run: conda install -c conda-forge sphinx cython numpy numpydoc biotite | ||
- name: Building documentation | ||
run: sphinx-build ./doc ./build/doc | ||
- name: Zipping documentation | ||
run: cd .//build; zip -r doc.zip doc; cd .. | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: doc | ||
path: build//doc.zip | ||
if-no-files-found: error | ||
|
||
|
||
upload: | ||
name: Upload to GitHub Releases & PyPI | ||
permissions: | ||
contents: write | ||
needs: [test-and-build, make-sdist, make-doc] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- name: List distributions to be uploaded | ||
run: ls dist | ||
- name: Upload to GitHub Releases | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
with: | ||
files: | | ||
dist//* | ||
doc//* | ||
- name: Upload to PyPI | ||
uses: pypa/gh-action-pypi-publish@c7f29f7adef1a245bd91520e94867e5c6eedddcc | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} |
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,10 +1,51 @@ | ||
[project] | ||
name = "hydride" | ||
authors = [ | ||
{name = "The 'Hydride' contributors"}, | ||
] | ||
description = "Adding hydrogen atoms to molecular models" | ||
readme = "README.rst" | ||
requires-python = ">=3.7" | ||
license = {file = "LICENSE.rst"} | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: BSD License", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: MacOS", | ||
"Operating System :: Microsoft :: Windows", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics" | ||
] | ||
dependencies = [ | ||
"biotite >= 0.35", | ||
"numpy >= 1.14.5", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
homepage = "https://hydride.biotite-python.org" | ||
repository = "https://github.com/biotite-dev/hydride" | ||
documentation = "https://hydride.biotite-python.org" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest", | ||
] | ||
|
||
[project.scripts] | ||
hydride = "hydride.cli:main" | ||
|
||
[build-system] | ||
# Minimum requirements for the build system to execute. | ||
requires = [ | ||
"setuptools >= 0.30", | ||
"wheel >= 0.30", | ||
"biotite >= 0.37", | ||
"numpy >= 1.14, <= 1.21", | ||
"oldest-supported-numpy", | ||
"msgpack >= 0.5.6", | ||
"cython >= 0.29" | ||
] | ||
] |
Oops, something went wrong.