Skip to content

Put the current ROBOT profile in the templates directory.#1187

Merged
gouttegd merged 1 commit intomasterfrom
always-use-current-robot-profile
Feb 24, 2025
Merged

Put the current ROBOT profile in the templates directory.#1187
gouttegd merged 1 commit intomasterfrom
always-use-current-robot-profile

Conversation

@gouttegd
Copy link
Contributor

For now, when building the image, we download the ROBOT report profile for the current version of ROBOT (the version used in the ODK) and put it in /tools/robot_report_profile.txt. We do that so that we can check, as part of the standard workflow, whether the custom profile that the project may be using is not lacking any new tests that are available in the current version of ROBOT (see #998).

Here, we simply move the location of the profile file within the image, from /tools/robot_report_profile.txt to /tools/templates/src/ontology/profile.txt.

This does not change how the check mentioned above works (we just update the path involved in that check), but this will have the benefit of automatically installing the ROBOT profile when seeding a repository, since the file is now within the template directory used by the seeding system.

Therefore, we can remove the src/ontology/profile.txt block from the dynamic template pack (which needed to be manually updated by us whenever we updated ROBOT – something I don't think we have really been doing).

But we do not want to always install this profile.txt file in a seeded repository – we only need to do that when the use of a custom profile is enabled in the configuration (that was the reason why the profile was part of the dynamic template pack). To avoid installing the file when a custom profile is not enabled, we use the recently introduced per-template policies system: we set the policy for the src/ontology/profile.txt template to NEVER if a custom profile is not enabled.

closes #999

For now, when building the image, we download the ROBOT report profile
for the current version of ROBOT (the version used in the ODK) and put
it in /tools/robot_report_profile.txt. We do that so that we can check,
as part of the standard workflow, whether the custom profile that the
project may be using is not lacking any new tests that are available in
the current version of ROBOT (see #998).

Here, we simply move the location of the profile file within the image,
from

  /tools/robot_report_profile.txt

to

  /tools/templates/src/ontology/profile.txt

This does not change how the check mentioned above works (we just update
the path involved in that check), but this will have the benefit of
automatically installing the ROBOT profile when seeding a repository,
since the file is now within the template directory used by the seeding
system.

Therefore, we can remove the 'src/ontology/profile.txt' block from the
dynamic template pack (which needed to be manually updated by us
whenever we updated ROBOT -- something I don't think we have really been
doing).

But we do not want to _always_ install this profile.txt file in a seeded
repository -- we only need to do that when the use of a custom profile
is enabled in the configuration (that was the reason why the profile was
part of the dynamic template pack). To avoid installing the file when a
custom profile is _not_ enabled, we use the recently introduced
per-template policies system: we set the policy for the
'src/ontology/profile.txt' template to NEVER if a custom profile is not
enabled.

closes #999
@gouttegd gouttegd self-assigned this Feb 20, 2025
@gouttegd gouttegd requested a review from matentzn February 20, 2025 23:44
Copy link
Contributor

@matentzn matentzn left a comment

Choose a reason for hiding this comment

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

Very nice, thanks!

@gouttegd gouttegd merged commit f0cf2bf into master Feb 24, 2025
1 check passed
@gouttegd gouttegd deleted the always-use-current-robot-profile branch February 24, 2025 09:36
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.

Default profile.txt (ROBOT report config) not synced with ROBOT repo

2 participants