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

Align to latest Nextflow version and bump to groovy 4.0 #91

Merged
merged 7 commits into from
Oct 10, 2024

Conversation

tillenglert
Copy link
Collaborator

@tillenglert tillenglert commented Sep 11, 2024

This PR will align the plugin to the latest nextflow version (24.08.0-edge).

It will deprecate all nextflow versions prior to 24.01.0-edge.

(I might need to add some updates to the test workflows, but we'll see if that can be changed apart of this PR)

@tillenglert tillenglert marked this pull request as draft September 11, 2024 09:21
@tillenglert tillenglert force-pushed the Align_to_latest_nextflow branch 2 times, most recently from cb1518a to ad09eb2 Compare September 30, 2024 11:08
@tillenglert tillenglert marked this pull request as ready for review September 30, 2024 11:11
@@ -182,7 +182,7 @@ class CO2FootprintFactory implements TraceObserverFactory {
* Factors of memory power usage
*/
// nm: size of memory available [GB] -> requested memory
Long memory = trace.get('memory') as Long
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you change this? I think Long would be needed here

Copy link
Collaborator Author

@tillenglert tillenglert Oct 1, 2024

Choose a reason for hiding this comment

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

The function returns a List<Double>, and within this list the memory. So to return it actually as said list the memory needs to be cast to double. If the memory is returned as memory, the function would need to be set to return something like List<numerical> which in turn would need casting to doubles again. So in this case I would say the lesser evil is to cast the memory to double, even though it is a non float number.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

(it was about this list:

)

Copy link
Collaborator

Choose a reason for hiding this comment

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

conclusion: although long would be more optimal, using double should be sufficient to represent the memory values here

Copy link
Collaborator

@skrakau skrakau Oct 9, 2024

Choose a reason for hiding this comment

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

Maybe we can convert the returned list to a map in a follow-up PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a comment and a todo to the cast, which is now later to calculate the nm and respective used energy with the full precision memory

@tillenglert
Copy link
Collaborator Author

The force push was to sign off every commit using, which is now required.

Copy link
Collaborator

@skrakau skrakau left a comment

Choose a reason for hiding this comment

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

LGTM!

@tillenglert tillenglert merged commit b604b7a into nextflow-io:master Oct 10, 2024
3 checks passed
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.

2 participants