Skip to content

Feature/add javafx gui #121#286

Merged
VerisimilitudeX merged 18 commits intoVerisimilitudeX:mainfrom
frankschmitt:feature/add-javafx-gui-#121
Nov 6, 2022
Merged

Feature/add javafx gui #121#286
VerisimilitudeX merged 18 commits intoVerisimilitudeX:mainfrom
frankschmitt:feature/add-javafx-gui-#121

Conversation

@frankschmitt
Copy link
Contributor

@frankschmitt frankschmitt commented Oct 30, 2022

Implements a very basic GUI for DNAnalyzer (using JavaFX).

Closes #121.

So far, you can

  • enter the name of the DNA file
  • enter the name of the protein file
  • set min and max
  • start the analysis

Results are written to a text area in the GUI.

@CLAassistant
Copy link

CLAassistant commented Oct 30, 2022

CLA assistant check
All committers have signed the CLA.

@LimesKey LimesKey added this to the UX milestone Oct 30, 2022
@LimesKey LimesKey added the documentation Improvements or additions to documentation label Oct 30, 2022
Copy link
Collaborator

@LimesKey LimesKey left a comment

Choose a reason for hiding this comment

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

I'm trying to run it from CMD for Windows, ./gradlew run --args="--gui" does not seem to work, '.' is not recognized as an internal or external command, operable program or batch file.. Only .\gradlew run --args="--gui" works with the backslash.

I see here it says something about Java 19, do you need Java 19 for it to run or does it work with Java 17. Currently Gradle only supports Java 17 so everyone only downloads Java 17, I don't want to have to download Java 19 too. javafx { version = "19"

I am unable to run this and .\gradlew build fails. I'll try to do it again.

@frankschmitt
Copy link
Contributor Author

I'm trying to run it from CMD for Windows, ./gradlew run --args="--gui" does not seem to work, '.' is not recognized as an internal or external command, operable program or batch file.. Only .\gradlew run --args="--gui" works with the backslash.

Aw sorry, stupid me - ./gradlew is UNIX / Linux syntax, whereas for Windows, it should indeed by .\gradlew or simply gradlew. I'll update the README accordingly.

I see here it says something about Java 19, do you need Java 19 for it to run or does it work with Java 17. Currently Gradle only supports Java 17 so everyone only downloads Java 17, I don't want to have to download Java 19 too. javafx { version = "19"

That's the JavaFX version - running it with Java 17 works perfectly fine (in fact, I'm using OpenJDK 17.0.4 myself)

I am unable to run this and .\gradlew build fails. I'll try to do it again.

VerisimilitudeX and others added 3 commits October 30, 2022 23:31
The gradle build command failed with "Entry ... is a duplicate". To circumvent this, we use the exclude strategy for handling duplicates; see https://dzone.com/articles/gradle-goodness-handle-copying .
…3/frankschmitt/DNAnalyzer into feature/add-javafx-gui-#121
@frankschmitt
Copy link
Contributor Author

I am unable to run this and .\gradlew build fails. I'll try to do it again.

Should be fixed now - I've included a strategy for duplicate handling (I'm still not sure where the duplicate comes from, though - the file name mentioned in the error message (reflectionconfig.json) is totally unfamiliar to me. Might be a grade internal thingy)

@frankschmitt frankschmitt requested a review from LimesKey October 31, 2022 15:04
@LimesKey
Copy link
Collaborator

Seems to get stuck at 80%? The GUI opens and the GUI looks really good so far though.
image

@VerisimilitudeX
Copy link
Owner

VerisimilitudeX commented Oct 31, 2022

@frankschmitt could you please clear the merge conflicts? I'm really looking forward to testing the GUI later today! Thank you so much for working on this, I'll give you some feedback on it after some testing.

# Conflicts:
#	README.md
#	build.gradle
#	src/main/java/DNAnalyzer/CmdArgs.java
#	src/main/java/DNAnalyzer/DNAAnalysis.java
#	src/main/java/DNAnalyzer/Properties.java
@frankschmitt
Copy link
Contributor Author

frankschmitt commented Nov 1, 2022

@frankschmitt could you please clear the merge conflicts? I'm really looking forward to testing the GUI later today! Thank you so much for working on this, I'll give you some feedback on it after some testing.

I've synced the branch with main and resolved the merge conflicts - should be ok now.

Signed-off-by: Frank Schmitt <frank@qwhon.de>
Copy link
Collaborator

@LimesKey LimesKey left a comment

Choose a reason for hiding this comment

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

It looks really good so far, although it is still stuck at 80% in the CLI, the GUI still works and is responsive.

I also get this message in the CLI everytime I click "Analyze"

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

Is it possible for you to make this the GUI launch from an executable file instead of the CLI? Most users are not comfortable with even touching the CLI for anything, so having this in a exe will make it a lot easier for beginners.

Low priority, but are you also able to incorporate drag and drop functionality where it says "put filename in DNA file, and click analyze"? I'm very impressed though!

@LimesKey
Copy link
Collaborator

LimesKey commented Nov 2, 2022

> Configure project :
Project : => no module-info.java found

@VerisimilitudeX
Copy link
Owner

