8000 start status summarize option by lupeterm · Pull Request #200 · exasim-project/OBR · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

start status summarize option #200

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

Merged
merged 22 commits into from
Aug 6, 2024
Merged

start status summarize option #200

merged 22 commits into from
Aug 6, 2024

Conversation

lupeterm
Copy link
Collaborator

Adds --summarize CLI option for obr status

@lupeterm
Copy link
Collaborator Author

format!

@lupeterm
Copy link
Collaborator Author

format!

Co-authored-by: Lukas <lupeterm@users.noreply.github.com>
@lupeterm lupeterm requested a review from greole March 17, 2024 13:09
@lupeterm
Copy link
Collaborator Author

!format

@lupeterm
Copy link
Collaborator Author

format!

Co-authored-by: Lukas <lupeterm@users.noreply.github.com>
@lupeterm lupeterm requested a review from greole March 20, 2024 14:57
Copy link
Collaborator
@greole greole left a comment

Choose a reason for hiding this comment

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

Some minor things to be resolved then it can be merged.

def group_jobs(self, jobs: list[Job], summarize: int = 0) -> dict[str, list[Job]]:
"""Returns the list of jobs of the given OpenFOAMProject where the last `summarize` levels are grouped together at the corresponding parent view."""
grouped = {}
id_view_map = map_view_folder_to_job_id(os.path.join(self.path, "view"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we should pass it as parameter, then we are more flexible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just to be clear, you suggest to pass the path, or the view map?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Im going to go ahead and assume the former

Copy link
Collaborator

Choose a reason for hiding this comment

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

no the latter, generate the view map outside of this function and pass the map to group_jobs. Because we might pregenerate the map and use it somewhere else too.

if p_view and p_view not in grouped:
grouped[p_view] = []
view = p_view or id_view_map.get(jobid)
job.doc["state"]["view"] = view
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
job.doc["state"]["view"] = view

I think that should be somewhere else, otherwise it an unexpected side effect and hard to find later.

@greole
Copy link
Collaborator
greole commented Apr 23, 2024

format!

Co-authored-by: Gregor Olenik <greole@users.noreply.github.com>
@greole
Copy link
Collaborator
greole commented Aug 6, 2024

format!

@greole greole merged commit 430fc34 into dev Aug 6, 2024
7 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
0