Skip to content

Commit d95ab4f

Browse files
author
Christopher Doris
committed
Merge branch 'v1' into pr/JamesWrigley/698
2 parents 7cc0f45 + 59a16f9 commit d95ab4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+4599
-1092
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
schedule:
11+
interval: weekly
12+
- package-ecosystem: pip
13+
directory: /
14+
schedule:
15+
interval: weekly

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
run: which julia
1616
continue-on-error: true
1717
- name: Install Julia, but only if it is not already available in the PATH
18-
uses: julia-actions/setup-julia@v1
18+
uses: julia-actions/setup-julia@v2
1919
with:
2020
version: '1'
2121
arch: ${{ runner.arch }}

.github/workflows/benchmark_pr.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Benchmark PR
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
bench:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: MilesCranmer/AirspeedVelocity.jl@action-v1
10+
with:
11+
julia-version: "1"
12+
tune: "true"
13+
# Post to "summary" tab of workflow run:
14+
job-summary: "true"
15+
# Run benchmark using PR's version of the script:
16+
bench-on: ${{ github.event.pull_request.head.sha }}

.github/workflows/docs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ jobs:
1717
name: Documentation
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v2
21-
- uses: julia-actions/setup-julia@v1
20+
- uses: actions/checkout@v5
21+
- uses: julia-actions/setup-julia@v2
2222
with:
2323
version: '1'
2424
- run: |
2525
julia --project=docs -e '
2626
using Pkg
27-
Pkg.develop(PackageSpec(path=pwd()))
2827
Pkg.instantiate()'
2928
- run: |
3029
julia --project=docs -e '

.github/workflows/docscleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout gh-pages branch
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v5
1313
with:
1414
ref: gh-pages
1515

.github/workflows/register-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
register:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v5
1515
with:
1616
ref: ${{ inputs.git_ref }}
1717
- name: Set up Python
18-
uses: actions/setup-python@v3
18+
uses: actions/setup-python@v6
1919
with:
2020
python-version: "3.10"
2121
- name: Install build

.github/workflows/tests-nightly.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
tests:
13-
name: Test (${{ matrix.os }}-${{ matrix.arch }}, julia ${{ matrix.jlversion }})
13+
name: Test Julia (${{ matrix.jlversion }}, ${{ matrix.os }}-${{ matrix.arch }})
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
@@ -19,12 +19,12 @@ jobs:
1919
os: [ubuntu-latest, windows-latest, macos-latest]
2020
jlversion: ['~1.9.0-0', 'nightly']
2121
steps:
22-
- uses: actions/checkout@v2
23-
- uses: julia-actions/setup-julia@v1
22+
- uses: actions/checkout@v5
23+
- uses: julia-actions/setup-julia@v2
2424
with:
2525
version: ${{ inputs.jl_version }}
2626
arch: ${{ matrix.arch }}
27-
- uses: actions/cache@v1
27+
- uses: actions/cache@v4
2828
env:
2929
cache-name: cache-artifacts
3030
with:
@@ -40,6 +40,6 @@ jobs:
4040
JULIA_DEBUG: PythonCall
4141
JULIA_NUM_THREADS: '2'
4242
- uses: julia-actions/julia-processcoverage@v1
43-
- uses: codecov/codecov-action@v1
43+
- uses: codecov/codecov-action@v5
4444
with:
4545
file: lcov.info

.github/workflows/tests.yml

Lines changed: 82 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,86 +8,135 @@ on:
88
push:
99
branches:
1010
- main
11-
- v1
1211
tags:
1312
- '*'
1413

