Skip to content

Commit 18bf8c8

Browse files
authored
Use PythonOT (#64)
1 parent d5ebf7a commit 18bf8c8

File tree

14 files changed

+106
-401
lines changed

14 files changed

+106
-401
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,13 @@ jobs:
2323
- macOS-latest
2424
arch:
2525
- x64
26-
- x86
27-
exclude:
28-
- os: ubuntu-latest
29-
arch: x86
30-
- os: macOS-latest
31-
arch: x86
3226
include:
3327
- version: '1'
3428
os: ubuntu-latest
3529
arch: x64
3630
coverage: true
3731
steps:
3832
- uses: actions/checkout@v2
39-
- name: Install python
40-
uses: actions/setup-python@v2
41-
with:
42-
python-version: '3.x'
43-
architecture: ${{ matrix.arch }}
44-
# Limitation of pip: https://pythonot.github.io/index.html#pip-installation
45-
- run: python -m pip install cython numpy
46-
- run: python -m pip install pot
4733
- uses: julia-actions/setup-julia@v1
4834
with:
4935
version: ${{ matrix.version }}
@@ -59,11 +45,11 @@ jobs:
5945
${{ runner.os }}-test-
6046
${{ runner.os }}-
6147
- uses: julia-actions/julia-buildpkg@latest
62-
env:
63-
PYTHON: python
6448
- uses: julia-actions/julia-runtest@latest
49+
with:
50+
coverage: ${{ matrix.coverage || false }}
6551
env:
66-
PYTHON: python
52+
PYTHON: '' # Use Conda.jl also on Linux
6753
- uses: julia-actions/julia-processcoverage@v1
6854
if: matrix.coverage
6955
- uses: codecov/codecov-action@v1

.github/workflows/Documentation.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15-
- name: Install python
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: '3.x'
19-
# Limitation of pip: https://pythonot.github.io/index.html#pip-installation
20-
- run: python -m pip install cython numpy
21-
- run: python -m pip install pot
2215
- uses: julia-actions/setup-julia@latest
2316
with:
2417
version: '1'
25-
- name: Install dependencies
26-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
27-
env:
28-
PYTHON: python
29-
- name: Build and deploy
18+
- name: Install dependencies, build and deploy
19+
run: |
20+
using Pkg: Pkg
21+
Pkg.develop(Pkg.PackageSpec(path=pwd()))
22+
Pkg.instantiate()
23+
include(joinpath(pwd(), "docs", "make.jl"))
3024
env:
31-
PYTHON: python
3225
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
3326
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
27+
PYTHON: '' # Use Conda.jl also on Linux
3428
GKSwstype: nul # avoid (irrelevant) error messages from GR
35-
run: julia --project=docs/ docs/make.jl
29+
shell: julia --color=yes --project=docs/ {0}

Project.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
name = "OptimalTransport"
22
uuid = "7e02d93a-ae51-4f58-b602-d97af76e3b33"
33
authors = ["zsteve <[email protected]>"]
4-
version = "0.2.4"
4+
version = "0.3.0"
55

66
[deps]
77
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
88
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
99
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1010
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
11-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1211
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1312

1413
[compat]
1514
Distances = "0.9.0, 0.10"
1615
IterativeSolvers = "0.8.4, 0.9"
1716
MathOptInterface = "0.9"
18-
Requires = "1.1"
1917
julia = "1"
2018

2119
[extras]
22-
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
20+
PythonOT = "3c485715-4278-42b2-9b5f-8f00e43c12ef"
2321
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2422
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2523
Tulip = "6dd1b50a-3aae-11e9-10b5-ef983d2400fa"
2624

2725
[targets]
28-
test = ["Tulip", "PyCall", "Random", "Test"]
26+
test = ["Tulip", "PythonOT", "Random", "Test"]

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ Contributors include:
3939
- Davi Barreira (FGV)
4040
- Stephen Zhang (UBC)
4141

42+
## Related packages
43+
44+
- [PythonOT.jl](https://github.com/JuliaOptimalTransport/PythonOT.jl): Julia interface for the [Python Optimal Transport (POT) package](https://pythonot.github.io/).
45+
- [StochasticOptimalTransport.jl](https://github.com/JuliaOptimalTransport/StochasticOptimalTransport.jl): Julia implementation of stochastic optimization algorithms for large-scale optimal transport.
46+
4247
## References
4348

4449
- Peyré, G. and Cuturi, M., 2019. Computational optimal transport. Foundations and Trends® in Machine Learning, 11(5-6), pp.355-607.

docs/Manifest.toml

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ version = "0.7.0"
1717

1818
[[Bzip2_jll]]
1919
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
20-
git-tree-sha1 = "c3598e525718abcc440f69cc6d5f60dda0a1b61e"
20+
git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2"
2121
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
22-
version = "1.0.6+5"
22+
version = "1.0.8+0"
2323

2424
[[CodecBzip2]]
2525
deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"]
@@ -33,12 +33,6 @@ git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
3333
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
3434
version = "0.7.0"
3535

36-
[[Conda]]
37-
deps = ["JSON", "VersionParsing"]
38-
git-tree-sha1 = "299304989a5e6473d985212c28928899c74e9421"
39-
uuid = "8f4d0f93-b110-5947-807f-2305c1781a2d"
40-
version = "1.5.2"
41-
4236
[[Dates]]
4337
deps = ["Printf"]
4438
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -66,10 +60,10 @@ deps = ["ArgTools", "LibCURL", "NetworkOptions"]
6660
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
6761

6862
[[HTTP]]
69-
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets"]
70-
git-tree-sha1 = "c7ec02c4c6a039a98a15f955462cd7aea5df4508"
63+
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
64+
git-tree-sha1 = "b855bf8247d6e946c75bb30f593bfe7fe591058d"
7165
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
72-
version = "0.8.19"
66+
version = "0.9.8"
7367

7468
[[IOCapture]]
7569
deps = ["Logging"]
@@ -89,9 +83,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
8983

9084
[[IterativeSolvers]]
9185
deps = ["LinearAlgebra", "Printf", "Random", "RecipesBase", "SparseArrays"]
92-
git-tree-sha1 = "6f5ef3206d9dc6510a8b8e2334b96454a2ade590"
86+
git-tree-sha1 = "1a8c6237e78b714e901e406c096fc8a65528af7d"
9387
uuid = "42fd0dbc-a981-5370-80f2-aaf504508153"
94-
version = "0.9.0"
88+
version = "0.9.1"
9589

9690
[[JLLWrappers]]
9791
deps = ["Preferences"]
@@ -143,12 +137,6 @@ version = "2.8.0"
143137
[[Logging]]
144138
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
145139

146-
[[MacroTools]]
147-
deps = ["Markdown", "Random"]
148-
git-tree-sha1 = "6a8a2a625ab0dea913aba95c11370589e0239ff0"
149-
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
150-
version = "0.5.6"
151-
152140
[[Markdown]]
153141
deps = ["Base64"]
154142
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
@@ -185,10 +173,10 @@ version = "0.2.19"
185173
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
186174

187175
[[OptimalTransport]]
188-
deps = ["Distances", "IterativeSolvers", "LinearAlgebra", "MathOptInterface", "Requires", "SparseArrays"]
176+
deps = ["Distances", "IterativeSolvers", "LinearAlgebra", "MathOptInterface", "SparseArrays"]
189177
path = ".."
190178
uuid = "7e02d93a-ae51-4f58-b602-d97af76e3b33"
191-
version = "0.2.1"
179+
version = "0.3.0"
192180

193181
[[OrderedCollections]]
194182
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
@@ -215,12 +203,6 @@ version = "1.2.2"
215203
deps = ["Unicode"]
216204
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
217205

218-
[[PyCall]]
219-
deps = ["Conda", "Dates", "Libdl", "LinearAlgebra", "MacroTools", "Serialization", "VersionParsing"]
220-
git-tree-sha1 = "169bb8ea6b1b143c5cf57df6d34d022a7b60c6db"
221-
uuid = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
222-
version = "1.92.3"
223-
224206
[[REPL]]
225207
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
226208
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
@@ -234,12 +216,6 @@ git-tree-sha1 = "b3fb709f3c97bfc6e948be68beeecb55a0b340ae"
234216
uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
235217
version = "1.1.1"
236218

237-
[[Requires]]
238-
deps = ["UUIDs"]
239-
git-tree-sha1 = "4036a3bd08ac7e968e27c203d45f5fff15020621"
240-
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
241-
version = "1.1.3"
242-
243219
[[SHA]]
244220
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
245221

@@ -280,18 +256,18 @@ git-tree-sha1 = "7c53c35547de1c5b9d46a4797cf6d8253807108c"
280256
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
281257
version = "0.9.5"
282258

259+
[[URIs]]
260+
git-tree-sha1 = "97bbe755a53fe859669cd907f2d96aee8d2c1355"
261+
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
262+
version = "1.3.0"
263+
283264
[[UUIDs]]
284265
deps = ["Random", "SHA"]
285266
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
286267

287268
[[Unicode]]
288269
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
289270

290-
[[VersionParsing]]
291-
git-tree-sha1 = "80229be1f670524750d905f8fc8148e5a8c4537f"
292-
uuid = "81def892-9a0e-5fdd-b105-ffc91e053289"
293-
version = "1.2.0"
294-
295271
[[ZipFile]]
296272
deps = ["Libdl", "Printf", "Zlib_jll"]
297273
git-tree-sha1 = "c3a5637e27e914a7a445b8d0ad063d701931e9f7"

docs/Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
44
OptimalTransport = "7e02d93a-ae51-4f58-b602-d97af76e3b33"
5-
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
65

76
[compat]
87
Documenter = "0.26"
98
Literate = "2.8"
10-
OptimalTransport = "0.2"
11-
PyCall = "1"
9+
OptimalTransport = "0.3"
1210
julia = "1"

docs/make.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ for name in EXAMPLES
5555
end
5656

5757
using Documenter
58-
using PyCall
5958

6059
makedocs(;
61-
modules=[OptimalTransport, POT],
60+
modules=[OptimalTransport],
6261
repo="https://github.com/JuliaOptimalTransport/OptimalTransport.jl/blob/{commit}{path}#L{line}",
6362
sitename="OptimalTransport.jl",
6463
format=Documenter.HTML(;
@@ -68,7 +67,6 @@ makedocs(;
6867
),
6968
pages=[
7069
"Home" => "index.md",
71-
"POT" => "pot.md",
7270
"Examples" => [joinpath("examples", "$(name).md") for name in EXAMPLES],
7371
],
7472
strict=true,

docs/src/pot.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)