Skip to content

Commit

Permalink
Merge pull request #177 from MannLabs/development
Browse files Browse the repository at this point in the history
Release 1.2.4
  • Loading branch information
GeorgWa authored May 29, 2024
2 parents 8989a1c + 7556975 commit 00ba37b
Show file tree
Hide file tree
Showing 188 changed files with 6,037 additions and 8,206 deletions.
7 changes: 3 additions & 4 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[bumpversion]
current_version = 1.2.3
current_version = 1.2.4
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
serialize =
{major}.{minor}.{patch}
{major}.{minor}.{patch}

Expand All @@ -13,8 +13,6 @@ serialize =

[bumpversion:file:./alphabase/__init__.py]

[bumpversion:file:./settings.ini]

[bumpversion:file:./docs/conf.py]

[bumpversion:file:./release/one_click_linux_gui/control]
Expand All @@ -30,5 +28,6 @@ serialize =
[bumpversion:file:./release/one_click_windows_gui/create_installer_windows.sh]

[bumpversion:file:./release/one_click_windows_gui/alphabase_innoinstaller.iss]

search = {current_version}
replace = {new_version}
46 changes: 46 additions & 0 deletions .github/workflows/_run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# reusable workflow to run all tests
name: run-tests

on:
workflow_call:
inputs:
os:
required: true
type: string
python-version:
required: true
type: string
install-script:
required: true
type: string
jobs:
pre-commit:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ inputs.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Perform pip installation with all stable dependencies
shell: bash -l {0}
run: |
cd misc
. ./${{ inputs.install-script }}
- name: Install additional dependencies required for testing
shell: bash -l {0}
run: |
conda activate alphabase
pip install pytest nbmake==1.5.3
conda deactivate
- name: Run tests
shell: bash -l {0}
run: |
conda activate alphabase
cd tests
. ./run_tests.sh
conda deactivate
26 changes: 26 additions & 0 deletions .github/workflows/branch-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# checks to run on branches for each pull request
name: branch-checks

on:
pull_request:

jobs:
pre-commit:
name: Run all pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
# For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources.
run-tests-loose:
name: Test loose pip installation on ubuntu-latest
needs: pre-commit
strategy:
matrix:
os: [ubuntu-latest]
uses: ./.github/workflows/_run_tests.yml
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
install-script: "loose_pip_install.sh"
12 changes: 0 additions & 12 deletions .github/workflows/github_action_test_dummy.yml

This file was deleted.

68 changes: 21 additions & 47 deletions .github/workflows/pip_installation.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,38 @@
# Perform pip installation and run all tests

# For feature branches, we don't test the full matrix (os x [stable, loose]) in order to save time & resources.
# On each push to develop, the whole test matrix runs, additionally, its success is mandatory for merging to main.
# In the (assumed to be rare case) that these full matrix tests fail but the reduced matrix tests passed,
# we will learn about it latest before pushing to main. The merge that caused the issue can then be identified
# from the tests that ran on develop.
on:
push:
branches: [ main ]
pull_request:
branches: [ main, development ]
pull_request:
branches: [ main ]
workflow_dispatch:

name: Default installation and tests
name: Pip installation and tests

jobs:
stable_installation:
name: Test stable pip installation on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Test pip installation with all stable dependencies
shell: bash -l {0}
run: |
cd misc
. ./stable_pip_install.sh
- name: Unittests
shell: bash -l {0}
run: |
conda activate alphabase
nbdev_test
conda deactivate
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
install-script: "stable_pip_install.sh"

loose_installation:
name: Test loose pip installation on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest, macos-latest-xlarge]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Test pip installation with all loose dependencies
shell: bash -l {0}
run: |
cd misc
. ./loose_pip_install.sh
- name: Unittests
shell: bash -l {0}
run: |
conda activate alphabase
nbdev_test
conda deactivate
uses: ./.github/workflows/_run_tests.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
install-script: "loose_pip_install.sh"
80 changes: 80 additions & 0 deletions .github/workflows/publish_and_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
on:
# push:
# branches: [ main ]
workflow_dispatch:


name: Publish on PyPi and release on GitHub

jobs:
Version_Bumped:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.master_version_bumped.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Master version bumped
id: master_version_bumped
shell: bash -l {0}
run: |
cd misc
. ./check_version.sh
echo "version=${current_version}" >> $GITHUB_OUTPUT
Create_PyPi_Release:
runs-on: ubuntu-latest
needs: Version_Bumped
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Prepare distribution
shell: bash -l {0}
run: |
cd release/pypi
. ./prepare_pypi_wheel.sh
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_ALPHABASE_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Test PyPI test release
shell: bash -l {0}
run: |
cd release/pypi
. ./install_test_pypi_wheel.sh
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_ALPHABASE_API_TOKEN }}
Test_PyPi_Release:
name: Test_PyPi_version_on_${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: Create_PyPi_Release
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Test pip installation from PyPi
shell: bash -l {0}
run: |
cd release/pypi
. ./install_pypi_wheel.sh
Loading

0 comments on commit 00ba37b

Please sign in to comment.