REGnosys / rosetta-code-generators

Write code generators for any language, based on the rosetta DSL
Apache License 2.0
17 stars 33 forks source link

Simplify the testing and release process #316

Open dschwartznyc opened 5 months ago

dschwartznyc commented 5 months ago

Description

Testing and creating a new Python generator release is complicated and very time consuming especially since testing includes ensuring that the generator creates a valid form of CDM.

After taking a copy of the current repo, the steps we follow are:

To develop and test changes:

  1. Update the Python POM to point to a recent version of the complete CDM Rune mode
  2. Enable CDM generation in python/src/test/java/com/regnosys/rosetta/generator/python/PythonFilesGeneratorTest.xtend
  3. Build the codebase mvn clean install
  4. Invoke the Python build script
  5. Run the test script
  6. Once dev and local testing finishes, test the Codefresh config by use of docker

Once development is finished and all tests pass, to prep for a PR:

  1. Undo (1) and (2) above
  2. Push the changes
  3. Raise a PR

Changes may be required in the CDM repo

  1. To enable testing of new generator, update the top level CDM POM to force use of the local version of the generator
  2. Build the Python version of CDM
  3. Run tests locally
  4. Use docker to test the Python Codefresh build commands
  5. Once finished, back out (1)
  6. Raise a PR once the generator PR has been merged

Describe the solution you'd like

The desired solution would allow skipping and reverting local config changes

Describe alternatives you've considered

We considered and rejected scripting changes to the environment as potentially fragile because they rely upon knowledge of the POM and code.