Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a REPL widget that supports the SciJava ScriptREPL #265

Merged
merged 20 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
# Create env with dev packages
auto-update-conda: true
python-version: "3.10"
miniforge-variant: Mambaforge
miniforge-version: latest
environment-file: dev-environment.yml
# Activate napari-imagej-dev environment
activate-environment: napari-imagej-dev
Expand Down
2 changes: 1 addition & 1 deletion bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd "$dir/.."
modes="
| Testing ImageJ2 + original ImageJ |NAPARI_IMAGEJ_INCLUDE_IMAGEJ_LEGACY=TRUE
| Testing ImageJ2 standalone |NAPARI_IMAGEJ_INCLUDE_IMAGEJ_LEGACY=FALSE
| Testing Fiji Is Just ImageJ(2) |NAPARI_IMAGEJ_IMAGEJ_DIRECTORY_OR_ENDPOINT=sc.fiji:fiji:2.13.1
| Testing Fiji Is Just ImageJ(2) |NAPARI_IMAGEJ_IMAGEJ_DIRECTORY_OR_ENDPOINT=sc.fiji:fiji:2.15.0
"

echo "$modes" | while read mode
Expand Down
10 changes: 10 additions & 0 deletions doc/Usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,13 @@ Note that these buttons are only enabled when there is a ``Layer`` that can be t
Using the |advanced export| button, users can provide metadata for richer data transfer to the ImageJ UI

The |import| button can be used to transfer the **active** ImageJ window back into the napari application.

Using the SciJava REPL
--------------------------------

You can use the SciJava REPL to interactively run SciJava code. This makes it possible to do things like paste existing SciJava scripts into the REPL. More information on scripting in SciJava can be found `here <https://imagej.net/scripting/interpreter>`_.

.. figure:: https://media.imagej.net/napari-imagej/0.2.0/script_repl.png

The REPL can be shown/hidden by clicking on the command prompt icon.

4 changes: 4 additions & 0 deletions src/napari_imagej/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@

import scyjava as sj

from napari_imagej.model import NapariImageJ

__author__ = "ImageJ2 developers"
__version__ = sj.get_version("napari-imagej")

nij = NapariImageJ()
Loading
Loading