Skip to content

Commit

Permalink
update external api for DECAES v0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jondeuce committed Mar 3, 2022
1 parent 56683dc commit 8f08b1e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/decaes.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
%
% Note the separation of the Matlab-specific flags from the DECAES settings file.
%
% This version of decaes.m was written for DECAES v0.4.2.
% This version of decaes.m was written for DECAES v0.4.3.
% DECAES was written by Jonathan Doucette ([email protected]).
% Original MATLAB implementation is by Thomas Prasloski ([email protected]).

Expand Down
25 changes: 23 additions & 2 deletions api/decaes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
"""
Load the DECAES.jl Julia package from python.
DECAES.jl will be installed automatically, if necessary.
This module requires the julia Python package to be installed.
See the following documentation for instructions:
https://github.com/JuliaPy/pyjulia#quick-usage
Quick usage:
import decaes
decaes.initialize()
from decaes import DECAES
# Call methods from the DECAES module as usual, e.g.
DECAES.T2mapSEcorr(image; kwargs...)
This version of decaes.py was written for DECAES v0.4.3.
"""

import julia
import os
import subprocess
Expand Down Expand Up @@ -39,13 +60,13 @@ def install(
# Install DECAES.jl
decaes_install_script = """try
@info "Trying to import DECAES..."
import DECAES
@eval import DECAES
catch e
@error "`import DECAES` failed" exception=(e, catch_backtrace())
@info "Installing DECAES..."
import Pkg
Pkg.add("DECAES")
import DECAES
@eval import DECAES
end
""".replace(" ", "")

Expand Down
6 changes: 4 additions & 2 deletions api/decaes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ parser = argparse.ArgumentParser(
Example:
Start Julia with 8 threads and run DECAES using parameters specified by the
Start Julia with multiple threads and run DECAES using parameters specified by the
settings file 'decaes_settings_file.txt':
python decaes.py --threads=8 @/path/to/decaes_settings_file.txt
python decaes.py @/path/to/decaes_settings_file.txt
This version of decaes.sh was written for DECAES v0.4.3.
""",
formatter_class = argparse.RawDescriptionHelpFormatter,
)
Expand Down

2 comments on commit 8f08b1e

@jondeuce
Copy link
Owner Author

Choose a reason for hiding this comment

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

@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/55907

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.4.3 -m "<description of version>" 8f08b1eff0ec42c071f6f3427820fc77b0c3e9a4
git push origin v0.4.3

Please sign in to comment.