clEsperanto / clesperantoj_prototype

A Java Wrapper around CLIc / clesperanto
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

Change autogenerated Javadoc for Tiers #81

Open carlosuc3m opened 3 days ago

carlosuc3m commented 3 days ago

HEllo @StRigaud , Deployment seems to be almost ready but I am finding an error generating the JAvadoc, which is required to deploy to scijava.

The tag @see cannot be used together with links. The Tier generator uses it for every tier: https://github.com/clEsperanto/clesperantoj_prototype/blob/f40abd41030999f781f86687ccf29f5c4bc0900a/src/main/java/net/clesperanto/kernels/Tier1.java#L27

The link needs to be embedded in html: instead of @see https://clij.github.io/clij2-docs/reference_absolute we need to use @see <a href="https://clij.github.io/clij2-docs/reference_absolute">reference_absolute</a>

StRigaud commented 3 days ago

Ffs ...

Okay, I will remove the tag for now. It will be easier to deal with this later

StRigaud commented 3 days ago

I merged a fix but the issue is not solved, I will find an alternative later when more urgent issue are done

carlosuc3m commented 3 days ago

There are more Javadoc errors that stop the deploymnet (mvn does not tell you all at once). Now the issue is with using &, > and <. They should be:

& -> &amp; > -> &gt; < -> &lt; I can have a look at the autogenerator for more possible conflicts

StRigaud commented 3 days ago

So:

is it correct?

StRigaud commented 3 days ago

@carlosuc3m can you actually point to a piece of code to correct / an example. I don't understand well the issue

StRigaud commented 3 days ago

Ha got it, the charactere in the JavaDoc need to be replace by code charactere

carlosuc3m commented 3 days ago

Yess sorry. Basically in javadocs there are some characters reserved for certain things that cannot be used. These special characters need to be substituted for their html equivalents

For example this line uses < which cannot be used for javadoc. https://github.com/clEsperanto/clesperantoj_prototype/blob/d1a10d9b058f0dbc172c4e4ce15e9f08a7376d7d/src/main/java/net/clesperanto/kernels/Tier3.java#L25

The line is: * @return ArrayList<Float>

It should be

* @return ArrayList&lt;Float&gt;

So the mvn javadoc plugin recognises it

StRigaud commented 3 days ago

I made a PR, the JavaDoc look like nothing but hopefully its ok

carlosuc3m commented 3 days ago

In this line https://github.com/clEsperanto/clesperantoj_prototype/blob/d1a10d9b058f0dbc172c4e4ce15e9f08a7376d7d/src/main/java/net/clesperanto/kernels/Tier1.java#L1993

Instead of * If it was > 0, it will be 1.

do * If it was &gt; 0, it will be 1.

carlosuc3m commented 3 days ago

Also we might need javadoc for Javacpp xd, lets see

carlosuc3m commented 3 days ago

Also I am trying right now if it works but there is a difference between html and non-html <> use.

You can do * <pre>f(x) = x</pre> For binary images, use binaryNot.

but you cannot do 5 > 4

StRigaud commented 3 days ago

I simply did a full character replacement, if it work I am fine and we will see later for a cleaner writing

StRigaud commented 3 days ago

Also we might need javadoc for Javacpp xd, lets see

That would be annoying

carlosuc3m commented 3 days ago

It builds the javadoc now without any issue 🥳

StRigaud commented 2 days ago

Not urgent but for later, what can I use instead of the @see tag to display links? or do I need to convert the links to html ?

carlosuc3m commented 2 days ago

It looks like it: The correct link formatting is the following: @see <a href="https://clij.github.io/clij2-docs/reference_absolute">reference_absolute</a>