-
Notifications
You must be signed in to change notification settings - Fork 2
PR: Build conda package and add workflow #1
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 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
cce08ef
Remove interactivity from scripts
mrclary ca2d4e6
Rename start-update.py -> start.py
mrclary c116426
Add executable script at install
mrclary b5d3361
Use absolute imports.
mrclary 80290e5
Add --version CLI option
mrclary 38f4b61
Move spyder_updater and tests to src directory.
mrclary bfae39d
Add conda recipe
mrclary 984f297
Add workflow
mrclary bbd9fc7
Include data files in package build
mrclary 028f653
Apply suggestions from code review
mrclary 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,122 @@ | ||
| name: Updater Release | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| release: | ||
| types: | ||
| - created | ||
|
|
||
| workflow_dispatch: | ||
| inputs: | ||
| pre: | ||
| description: 'Build as release candidate' | ||
| required: false | ||
| default: true | ||
| type: boolean | ||
| ssh: | ||
| # github_cli: gh workflow run updater-release.yml --repo spyder-ide/spyder-updater --ref <branch> -f ssh=true | ||
| description: 'Enable ssh debugging' | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
|
|
||
| concurrency: | ||
| group: updater-release-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build conda package | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash -le {0} | ||
|
|
||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Remote SSH Connection | ||
| if: inputs.ssh | ||
| uses: mxschmitt/action-tmate@v3 | ||
| timeout-minutes: 60 | ||
| with: | ||
| detached: true | ||
|
|
||
| - name: Setup Build Environment | ||
| uses: mamba-org/setup-micromamba@v1 | ||
| with: | ||
| condarc: | | ||
| conda_build: | ||
| pkg_format: '2' | ||
| zstd_compression_level: '19' | ||
| channels: | ||
| - conda-forge | ||
| environment-name: build | ||
| create-args: >- | ||
| python=3.11 | ||
| conda-build | ||
| conda-lock | ||
| cache-downloads: true | ||
| cache-environment: true | ||
|
|
||
| - name: Environment Variables | ||
| run: | | ||
| export DISTDIR=${GITHUB_WORKSPACE}/dist | ||
| echo "DISTDIR=$DISTDIR" >> $GITHUB_ENV | ||
| mkdir -p $DISTDIR | ||
|
|
||
| export CONDA_BLD_PATH=${RUNNER_TEMP}/conda-bld | ||
| echo "CONDA_BLD_PATH=$CONDA_BLD_PATH" >> $GITHUB_ENV | ||
| mkdir -p $CONDA_BLD_PATH | ||
|
|
||
| conda config --set bld_path $CONDA_BLD_PATH | ||
| conda config --set conda_build.root-dir $CONDA_BLD_PATH | ||
|
|
||
| env | sort | ||
|
|
||
| - name: Build spyder-updater Conda Package | ||
| run: | | ||
| conda build --no-anaconda-upload recipe | ||
|
|
||
| - name: Create Conda Lock Files | ||
| run: | | ||
| conda-lock lock -c conda-forge --kind explicit --file pyproject.toml --filename-template $DISTDIR/conda-updater-{platform}.lock | ||
|
|
||
| - name: Create Distribution File | ||
| working-directory: ${{ env.DISTDIR }} | ||
| run: | | ||
| mv $CONDA_BLD_PATH/noarch/*.conda . | ||
| zip -mT spyder-updater *.lock *.conda | ||
|
|
||
| - name: Create Checksums | ||
| working-directory: ${{ env.DISTDIR }} | ||
| run: | | ||
| sha256sum spyder-updater.zip > Spyder-Updater-checksums.txt | ||
|
|
||
| - name: Upload Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| path: ${{ env.DISTDIR }} | ||
| name: spyder-updater-artifact | ||
|
|
||
| - name: Get Release | ||
| if: github.event_name == 'release' | ||
| uses: bruceadams/get-release@v1.3.2 | ||
| id: get_release | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
|
|
||
| - name: Upload Release Asset | ||
| if: github.event_name == 'release' | ||
| uses: shogo82148/actions-upload-release-asset@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| with: | ||
| upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
| asset_path: ${{ env.DISTDIR }}/*.* |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| setlocal ENABLEDELAYEDEXPANSION | ||
|
|
||
| set SPYDER_QT_BINDING=conda-forge | ||
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| %PYTHON% -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv | ||
| if errorlevel 1 exit 1 | ||
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,4 @@ | ||
| #!/bin/bash | ||
|
|
||
| export SPYDER_QT_BINDING=conda-forge | ||
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $PYTHON -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv | ||
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,69 @@ | ||
| {% set version = "0.1.0.dev0" %} | ||
| {% set python_min = "3.9" %} | ||
| {% set build = 0 %} | ||
|
|
||
| package: | ||
| name: spyder-updater | ||
| version: {{ version }} | ||
|
|
||
| source: | ||
| path: ../ | ||
|
|
||
| build: | ||
| number: {{ build }} | ||
| entry_points: | ||
| - spyder-updater = spyder_updater.start:main | ||
| noarch: python | ||
|
|
||
| requirements: | ||
| build: | ||
| - python >={{ python_min }} # [unix and (build_platform != target_platform)] | ||
| - python # [win and (build_platform != target_platform)] | ||
| host: | ||
| - python {{ python_min }} # [unix] | ||
| - python # [win] | ||
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - pip | ||
| - setuptools | ||
| - packaging | ||
| run: | ||
| - python >={{ python_min }} # [unix] | ||
| - python # [win] | ||
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - jsonschema | ||
| - pyqt | ||
| - qdarkstyle | ||
| - qstylizer | ||
| - qtawesome | ||
| - qtpy | ||
| - superqt | ||
|
|
||
| test: | ||
| requires: | ||
| - pip | ||
| commands: | ||
| - spyder-updater -h | ||
| - python -m pip check | ||
| imports: | ||
| - spyder_updater | ||
|
|
||
| about: | ||
| home: https://www.spyder-ide.org/ | ||
| license: MIT | ||
| license_file: LICENSE.txt | ||
| summary: The Scientific Python Development Environment | ||
| description: | | ||
| Spyder is a powerful scientific environment written in Python, for Python, | ||
| and designed by and for scientists, engineers and data analysts. | ||
| It features a unique combination of the advanced editing, analysis, | ||
| debugging and profiling functionality of a comprehensive development tool | ||
| with the data exploration, interactive execution, deep inspection and | ||
| beautiful visualization capabilities of a scientific package.\n | ||
| Furthermore, Spyder offers built-in integration with many popular | ||
| scientific packages, including NumPy, SciPy, Pandas, IPython, QtConsole, | ||
| Matplotlib, SymPy, and more.\n | ||
| Beyond its many built-in features, Spyder can be extended even further via | ||
| third-party plugins.\n | ||
| Spyder can also be used as a PyQt5 extension library, allowing you to build | ||
| upon its functionality and embed its components, such as the interactive | ||
| console or advanced editor, in your own software. | ||
| doc_url: https://docs.spyder-ide.org/ | ||
| dev_url: https://github.com/spyder-ide/spyder | ||
mrclary marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
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
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.