Skip to content

Use ProFSea version - #105

Merged
Hemant Khatri (hmkhatri) merged 5 commits into
profsea-v3from
version-timeline
Sep 30, 2026
Merged

Hemant Khatri (hmkhatri) merged 5 commits into
profsea-v3from
version-timeline

Conversation

@hmkhatri

Copy link
Copy Markdown
Collaborator

Uses correct version of ProFSea in output attributes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Import ordering and the stale version assertion will fail existing CI checks.

Review effort: Balanced
Findings: 2 High severity

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.

Comment thread profsea/utils/utils.py Outdated
@@ -1,5 +1,6 @@
from __future__ import annotations

from importlib.metadata import PackageNotFoundError, version as package_version
Comment thread profsea/utils/utils.py

# Add ProFSea version and scenario metadata
ds.attrs["source"] = "ProFSea v3.0"
ds.attrs["source"] = f"ProFSea v{PROFSEA_VERSION}"
Comment thread tests/utils/test_utils.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah ok, makes sense. Yes, all working properly with the output files, so all looks good!

@hmkhatri
Hemant Khatri (hmkhatri) merged commit 160ee8a into profsea-v3 Sep 30, 2026
2 checks passed
@hmkhatri
Hemant Khatri (hmkhatri) deleted the version-timeline branch September 30, 2026 09:29
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.

3 participants