Skip to content

Commit

Permalink
added release_url to component build
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshgupta95 committed Aug 2, 2024
1 parent db1ad07 commit 7c510e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions tools/release_provenance/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ComponentBuild(Base):
spack_hash = Column(String, primary_key=True, index=True)
spec = Column(String, nullable=False)
install_path = Column(String, nullable=False, unique=True)
release_url = Column(Text, nullable=False, unique=True)
model_build = relationship('ModelBuild', secondary="model_component", back_populates='component_build')

class ModelStatusEnum(enum.Enum):
Expand Down
1 change: 1 addition & 0 deletions tools/release_provenance/save_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def get_component_build(component_build_data_list, model_build):
component_build.install_path = component_build_data["install_path"]
component_build.spack_hash = component_build_data["spack_hash"]
component_build.spec = component_build_data["spec"]
component_build.release_url = component_build_data["release_url"]
component_build.model_build.append(model_build)
component_build_list.append(component_build)
else:
Expand Down
6 changes: 4 additions & 2 deletions tools/release_provenance/test_release_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
{
"spack_hash": "ewcdbrfukblyjxpkhd3mfkj4yxfolal8",
"spec": "[email protected]=2023.11.09",
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.0.5.280/"
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.0.5.280/",
"release_url": "https://github.com/ACCESS-NRI/mom5/releases"
},
{
"spack_hash": "ewcdbrfukblyjxpkhd3mfkj4yxfolal9",
"spec": "[email protected]=2023.11.09",
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.1.5.283/"
"install_path": "/g/data/vk83/apps/spack/0.20/release/linux-rocky8-x86_64/intel-19.1.5.283/",
"release_url": "https://github.com/ACCESS-NRI/mom5-example/releases"
}
],
"model_build": {
Expand Down

0 comments on commit 7c510e9

Please sign in to comment.