Skip to content
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

Merge Master to clustering for new changes in GAMA Backend #181

Open
wants to merge 38 commits into
base: clustering
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
24b1986
Generate new ind late as possible (#140)
PGijsbers Feb 5, 2022
49a5a2a
Update ASHA (#139)
PGijsbers Feb 5, 2022
1c74471
Fix small error introduced by #140 (#145)
PGijsbers Feb 10, 2022
74e0407
fix function argument to onehotencoder (#148)
chclam Mar 22, 2022
1f619fe
Fix unseen label issue in smaller data set during cross validation (#…
chclam Mar 31, 2022
1432638
Update citation to Springer-provided
PGijsbers May 9, 2022
84b95e4
Update versions (#158)
PGijsbers Jul 31, 2022
5479c7e
#137: Raise an error of output_directory is non-empty
PGijsbers Aug 1, 2022
39ac9b9
Add more typehints (#160)
PGijsbers Aug 1, 2022
1bed842
Add codecov upload to CI (#161)
PGijsbers Aug 1, 2022
565348d
Update pre-commit (#162)
PGijsbers Aug 2, 2022
f7b447c
Add pre-commit workflow (#163)
PGijsbers Aug 2, 2022
50f374b
Refactor Pytest in Workflows (#164)
PGijsbers Aug 4, 2022
d2247e5
Automatically update docs on push (#165)
PGijsbers Aug 4, 2022
b95c132
Add CI to check for changelog update (#166)
PGijsbers Aug 4, 2022
9f7854b
Remove old CI files (#167)
PGijsbers Aug 4, 2022
4093f6f
Update installation instructions.
PGijsbers Aug 4, 2022
556d601
Fix build doc workflow (#168)
PGijsbers Aug 4, 2022
d2c297a
Fix warnings (#170)
PGijsbers Aug 25, 2022
9596bf0
Bump version (#172)
PGijsbers Aug 29, 2022
cded585
Remove process from list if it no longer exists (#174)
PGijsbers Sep 14, 2022
8f1e48d
Add publish workflow (#175)
PGijsbers Sep 15, 2022
241dd0f
Small fixes (#173)
PGijsbers Sep 15, 2022
6c9743a
Set release version
PGijsbers Sep 15, 2022
c541e5d
Remove release trigger
PGijsbers Sep 16, 2022
8f5803f
Merge branch '22.x' into master
PGijsbers Sep 16, 2022
c73e683
DOC: Add license to readme (#187)
darigovresearch Jan 30, 2023
941d1f9
Bump to next dev version
PGijsbers Mar 28, 2023
2827a2a
Updating devtools, removing dashboard (#192)
PGijsbers Apr 29, 2023
f67002f
Bump to minimum Py3.9 (#195)
PGijsbers Apr 29, 2023
c89a524
Refactor (#196)
PGijsbers May 2, 2023
5a42a91
Add back preset hyperparameter (was `goal` in 21.0.1) (#203)
PGijsbers Jun 22, 2023
3fe60bf
Bump version to release (#204)
PGijsbers Jun 22, 2023
e0e49e4
Update to minimum py3.9 (#205)
PGijsbers Jun 22, 2023
0e5773f
Bump black from 23.3.0 to 24.3.0 (#213)
dependabot[bot] Mar 21, 2024
96d05b1
Fix scikit-learn to <1.3, prepare post release (#215)
PGijsbers Jun 14, 2024
2614392
Fix/workflow publish (#217)
PGijsbers Jun 14, 2024
21bb074
Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows …
dependabot[bot] Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
ignore_errors = True
omit =
tests/*
gama/dashboard/*
exclude_lines =
pragma: no cover
def __repr__
Expand Down
6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

67 changes: 67 additions & 0 deletions .github/actions/pytest/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: "Pytest"
description: "Run a test suite"

inputs:
path:
description: "Path to test suite"
required: true
python-version:
description: "Python version to use"
default: "3.10"
required: true
use-cache:
description: "If set, use cached dependencies."
default: true
required: true
os:
description: "OS for runs-on. Only required when cache is set."
default: "ubuntu-latest"
required: false
pip-args:
description: "Additional pip args"
default: ""
required: false
pytest-args:
description: "Additional ptest args"
default: ""
required: false

runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}

- name: Get pip cache dir
id: get-cache-location
if: inputs.use-cache == 'true'
shell: bash
run: |
echo "::set-output name=dir::$(pip cache dir)"

- uses: actions/cache@v3
id: cache
if: inputs.use-cache == 'true'
with:
path: ${{ steps.get-cache-location.outputs.dir }}
key: ${{ inputs.os }}-pip-${{ inputs.python-version }}-${{ hashFiles('**/pyproject.toml') }}

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install ${{ inputs.pip-args }} ".[test]"

- name: Test with pytest
shell: bash
run: |
echo pytest ${{ inputs.path }} --cov ${{ inputs.pytest-args }}
pytest ${{ inputs.path }} --cov ${{ inputs.pytest-args }}

- uses: codecov/codecov-action@v3
with:
flags: unit-tests
fail_ci_if_error: true
verbose: true
49 changes: 49 additions & 0 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docs

on:
push:
branches:
- master
- main
- "[0-9][0-9].[0-9]+.x"

pull_request:
branches:
- master
- main
- "[0-9][0-9].[0-9]+.x"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[doc]"

- name: Clone GH-Pages
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v3
with:
ref: "gh-pages"
path: docs/build/

- name: Build Docs
run: |
sphinx-build docs/source docs/build/${{ github.ref_name }}

- name: Push GH-Pages
if: ${{ github.event_name != 'pull_request' }}
run: |
cd docs/build
git config user.name github-actions
git config user.email [email protected]
git add ${{ github.ref_name }}
git commit -m "Autodeploy docs"
git push
41 changes: 41 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Changelog

on:
pull_request:
branches:
- master
- main

jobs:
check-and-comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Releases.rst Updated
run: |
git fetch origin master:master
updated_files=$(git diff master -- docs/source/releases.rst)
if [[ -z $updated_files ]]
then
exit 1
fi

- name: Thank you comment
uses: thollander/actions-comment-pull-request@v1
with:
comment_includes: "changelog"
message: |
Thank you for the pull request! :pray:
If CI reports any errors please address them.
If you believe the errors are unrelated to your PR, please state why.
This will make it easier for the maintainers to assess your PR :)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Comment PR
if: ${{ failure() }}
uses: thollander/actions-comment-pull-request@v1
with:
comment_includes: "changelog" # To avoid creating additional comments
message: |
Please include the change for this PR in the changelog (`docs/source/releases.rst`).
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/precommit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: pre-commit

on:
workflow_dispatch:
push:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
126 changes: 126 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Publish

on:
workflow_dispatch:
inputs:
year:
required: true
type: number
macro:
required: true
type: number
micro:
required: true
type: number
suffix:
required: false
type: string
i-know-what-i-am-doing:
required: true
type: boolean
default: false
test-pypi:
required: true
type: boolean
default: true

jobs:
warn:
if: ${{ ! inputs.i-know-what-i-am-doing }}
runs-on: ubuntu-latest
steps:
- name: "i-know-what-i-am-doing not set"
run: |
exit 1

build:
if: ${{ inputs.i-know-what-i-am-doing }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Match version with input
run: |
GAMA_VERSION=$(grep -Po "\d+\.\d+\.\d+((\.dev\d*)|(\.post\d*))?" "gama/__version__.py")
NEW_VERSION=${{ inputs.year }}.${{ inputs.macro }}.${{ inputs.micro }}${{ inputs.suffix }}
echo $GAMA_VERSION $NEW_VERSION
exit $([ $GAMA_VERSION == $NEW_VERSION ])
- name: Match version with tag
run: |
GAMA_VERSION=$(grep -Po "\d+\.\d+\.\d+((\.dev\d*)|(\.post\d*))?" "gama/__version__.py")
NEW_VERSION=${{ github.ref }}
echo refs/tags/v$GAMA_VERSION $NEW_VERSION
exit $([ refs/tags/v$GAMA_VERSION == $NEW_VERSION ])
- name: Install build & publish dependencies
run: |
python -m pip install build
- name: Build Wheel
run: |
python -m build
- name: Upload Dist
uses: actions/upload-artifact@v3
with:
name: dist-folder
path: dist
retention-days: 1
if-no-files-found: error

test-install:
needs: build
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Download dist
uses: actions/[email protected]
with:
name: dist-folder
path: dist
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Wheel
shell: bash
run: |
python -m pip install dist/*.whl
- name: Run example
run: |
curl https://raw.githubusercontent.com/openml-labs/gama/master/examples/classification_example.py > example.py
# First reduce runtime for 3 minutes to 1 minute, does not work for Windows but fails silently.
sed -i.bak "s/180/60/" example.py
sed -i.bak "s/3/1/" example.py
python example.py

publish:
needs: test-install
runs-on: ubuntu-latest
steps:
- name: Download dist
uses: actions/[email protected]
with:
name: dist-folder
path: dist
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Twine
run: |
python -m pip install twine
- name: Upload to test server
if: ${{ inputs.test-pypi }}
run: |
python -m twine upload --repository testpypi -u __token__ -p ${{ secrets.TEST_PYPI }} dist/*
- name: Upload to real server
if: ${{ ! inputs.test-pypi }}
run: |
python -m twine upload -u __token__ -p ${{ secrets.PYPI }} dist/*
41 changes: 41 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pytest
on:
workflow_dispatch:
pull_request:

jobs:
unit:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Invoke Unit Tests
uses: ./.github/actions/pytest
with:
path: tests/unit
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

system:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Invoke System Tests
uses: ./.github/actions/pytest
with:
path: tests/system
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
26 changes: 26 additions & 0 deletions .github/workflows/test-with-pre.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test --pre
on:
workflow_dispatch:
schedule:
- cron: "00 0 * * 1"

jobs:
unit:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Invoke Unit Tests
uses: ./.github/actions/pytest
with:
path: tests/unit
python-version: ${{ matrix.python-version }}
use-cache: false
pip-args: "--pre"
pytest-args: "-W error -W ignore::sklearn.exceptions.ConvergenceWarning"
Loading
Loading