Skip to content

<%= taxonomy %> doesn't work in README.md.erb #3156

Open

Description

@DavidGoldwasser

https://github.com/NREL/OpenStudio/blob/6aed934ea899f50ee017347bf4333687f5af15ca/openstudiocore/src/utilities/bcl/templates/common/README.md.erb#L17

This isn't a big deal, but if it is an easy fix and if we have to make a new installer anyway, it would be nice to fix. This will the readme.md on the all the updated measures on BCL.

Note: this doesn't error out the process, it just ends up with a blank space on the Readme.md under taxonomy.

Activity

  1. removed their assignment
    on Jun 18, 2018
  2. macumber commented on Jun 18, 2018

    @macumber
    Contributor

    Looks like the issue here is that I added support for putting taxonomy in the measure.rb which will update it in the XML. Taxonomy in measure.rb will end up in the readme.md but not if it is only in the xml.

    def taxonomy
    return 'Envelope.form'
    end

  3. DavidGoldwasser commented on Jun 18, 2018

    @DavidGoldwasser
    CollaboratorAuthor

    Ok, so more of a measure update issue than core C++. That makes sense. I can close this issue unless you see reason to keep it open. For measures, I think would probably just add the def to measure.rb as measure are worked on. I don't think we have the time or an automated way to batch change them.

  4. macumber commented on Jun 18, 2018

    @macumber
    Contributor

    Related to #3159

  5. DavidGoldwasser commented on Apr 18, 2021

    @DavidGoldwasser
    CollaboratorAuthor

    I'm going to re-open this as it is something I want to show on all measure.rb files to identify where the users will find these measures on BCL.

  6. jmarrec commented on Apr 26, 2021

    @jmarrec
    Collaborator

    I am not following what the action item(s) is (are) @DavidGoldwasser? Could you explain please?

    If I follow correctly:

    So how do we resolve this?

    Could it be this?

    • Update the measure template to have a taxonomy method. Probably make it accept a list too.
      # A single string, or a list of BCL tags (shown here) https://bcl.nrel.gov/api/taxonomy/measure
      def taxonomy
        return ['Envelope.form', 'HVAC.HVAC Controls']
      end
    • (On OSApp side, the user-selected taxonomy should end up in the template...)
    • Upon openstudio measure -u ., this should populate the tags section of the measure.xml
      <tags>
        <tag>Envelope.form</tag>
        <tag>HVAC.HVAC Controls</tag>
      </tags>
    • Modify the default README.md.erb if it needs to handles a LIST inside of a raw string.
    <% if taxonomy.size > 0 %>
    ## Taxonomy
    <%= taxonomy.each do |tag| %>
    * <%= argument[:name] %>
    <% end %>
    
  7. jmarrec commented on Apr 26, 2021

    @jmarrec
    Collaborator

    I'm not sure why the XML would allow several tags but setTaxonomyTag is single-use only.

    https://github.com/NREL/OpenStudio/blob/3d8ee1fc5a9db6654d2c451be5bafeadda6250be/src/utilities/bcl/BCLMeasure.hpp#L190-L195

  8. 7 remaining items

  9. jmarrec commented on May 3, 2021

    @jmarrec
    Collaborator

    Yeah that error means you probably tried to make it a list but didn't update the readme.md.erb to reflect that.

    I think we still need to clean up our act here so I'll reopen:

    • Question: do we keep supporting a single taxonomy tag? @kflemin @nllong
    • Based on the outcome of that question, update the measure templates to include the def taxonomy method.
    • (maybe some updates to the docs somewhere?)
  10. reopened this on May 3, 2021
  11. nllong commented on May 3, 2021

    @nllong
    Member

    On the question--i think that is a question on how the new BCL is handing it. Also need to make sure that PAT handles it too (may be moot if using the MeasureManager). @kflemin

  12. jmarrec commented on Jun 8, 2021

    @jmarrec
    Collaborator

    @kflemin @nllong is the new BCL ready or do we have design docs to answer this question please? I'd like to put this issue to rest as soon as possible so we can move on. Thanks!

  13. jmarrec commented on May 31, 2023

    @jmarrec
    Collaborator

    @kflemin @nllong is the new BCL ready or do we have design docs to answer this question please? I'd like to put this issue to rest as soon as possible so we can move on. Thanks!

    Does the new BCL handle multiple Taxonomy tags?

  14. jmarrec commented on Oct 30, 2024

    @jmarrec
    Collaborator

    Ping

  15. DavidGoldwasser commented on Oct 31, 2024

    @DavidGoldwasser
    CollaboratorAuthor

    I can try to close this or get fix in for 3.11 if there is something else. I'll tag it so I don't forget about it

  16. jmarrec commented on Mar 20, 2025

    @jmarrec
    Collaborator

    Ping

  17. DavidGoldwasser commented on Apr 3, 2025

    @DavidGoldwasser
    CollaboratorAuthor

    I think we will have some new XML data soon related to measure language and possibly additional dependences. We we update to add those to measure.rb we can fix this as well. So I may tag this for 3.11.0 instead of 3.10.0. @kflemin does that make sense.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions