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

Update build and test config #128

Merged
merged 24 commits into from
Jan 24, 2025
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
31 changes: 15 additions & 16 deletions .github/workflows/_conda-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,29 @@ jobs:
if: github.ref_type == 'tag'
run: sed -i "s/0.0.0/${{ env.tag }}/g" kelp_o_matic/__init__.py

- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v3
- name: Setup Mamba
uses: mamba-org/setup-micromamba@v2
with:
python-version: ${{ inputs.python-version }}
mamba-version: "*"
channels: pytorch,nvidia,conda-forge,defaults
channel-priority: true
auto-update-conda: true
activate-environment: my-env
miniforge-variant: Mambaforge
use-mamba: true
environment-name: build-env
create-args: >-
python=${{ inputs.python-version }}
rattler-build
anaconda-client
-c pytorch -c nvidia -c conda-forge
cache-downloads: true
cache-downloads-key: ${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NUMBER }}
init-shell: bash

- name: Install build packages
run: mamba install -y boa anaconda-client
- name: Verify rattler-build installation
run: rattler-build --version

- name: Build package
run: |
cd conda
conda mambabuild --output-folder . .
run: rattler-build build -r conda/recipe.yaml

- name: Publish package
if: inputs.should-upload
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
cd conda
cd output
anaconda upload --label main noarch/*.tar.bz2
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
os: ["ubuntu-latest", "windows-latest"]
uses: ./.github/workflows/_conda-build.yml
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ jobs:
- Windows
- MacOs
py:
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
steps:
- uses: actions/checkout@v4
- name: Setup python for test ${{ matrix.py }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,5 @@ conda/index.html
.idea/

*.profile

output
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: "ubuntu-20.04"
os: "ubuntu-24.04"
tools:
python: "3.9"
python: "3.10"

mkdocs:
configuration: mkdocs.yml
Expand Down
53 changes: 0 additions & 53 deletions conda/meta.yaml

This file was deleted.

64 changes: 64 additions & 0 deletions conda/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
schema_version: 1

context:
git_tag: ${{ env.get('GIT_DESCRIBE_TAG', default="v0.0.0") }}
version: ${{ git_tag[1:] }}

package:
name: kelp-o-matic
version: ${{ version }}

source:
path: ../

build:
number: 0
noarch: python
script: ${{ PYTHON }} -m pip install . -vv
python:
entry_points:
- kom = kelp_o_matic.cli:cli

requirements:
host:
- python >=3.10
- poetry-core
- pip
run:
- python >=3.10
- numpy >=1.24.2
- pytorch >=2.1.0, <3
- fsspec
- rasterio >=1.3.7, <2
- rich >=13.5, <14
- torchvision >=0.16.1
- typer >=0.9.0
- packaging >=24.1, <25
run_constraints:
- pytorch-cuda >=11.8

tests:
- python:
imports:
- kelp_o_matic
- kelp_o_matic.geotiff_io
- requirements:
run:
- python >=3.10
- pip
script:
- pip check
- kom --help

about:
summary: Segmentation Tools for Remotely Sensed RPAS Imagery
license: MIT
license_file: LICENSE.txt
homepage: https://github.com/HakaiInstitute/kelp-o-matic
repository: https://github.com/HakaiInstitute/kelp-o-matic
documentation: https://kelp-o-matic.readthedocs.io

extra:
recipe-maintainers:
- tayden

Loading
Loading