diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d486ff7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index 81677be..e4ee926 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -2,19 +2,47 @@ name: CompatHelper on: schedule: - - cron: '00 00 * * *' + - cron: 0 0 * * 0 # weekly workflow_dispatch: - +permissions: + contents: write + pull-requests: write jobs: CompatHelper: runs-on: ubuntu-latest steps: - - uses: julia-actions/setup-julia@latest + - 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 - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() + version: '1' + # arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' + - name: "Add the General registry via Git" + run: | + import Pkg + ENV["JULIA_PKG_SERVER"] = "" + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: julia -e 'using CompatHelper; CompatHelper.main()' + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + +# based on: +# https://github.com/JuliaRegistries/CompatHelper.jl diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 8863b97..a90b7b7 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -16,7 +16,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@latest with: version: '1' diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index 6887673..6d2efc1 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -14,3 +14,4 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml new file mode 100644 index 0000000..fdbfb0b --- /dev/null +++ b/.github/workflows/clean.yml @@ -0,0 +1,28 @@ +# https://juliadocs.github.io/Documenter.jl/stable/man/hosting/#gh-pages-Branch + +name: DocPreviewCleanup + +on: + pull_request: + types: [closed] + +jobs: + doc-preview-cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v4 + with: + ref: gh-pages + - name: Delete preview and history + push changes + run: | + if [ -d "previews/PR$PRNUM" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "previews/PR$PRNUM" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi + env: + PRNUM: ${{ github.event.number }} diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml index 91d12d0..f2791d7 100644 --- a/.github/workflows/runtests.yml +++ b/.github/workflows/runtests.yml @@ -3,43 +3,38 @@ name: Unit Tests on: create: tags: - pull_request: + push: branches: - main paths-ignore: - '**.md' - 'docs/**' - push: - branches: - - main + pull_request: paths-ignore: - '**.md' - 'docs/**' - schedule: - - cron: '0 1 * * 1' # Every Monday at 1am + workflow_dispatch: jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }} runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.version == 'nightly' }} strategy: fail-fast: false matrix: - version: - - '1' # Leave this line unchanged; '1' will automatically expand to the latest stable 1.x release of Julia. - - 'nightly' - os: - - ubuntu-latest - arch: - - x64 + version: ['1', 'nightly'] + os: [ubuntu-latest, windows-latest, macOS-latest] steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + +# - name: "Set up Julia" + - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 + + - name: Cache artifacts + uses: actions/cache@v3 env: cache-name: cache-artifacts with: @@ -49,9 +44,14 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 + +# - name: "Unit Test" + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-runtest@latest + +# - name: "Cover" - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v3 + if: ${{ matrix.version == '1' && matrix.os == 'ubuntu-latest' }} with: file: lcov.info diff --git a/README.md b/README.md index 16c8b8c..a36d3b9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # BlochSim.jl -https://github.com/StevenWhitaker/BlochSim.jl +https://github.com/MagneticResonanceImaging/BlochSim.jl [![docs-stable][docs-stable-img]][docs-stable-url] [![docs-dev][docs-dev-img]][docs-dev-url] @@ -24,9 +24,11 @@ The main functionality is provided by the functions `freeprecess`, `excite`, and `spoil` (and their mutating variants `freeprecess!`, `excite!`, and `spoil!`). These functions can be used to simulate a wide variety of MRI sequences. -In addition, this package provides implementations for -a multi-echo spin echo (MESE) scan (`MESEBlochSim`) -and a spoiled gradient-recalled echo (SPGR) scan (`SPGRBlochSim`). +In addition, this package provides implementations +for specific scan sequences: + +- multi-echo spin echo (MESE) scan (`MESEBlochSim`) +- spoiled gradient-recalled echo (SPGR) scan (`SPGRBlochSim`). ## Examples See the examples given in the documentation strings for how to use the provided @@ -128,6 +130,8 @@ julia> signal(spinmc) * [MRIgeneralizedBloch.jl](https://github.com/JakobAsslaender/MRIgeneralizedBloch.jl) focuses on [magnetization transfer](https://doi.org/10.1002/mrm.29071) +* [KomaMRI.jl](https://github.com/JuliaHealth/KomaMRI.jl) + has Pulseq compatability ## Acknowledgement @@ -137,16 +141,24 @@ All tests for this package of the form `testX0x` (like `testA5b` or `testF3d`) are based on the corresponding section in the tutorial (see [test/matlab.jl](test/matlab.jl)). + +## Status + +On 2024-04-08 this repo moved here from +https://github.com/StevenWhitaker/BlochSim.jl. +Submit issues for outdated URLs. + + -[action-img]: https://github.com/StevenWhitaker/BlochSim.jl/actions/workflows/runtests.yml/badge.svg -[action-url]: https://github.com/StevenWhitaker/BlochSim.jl/actions +[action-img]: https://github.com/MagneticResonanceImaging/BlochSim.jl/actions/workflows/runtests.yml/badge.svg +[action-url]: https://github.com/MagneticResonanceImaging/BlochSim.jl/actions [pkgeval-img]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/B/BlochSim.svg [pkgeval-url]: https://juliaci.github.io/NanosoldierReports/pkgeval_badges/B/BlochSim.html -[codecov-img]: https://codecov.io/gh/StevenWhitaker/BlochSim.jl/branch/main/graph/badge.svg?token=tduieBgema -[codecov-url]: https://codecov.io/gh/StevenWhitaker/BlochSim.jl +[codecov-img]: https://codecov.io/gh/MagneticResonanceImaging/BlochSim.jl/branch/main/graph/badge.svg?token=tduieBgema +[codecov-url]: https://codecov.io/gh/MagneticResonanceImaging/BlochSim.jl [docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg -[docs-stable-url]: https://StevenWhitaker.github.io/BlochSim.jl/stable +[docs-stable-url]: https://MagneticResonanceImaging.github.io/BlochSim.jl/stable [docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg -[docs-dev-url]: https://StevenWhitaker.github.io/BlochSim.jl/dev +[docs-dev-url]: https://MagneticResonanceImaging.github.io/BlochSim.jl/dev [license-img]: http://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat [license-url]: LICENSE diff --git a/docs/make.jl b/docs/make.jl index 8d42092..0fad289 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -82,7 +82,7 @@ Documenter.makedocs(; authors = "Amaya Murgia, Steven Whitaker, Jeff Fessler and contributors", sitename = "$repo.jl", format, - strict = true, # fail on "warnings" +# strict = true, # fail on "warnings" - deprecated pages = [ "Home" => "index.md", "Methods" => "methods.md",