Skip to content

[FIX] Project.write_json() update outputs instead of overriding them#431

Open
Gautzilla wants to merge 5 commits into
Project-OSmOSE:mainfrom
Gautzilla:fix/project-write-json
Open

[FIX] Project.write_json() update outputs instead of overriding them#431
Gautzilla wants to merge 5 commits into
Project-OSmOSE:mainfrom
Gautzilla:fix/project-write-json

Conversation

@Gautzilla

Copy link
Copy Markdown
Contributor

If a project's JSON was modified by another process while the script was running (e.g. if two transforms are run simultaneously in different jobs), the latter overwrote the former

This PR should fix it by parsing the outputs in the project's JSON and joining them with the outputs of the project in the current shell.

The only remaining thing that could be messy if if someones runs simultaneously 2 transform that have the same name: the latter might still overwrite the former, but I'm not sure what's the best way of avoiding that (other than the user not doing that mistake!)

This PR resolves #405

@Gautzilla Gautzilla requested a review from mathieudpnt July 6, 2026 15:56
@Gautzilla Gautzilla self-assigned this Jul 6, 2026
@Gautzilla Gautzilla added the Bug Something's fishy label Jul 6, 2026
@coveralls

coveralls commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 98.981% (+0.009%) from 98.972% — Gautzilla:fix/project-write-json into Project-OSmOSE:main

@Gautzilla Gautzilla marked this pull request as ready for review July 7, 2026 09:14

@mathieudpnt mathieudpnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This worked for me as i successfully launched 13 Transforms simultenaously 🥇

Also, would be nice to have the transforms of a Project instance in alphanumerical order 👼

It would be nice to sort alphanumericaly the Transform names though

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

Labels

Bug Something's fishy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Messy project json file transform name refresh

3 participants