Skip to content

Jpype test#20

Merged
ctrueden merged 2 commits intomasterfrom
jpype-test
Nov 11, 2020
Merged

Jpype test#20
ctrueden merged 2 commits intomasterfrom
jpype-test

Conversation

@elevans
Copy link
Copy Markdown
Member

@elevans elevans commented Nov 2, 2020

Here's the scyjava layer running on JPype. Some key differences between the older scyjava that ran on pyjnius are:

  • JVM controls have been added and are located in the scyjava.jvm module.
  • The JVM must be started before you can import and use scyjava.convert.
  • Working with Long arrays can be a little goofy. Use Jpype's JArray and JLong.

Copy link
Copy Markdown
Member

@imagejan imagejan left a comment

Choose a reason for hiding this comment

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

Great, @elevans, I'm looking so forward to a JPype-based scyjava/pyimagej!

The Travis build is currently failing, I think what's missing is jpype (or jpype1?) instead of pyjnius here:

install_requires=['pyjnius', 'jgo'],

and here:

- conda install -c conda-forge pyjnius jgo pandas numpy

Comment thread environment.yml Outdated
Comment on lines +1 to +17
usage: conda-env [-h] {create,export,list,remove,update,config} ...

positional arguments:
{create,export,list,remove,update,config}
create Create an environment based on an environment file
export Export a given environment
list List the Conda environments
remove Remove an environment
update Update the current environment based on environment
file
config Configure a conda environment

optional arguments:
-h, --help Show this help message and exit.

conda commands available from other packages:
env
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This file doesn't look like a valid environment.yml, but rather like the accidental output of conda env > environment.yml (instead of maybe conda list > environment.yml).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@imagejan Thanks!! Addressing this now.

@Thrameos
Copy link
Copy Markdown

Thrameos commented Nov 3, 2020

Anything in particular on the Longs that presents an issue?

@imagejan imagejan mentioned this pull request Nov 4, 2020
Comment thread README.md Outdated
Comment on lines +69 to +70
>>> LongArray = JArray(JLong)
>>> dims = LongArray([64, 16])
>>> blank = ij.op().getClass().getMethod('create').invoke(ij.op()).img(dims)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One option here is to use the array notation.

  dims = JLong[64, 16]  # equal to   "dims = new long[64][16]"

elevans and others added 2 commits November 11, 2020 10:30
Closes #18. See #18 for detailed discussion and rationale.
@ctrueden
Copy link
Copy Markdown
Member

The Travis failure is a failure of travis-ci.org, whereas travis-ci.com is passing. It was a mistake for both Travis platforms to be attached to this project at the same time. So there should be no issue with merging this.

@ctrueden ctrueden merged commit 6f46e7e into master Nov 11, 2020
@ctrueden ctrueden deleted the jpype-test branch November 11, 2020 17:07
@ctrueden
Copy link
Copy Markdown
Member

Thanks so much @elevans for your hard work on this!! 🍻 🏆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants