Skip to content

Commit c995cb5

Browse files
author
Christopher Doris
committed
Merge remote-tracking branch 'origin/main' into v1
2 parents 4fa1228 + 71666ca commit c995cb5

Some content is hidden

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

99 files changed

+4105
-1010
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: 73 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,80 +14,122 @@ on:
1414

1515
jobs:
1616
julia:
17-
name: Test (${{ matrix.os }}, julia ${{ matrix.jlversion }})
17+
name: Test Julia (${{ matrix.jlversion }}, ${{ matrix.os }}, ${{ matrix.pythonexe }})
1818
runs-on: ${{ matrix.os }}
1919
strategy:
20-
fail-fast: true
20+
fail-fast: false
2121
matrix:
2222
arch: [x64] # x86 unsupported by MicroMamba
2323
os: [ubuntu-latest, windows-latest, macos-latest]
24-
jlversion: ['1','1.6']
24+
jlversion: ['1','1.9']
25+
pythonexe: ['@CondaPkg']
26+
include:
27+
- arch: x64
28+
os: ubuntu-latest
29+
jlversion: '1'
30+
pythonexe: python
31+
2532
steps:
26-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v5
34+
2735
- name: Set up Julia ${{ matrix.jlversion }}
28-
uses: julia-actions/setup-julia@v1
36+
uses: julia-actions/setup-julia@v2
2937
with:
3038
version: ${{ matrix.jlversion }}
3139
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 }}-
40+
41+
- uses: julia-actions/cache@v2
42+
4243
- name: Build package
4344
uses: julia-actions/julia-buildpkg@v1
45+
env:
46+
PYTHON: python
47+
4448
- name: Run tests
4549
uses: julia-actions/julia-runtest@v1
4650
env:
4751
JULIA_DEBUG: PythonCall
4852
JULIA_NUM_THREADS: '2'
53+
PYTHON: python
54+
JULIA_PYTHONCALL_EXE: ${{ matrix.pythonexe }}
55+
4956
- name: Process coverage
5057
uses: julia-actions/julia-processcoverage@v1
58+
5159
- name: Upload coverage to Codecov
52-
uses: codecov/codecov-action@v2
60+
uses: codecov/codecov-action@v5
5361
env:
5462
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
63+
5564
python:
56-
name: Test (${{ matrix.os }}, python ${{ matrix.pyversion }})
65+
name: Test Python (${{ matrix.pyversion }}, ${{ matrix.os }}, ${{ matrix.juliaexe }})
5766
runs-on: ${{ matrix.os }}
5867
strategy:
59-
fail-fast: true
68+
fail-fast: false
6069
matrix:
6170
os: [ubuntu-latest, windows-latest, macos-latest]
62-
pyversion: ["3.x", "3.8"]
71+
pyversion: ["3", "3.9"]
72+
juliaexe: ["@JuliaPkg"]
73+
include:
74+
- os: ubuntu-latest
75+
pyversion: 3
76+
juliaexe: julia
77+
env:
78+
MANUAL_TEST_PROJECT: /tmp/juliacall-test-project
79+
PYTHON_JULIACALL_THREADS: '2'
80+
PYTHON_JULIACALL_HANDLE_SIGNALS: 'yes'
81+
6382
steps:
64-
- uses: actions/checkout@v3
83+
- uses: actions/checkout@v5
84+
6585
- name: Set up Python ${{ matrix.pyversion }}
66-
uses: actions/setup-python@v4
86+
uses: actions/setup-python@v6
6787
with:
6888
python-version: ${{ matrix.pyversion }}
89+
90+
- name: Set up uv
91+
uses: astral-sh/setup-uv@v6
92+
with:
93+
python-version: ${{ matrix.pyversion }}
94+
6995
- name: Set up Julia
70-
uses: julia-actions/setup-julia@v1
96+
id: setup_julia
97+
uses: julia-actions/setup-julia@v2
7198
with:
7299
version: '1'
100+
101+
- name: Set up test Julia project
102+
if: ${{ matrix.juliaexe == 'julia' }}
103+
run: |
104+
mkdir ${{ env.MANUAL_TEST_PROJECT }}
105+
julia --project=${{ env.MANUAL_TEST_PROJECT }} -e 'import Pkg; Pkg.develop(path="."); Pkg.instantiate()'
106+
73107
- name: Install dependencies
74108
run: |
75-
python -m pip install --upgrade pip
76-
pip install flake8 pytest pytest-cov nbval numpy
77109
cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json
78-
pip install -e .
110+
uv sync --dev
111+
79112
- name: Lint with flake8
80113
run: |
81114
# 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
115+
uv run flake8 ./pysrc ./pytest --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
83116
# 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
117+
uv run flake8 ./pysrc ./pytest --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
118+
119+
- name: Run tests (with JuliaPkg)
120+
if: ${{ matrix.juliaexe == '@JuliaPkg' }}
86121
run: |
87-
pytest -s --nbval --cov=pysrc ./pytest/
122+
uv run pytest -s --nbval --cov=pysrc ./pytest/
123+
124+
- name: Run tests (without JuliaPkg)
125+
if: ${{ matrix.juliaexe == 'julia' }}
126+
run: |
127+
uv run pytest -s --nbval --cov=pysrc ./pytest/
88128
env:
89-
PYTHON_JULIACALL_THREADS: '2'
129+
PYTHON_JULIACALL_EXE: "${{ steps.setup_julia.outputs.julia-bindir }}/julia"
130+
PYTHON_JULIACALL_PROJECT: ${{ env.MANUAL_TEST_PROJECT }}
131+
90132
- name: Upload coverage to Codecov
91-
uses: codecov/codecov-action@v2
133+
uses: codecov/codecov-action@v5
92134
env:
93135
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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[deps.libstdcxx]
2+
version = "<=julia"
3+
14
[deps.libstdcxx-ng]
25
version = "<=julia"
36

@@ -6,4 +9,4 @@ version = "<=julia"
69

710
[deps.python]
811
build = "**cpython**"
9-
version = ">=3.8,<4"
12+
version = ">=3.9,<4"

0 commit comments

Comments
 (0)