Skip to content

Commit e95648f

Browse files
authored
Update CI and dependencies + format code consistently (#8)
1 parent 7960dc8 commit e95648f

20 files changed

+271
-171
lines changed

.JuliaFormatter.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
style="blue"

.github/workflows/ci.yml renamed to .github/workflows/CI.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88

99
jobs:
@@ -60,25 +60,3 @@ jobs:
6060
with:
6161
github-token: ${{ secrets.GITHUB_TOKEN }}
6262
path-to-lcov: lcov.info
63-
docs:
64-
name: Documentation
65-
runs-on: ubuntu-latest
66-
steps:
67-
- uses: actions/checkout@v2
68-
- uses: julia-actions/setup-julia@v1
69-
with:
70-
version: '1'
71-
- run: |
72-
julia --project=docs -e '
73-
using Pkg
74-
Pkg.develop(PackageSpec(path=pwd()))
75-
Pkg.instantiate()'
76-
- run: |
77-
julia --project=docs -e '
78-
using Documenter: doctest
79-
using StochasticOptimalTransport
80-
doctest(StochasticOptimalTransport)'
81-
- run: julia --project=docs docs/make.jl
82-
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@ jobs:
77
CompatHelper:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
10+
- name: "Install CompatHelper"
11+
run: |
12+
import Pkg
13+
name = "CompatHelper"
14+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
15+
version = "2"
16+
Pkg.add(; name, uuid, version)
17+
shell: julia --color=yes {0}
18+
- name: "Run CompatHelper"
19+
run: |
20+
import CompatHelper
21+
CompatHelper.main(; subdirs=["", "test", "docs"])
22+
shell: julia --color=yes {0}
1323
env:
1424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1525
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'

.github/workflows/DocCleanup.yml

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

.github/workflows/Docs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
docs:
12+
name: Documentation
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: julia-actions/setup-julia@v1
17+
with:
18+
version: '1'
19+
- run: |
20+
julia --project=docs -e '
21+
using Pkg
22+
Pkg.develop(PackageSpec(path=pwd()))
23+
Pkg.instantiate()'
24+
- run: julia --project=docs docs/make.jl
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: DocsPreviewCleanup
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
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+
- name: Delete preview and history + push changes
16+
run: |
17+
if [ -d "previews/PR$PRNUM" ]; then
18+
git config user.name "Documenter.jl"
19+
git config user.email "[email protected]"
20+
git rm -rf "previews/PR$PRNUM"
21+
git commit -m "delete preview"
22+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
23+
git push --force origin gh-pages-new:gh-pages
24+
fi
25+
env:
26+
PRNUM: ${{ github.event.number }}

.github/workflows/Format.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Format
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
format:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: julia-actions/setup-julia@latest
12+
with:
13+
version: 1
14+
- run: |
15+
julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
16+
julia -e 'using JuliaFormatter; format("."; verbose=true)'
17+
- uses: reviewdog/action-suggester@v1
18+
with:
19+
tool_name: JuliaFormatter
20+
fail_on_error: true

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name = "StochasticOptimalTransport"
22
uuid = "d0107fbf-5e6e-4997-ac8d-099d2392f4a6"
33
authors = ["David Widmann <[email protected]>"]
4-
version = "0.1.0"
4+
version = "0.1.1"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
8+
LogExpFunctions = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
89
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
910
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
10-
StatsFuns = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
1111

1212
[compat]
13-
StatsFuns = "0.9"
13+
LogExpFunctions = "0.2"
1414
julia = "1.3"

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ Julia implementation of stochastic optimization algorithms for large-scale optim
44

55
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://devmotion.github.io/StochasticOptimalTransport.jl/stable)
66
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://devmotion.github.io/StochasticOptimalTransport.jl/dev)
7-
[![Build Status](https://github.com/devmotion/StochasticOptimalTransport.jl/workflows/CI/badge.svg?branch=master)](https://github.com/devmotion/StochasticOptimalTransport.jl/actions?query=workflow%3ACI%20branch%3Amaster)
8-
[![Coverage](https://codecov.io/gh/devmotion/StochasticOptimalTransport.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/devmotion/StochasticOptimalTransport.jl)
9-
[![Coverage](https://coveralls.io/repos/github/devmotion/StochasticOptimalTransport.jl/badge.svg?branch=master)](https://coveralls.io/github/devmotion/StochasticOptimalTransport.jl?branch=master)
7+
[![Build Status](https://github.com/devmotion/StochasticOptimalTransport.jl/workflows/CI/badge.svg?branch=main)](https://github.com/devmotion/StochasticOptimalTransport.jl/actions?query=workflow%3ACI%20branch%3Amain)
8+
[![Coverage](https://codecov.io/gh/devmotion/StochasticOptimalTransport.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/devmotion/StochasticOptimalTransport.jl)
9+
[![Coverage](https://coveralls.io/repos/github/devmotion/StochasticOptimalTransport.jl/badge.svg?branch=main)](https://coveralls.io/github/devmotion/StochasticOptimalTransport.jl?branch=main)
10+
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
1011

1112
# Bibliography
1213

docs/Manifest.toml

Lines changed: 82 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,33 @@
11
# This file is machine-generated - editing it directly is not advised
22

3+
[[ArgTools]]
4+
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
5+
6+
[[Artifacts]]
7+
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
8+
39
[[Base64]]
410
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
511

612
[[Dates]]
713
deps = ["Printf"]
814
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
915

10-
[[Distributed]]
11-
deps = ["Random", "Serialization", "Sockets"]
12-
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
13-
1416
[[DocStringExtensions]]
1517
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
16-
git-tree-sha1 = "50ddf44c53698f5e784bbebb3f4b21c5807401b1"
18+
git-tree-sha1 = "9d4f64f79012636741cf01133158a54b24924c32"
1719
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
18-
version = "0.8.3"
20+
version = "0.8.4"
1921

2022
[[Documenter]]
2123
deps = ["Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
22-
git-tree-sha1 = "c01a7e8bcf7a6693444a52a0c5ac8b4e9528600e"
24+
git-tree-sha1 = "3ebb967819b284dc1e3c0422229b58a40a255649"
2325
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
24-
version = "0.26.0"
26+
version = "0.26.3"
27+
28+
[[Downloads]]
29+
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
30+
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
2531

2632
[[IOCapture]]
2733
deps = ["Logging"]
@@ -39,39 +45,71 @@ git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
3945
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
4046
version = "0.21.1"
4147

48+
[[LibCURL]]
49+
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
50+
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
51+
52+
[[LibCURL_jll]]
53+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
54+
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
55+
4256
[[LibGit2]]
43-
deps = ["Printf"]
57+
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
4458
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
4559

60+
[[LibSSH2_jll]]
61+
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
62+
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
63+
4664
[[Libdl]]
4765
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
4866

67+
[[LinearAlgebra]]
68+
deps = ["Libdl"]
69+
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
70+
71+
[[LogExpFunctions]]
72+
deps = ["DocStringExtensions", "LinearAlgebra"]
73+
git-tree-sha1 = "ed26854d7c2c867d143f0e07c198fc9e8b721d10"
74+
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
75+
version = "0.2.3"
76+
4977
[[Logging]]
5078
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
5179

5280
[[Markdown]]
5381
deps = ["Base64"]
5482
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
5583

84+
[[MbedTLS_jll]]
85+
deps = ["Artifacts", "Libdl"]
86+
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
87+
5688
[[Mmap]]
5789
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
5890

91+
[[MozillaCACerts_jll]]
92+
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
93+
94+
[[NetworkOptions]]
95+
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
96+
5997
[[Parsers]]
6098
deps = ["Dates"]
61-
git-tree-sha1 = "6370b5b3cf2ce5a3d2b6f7ab2dc10f374e4d7d2b"
99+
git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc"
62100
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
63-
version = "1.0.14"
101+
version = "1.1.0"
64102

65103
[[Pkg]]
66-
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
104+
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
67105
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
68106

69107
[[Printf]]
70108
deps = ["Unicode"]
71109
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
72110

73111
[[REPL]]
74-
deps = ["InteractiveUtils", "Markdown", "Sockets"]
112+
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
75113
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
76114

77115
[[Random]]
@@ -87,13 +125,30 @@ uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
87125
[[Sockets]]
88126
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
89127

128+
[[SparseArrays]]
129+
deps = ["LinearAlgebra", "Random"]
130+
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
131+
132+
[[Statistics]]
133+
deps = ["LinearAlgebra", "SparseArrays"]
134+
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
135+
90136
[[StochasticOptimalTransport]]
137+
deps = ["LinearAlgebra", "LogExpFunctions", "Random", "Statistics"]
91138
path = ".."
92139
uuid = "d0107fbf-5e6e-4997-ac8d-099d2392f4a6"
93-
version = "0.1.0"
140+
version = "0.1.1"
141+
142+
[[TOML]]
143+
deps = ["Dates"]
144+
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
145+
146+
[[Tar]]
147+
deps = ["ArgTools", "SHA"]
148+
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
94149

95150
[[Test]]
96-
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
151+
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
97152
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
98153

99154
[[UUIDs]]
@@ -102,3 +157,15 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
102157

103158
[[Unicode]]
104159
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
160+
161+
[[Zlib_jll]]
162+
deps = ["Libdl"]
163+
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
164+
165+
[[nghttp2_jll]]
166+
deps = ["Artifacts", "Libdl"]
167+
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
168+
169+
[[p7zip_jll]]
170+
deps = ["Artifacts", "Libdl"]
171+
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

0 commit comments

Comments
 (0)