Skip to content

Commit c63ab23

Browse files
authored
Merge branch 'cjdoris:main' into main
2 parents 093bdcb + e374e25 commit c63ab23

Some content is hidden

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

114 files changed

+4891
-1416
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Affects:** PythonCall / JuliaCall / Both [delete as appropriate]
11+
12+
**Describe the bug**
13+
A clear and concise description of what the bug is. What did you expect? What happened instead?
14+
15+
Please include the steps required to reproduce the bug. This should include not just code but **all** the steps required to reproduce the bug
16+
17+
**Your system**
18+
Please provide detailed information about your system:
19+
- The operating system
20+
- The version of Julia, Python, PythonCall, JuliaCall and any other affected packages
21+
- If an issue with PythonCall, the output of `Base.versioninfo()`, `Pkg.status()` and `CondaPkg.status()`.
22+
- If an issue with JuliaCall, the output of `pip list` or `conda list` and `juliapkg.status()`.
23+
24+
**Additional context**
25+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context about the feature request here.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Help & support
3+
about: Any other questions
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
Please direct any other questions to [github discussions](https://github.com/cjdoris/PythonCall.jl/discussions).

.github/workflows/CompatHelper.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,35 @@ on:
33
schedule:
44
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
912
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v1
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
1029
- name: "Install CompatHelper"
1130
run: |
1231
import Pkg
1332
name = "CompatHelper"
1433
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
15-
version = "2"
34+
version = "3"
1635
Pkg.add(; name, uuid, version)
1736
shell: julia --color=yes {0}
1837
- name: "Run CompatHelper"
@@ -23,3 +42,4 @@ jobs:
2342
env:
2443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2544
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ name: Docs
22

33
on:
44
push:
5-
branches: [main]
6-
tags: '*'
5+
branches:
6+
- main
7+
tags:
8+
- '*'
79

810
jobs:
911
docs:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Register to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
register:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: Set up Python
12+
uses: actions/setup-python@v3
13+
with:
14+
python-version: "3.10"
15+
- name: Install build
16+
run: >-
17+
python -m
18+
pip install
19+
build
20+
--user
21+
- name: Build distribution
22+
run: >-
23+
python -m
24+
build
25+
--sdist
26+
--wheel
27+
--outdir dist/
28+
.
29+
- name: Publish to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Tests (nightly)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
tags:
11+
- '*'
12+
13+
jobs:
14+
tests:
15+
name: Test (${{ matrix.os }}-${{ matrix.arch }}, julia ${{ matrix.jlversion }})
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
arch: [x64] # x86 unsupported by MicroMamba
21+
os: [ubuntu-latest, windows-latest, macos-latest]
22+
jlversion: ['~1.9.0-0', 'nightly']
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: julia-actions/setup-julia@v1
26+
with:
27+
version: ${{ matrix.jlversion }}
28+
arch: ${{ matrix.arch }}
29+
- uses: actions/cache@v1
30+
env:
31+
cache-name: cache-artifacts
32+
with:
33+
path: ~/.julia/artifacts
34+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
35+
restore-keys: |
36+
${{ runner.os }}-test-${{ env.cache-name }}-
37+
${{ runner.os }}-test-
38+
${{ runner.os }}-
39+
- uses: julia-actions/julia-buildpkg@v1
40+
- uses: julia-actions/julia-runtest@v1
41+
env:
42+
JULIA_DEBUG: PythonCall
43+
- uses: julia-actions/julia-processcoverage@v1
44+
- uses: codecov/codecov-action@v1
45+
with:
46+
file: lcov.info

.github/workflows/tests.yml

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@ name: Tests
22

33
on:
44
pull_request:
5-
branches: [main]
5+
branches:
6+
- main
67
push:
7-
branches: [main]
8-
tags: '*'
8+
branches:
9+
- main
10+
tags:
11+
- '*'
912

1013
jobs:
11-
tests:
12-
name: Test (${{ matrix.os }}-${{ matrix.arch }}, julia ${{ matrix.jlversion }})
14+
julia:
15+
name: Test (${{ matrix.os }}, julia ${{ matrix.jlversion }})
1316
runs-on: ${{ matrix.os }}
1417
strategy:
1518
fail-fast: false
@@ -19,7 +22,8 @@ jobs:
1922
jlversion: ['1','1.6']
2023
steps:
2124
- uses: actions/checkout@v2
22-
- uses: julia-actions/setup-julia@v1
25+
- name: Set up Julia ${{ matrix.jlversion }}
26+
uses: julia-actions/setup-julia@v1
2327
with:
2428
version: ${{ matrix.jlversion }}
2529
arch: ${{ matrix.arch }}
@@ -33,11 +37,43 @@ jobs:
3337
${{ runner.os }}-test-${{ env.cache-name }}-
3438
${{ runner.os }}-test-
3539
${{ runner.os }}-
36-
- uses: julia-actions/julia-buildpkg@v1
37-
- uses: julia-actions/julia-runtest@v1
40+
- name: Build package
41+
uses: julia-actions/julia-buildpkg@v1
42+
- name: Run tests
43+
uses: julia-actions/julia-runtest@v1
3844
env:
3945
JULIA_DEBUG: PythonCall
40-
- uses: julia-actions/julia-processcoverage@v1
41-
- uses: codecov/codecov-action@v1
46+
- name: Process coverage
47+
uses: julia-actions/julia-processcoverage@v1
48+
- name: Upload coverage to Codecov
49+
uses: codecov/codecov-action@v2
50+
python:
51+
name: Test (${{ matrix.os }}, python ${{ matrix.pyversion }})
52+
runs-on: ${{ matrix.os }}
53+
strategy:
54+
matrix:
55+
os: [ubuntu-latest, windows-latest, macos-latest]
56+
pyversion: ["3.7", "3.10"]
57+
steps:
58+
- uses: actions/checkout@v3
59+
- name: Set up Python ${{ matrix.pyversion }}
60+
uses: actions/setup-python@v4
4261
with:
43-
file: lcov.info
62+
python-version: ${{ matrix.pyversion }}
63+
- name: Install dependencies
64+
run: |
65+
python -m pip install --upgrade pip
66+
pip install flake8 pytest pytest-cov
67+
cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json
68+
pip install -e .
69+
- name: Lint with flake8
70+
run: |
71+
# stop the build if there are Python syntax errors or undefined names
72+
flake8 . --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics
73+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
74+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
75+
- name: Run tests
76+
run: |
77+
pytest -s --cov=pysrc
78+
- name: Upload coverage to Codecov
79+
uses: codecov/codecov-action@v2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ __pycache__
55
build/
66
dist/
77
.CondaPkg/
8+
/jltest.*

0 commit comments

Comments
 (0)