Skip to content

Commit 8e9e77a

Browse files
authored
Update compat; standardize yml; use Type not DataType; to v0.18 (#133)
* Update compat * Standardize yml * Standardize make.jl * Use Type not DataType * Use Type not DataType * Use Type not DataType * Fix typos
1 parent 42869f2 commit 8e9e77a

File tree

24 files changed

+166
-81
lines changed

24 files changed

+166
-81
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,47 @@ name: CompatHelper
22

33
on:
44
schedule:
5-
- cron: '00 00 * * *'
5+
- cron: 0 0 * * 0 # weekly
66
workflow_dispatch:
7-
7+
permissions:
8+
contents: write
9+
pull-requests: write
810
jobs:
911
CompatHelper:
1012
runs-on: ubuntu-latest
1113
steps:
12-
- name: Pkg.add("CompatHelper")
13-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
14-
- name: CompatHelper.main()
14+
- name: Check if Julia is already available in the PATH
15+
id: julia_in_path
16+
run: which julia
17+
continue-on-error: true
18+
- name: Install Julia, but only if it is not already available in the PATH
19+
uses: julia-actions/setup-julia@latest
20+
with:
21+
version: '1'
22+
# arch: ${{ runner.arch }}
23+
if: steps.julia_in_path.outcome != 'success'
24+
- name: "Add the General registry via Git"
25+
run: |
26+
import Pkg
27+
ENV["JULIA_PKG_SERVER"] = ""
28+
Pkg.Registry.add("General")
29+
shell: julia --color=yes {0}
30+
- name: "Install CompatHelper"
31+
run: |
32+
import Pkg
33+
name = "CompatHelper"
34+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
35+
version = "3"
36+
Pkg.add(; name, uuid, version)
37+
shell: julia --color=yes {0}
38+
- name: "Run CompatHelper"
39+
run: |
40+
import CompatHelper
41+
CompatHelper.main()
42+
shell: julia --color=yes {0}
1543
env:
1644
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17-
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # optional
18-
run: julia -e 'using CompatHelper; CompatHelper.main()'
45+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
1946

2047
# based on:
2148
# https://github.com/JuliaRegistries/CompatHelper.jl

.github/workflows/Documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
Pkg.instantiate()'
4141
- name: BuildAndDeploy
4242
env:
43+
# https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#Authentication:-GITHUB_TOKEN
4344
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4445
ssh: ${{ secrets.DOCUMENTER_KEY }}
4546
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/SpellCheck.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Spell Check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
typos-check:
7+
name: Spell Check with Typos
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Actions Repository
11+
uses: actions/checkout@v4
12+
- name: Check spelling
13+
uses: crate-ci/typos@master

.github/workflows/TagBot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: TagBot
2+
23
on:
34
issue_comment:
45
types:
56
- created
67
workflow_dispatch:
8+
79
jobs:
810
TagBot:
911
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'

.github/workflows/clean.yml

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

Project.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MIRT"
22
uuid = "7035ae7a-3787-11e9-139a-5545ed3dc201"
33
authors = ["fessler <fessler@umich.edu>"]
4-
version = "0.17.0"
4+
version = "0.18"
55

66
[deps]
77
AVSfldIO = "b6189060-daf9-4c28-845a-cc0984b81781"
@@ -25,14 +25,14 @@ Wavelets = "29a6e085-ba6d-5f35-a997-948ac2efa89a"
2525
[compat]
2626
AVSfldIO = "0.2"
2727
FFTW = "1"
28-
FileIO = "1.9, 1.14"
29-
FillArrays = "0.12, 0.13"
30-
ImageFiltering = "0.6, 0.7"
31-
ImageTransformations = "0.8, 0.9"
32-
Interpolations = "0.12, 0.13, 0.14"
33-
LazyGrids = "0.5"
34-
LinearMapsAA = "0.11"
28+
FileIO = "1"
29+
FillArrays = "1"
30+
ImageFiltering = "0.7"
31+
ImageTransformations = "0.10"
32+
Interpolations = "0.15"
33+
LazyGrids = "1"
34+
LinearMapsAA = "0.12"
3535
NFFT = "0.13"
36-
SpecialFunctions = "1, 2"
37-
Wavelets = "0.9"
38-
julia = "1.8"
36+
SpecialFunctions = "2"
37+
Wavelets = "0.10"
38+
julia = "1.10"

_typos.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[default]
2+
extend-ignore-identifiers-re = [
3+
"allk",
4+
"als",
5+
"Nd",
6+
"iy",
7+
"pn",
8+
"MIRTio",
9+
]

doc/start-juno.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jim(x, title="test")
4343
* This test should produce a grayscale image of the famous
4444
[Shepp-Logan phantom](https://en.wikipedia.org/wiki/Shepp%E2%80%93Logan_phantom) in the Plots tab of Atom.
4545
* To learn about the jiffy image display function `jim`, type `?jim` at the REPL.
46-
* Juno and Atom have lots of online documention.
46+
* Juno and Atom have lots of online documentation.
4747
I use the `vim-mode-plus` key bindings, installed using Atom preferences.
4848

4949
* To start a Jupyter notebook for Julia, type at the REPL:

doc/start.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
* Install Julia (1.5 or later recommended) from https://julialang.org/
2-
* Explore the extensive documentation at https://docs.julialang.org/
1+
* Install Julia (1.10 or later recommended) from https://julialang.org
2+
* Explore the extensive documentation at https://docs.julialang.org
33
* Launch Julia and use the `]` key to enter its package manager.
44
* Add any packages needed for these notebooks using the `add` command.
55
* For example `add Plots` to add the `Plots` package.
66
* Other crucial standard packages are `FFTW` `FFTViews`
77
* You will also need the package `IJulia` to run any Jupyter demo notebooks.
88
* Add MIRT by typing `add MIRT`
9-
(Automatically loads from https://github.com/JeffFessler/MIRT.jl because MIRT.jl is a registered package.)
9+
(Automatically loads from https://github.com/JeffFessler/MIRT.jl
10+
because MIRT.jl is a registered package.)
1011
* Type `precompile` to have Julia precompile the added packages.
11-
* After you are done adding packages, press the backspace key to return to the REPL prompt.
12-
* Later if you need to add more packages just type the `]` key again at the REPL prompt to enter the package manager.
13-
* Julia is under active development so code is updated frequently. It is a wise to type `up` (short for `update`) at the package manager prompt every week or so to get automatic updates of any packages you have intalled.
12+
* After you are done adding packages, press the backspace key
13+
to return to the REPL prompt.
14+
* Later if you need to add more packages just type the `]` key again
15+
at the REPL prompt to enter the package manager.
16+
* Julia is under active development so code is updated frequently.
17+
It is a wise to type `up` (short for `update`) at the package manager prompt
18+
every week or so to get automatic updates of any packages you have installed.
1419
* For some Julia tutorials see
15-
http://web.eecs.umich.edu/~fessler/course/551/julia/tutor/
20+
http://web.eecs.umich.edu/~fessler/course/551/julia/tutor
1621
* For some signal processing demos in Julia see
17-
http://web.eecs.umich.edu/~fessler/course/551/julia/demo/
22+
http://web.eecs.umich.edu/~fessler/course/551/julia/demo

docs/make.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ execute = isempty(ARGS) || ARGS[1] == "run"
22

33
org, reps = :JeffFessler, :MIRT
44
eval(:(using $reps))
5-
using Documenter
6-
using Literate
5+
import Documenter
6+
import Literate
77
#using DemoCards
88

99
# examples_templates, examples_theme = cardtheme("grid")
@@ -27,7 +27,7 @@ binder_root_url =
2727

2828

2929
repo = eval(:($reps))
30-
DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps); recursive=true)
30+
Documenter.DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps); recursive=true)
3131

