Skip to content

Conversation

@JulianFlesch
Copy link
Contributor

Closes #3952

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@ningyuxin1999 ningyuxin1999 self-assigned this Dec 2, 2025
@JulianFlesch JulianFlesch changed the title switch pre-commit to prek for development Implement wave container commands Dec 2, 2025
]
return containers_flat

def _resolve_module_dir(self, module: str | Path) -> Path:
Copy link
Contributor

Choose a reason for hiding this comment

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

do we not have this funciton already somehwere else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I might be overlooking something, but not really ... As far as I can tell, we have ModulesInfo, which was used at some point, but it never provides the environment.yml or meta.yml paths, or confirms their existance.

Maybe this should be in ModulesInfo?

return module_dir

@staticmethod
def _environment_path(module_dir: Path) -> Path:
Copy link
Contributor

Choose a reason for hiding this comment

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

because we lint for this, I think we should be able to reuse something there.



@contextmanager
def set_wd_tempdir() -> Generator[None, None, None]:
Copy link
Contributor

Choose a reason for hiding this comment

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

this function is for sure created somewhere else already.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, In pipeline downloads! But that version throws Download-specific errors ...
The plan was move it out of the utils.py over there into the general utils.
But now we don't use it at all anymore ...

Should we remove it again?

Comment on lines +17 to +19
IMAGE_KEY = "name"
BUILD_ID_KEY = "buildId"
SCAN_ID_KEY = "scanId"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think any of these will change in the future. clearer if we just use them as strings in the code I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you don't feel strongly about this, I think we should keep them. They only exist in the class scope, close to where they are being used, but there we use them quite a lot as it helps us to not have redundant literals

for platform in CONTAINER_PLATFORMS:
containers[cs][platform] = self.request_container(cs, platform, env_path, await_, dry_run)

for platform in CONTAINER_PLATFORMS:
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to loop twice over container_platforms?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it makes it more readable what's being done with being less nested and clearly separated. But for comparing, applied your suggestion in af97d90

@JulianFlesch
Copy link
Contributor Author

JulianFlesch commented Dec 9, 2025

  • Test still missing ( @ningyuxin1999 )
  • Linting still missing
  • Sorting the resulting meta.yml after running create() still missing
  • Refactoring ModuleInfo to be helpful here -> TODO: ISSUE
  • Decision required: Behavior if modules don't have meta.yml and/or environment.yml

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.

4 participants