1514
jobs:
1615
julia:
17-
name: Test (${{ matrix.os }}, julia ${{ matrix.jlversion }})
16+
name: Test Julia (${{ matrix.jlversion }}, ${{ matrix.os }}, ${{ matrix.pythonexe }})
1817
runs-on: ${{ matrix.os }}
1918
strategy:
20-
fail-fast: true
19+
fail-fast: false
2120
matrix:
2221
arch: [x64] # x86 unsupported by MicroMamba
2322
os: [ubuntu-latest, windows-latest, macos-latest]
24-
jlversion: ['1','1.6']
23+
jlversion: ['1','1.10']
24+
pythonexe: ['@CondaPkg']
25+
include:
26+
- arch: x64
27+
os: ubuntu-latest
28+
jlversion: '1'
29+
pythonexe: python
30+
2531
steps:
26-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v5
33+
2734
- name: Set up Julia ${{ matrix.jlversion }}
28-
uses: julia-actions/setup-julia@v1
35+
uses: julia-actions/setup-julia@v2
2936
with:
3037
version: ${{ matrix.jlversion }}
3138
arch: ${{ matrix.arch }}
32-
- uses: actions/cache@v1
33-
env:
34-
cache-name: cache-artifacts
35-
with:
36-
path: ~/.julia/artifacts
37-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
38-
restore-keys: |
39-
${{ runner.os }}-test-${{ env.cache-name }}-
40-
${{ runner.os }}-test-
41-
${{ runner.os }}-
39+
40+
- uses: julia-actions/cache@v2
41+
4242
- name: Build package
4343
uses: julia-actions/julia-buildpkg@v1
44+
env:
45+
PYTHON: python
46+
4447
- name: Run tests
4548
uses: julia-actions/julia-runtest@v1
4649
env:
4750
JULIA_DEBUG: PythonCall
4851
JULIA_NUM_THREADS: '2'
52+
PYTHON: python
53+
JULIA_PYTHONCALL_EXE: ${{ matrix.pythonexe }}
54+
4955
- name: Process coverage
5056
uses: julia-actions/julia-processcoverage@v1
57+
5158
- name: Upload coverage to Codecov
52-
uses: codecov/codecov-action@v2
59+
uses: codecov/codecov-action@v5
5360
env:
5461
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
62+
5563
python:
56-
name: Test (${{ matrix.os }}, python ${{ matrix.pyversion }})
64+
name: Test Python (${{ matrix.pyversion }}, ${{ matrix.os }}, ${{ matrix.juliaexe }})
5765
runs-on: ${{ matrix.os }}
5866
strategy:
59-
fail-fast: true
67+
fail-fast: false
6068
matrix:
6169
os: [ubuntu-latest, windows-latest, macos-latest]
62-
pyversion: ["3.x", "3.8"]
70+
pyversion: ["3", "3.10"]
71+
juliaexe: ["@JuliaPkg"]
72+
include:
73+
- os: ubuntu-latest
74+
pyversion: 3
75+
juliaexe: julia
76+
env:
77+
MANUAL_TEST_PROJECT: /tmp/juliacall-test-project
78+
PYTHON_JULIACALL_THREADS: '2'
79+
PYTHON_JULIACALL_HANDLE_SIGNALS: 'yes'
80+
6381
steps:
64-
- uses: actions/checkout@v3
82+
- uses: actions/checkout@v5
83+
6584
- name: Set up Python ${{ matrix.pyversion }}
66-
uses: actions/setup-python@v4
85+
uses: actions/setup-python@v6
6786
with:
6887
python-version: ${{ matrix.pyversion }}
88+
89+
- name: Check Python OpenSSL version (see setup_julia)
90+
shell: python
91+
run: |
92+
import ssl
93+
assert ssl.OPENSSL_VERSION_INFO < (3, 5)
94+
95+
- name: Set up uv
96+
uses: astral-sh/setup-uv@v7
97+
with:
98+
python-version: ${{ matrix.pyversion }}
99+
69100
- name: Set up Julia
70-
uses: julia-actions/setup-julia@v1
101+
id: setup_julia
102+
uses: julia-actions/setup-julia@v2
71103
with:
72-
version: '1'
104+
# Python in the GitHub runners ships with OpenSSL 3.0. Julia 1.12 requires
105+
# OpenSSL 3.5. Therefore juliapkg requires Julia 1.11 or lower.
106+
version: '1.11'
107+
108+
- name: Set up test Julia project
109+
if: ${{ matrix.juliaexe == 'julia' }}
110+
run: |
111+
mkdir ${{ env.MANUAL_TEST_PROJECT }}
112+
julia --project=${{ env.MANUAL_TEST_PROJECT }} -e 'import Pkg; Pkg.develop(path="."); Pkg.instantiate()'
113+
73114
- name: Install dependencies
74115
run: |
75-
python -m pip install --upgrade pip
76-
pip install flake8 pytest pytest-cov nbval numpy
77116
cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json
78-
pip install -e .
117+
uv sync --dev
118+
79119
- name: Lint with flake8
80120
run: |
81121
# stop the build if there are Python syntax errors or undefined names
82-
flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
122+
uv run flake8 ./pysrc ./pytest --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
83123
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
84-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
85-
- name: Run tests
124+
uv run flake8 ./pysrc ./pytest --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
125+
126+
- name: Run tests (with JuliaPkg)
127+
if: ${{ matrix.juliaexe == '@JuliaPkg' }}
86128
run: |
87-
pytest -s --nbval --cov=pysrc ./pytest/
129+
uv run pytest -s --nbval --cov=pysrc ./pytest/
130+
131+
- name: Run tests (without JuliaPkg)
132+
if: ${{ matrix.juliaexe == 'julia' }}
133+
run: |
134+
uv run pytest -s --nbval --cov=pysrc ./pytest/
88135
env:
89-
PYTHON_JULIACALL_THREADS: '2'
136+
PYTHON_JULIACALL_EXE: "${{ steps.setup_julia.outputs.julia-bindir }}/julia"
137+
PYTHON_JULIACALL_PROJECT: ${{ env.MANUAL_TEST_PROJECT }}
138+
90139
- name: Upload coverage to Codecov
91-
uses: codecov/codecov-action@v2
140+
uses: codecov/codecov-action@v5
92141
env:
93142
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build/
66
dist/
77
.CondaPkg/
88
/jltest.*
9+
uv.lock

CondaPkg.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
[deps.libstdcxx-ng]
2-
version = "<=julia"
31

42
[deps.openssl]
53
version = "<=julia"
64

5+
[deps.libstdcxx]
6+
version = "<=julia"
7+
8+
[deps.libstdcxx-ng]
9+
version = "<=julia"
10+
711
[deps.python]
812
build = "**cpython**"
9-
version = ">=3.8,<4"
13+
version = ">=3.10,<4"
14+
15+
[dev.deps]
16+
matplotlib = ""
17+
pyside6 = ""

0 commit comments

Comments
 (0)