Skip to content

Commit

Permalink
ci: added ruff linting in release-please.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rabii-chaarani committed May 17, 2024
1 parent a9843f2 commit d16e0dc
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 42 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ on:
push:
name: release-please
jobs:
# linting:
# name: Linting
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install black ruff
# - name: Autoformat with black
# run: |
# black .
# - name: Lint with ruff
# run: |
# ruff check FoldOptLib --fix
# - uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: "style: style fixes by ruff and autoformatting by black"
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
- name: Autoformat with black
run: |
black .
- name: Lint with ruff
run: |
ruff check FoldOptLib --fix
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: style fixes by ruff and autoformatting by black"

continuous-integration:
name: Continuous integration ${{ matrix.os }} python ${{ matrix.python-version }}
Expand All @@ -28,7 +28,7 @@ jobs:
fail-fast: false
matrix:
os: ${{ fromJSON(vars.BUILD_OS)}}
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
Expand All @@ -43,10 +43,10 @@ jobs:
shell: bash -l {0}
run: |
pip install . --user
# - name: pytest
# shell: bash -l {0}
# run: |
# pytest
- name: pytest
shell: bash -l {0}
run: |
pytest
release-please:
runs-on: ubuntu-latest
Expand All @@ -70,7 +70,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: conda-incubator/setup-miniconda@v3
with:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/download-artifact@v4
Expand All @@ -136,6 +136,7 @@ jobs:
run: |
conda install -c anaconda anaconda-client -y
anaconda upload --label main conda/*/*.tar.bz2
upload_to_pypi:
needs: ["release-please", "conda-deploy"]
runs-on: "ubuntu-latest"
Expand Down
36 changes: 19 additions & 17 deletions FoldOptLib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# from .fold_modelling import FoldModel, BaseFoldFrameBuilder
from .datatypes import (
KnowledgeType,
OptimisationType,
ObjectiveType,
DataType,
from version import __version__
from FoldOptLib.datatypes import (
KnowledgeType,
OptimisationType,
ObjectiveType,
DataType,
NormalDistribution,
VonMisesFisherDistribution,
InputGeologicalKnowledge
)
from .utils import utils
from .input import CheckInputData, InputDataProcessor
from .objective_functions import (
GeologicalKnowledgeFunctions,
VonMisesFisher,
InputGeologicalKnowledge,
)
from FoldOptLib.utils import utils
from FoldOptLib.input import CheckInputData, InputDataProcessor
from FoldOptLib.objective_functions import (
GeologicalKnowledgeFunctions,
VonMisesFisher,
LeastSquaresFunctions,
ObjectiveFunction
)
from .optimisers import FourierSeriesOptimiser, AxialSurfaceOptimiser
from .splot import SPlotProcessor
ObjectiveFunction,
)
from FoldOptLib.optimisers import FourierSeriesOptimiser, AxialSurfaceOptimiser
from FoldOptLib.splot import SPlotProcessor

__all__ = [FourierSeriesOptimiser, AxialSurfaceOptimiser]

0 comments on commit d16e0dc

Please sign in to comment.