Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tagging in include-path with YAML #2

Closed
dindon-sournois opened this issue Jun 22, 2023 · 4 comments
Closed

Use tagging in include-path with YAML #2

dindon-sournois opened this issue Jun 22, 2023 · 4 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@dindon-sournois
Copy link

It seems there's no documented way of doing in YAML what is advertised in the documentation in XML:

<?xml version="1.0" encoding="UTF-8"?>
<jube>
  <include-path>
    <path tag="plat1">some path</path>
    <path tag="plat2">another path</path>
    ...
  </include-path>
  ...
</jube>

Is it supported ?

@thobreuer
Copy link
Collaborator

thobreuer commented Jul 11, 2023

Yes it is supported. But we found a bug. If you don't want to wait for the next version, you have to make the following code adaptation:
Please change line 668 of file jube2/jubeio.py (https://github.com/FZJ-JSC/JUBE/blob/master/jube2/jubeio.py#L668):

-        if len(include_path_etree.text.strip()) > 0:
+        if (include_path_etree.text) and len(include_path_etree.text.strip()) > 0:

Here is a YAML example which we will add to the docu:

  include-path:
    path:
      - {tag: plat1,  _: "some path"}
      - {tag: plat2,  _: "another path"}

@thobreuer thobreuer added bug Something isn't working documentation Improvements or additions to documentation labels Jul 11, 2023
@dindon-sournois
Copy link
Author

I'll test this as soon as I'm able to patch the jube I'm using thanks!

@dindon-sournois
Copy link
Author

I could test it and it works. You might want to increase indentation up a notch in your example for "path:" and bellow as I was getting parsing errors.
I had hope I could use $jube_benchmark_home in the path but it seems not, but I made it work with relative path.

@thobreuer
Copy link
Collaborator

thobreuer commented Nov 16, 2023

Thanks for reporting. Fixed in 27c3d57 as part of REL-2.6.0.
Unfortunately, parameters such as $jube_benchmark_home have not yet been evaluated at the time the includes are processed, and therefore cannot be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants