Skip to content

Commit 37a3c85

Browse files
author
Christopher Doris
committed
Merge remote-tracking branch 'origin/main' into v1
2 parents eda0cc6 + 379f16c commit 37a3c85

Some content is hidden

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

84 files changed

+3130
-1770
lines changed

.JuliaFormatter.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ignore = [
2+
"examples",
3+
".git",
4+
".CondaPkg",
5+
".ipynb_checkpoints",
6+
".pytest_cache",
7+
".venv",
8+
]

.github/workflows/tagbot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ on:
44
types:
55
- created
66
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: "3"
10+
permissions:
11+
actions: read
12+
checks: read
13+
contents: write
14+
deployments: read
15+
issues: read
16+
discussions: read
17+
packages: read
18+
pages: read
19+
pull-requests: read
20+
repository-projects: read
21+
security-events: read
22+
statuses: read
723
jobs:
824
TagBot:
925
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
@@ -12,4 +28,6 @@ jobs:
1228
- uses: JuliaRegistries/TagBot@v1
1329
with:
1430
token: ${{ secrets.GITHUB_TOKEN }}
31+
# Edit the following line to reflect the actual name of the GitHub Secret containing your private key
1532
ssh: ${{ secrets.DOCUMENTER_KEY }}
33+
# ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }}

.github/workflows/tests-nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
- uses: julia-actions/julia-runtest@v1
3939
env:
4040
JULIA_DEBUG: PythonCall
41+
JULIA_NUM_THREADS: '2'
4142
- uses: julia-actions/julia-processcoverage@v1
4243
- uses: codecov/codecov-action@v1
4344
with:

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
uses: julia-actions/julia-runtest@v1
4646
env:
4747
JULIA_DEBUG: PythonCall
48+
JULIA_NUM_THREADS: '2'
4849
- name: Process coverage
4950
uses: julia-actions/julia-processcoverage@v1
5051
- name: Upload coverage to Codecov
@@ -84,6 +85,8 @@ jobs:
8485
- name: Run tests
8586
run: |
8687
pytest -s --nbval --cov=pysrc ./pytest/
88+
env:
89+
PYTHON_JULIACALL_THREADS: '2'
8790
- name: Upload coverage to Codecov
8891
uses: codecov/codecov-action@v2
8992
env:

CondaPkg.toml

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

4+
[deps.openssl]
5+
version = "<=julia"
6+
47
[deps.python]
58
build = "**cpython**"
69
version = ">=3.8,<4"

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "PythonCall"
22
uuid = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
33
authors = ["Christopher Doris <github.com/cjdoris>"]
4-
version = "0.9.20"
4+
version = "0.9.22"
55

66
[deps]
77
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
@@ -18,7 +18,7 @@ UnsafePointers = "e17b2a0c-0bdf-430a-bd0c-3a23cae4ff39"
1818

1919
[compat]
2020
Aqua = "0 - 999"
21-
CondaPkg = "0.2.21"
21+
CondaPkg = "0.2.23"
2222
Dates = "1"
2323
Libdl = "1"
2424
MacroTools = "0.5"

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ In this example we use the Python module JuliaCall from an IPython notebook to t
4040

4141
## What about PyCall?
4242

43-
The existing package [PyCall](https://github.com/JuliaPy/PyCall.jl) is another similar interface to Python. Here we note some key differences, but a more detailed comparison is in the documentation.
43+
The existing package [PyCall](https://github.com/JuliaPy/PyCall.jl) is another similar interface to Python. Here we note some key differences:.
4444
- PythonCall supports a wider range of conversions between Julia and Python, and the conversion mechanism is extensible.
4545
- PythonCall by default never copies mutable objects when converting, but instead directly wraps the mutable object. This means that modifying the converted object modifies the original, and conversion is faster.
4646
- PythonCall does not usually automatically convert results to Julia values, but leaves them as Python objects. This makes it easier to do Pythonic things with these objects (e.g. accessing methods) and is type-stable.
47-
- PythonCall installs dependencies into a separate Conda environment for each Julia project. This means each Julia project can have an isolated set of Python dependencies.
48-
- PythonCall supports Julia 1.6.1+ and Python 3.8+ whereas PyCall supports Julia 0.7+ and Python 2.7+.
47+
- PythonCall installs dependencies into a separate Conda environment for each Julia project using [CondaPkg](https://github.com/JuliaPy/CondaPkg.jl). This means each Julia project can have an isolated set of Python dependencies.

bump.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function bump(file, oldpat, newpat)
99
oldtext = read(file, String)
1010
newtext = replace(oldtext, oldpat => newpat)
1111
@assert newtext != oldtext
12-
write(file, newtext)
12+
write(file, newtext)
1313
end
1414

1515
function bumpver(file, pattern, oldver, newver)

docs/customdocs.jl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ function runner(::Type{CustomDocExpander}, node, page, doc)
5353
Dict{Symbol,Any}( # NOTE: Not sure about what to put here.
5454
:module => Main, # This is supposed to be tracking python code.
5555
:path => "",
56-
:linenumber => 0
57-
)
56+
:linenumber => 0,
57+
),
5858
)::Docs.DocStr
5959

6060
# NOTE: This was modified because the original Documenter.create_docsnode was generating unreachable links
@@ -80,12 +80,10 @@ function _parse_docs(code::AbstractString)
8080
m = match(r"^(.+?)\s*-\s*(.+?)\s*(\n[\s\S]*)$", strip(code))
8181

8282
if isnothing(m)
83-
error(
84-
"""
85-
Invalid docstring:
86-
$(code)
87-
"""
88-
)
83+
error("""
84+
Invalid docstring:
85+
$(code)
86+
""")
8987
end
9088

9189
name = Symbol(m[1])
@@ -134,4 +132,4 @@ function _create_docsnode(docstring, result, object, page, doc)
134132
return MarkdownAST.Node(docsnode)
135133
end
136134

137-
end # module CustomDocs
135+
end # module CustomDocs

docs/make.jl

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,22 @@ include("customdocs.jl")
55
makedocs(
66
sitename = "PythonCall & JuliaCall",
77
modules = [PythonCall],
8-
format = Documenter.HTML(
9-
assets = ["assets/favicon.ico"],
10-
),
8+
format = Documenter.HTML(assets = ["assets/favicon.ico"]),
119
warnonly = [:missing_docs], # avoid raising error when docs are missing
1210
pages = [
1311
"Home" => "index.md",
14-
"The Julia module PythonCall" => [
15-
"Guide" => "pythoncall.md",
16-
"Reference" => "pythoncall-reference.md",
17-
],
18-
"The Python module JuliaCall" => [
19-
"Guide" => "juliacall.md",
20-
"Reference" => "juliacall-reference.md",
21-
],
12+
"The Julia module PythonCall" =>
13+
["Guide" => "pythoncall.md", "Reference" => "pythoncall-reference.md"],
14+
"The Python module JuliaCall" =>
15+
["Guide" => "juliacall.md", "Reference" => "juliacall-reference.md"],
2216
"Conversion" => [
2317
"Julia to Python" => "conversion-to-python.md",
2418
"Python to Julia" => "conversion-to-julia.md",
2519
],
2620
"compat.md",
2721
"faq.md",
28-
"pycall.md",
2922
"releasenotes.md",
30-
]
23+
],
3124
)
3225

33-
deploydocs(
34-
repo = raw"github.com/JuliaPy/PythonCall.jl.git",
35-
push_preview = true
36-
)
26+
deploydocs(repo = raw"github.com/JuliaPy/PythonCall.jl.git", push_preview = true)

0 commit comments

Comments
 (0)