fem2geo 0.0.2__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,98 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches: [ main ]
9
+
10
+ jobs:
11
+ build-test:
12
+ if: github.repository == 'pabloitu/fem2geo'
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ include:
18
+ - os: ubuntu-latest
19
+ python-version: '3.10'
20
+ - os: ubuntu-latest
21
+ python-version: '3.11'
22
+ - os: ubuntu-latest
23
+ python-version: '3.12'
24
+ - os: macos-latest
25
+ python-version: '3.11'
26
+
27
+ defaults:
28
+ run:
29
+ shell: bash -l {0}
30
+
31
+ steps:
32
+ - uses: actions/checkout@v4.2.2
33
+ - uses: mamba-org/setup-micromamba@v1
34
+ with:
35
+ generate-run-shell: true
36
+ environment-file: environment.yml
37
+ create-args: >-
38
+ python=${{ matrix.python-version }}
39
+
40
+ - name: Install fem2geo
41
+ run: |
42
+ pip install -e .[dev]
43
+ python -c "from importlib.metadata import version; print(version('fem2geo'))"
44
+
45
+ - name: Free disk
46
+ run: |
47
+ micromamba clean --all --yes
48
+ rm -rf "$MAMBA_ROOT_PREFIX/pkgs" || true
49
+ df -h
50
+
51
+ - name: Test with pytest
52
+ run: |
53
+ pytest --durations=0
54
+
55
+ - name: Upload coverage
56
+ if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
57
+ uses: codecov/codecov-action@v3
58
+ with:
59
+ token: ${{ secrets.CODECOV_TOKEN }}
60
+ fail_ci_if_error: false
61
+
62
+ pip_smoke_linux:
63
+ if: github.repository == 'pabloitu/fem2geo'
64
+ runs-on: ubuntu-latest
65
+ steps:
66
+ - uses: actions/checkout@v4.2.2
67
+
68
+ - name: Set up Python
69
+ uses: actions/setup-python@v5
70
+ with:
71
+ python-version: "3.11"
72
+ cache: pip
73
+
74
+ - name: Pip-only install (no tests)
75
+ run: |
76
+ python -m pip install --upgrade pip
77
+ python -m pip install -e ".[dev]"
78
+ python -c "from importlib.metadata import version; print(version('fem2geo'))"
79
+
80
+ pip_smoke_macos:
81
+ if: github.repository == 'pabloitu/fem2geo'
82
+ runs-on: macos-latest
83
+ steps:
84
+ - uses: actions/checkout@v4.2.2
85
+
86
+ - name: Set up Python
87
+ uses: actions/setup-python@v5
88
+ with:
89
+ python-version: "3.11"
90
+ cache: pip
91
+
92
+ - name: Pip-only install (no tests)
93
+ env:
94
+ DYLD_FALLBACK_LIBRARY_PATH: /opt/homebrew/lib:/usr/local/lib:${{ env.DYLD_FALLBACK_LIBRARY_PATH }}
95
+ run: |
96
+ python -m pip install --upgrade pip
97
+ python -m pip install -e ".[dev]"
98
+ python -c "from importlib.metadata import version; print(version('fem2geo'))"
@@ -0,0 +1,43 @@
1
+ name: Build and upload to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags: [ 'v*' ]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build and upload sdist
10
+ runs-on: ubuntu-latest
11
+
12
+ permissions:
13
+ id-token: write
14
+ contents: read
15
+
16
+ defaults:
17
+ run:
18
+ shell: bash -l {0}
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4.2.2
22
+ - uses: mamba-org/setup-micromamba@v1
23
+ with:
24
+ generate-run-shell: true
25
+ environment-file: environment.yml
26
+ create-args: >-
27
+ python=3.11
28
+
29
+ - name: Install py-build and setuptools-scm
30
+ run: |
31
+ micromamba run -n fem2geo pip install --upgrade build setuptools-scm
32
+
33
+ - name: Build
34
+ run: |
35
+ micromamba run -n fem2geo python3 -m build --sdist --wheel --outdir dist/
36
+
37
+ - name: Check distribution files
38
+ run: |
39
+ micromamba run -n fem2geo pip install twine
40
+ micromamba run -n fem2geo twine check dist/*
41
+
42
+ - name: Publish Package
43
+ uses: pypa/gh-action-pypi-publish@v1.12.4
@@ -0,0 +1,36 @@
1
+ name: Release Tutorials
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ upload-tutorials:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write
12
+
13
+ steps:
14
+ - name: Check out the code
15
+ uses: actions/checkout@v4.2.2
16
+
17
+ - name: Ensure tutorials folder exists
18
+ run: |
19
+ test -d tutorials || (echo "tutorials/ folder not found" && exit 1)
20
+
21
+ - name: Create tutorials zip (no nested tutorials/ folder)
22
+ run: |
23
+ TAG="${{ github.event.release.tag_name }}"
24
+ ZIP="fem2geo-tutorials-${TAG}.zip"
25
+
26
+ cd tutorials
27
+ zip -r "../$ZIP" .
28
+
29
+ - name: Upload tutorials zip to the release
30
+ uses: softprops/action-gh-release@v2.2.2
31
+ with:
32
+ files: |
33
+ ${{ env.ZIP_NAME }}
34
+ ${{ env.ZIP_NAME }}.sha256
35
+ env:
36
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}