@frankschmitt could you please add the features currently present in the GUI to the README: https://github.com/Verisimilitude11/DNAnalyzer/blob/main/README.md#:~:text=CLI%20GitHub%20repository.-,GUI,-A%20cross%2Dplatform
Thanks!

@VerisimilitudeX
Copy link
Owner

@frankschmitt, please clear conflicts as well. Thanks for implementing this btw!

@frankschmitt
Copy link
Contributor Author

It looks really good so far, although it is still stuck at 80% in the CLI, the GUI still works and is responsive.

I guess that's how "gradle run" works - it considers the task completed only when the program exits (i.e. when you close the GUI).

I also get this message in the CLI everytime I click "Analyze"

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

That happens if you didn't set the DNA file - you have to enter the file name first.

Is it possible for you to make this the GUI launch from an executable file instead of the CLI? Most users are not comfortable with even touching the CLI for anything, so having this in a exe will make it a lot easier for beginners.

AFAIK, the usual approach would be to provide a .cmd file for Windows and a .sh file for Linux / UNIX that uses the java executable to launch the application. Do you think that would suffice?

Low priority, but are you also able to incorporate drag and drop functionality where it says "put filename in DNA file, and click analyze"? I'm very impressed though!

I'll create another issue for this. Implementing Drag & Drop is usually a little bit involved.

@frankschmitt
Copy link
Contributor Author

@frankschmitt, please clear conflicts as well. Thanks for implementing this btw!

I've updated the README and re-synced with the main branch - all conflicts should be resolved now.

@frankschmitt frankschmitt requested a review from LimesKey November 5, 2022 11:52
@frankschmitt
Copy link
Contributor Author

@Verisimilitude11 One more question regarding:

Verisimilitude11 removed the[ hacktoberfest-accepted ]

Is there a specific reason why you removed the hacktoberfest-accepted label?

@LimesKey
Copy link
Collaborator

LimesKey commented Nov 5, 2022

Have you seen this?
image
@frankschmitt

@VerisimilitudeX
Copy link
Owner

I guess that's how "gradle run" works - it considers the task completed only when the program exits (i.e. when you close the GUI).

Yeah, that's fine - it doesn't really matter.

AFAIK, the usual approach would be to provide a .cmd file for Windows and a .sh file for Linux / UNIX that uses the java executable to launch the application. Do you think that would suffice?

Sure, could you please add that to your commit? Thanks!

I'll create another issue for this. Implementing Drag & Drop is usually a little bit involved.
Sounds good. 👍

I've updated the README and re-synced with the main branch - all conflicts should be resolved now.
Awesome, I'm going to merge this then. You can add the .cmd and .sh file in another PR.

Regarding the hacktoberfest-accepted label, that was only for a PR challenge during the month of October. As October is now over, I removed the label. It has nothing to do with your PR - this is great!

@VerisimilitudeX
Copy link
Owner

Have you seen this? image @frankschmitt

@LimesKey, I will add separate issues for this - @frankschmitt doesn't need to fix them.

@VerisimilitudeX
Copy link
Owner

VerisimilitudeX commented Nov 6, 2022

@frankschmitt one thing, did you mark this as //TODO?
image

@VerisimilitudeX
Copy link
Owner

I guess it would be helpful if @frankschmitt could take care of adding Javadocs is he gets time; no urgency. In the meantime, I'm going to merge this PR if it looks fine to you @LimesKey.

@LimesKey
Copy link
Collaborator

LimesKey commented Nov 6, 2022

LGTM @Verisimilitude11

@VerisimilitudeX
Copy link
Owner

LGTM @Verisimilitude11

Can you please approve the PR?

Copy link
Collaborator

@LimesKey LimesKey left a comment

Choose a reason for hiding this comment

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

LGTM

@VerisimilitudeX VerisimilitudeX merged commit 0a0f358 into VerisimilitudeX:main Nov 6, 2022
@frankschmitt
Copy link
Contributor Author

Regarding the hacktoberfest-accepted label, that was only for a PR challenge during the month of October. As October is now over, I removed the label. It has nothing to do with your PR - this is great!

Sorry to be a nuisance, but could you please re-add it? Because currently, the PR isn't counted for the Hacktoberfest challenge:

Screenshot from 2022-11-06 13-53-33

@frankschmitt
Copy link
Contributor Author

I guess it would be helpful if @frankschmitt could take care of adding Javadocs is he gets time; no urgency. In the meantime, I'm going to merge this PR if it looks fine to you @LimesKey.

I've added a new issues for this - #295. Can you please assign it to me?

@VerisimilitudeX
Copy link
Owner

Regarding the hacktoberfest-accepted label, that was only for a PR challenge during the month of October. As October is now over, I removed the label. It has nothing to do with your PR - this is great!

Sorry to be a nuisance, but could you please re-add it? Because currently, the PR isn't counted for the Hacktoberfest challenge:

Screenshot from 2022-11-06 13-53-33

Sure, I added it back, no worries.

@VerisimilitudeX
Copy link
Owner

I guess it would be helpful if @frankschmitt could take care of adding Javadocs is he gets time; no urgency. In the meantime, I'm going to merge this PR if it looks fine to you @LimesKey.

I've added a new issues for this - #295. Can you please assign it to me?

Done. Thanks for working on those, we really appreciate your help with the GUI!

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request hacktoberfest-accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GUI

4 participants