Skip to content

Commit

Permalink
Standardize yml; compat LinearMapsAA v0.12; to v0.2 (#53)
Browse files Browse the repository at this point in the history
* Standardize yml

* Standardize make.jl

* Compat to v0.2

* Fix typos
  • Loading branch information
JeffFessler committed May 18, 2024
1 parent cfccdf4 commit 82045f2
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 17 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@ on:
schedule:
- cron: 0 0 * * 0 # weekly
workflow_dispatch:

permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@latest
with:
version: '1'
# arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
Expand All @@ -31,3 +43,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}

# based on:
# https://github.com/JuliaRegistries/CompatHelper.jl
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
2 changes: 2 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: TagBot

on:
issue_comment:
types:
- created
workflow_dispatch:

jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SPECTrecon"
uuid = "ab1be465-a7f0-4423-9048-0ee774b70ed9"
authors = ["Zongyu Li and Jeff Fessler and group"]
version = "0.1"
version = "0.2"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand All @@ -13,10 +13,10 @@ LinearMapsAA = "599c1a8e-b958-11e9-0d14-b1e6b2ecea07"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"

[compat]
AbstractFFTs = "1.0"
AbstractFFTs = "1"
FFTW = "1"
ImageFiltering = "0.6, 0.7"
LinearInterpolators = "0.1"
LinearMapsAA = "0.11"
LinearMapsAA = "0.12"
OffsetArrays = "1"
julia = "1.10"
11 changes: 11 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[default]
extend-ignore-identifiers-re = [
"thid",
"iy",
"iy",
]

[files]
extend-exclude = [
"*.ipynb",
]
2 changes: 1 addition & 1 deletion docs/lit/examples/1-overview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ mul!(tmp, A', views)
The pixel dimensions `deltas` can (and should!) be values with units.
Here is an example ... (todo)
Here is an example with units ... (todo)
using UnitfulRecipes
using Unitful: mm
Expand Down
12 changes: 5 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ execute = isempty(ARGS) || ARGS[1] == "run"

org, reps = :JuliaImageRecon, :SPECTrecon
eval(:(using $reps))
using Documenter
using Literate
import Documenter
import Literate

# https://juliadocs.github.io/Documenter.jl/stable/man/syntax/#@example-block
ENV["GKSwstype"] = "100"
Expand All @@ -23,9 +23,7 @@ binder_root_url =


repo = eval(:($reps))
DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps); recursive=true)

#ENV["JULIA_DEBUG"] = "Literate"
Documenter.DocMeta.setdocmeta!(repo, :DocTestSetup, :(using $reps); recursive=true)

# preprocessing
inc1 = "include(\"../../../inc/reproduce.jl\")"
Expand Down Expand Up @@ -79,7 +77,7 @@ format = Documenter.HTML(;
assets = ["assets/custom.css"],
)

makedocs(;
Documenter.makedocs(;
modules = [repo],
authors = "Jeff Fessler & Zongyu Li & contributors",
sitename = "$repo.jl",
Expand All @@ -93,7 +91,7 @@ makedocs(;
)

if isci
deploydocs(;
Documenter.deploydocs(;
repo = "github.com/$base",
devbranch = "main",
devurl = "dev",
Expand Down
8 changes: 4 additions & 4 deletions src/spectplan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Struct for storing key factors for a SPECT system model
- `psfs [px,pz,ny,nview]` point spread function, must be 4D, with `px and `pz` odd, and symmetric for each slice
- `nview` number of views, must be integer
- `viewangle` set of view angles, must be from 0 to 2π
- `interpmeth` interpolation method, :one means 1d, :two means 2d
- `mode` pre-allcoation method, :fast means faster, :mem means use less memory
- `dy` voxel size in y direction (dx is the same value)
- `nthread` number of CPU threads used to process data, must be integer
- `interpmeth` interpolation method: `:one` means 1d; `:two` means 2d
- `mode` pre-allocation method: `:fast` means faster; `:mem` means use less memory
- `dy` voxel size in y direction (`dx` is the same value)
- `nthread` number of CPU threads used to process data; must be integer
- `planrot` Vector of struct `PlanRotate`
- `planpsf` Vector of struct `PlanPSF`
Currently code assumes the following:
Expand Down
3 changes: 2 additions & 1 deletion time/SPECTplan.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ function SPECTplan_time()
end


# run all functions, time may vary on different machines, will alllocate ~100 MB memory.
# Run all functions; time may vary on different machines.
# Will allocate ~100 MB memory.
SPECTplan_time()

4 comments on commit 82045f2

@JeffFessler
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator() register

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Changing package repo URL not allowed, please submit a pull request with the URL change to the target registry and retry.

@JeffFessler
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator() register

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107216

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 82045f2a4b84a96478558b6a9f313833351e12a2
git push origin v0.2.0

Please sign in to comment.