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

Pypi conda pkg #21

Merged
merged 7 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 29 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,32 @@ jobs:
if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi
echo pushing ${{ github.ref }} with label $CONDA_LABEL
anaconda upload --label $CONDA_LABEL conda.recipe/noarch/bm3dornl*.tar.bz2

pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: conda-forge,defaults
mamba-version: "*"
environment-file: environment.yml
cache-environment-key: ${{ runner.os }}-env-${{ hashFiles('**/environment.yml') }}
cache-downloads-key: ${{ runner.os }}-downloads-${{ hashFiles('**/environment.yml') }}
- name: build pypi pacakge
run: |
echo "versioningit $(versioningit .)"
# build the package
VERSION=$(versioningit .) python -m build
# retrieve your distributions here
- name: Publish package distributions to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
18 changes: 18 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,28 @@ requirements:

run:
- python
- numpy
- scipy<1.13
- numba
- cupy
- scikit-image

test:
imports:
- bm3dornl

channels:
- conda-forge
- nvidia
- defaults

about:
home: {{ url }}
license: {{ license }}
license_family: MIT
license_file: ../LICENSE
summary: {{ description }}

extra:
recipe-maintainers:
- kedokudo
18 changes: 13 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
[project]
name = "bm3dornl"
description = "BM3D repo"
description = "BM3D for streak artifact removal in neutron imaging"
dynamic = ["version"]
requires-python = ">=3.10"
dependencies = [
# list all runtime dependencies here
"numpy",
"scipy<1.13", # avoid a bug
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment on the pin

"numba",
"cupy-cuda12x", # use pre-built wheels
"scikit-image",
]
license = { text = "MIT" }
keywords = ["BM3D", "image processing", "neutron imaging", "denoising", "CuPy", "Numba"]
readme = "README.md"

[project.urls]
homepage = "https://github.com/neutrons/python_project_template/" # if no homepage, use repo url
homepage = "https://github.com/neutrons/python_project_template/"
repository = "https://github.com/ornlneutronimaging/bm3dornl"
documentation = "https://bm3dornl.readthedocs.io/en/latest/"
issues = "https://github.com/ornlneutronimaging/bm3dornl/issues"


[build-system]
requires = [
Expand Down Expand Up @@ -70,5 +80,3 @@ disable = ["too-many-locals",
"too-many-arguments",
"duplicate-code"
]

# Add additional 3rd party tool configuration here as needed
Loading