Skip to content

Commit 5a65a52

Browse files
committed
2 parents c63ab23 + c886d48 commit 5a65a52

File tree

132 files changed

+5107
-3265
lines changed

Some content is hidden

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

132 files changed

+5107
-3265
lines changed

.github/ISSUE_TEMPLATE/help---support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ assignees: ''
77

88
---
99

10-
Please direct any other questions to [github discussions](https://github.com/cjdoris/PythonCall.jl/discussions).
10+
Please direct any other questions to [github discussions](https://github.com/JuliaPy/PythonCall.jl/discussions).

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ on:
66
- main
77
tags:
88
- '*'
9+
pull_request:
10+
types: [opened, synchronize, reopened]
11+
workflow_dispatch:
912

1013
jobs:
1114
docs:
15+
if: ${{ !(github.event_name == 'pull_request') || contains(github.event.pull_request.labels.*.name, 'documentation') }}
1216
name: Documentation
1317
runs-on: ubuntu-latest
1418
steps:

.github/workflows/docscleanup.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Documentation Preview Cleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
doc-preview-cleanup:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout gh-pages branch
12+
uses: actions/checkout@v2
13+
with:
14+
ref: gh-pages
15+
16+
- name: Delete preview and history
17+
run: |
18+
if [ -d "$DIR" ]; then
19+
git config user.name "Documenter.jl"
20+
git config user.email "[email protected]"
21+
git rm -rf "$DIR"
22+
git commit -m "delete preview"
23+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
24+
git push --force origin gh-pages-new:gh-pages
25+
fi
26+
env:
27+
DIR: "previews/PR${{ github.event.number }}"
28+
29+
# Workflow copied from https://github.com/CliMA/TimeMachine.jl

.github/workflows/register-pypi.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@ name: Register to PyPI
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
git_ref:
7+
description: Git tag, branch or commit to register (e.g. v0.9.10)
8+
required: true
59

610
jobs:
711
register:
812
runs-on: ubuntu-latest
913
steps:
10-
- uses: actions/checkout@master
14+
- uses: actions/checkout@v3
15+
with:
16+
ref: ${{ inputs.git_ref }}
1117
- name: Set up Python
1218
uses: actions/setup-python@v3
1319
with:

.github/workflows/tests-nightly.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
name: Tests (nightly)
22

33
on:
4-
pull_request:
5-
branches:
6-
- main
7-
push:
8-
branches:
9-
- main
10-
tags:
11-
- '*'
4+
workflow_dispatch:
5+
inputs:
6+
jl_version:
7+
description: Julia version (e.g. nightly or ~1.9.0-0)
8+
required: true
9+
default: nightly
1210

1311
jobs:
1412
tests:
@@ -24,7 +22,7 @@ jobs:
2422
- uses: actions/checkout@v2
2523
- uses: julia-actions/setup-julia@v1
2624
with:
27-
version: ${{ matrix.jlversion }}
25+
version: ${{ inputs.jl_version }}
2826
arch: ${{ matrix.arch }}
2927
- uses: actions/cache@v1
3028
env:

.github/workflows/tests.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Test (${{ matrix.os }}, julia ${{ matrix.jlversion }})
1616
runs-on: ${{ matrix.os }}
1717
strategy:
18-
fail-fast: false
18+
fail-fast: true
1919
matrix:
2020
arch: [x64] # x86 unsupported by MicroMamba
2121
os: [ubuntu-latest, windows-latest, macos-latest]
@@ -47,23 +47,30 @@ jobs:
4747
uses: julia-actions/julia-processcoverage@v1
4848
- name: Upload coverage to Codecov
4949
uses: codecov/codecov-action@v2
50+
env:
51+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5052
python:
5153
name: Test (${{ matrix.os }}, python ${{ matrix.pyversion }})
5254
runs-on: ${{ matrix.os }}
5355
strategy:
56+
fail-fast: true
5457
matrix:
5558
os: [ubuntu-latest, windows-latest, macos-latest]
56-
pyversion: ["3.7", "3.10"]
59+
pyversion: ["3.x", "3.8"]
5760
steps:
5861
- uses: actions/checkout@v3
5962
- name: Set up Python ${{ matrix.pyversion }}
6063
uses: actions/setup-python@v4
6164
with:
6265
python-version: ${{ matrix.pyversion }}
66+
- name: Set up Julia
67+
uses: julia-actions/setup-julia@v1
68+
with:
69+
version: '1'
6370
- name: Install dependencies
6471
run: |
6572
python -m pip install --upgrade pip
66-
pip install flake8 pytest pytest-cov
73+
pip install flake8 pytest pytest-cov nbval numpy
6774
cp pysrc/juliacall/juliapkg-dev.json pysrc/juliacall/juliapkg.json
6875
pip install -e .
6976
- name: Lint with flake8
@@ -74,6 +81,8 @@ jobs:
7481
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
7582
- name: Run tests
7683
run: |
77-
pytest -s --cov=pysrc
84+
pytest -s --nbval --cov=pysrc ./pytest/
7885
- name: Upload coverage to Codecov
7986
uses: codecov/codecov-action@v2
87+
env:
88+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

CITATION.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ @misc{PythonCall.jl
22
author = {Rowley, Christopher},
33
title = {PythonCall.jl: Python and Julia in harmony},
44
year = {2022},
5-
url = {https://github.com/cjdoris/PythonCall.jl},
5+
url = {https://github.com/JuliaPy/PythonCall.jl},
66
}

CondaPkg.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
21
[deps.libstdcxx-ng]
3-
channel = "conda-forge"
42
version = "<=julia"
53

64
[deps.python]
7-
channel = "conda-forge"
8-
build = "*cpython*"
9-
version = ">=3.7,<4"
5+
build = "**cpython**"
6+
version = ">=3.8,<4"

Project.toml

Lines changed: 11 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.13"
4+
version = "0.9.20"
55

66
[deps]
77
CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab"
@@ -17,10 +17,19 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
1717
UnsafePointers = "e17b2a0c-0bdf-430a-bd0c-3a23cae4ff39"
1818

1919
[compat]
20-
CondaPkg = "0.2.15"
20+
Aqua = "0 - 999"
21+
CondaPkg = "0.2.21"
22+
Dates = "1"
23+
Libdl = "1"
2124
MacroTools = "0.5"
25+
Markdown = "1"
26+
Pkg = "1"
27+
REPL = "1"
2228
Requires = "1"
29+
Serialization = "1"
2330
Tables = "1"
31+
Test = "1"
32+
TestItemRunner = "0 - 999"
2433
UnsafePointers = "1"
2534
julia = "1.6.1"
2635

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
<h1><img src="https://raw.githubusercontent.com/cjdoris/PythonCall.jl/main/docs/src/assets/logo.png" alt="PythonCall.jl logo" style="width: 100px;"><br>PythonCall &amp;&nbsp;JuliaCall</h1>
1+
<h1><img src="docs/src/assets/logo.png" alt="PythonCall.jl logo" style="width: 100px;"><br>PythonCall &amp;&nbsp;JuliaCall</h1>
22

33
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
4-
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://cjdoris.github.io/PythonCall.jl/stable)
5-
[![Dev Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://cjdoris.github.io/PythonCall.jl/dev)
6-
[![Tests](https://github.com/cjdoris/PythonCall.jl/actions/workflows/tests.yml/badge.svg)](https://github.com/cjdoris/PythonCall.jl/actions/workflows/tests.yml)
7-
[![Tests (nightly)](https://github.com/cjdoris/PythonCall.jl/actions/workflows/tests-nightly.yml/badge.svg)](https://github.com/cjdoris/PythonCall.jl/actions/workflows/tests-nightly.yml)
8-
[![Codecov](https://codecov.io/gh/cjdoris/PythonCall.jl/branch/main/graph/badge.svg?token=A813UUIHGS)](https://codecov.io/gh/cjdoris/PythonCall.jl)
4+
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliapy.github.io/PythonCall.jl/stable)
5+
[![Dev Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliapy.github.io/PythonCall.jl/dev)
6+
[![Tests](https://github.com/JuliaPy/PythonCall.jl/actions/workflows/tests.yml/badge.svg)](https://github.com/JuliaPy/PythonCall.jl/actions/workflows/tests.yml)
7+
[![Codecov](https://codecov.io/gh/JuliaPy/PythonCall.jl/branch/main/graph/badge.svg?token=A813UUIHGS)](https://codecov.io/gh/JuliaPy/PythonCall.jl)
98
[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/P/PythonCall.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/P/PythonCall.html)
109

1110
Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://julialang.org/) together in seamless harmony:
@@ -15,11 +14,11 @@ Bringing [**Python®**](https://www.python.org/) and [**Julia**](https://juliala
1514
- Fast non-copying conversion of numeric arrays in either direction: modify Python arrays (e.g. `bytes`, `array.array`, `numpy.ndarray`) from Julia or Julia arrays from Python.
1615
- Helpful wrappers: interpret Python sequences, dictionaries, arrays, dataframes and IO streams as their Julia counterparts, and vice versa.
1716
- Beautiful stack-traces.
18-
- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.6.1 upwards and Python 3.7 upwards.
17+
- Supports modern systems: tested on Windows, MacOS and Linux, 64-bit, Julia 1.6.1 upwards and Python 3.8 upwards.
1918

2019
⭐ If you like this, a GitHub star would be lovely thank you. ⭐
2120

22-
To get started, read the [documentation](https://cjdoris.github.io/PythonCall.jl/stable).
21+
To get started, read the [documentation](https://juliapy.github.io/PythonCall.jl/stable).
2322

2423
## Example 1: Calling Python from Julia
2524

@@ -28,7 +27,7 @@ In this example, we use the Julia module PythonCall from a [Pluto](https://githu
2827
- We use `pytable(df)` to convert it to a Python [Pandas DataFrame](https://pandas.pydata.org/).
2928
- We use the Python package [Seaborn](https://seaborn.pydata.org/) to produce a pair-plot, which is automatically displayed.
3029

31-
![Seaborn example screenshot](https://raw.githubusercontent.com/cjdoris/PythonCall.jl/main/examples/seaborn.png)
30+
![Seaborn example screenshot](https://raw.githubusercontent.com/JuliaPy/PythonCall.jl/main/examples/seaborn.png)
3231

3332
## Example 2: Calling Julia from Python
3433

@@ -37,7 +36,7 @@ In this example we use the Python module JuliaCall from an IPython notebook to t
3736
- We construct and train a neural network model using Julia's Flux.
3837
- We plot some sample output from the model using Python's MatPlotLib.
3938

40-
![Flux example screenshot](https://raw.githubusercontent.com/cjdoris/PythonCall.jl/main/examples/flux.png)
39+
![Flux example screenshot](https://raw.githubusercontent.com/JuliaPy/PythonCall.jl/main/examples/flux.png)
4140

4241
## What about PyCall?
4342

@@ -46,4 +45,4 @@ The existing package [PyCall](https://github.com/JuliaPy/PyCall.jl) is another s
4645
- 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.
4746
- 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.
4847
- 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.
49-
- PythonCall supports Julia 1.6.1+ and Python 3.7+ whereas PyCall supports Julia 0.7+ and Python 2.7+.
48+
- PythonCall supports Julia 1.6.1+ and Python 3.8+ whereas PyCall supports Julia 0.7+ and Python 2.7+.

0 commit comments

Comments
 (0)