3232
# preprocessing
3333
inc1 = "include(\"../../../inc/reproduce.jl\")"
@@ -81,7 +81,7 @@ format = Documenter.HTML(;
8181
assets = ["assets/custom.css"],
8282
)
8383

84-
makedocs(;
84+
Documenter.makedocs(;
8585
modules = [repo],
8686
authors = "Jeff Fessler and contributors",
8787
sitename = "$repo.jl",
@@ -96,7 +96,7 @@ makedocs(;
9696
# examples_cb()
9797

9898
if isci
99-
deploydocs(;
99+
Documenter.deploydocs(;
100100
repo = "github.com/$base",
101101
devbranch = "main",
102102
devurl = "dev",

src/algorithm/general/dot-curv.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _curv_type(Tf::Type{<:RealU}, Tx::Type{<:Number}) =
1010

1111

1212
"""
13-
make_dot_curvf(curv::Function, [x, Tf::DataType; w = similar(x)])
13+
make_dot_curvf(curv::Function, [x, Tf::Type; w = similar(x)])
1414
1515
Make a function with arguments `(v, x)`
1616
that computes the dot product between
@@ -53,7 +53,7 @@ Those units are relevant to defining the work array `w`.
5353
- `x` an array whose `size` and `eltype` is used to allocate `w`
5454
5555
# option
56-
- `Tf::DataType = typeof(one(eltype(x)))`
56+
- `Tf::Type = typeof(one(eltype(x)))`
5757
Specify `eltype` of function `f(x)`, defaulting to unitless.
5858
- `w = similar(x, typeof(oneunit(Tf) / oneunit(eltype(x))^2))`
5959
work space for gradient calculation, with appropriate units (if needed).

src/algorithm/general/dot-grad.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ _grad_type(Tf::Type{<:RealU}, Tx::Type{<:Number}) =
1010

1111

1212
"""
13-
make_dot_gradf(grad::Function, [x, Tf::DataType; w = similar(x)])
13+
make_dot_gradf(grad::Function, [x, Tf::Type; w = similar(x)])
1414
1515
Make a function with arguments `(v, x)`
1616
that computes the dot product between
@@ -44,7 +44,7 @@ Those units are relevant to defining the work array `w`.
4444
# in
4545
- `grad::Function` see above
4646
- `x` an array whose `size` and `eltype` is used to allocate `w`
47-
- `Tf::DataType = typeof(one(eltype(x)))`
47+
- `Tf::Type = typeof(one(eltype(x)))`
4848
Specify `eltype` of function `f(x)`, defaulting to unitless.
4949
5050
# option

src/algorithm/general/pogm_restart.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ iterate as below for given coefficients ``(\\alpha, \\beta_k, \\gamma_k)``
7171
- ``x_{k+1} = y_{k+1} + \\beta_k (y_{k+1} - y_k) + \\gamma_k (y_{k+1} - x_k)`` : momentum update
7272
7373
Proximal versions of the above for ``g(x) \\neq 0`` are in the below references,
74-
and use the proximal operater
74+
and use the proximal operator
7575
``prox_g(z) = argmin_x {1/2\\|z-x\\|^2 + g(x)}``.
7676
7777
- Proximal Gradient method (PGM or ISTA) - ``\\beta_k = \\gamma_k = 0``. [BT09]

src/mri/kspace-spiral.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using Interpolations
1717
Make k-space spiral trajectory based on GE 3T scanner constraints
1818
1919
Option:
20-
- `N` dimention of reconstructed image
20+
- `N` dimension of reconstructed image
2121
- `Nt` # of time points
2222
- `fov` field of view in cm
2323
- `dt` time sampling interval out; default `5e-6` sec
@@ -163,7 +163,7 @@ to gradients at 4us.
163163
164164
Multi-shot spiral design
165165
uses Duyn's approximate slewrate limited design
166-
augmented with archimedian `gmax` limit
166+
augmented with archimedean `gmax` limit
167167
168168
# in [args]
169169
* `D` = FOV; cm

0 commit comments

Comments
 (0)