-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from ericpre/remove_setup.py
Consolidate packaging in `pyproject.toml`
- Loading branch information
Showing
64 changed files
with
170 additions
and
235 deletions.
There are no files selected for viewing
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,8 @@ | ||
name: Package & Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
package_and_test: | ||
# Use the "reusable workflow" from the hyperspy organisation | ||
uses: hyperspy/.github/.github/workflows/package_and_test.yml@main |
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,4 +1,8 @@ | ||
name: Release | ||
# Reusable workflow are not supported with trusted publisher | ||
# https://github.com/pypa/gh-action-pypi-publish/issues/166 | ||
# copy and paste | ||
# https://github.com/hyperspy/.github/blob/main/.github/workflows/release_pure_python.yml | ||
|
||
# This workflow builds the wheels "on tag". | ||
# If run from the hyperspy/hyperspy repository, the wheels will be uploaded to pypi ; | ||
|
@@ -10,76 +14,60 @@ on: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels | ||
build: | ||
name: Build wheel and sdist | ||
runs-on: ubuntu-latest | ||
env: | ||
CIBW_TEST_COMMAND: "pytest --pyargs exspy" | ||
CIBW_TEST_EXTRAS: "tests" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: ./wheelhouse/*.whl | ||
if-no-files-found: error | ||
- uses: actions/checkout@v4 | ||
|
||
make_sdist: | ||
name: Make SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run build | ||
run: | | ||
pipx run build | ||
- name: Build SDist | ||
run: pipx run build --sdist | ||
- name: Display built files | ||
run: | | ||
ls -shR | ||
working-directory: dist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
path: dist/* | ||
name: artifacts | ||
|
||
upload_to_pypi: | ||
needs: [build_wheels, make_sdist] | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
name: Upload to pypi | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- name: Download dist | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Download wheels | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheels | ||
name: artifacts | ||
path: dist | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
- name: Display downloaded files | ||
run: | | ||
ls -shR | ||
working-directory: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: github.repository_owner == 'hyperspy' | ||
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'hyperspy' }} | ||
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/ | ||
|
||
create_release: | ||
# TODO: once we are happy with the workflow | ||
# setup zenodo to create a DOI automatically | ||
create_github_release: | ||
# If zenodo is setup to create a DOI automatically on a GitHub release, | ||
# this step will trigger the mining of the DOI | ||
needs: upload_to_pypi | ||
permissions: | ||
contents: write | ||
name: Create Release | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
- name: Create Release | ||
id: create_release | ||
if: ${{ startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'hyperspy' }} | ||
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 |
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
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
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,2 @@ | ||
prune exspy/tests/drawing/plot_model | ||
prune exspy/tests/drawing/plot_spectra_markers |
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
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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
0
exspy/test/misc/test_eels.py → exspy/tests/misc/test_eels.py
100755 → 100644
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.