-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:Sm00thix/IKPLS
- Loading branch information
Showing
17 changed files
with
191 additions
and
69 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build | ||
description: Test | ||
|
||
runs: | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# # os: [ubuntu-latest, windows-latest, macos-latest] | ||
# os: [ubuntu-latest] | ||
# # python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
# python-version: ["3.10"] | ||
# include: | ||
# - os: ubuntu-latest | ||
# path: ~/.cache/pip | ||
|
||
# runs-on: ${{ matrix.os }} | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python #${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest | ||
python -m pip install build --user | ||
pip install -U "jax[cpu]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
shell: bash | ||
|
||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
shell: bash | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
shell: bash | ||
|
||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ |
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,13 @@ | ||
name: Publish | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,24 @@ | ||
name: Test | ||
description: Test | ||
|
||
inputs: | ||
PYTHON_VERSION: | ||
description: test | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Test | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade pandas | ||
python -m pip install --upgrade numpy | ||
python -m pip install --upgrade tqdm | ||
python -m pip install --upgrade scikit-learn | ||
python -m pip install flake8 pytest | ||
python -m pip install build --user | ||
pip install -U "jax[cpu]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
pip install pytest pytest-cov | ||
python3 -m pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=ikpls/ --cov-report=xml --cov-report=html | ||
shell: bash |
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,30 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python package | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
test_package: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] # os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.10"] # python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
env: | ||
JAX_ENABLE_X64: True | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/test | ||
|
||
build_package: | ||
runs-on: ubuntu-latest | ||
env: | ||
JAX_ENABLE_X64: True | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/build |
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,42 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
test_package: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] # os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.10"] # python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
env: | ||
JAX_ENABLE_X64: True | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/test | ||
|
||
build_package: | ||
runs-on: ubuntu-latest | ||
env: | ||
JAX_ENABLE_X64: True | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/build | ||
|
||
publish_package: | ||
needs: [build_package, test_package] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/publish | ||
permissions: | ||
id-token: write | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/ikpls |
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.
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.
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,19 @@ | ||
[tool.poetry] | ||
name = "ikpls" | ||
version = "0.1.1" | ||
description = "" | ||
authors = ["Sm00thix <[email protected]>"] | ||
license = "Apache-2.0" | ||
readme = "README.md" | ||
repository = "https://github.com/Sm00thix/IKPLS" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9, <3.13" | ||
numpy = "^1.26.1" | ||
jax = "^0.4.19" | ||
scikit-learn = "^1.3.2" | ||
tqdm = "^4.66.1" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from . import load_data, test_consistency | ||
from . import load_data, test_ikpls | ||
|
||
__all__ = ["load_data", "test_consistency"] | ||
__all__ = ["load_data", "test_ikpls"] |
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