Repository navigation
Use ProFSea version - #105
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Import ordering and the stale version assertion will fail existing CI checks.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Uses installed ProFSea package metadata to populate output source attributes.
Changes:
- Resolves the package version dynamically.
- Applies it to dataset and model output metadata.
| File | Description |
|---|---|
profsea/utils/utils.py |
Resolves and records the package version. |
profsea/components/core/spatial_model.py |
Updates spatial output metadata. |
profsea/components/core/local_model.py |
Updates local output metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -1,5 +1,6 @@ | |||
| from __future__ import annotations | |||
|
|
|||
| from importlib.metadata import PackageNotFoundError, version as package_version | |||
|
|
||
| # Add ProFSea version and scenario metadata | ||
| ds.attrs["source"] = "ProFSea v3.0" | ||
| ds.attrs["source"] = f"ProFSea v{PROFSEA_VERSION}" |
There was a problem hiding this comment.
The changes all look good to me -- but, should this test retrieve the package version (like in utils.py), rather than hard code v3.0.0 to avoid breaking in a future ProFSea version?
There was a problem hiding this comment.
Could not find an easy solution to this. So, I hard coded it. We would need to update it every time we bump the version. Maybe we can make it dynamic in future updates.
Are versions showing up properly in output files now?
There was a problem hiding this comment.
Ah ok, makes sense. Yes, all working properly with the output files, so all looks good!

Uses correct version of ProFSea in output attributes.