-
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.
* resolve cython issue * update ci * refactor * update repo structure * refactor build process * refine build and release pipeline * update pipeline * lazily import numpy * fix error * fix setup.py * add setup requires * fix env * change project name * update critical table * update version * update github-release rule * update to v0.2.3 * update release pipeline * update ci/cd yml * add more os and set workding dir for testing * fix circular import * fix gitignore
- Loading branch information
Showing
184 changed files
with
41,697 additions
and
2,585 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,72 +1,94 @@ | ||
name: Build and Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Name of the branch to build and release' | ||
required: true | ||
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
python-version: ['3.9', '3.10.8', '3.11'] | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
python-version: "3.x" | ||
- name: Install pypa/build | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine cython numpy | ||
pip install setuptools wheel twine | ||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
python setup.py bdist_wheel sdist | ||
run: python3 setup.py build sdist | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
- name: Rename wheel for manylinux compatibility (Ubuntu only) | ||
if: runner.os == 'Linux' | ||
run: | | ||
for file in *.whl; do | ||
if [[ $file == *linux* ]]; then | ||
mv "$file" "${file/-linux/-manylinux1}" | ||
fi | ||
done | ||
publish-to-testpypi: | ||
name: Publish Python 🐍 distribution 📦 to TestPyPI | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: release | ||
url: https://test.pypi.org/p/time-series-anomaly-detector | ||
|
||
- name: Publish artifacts | ||
uses: actions/upload-artifact@v2 | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
release: | ||
needs: build | ||
github-release: | ||
name: >- | ||
Sign the Python 🐍 distribution 📦 with Sigstore | ||
and upload them to GitHub Release | ||
needs: | ||
- publish-to-testpypi | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
id-token: write # IMPORTANT: mandatory for sigstore | ||
|
||
steps: | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
- name: Publish to GitHub Releases | ||
- name: Sign the dists with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: >- | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Create GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
run: >- | ||
gh release create | ||
'${{ github.ref_name }}' | ||
--repo '${{ github.repository }}' | ||
--notes "" | ||
- name: Upload artifact signatures to GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }} | ||
GITHUB_TOKEN: ${{ github.token }} | ||
# Upload to GitHub Release using the `gh` CLI. | ||
# `dist/` contains the built packages, and the | ||
# sigstore-produced signatures and certificates. | ||
run: >- | ||
pwd && ls -lh && ls -lh dist/ && | ||
gh release create ${{ github.ref_name }} ./dist/* | ||
"release binary and source artifacts" | ||
--generate-notes | ||
--title "Version ${{ github.ref_name }}" | ||
gh release upload | ||
'${{ github.ref_name }}' dist/** | ||
--repo '${{ github.repository }}' |
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 |
---|---|---|
@@ -1,10 +1 @@ | ||
recursive-include ./anomaly-detector/*.pyx | ||
recursive-include ./anomaly-detector/*.c | ||
recursive-include ./anomaly-detector/*.h | ||
recursive-include ./anomaly-detector/*.py | ||
recursive-include ./anomaly-detector/*.txt | ||
recursive-include ./anomaly-detector/anomaly_detector/univariate * | ||
include ./README.md | ||
include ./LICENSE | ||
include ./requirements.txt | ||
include ./setup.py | ||
recursive-include ./src/anomaly_detector/univariate * |
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
Empty file.
1 change: 0 additions & 1 deletion
1
anomaly-detector/anomaly_detector/univariate/util/critical_table.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.