Skip to content

Conversation

@sayalaruano
Copy link
Collaborator

Following the discussion on #146, I added code to look for a home image in the base folder and load it if exist, when creating a report from a directory.

A Enum for ImageFormats was also created in the report.py script

… exist when creating a report from a directory

A Enum for ImageFormats was also created on the report.py script
@sayalaruano sayalaruano changed the title Add code to look for a home image on the base folder and load it if exist when creating a report from a directory Look for a home image on the base folder and load it when creating a report from a directory Jul 18, 2025
@sayalaruano sayalaruano changed the title Look for a home image on the base folder and load it when creating a report from a directory Load home image on the base folder when creating a streamlit report from a directory Jul 18, 2025
@sayalaruano sayalaruano changed the title Load home image on the base folder when creating a streamlit report from a directory Load home image on the base folder when creating a report from a directory Jul 18, 2025
Path to the 'home_image' image file as a string if found, otherwise an
empty string.
"""
for image_format in r.ImageFormat:
Copy link
Collaborator

Choose a reason for hiding this comment

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

so this will return the first one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, but an Enum is iterable, isn't it? So, inside a for-loop should return all the components, or not?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I should got this wrong. So the file will need to called home_image.jpg or alike?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, exactly, bc if we allow any image, it will also add it into the default section created for components at the section level

Copy link
Collaborator

@enryH enryH left a comment

Choose a reason for hiding this comment

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

I am not sure what exactly happens if there are two version of the same image, but let's say it's a detail for now.

@sayalaruano sayalaruano merged commit 01dd9c5 into main Jul 18, 2025
14 checks passed
@sayalaruano sayalaruano deleted the graph-abstr-from-dir branch July 18, 2025 16:21
@sayalaruano sayalaruano restored the graph-abstr-from-dir branch July 18, 2025 16:22
@sayalaruano sayalaruano deleted the graph-abstr-from-dir branch July 18, 2025 16:38
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