Skip to content

563 add dependency info - #600

Open
Joerg Henrichs (hiker) wants to merge 7 commits into
mainfrom
563_add_dependency_info
Open

563 add dependency info#600
Joerg Henrichs (hiker) wants to merge 7 commits into
mainfrom
563_add_dependency_info

Conversation

@hiker

Copy link
Copy Markdown
Collaborator

Adds DependencyInfo class (which is used in LFRic and UM) to Fab.

@hiker
Joerg Henrichs (hiker) requested review from a team and allynt and removed request for a team August 26, 2026 06:31
@hiker

Copy link
Copy Markdown
Collaborator Author

I had to add yaml as dependency.

@hiker

Copy link
Copy Markdown
Collaborator Author

Matthew Hambley (@MatthewHambley) , Sam Clarke-Green (@t00sa) - adding you, since I assume allynt is also on leave.

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.

A few small issues around documentation and minor details.

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 documentation should probably mention the checkout-and-merge behaviour outlined in the docstring of RepoInfo.

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.

I've updated the documentation to mention this, but didn't extend the example code, instead added a link to SimSys_script repository (since that code is not that easy)

Comment on lines +37 to +38
to access and update them individually. Source and ref can
are None if there is no information for a repository.

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.

"can are", looks like a change of mind mid sentence.

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.

Indeed, fixed.

dep_info = DependencyInfo(yaml_file)

# Loop over all dependency repositories:
for repo in self.dependency_info.get_repo_names():

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.

Do we care about the keys here? Would it be tidier to just iterate over the repository information objects directly?

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.

The key is used in logging message. But I can indeed use a items() and avoid accessing the dict for getting the info object, which is more pythonic I think(?).

Comment thread pyproject.toml
'flake8 >= 5.0.4',
'mypy'
'mypy',
'pyyaml',

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.

Is this not a permanent dependency. i.e. one for the dependencies = ... section above?

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.

I opted for dev, since not all Fab applications will need it - and if an application is using a yaml file, you would assume that they have yaml installed as part of their setup ;)
But, I don't mind, if you prefer to have it as a permanent dependency, I am happy to move this.

@hiker

Copy link
Copy Markdown
Collaborator Author

Ready for next review,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants