ropt-eo 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ name: Build documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ schedule:
10
+ - cron: '43 1 * * 1'
11
+
12
+ jobs:
13
+ build-docs:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.12"]
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v6
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ enable-cache: true
29
+ cache-dependency-glob: "**/pyproject.toml"
30
+ - name: Install ropt
31
+ run: |
32
+ uv sync --all-extras --dev
33
+ uv pip install git+https://github.com/TNO-ropt/ropt
34
+ - name: Build docs
35
+ if: always()
36
+ run: uv run mkdocs build --strict
37
+ - name: Deploy docs
38
+ if: github.event_name == 'push'
39
+ run: |
40
+ git config --global user.name "${{ github.actor }}"
41
+ git config --global user.email "${{ github.actor }}@users.noreply.github.com"
42
+ git fetch origin gh-pages --depth=1
43
+ uv run mike deploy --push dev
@@ -0,0 +1,63 @@
1
+ name: Release to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v0.[0-9]+.[0-9]+'
7
+
8
+ jobs:
9
+ deployment:
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: deploy-to-pypi
13
+ url: https://pypi.org/project/ropt-eo/
14
+ permissions:
15
+ id-token: write
16
+ steps:
17
+ - uses: actions/checkout@v6
18
+ with:
19
+ ref: ${{ github.ref_name}}
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v6
22
+ with:
23
+ python-version: "3.12"
24
+ - name: Install uv
25
+ uses: astral-sh/setup-uv@v7
26
+ with:
27
+ enable-cache: true
28
+ cache-dependency-glob: "**/pyproject.toml"
29
+ - name: Build and deploy
30
+ run: uv build
31
+ - name: Publish package
32
+ uses: pypa/gh-action-pypi-publish@release/v1
33
+
34
+ deploy-docs:
35
+ runs-on: ubuntu-latest
36
+ steps:
37
+ - uses: actions/checkout@v6
38
+ with:
39
+ ref: ${{ github.ref_name}}
40
+ - name: Set up Python
41
+ uses: actions/setup-python@v6
42
+ with:
43
+ python-version: "3.12"
44
+ - name: Install uv
45
+ uses: astral-sh/setup-uv@v7
46
+ with:
47
+ enable-cache: true
48
+ cache-dependency-glob: "**/pyproject.toml"
49
+ - name: Initialize deployment
50
+ id: docs
51
+ run: |
52
+ uv sync --all-extras --dev
53
+ echo "MAJOR=$(uv run python -c 'from ropt_eo import version; print(version.version_tuple[0])')" >> $GITHUB_OUTPUT
54
+ echo "MINOR=$(uv run python -c 'from ropt_eo import version; print(version.version_tuple[1])')" >> $GITHUB_OUTPUT
55
+ - name: Deploy
56
+ env:
57
+ MAJOR: ${{ steps.docs.outputs.MAJOR }}
58
+ MINOR: ${{ steps.docs.outputs.MINOR }}
59
+ run: |
60
+ git config --global user.name "${{ github.actor }}"
61
+ git config --global user.email "${{ github.actor }}@users.noreply.github.com"
62
+ git fetch origin gh-pages --depth=1
63
+ uv run mike deploy $MAJOR.$MINOR latest --update-aliases --push
@@ -0,0 +1,43 @@
1
+ name: Run static checks
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ schedule:
10
+ - cron: '43 1 * * 1'
11
+
12
+ jobs:
13
+ static-checks:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.12"]
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v6
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ enable-cache: true
29
+ cache-dependency-glob: "**/pyproject.toml"
30
+ - name: Install ropt-eo
31
+ run: |
32
+ uv sync --all-extras --dev
33
+ uv pip install git+https://github.com/TNO-ropt/ropt
34
+ - name: Run ruff format
35
+ if: always()
36
+ run: uv run ruff format --check src/ropt_eo tests
37
+ - name: Run ruff check
38
+ if: always()
39
+ run: uv run ruff check src/ropt_eo tests
40
+ - name: Run mypy
41
+ if: always()
42
+ continue-on-error: true
43
+ run: uv run mypy src/ropt_eo tests
@@ -0,0 +1,35 @@
1
+ name: Run tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+ schedule:
10
+ - cron: '43 1 * * 1'
11
+
12
+ jobs:
13
+ run-tests:
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python-version: ["3.11", "3.12", "3.13"]
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v6
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ enable-cache: true
29
+ cache-dependency-glob: "**/pyproject.toml"
30
+ - name: Install ropt
31
+ run: |
32
+ uv sync --all-extras --dev
33
+ uv pip install git+https://github.com/TNO-ropt/ropt
34
+ - name: Run pytest
35
+ run: uv run pytest tests --run-external
@@ -0,0 +1,5 @@
1
+ **/__pycache__/**
2
+ src/**egg-info/**
3
+ src/ropt_eo/version.py
4
+ uv.lock
5
+