-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #68 from biolab/automated-release
[CI] User reusable workflow for automated release
- Loading branch information
Showing
6 changed files
with
26 additions
and
120 deletions.
There are no files selected for viewing
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,74 +1,12 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
# Enable manual run | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_dist_files: | ||
name: Build distribution files | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install build tool | ||
run: python -m pip install build | ||
|
||
- name: Build sdist and wheel | ||
run: python -m build --sdist --wheel . | ||
|
||
- name: Upload dist files | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist_files | ||
path: dist/* | ||
|
||
upload_release_assets: | ||
name: Upload Release Assets | ||
needs: [build_dist_files] | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Download dist files | ||
id: download_artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist_files | ||
path: ~/downloads | ||
|
||
- name: List downloaded artifacts | ||
run: ls -la ~/downloads | ||
|
||
- name: Upload to release | ||
uses: shogo82148/[email protected] | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ steps.download_artifact.outputs.download-path }}/*.whl | ||
|
||
pypi_publish: | ||
name: PyPI Publish | ||
needs: [upload_release_assets] | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Download dist files | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist_files | ||
path: downloads/ | ||
|
||
- name: Publish packages to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages_dir: downloads/ | ||
# repository_url: https://test.pypi.org/legacy/ | ||
# verbose: true | ||
release: | ||
uses: biolab/orange-ci-cd/.github/workflows/release.yml@master | ||
with: | ||
pure-python: true | ||
secrets: inherit |
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,18 +1 @@ | ||
from Orange.data import Table | ||
|
||
from .evaluation import scoring # noqa: F401 | ||
|
||
# Remove this when we require Orange 3.34 | ||
if not hasattr(Table, "get_column"): | ||
import scipy.sparse as sp | ||
import numpy as np | ||
|
||
def get_column(self, column): | ||
col, _ = self.get_column_view(column) | ||
if sp.issparse(col): | ||
col = col.toarray().reshape(-1) | ||
if self.domain[column].is_primitive(): | ||
col = col.astype(np.float64) | ||
return col | ||
|
||
Table.get_column = get_column |
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