-
Notifications
You must be signed in to change notification settings - Fork 20
Update the workflow for deploying the package on anaconda #170
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,54 @@ | ||
| {% set name = "dl1_data_handler" %} | ||
| {% set version = os.environ.get('PACKAGE_VERSION', '0.0.0+dev') %} | ||
|
|
||
| package: | ||
| name: {{ name }} | ||
| version: {{ version }} | ||
|
|
||
| source: | ||
|
|
||
| path: ../../ | ||
|
|
||
| build: | ||
| noarch: python | ||
| number: 0 | ||
| script: "{{ PYTHON }} -m pip install . --no-deps -vv" | ||
|
|
||
| requirements: | ||
| host: | ||
| - python >=3.10 | ||
| - pip | ||
| - setuptools >=65 | ||
| - setuptools_scm >=6.2 | ||
| run: | ||
| - python >=3.10 | ||
| - astropy | ||
| - numpy | ||
| - pandas | ||
| - pyyaml | ||
| - scipy | ||
| - traitlets | ||
| - pydot | ||
| - setuptools | ||
| - ctapipe>=0.23,<0.26 | ||
|
|
||
|
|
||
| test: | ||
| imports: | ||
| - dl1_data_handler | ||
|
|
||
| about: | ||
| home: https://github.com/cta-observatory/dl1-data-handler | ||
| license: BSD-3-Clause | ||
| summary: "Utilities for reading and processing CTA R1/DL0/DL1 data in a standardized format." | ||
| description: | | ||
| A package of utilities for reading and applying image processing to Cherenkov Telescope Array (CTA) | ||
| R1/DL0/DL1 data in a standardized format. Created primarily for testing machine learning image | ||
| analysis techniques on IACT data. | ||
| dev_url: https://github.com/cta-observatory/dl1-data-handler | ||
|
|
||
| extra: | ||
| recipe-maintainers: | ||
| - Daniel Nieto | ||
| - Tjark Miener | ||
| - Alexander Cervino | ||
This file contains hidden or 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,59 @@ | ||
| name: Release Conda | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-22.04 | ||
|
|
||
| steps: | ||
| - name: Checkout repository and fetch tags | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Miniconda and Conda Tools | ||
| uses: conda-incubator/setup-miniconda@v3 | ||
| with: | ||
| python-version: '3.10' | ||
| channels: conda-forge | ||
| auto-update-conda: true | ||
| mamba-version: "*" | ||
| activate-environment: false | ||
|
|
||
| - name: Install anaconda-client and conda-build | ||
| shell: bash | ||
| run: | | ||
| mamba install anaconda-client conda-build -y | ||
|
|
||
| - name: Conda Build and Upload Package | ||
| shell: bash | ||
| env: | ||
| ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | ||
| run: | | ||
| CONDA_RECIPE_DIR=".github/conda" | ||
| ANACONDA_CHANNEL="ctlearn-project" | ||
|
|
||
| FULL_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0+dev") | ||
| VERSION="${FULL_TAG#v}" | ||
| VERSION="${VERSION#V}" | ||
|
|
||
| echo "Building package version: $VERSION" | ||
| export PACKAGE_VERSION=$VERSION | ||
|
|
||
| conda run conda build $CONDA_RECIPE_DIR | ||
|
|
||
| PACKAGE_PATH=$(conda run conda build $CONDA_RECIPE_DIR --output) | ||
|
|
||
| if [[ "$VERSION" != "0.0.0+dev" ]]; then | ||
| echo "Uploading $PACKAGE_PATH to $ANACONDA_CHANNEL channel..." | ||
| conda run anaconda upload \ | ||
| "$PACKAGE_PATH" \ | ||
| --force \ | ||
| --user $ANACONDA_CHANNEL | ||
| else | ||
| echo "Skipping upload: Version is $VERSION (development)." | ||
| fi |
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.