Uploaded image for project: 'Corda'
  1. CORDA-2777

Change the doc substitution so that it works in code blocks as well as in other places

    Details

    • Type: Story
    • Status: Done (View workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects versions: Corda 4
    • Fix versions: Corda 4.1
    • Components: None
    • Labels:
      None
    • Feature Team:
      Select team
    • Target Version/s:
    • Story Points:
      1
    • Sprint:

      Description

      Currently, we have this in code.py:

      
      with open("../../constants.properties", "r") as f:
          constants_properties_lines = f.readlines()
      constants_properties_dict = dict([l.strip().split('=') for l in constants_properties_lines if not l.startswith("#") and not l.strip() == ""])
      
      rst_epilog = """
      .. |java_version| replace:: 8u%s
      .. |kotlin_version| replace:: %s
      .. |gradle_plugins_version| replace:: %s
      .. |quasar_version| replace:: %s
      .. |corda_version| replace:: %s
      """ % (constants_properties_dict["java8MinUpdateVersion"],
             constants_properties_dict["kotlinVersion"],
             constants_properties_dict["gradlePluginsVersion"],
             constants_properties_dict["quasarVersion"],
             constants_properties_dict["cordaVersion"])
      

      But this does now support substitutions in code blocks. There is a bit of python we can use to do this. So we're going to use that instead so that we can get rid of a lot of

      <version>

      s in the docs and have them nicely dynamically replaced.

      Heavy boots. What could possibly go wrong?!!

        Attachments

          Activity

            People

            • Assignee:
              bw Ben Wyeth
              Reporter:
              bw Ben Wyeth
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: