fusion-energy / openmc-plasma-source

Creates a plasma source as an openmc.source object from input parameters that describe the plasma
MIT License
26 stars 11 forks source link

testing for multiple python versions #36

Open shimwell opened 2 years ago

shimwell commented 2 years ago

Not sure if this will work as we run ci in a container.

However it would be great if multiple python versions can be tested

Here is an example

https://github.com/C-bowman/inference-tools/blob/760061e77bdc8ddeacb951196a3deb783a6ccffd/.github/workflows/tests.yml#L16-L17

LiamPattinson commented 2 years ago

I found the openmc container to be quite difficult to work with. Any change to the Python environment using the setup-python action caused all tests to fail, so simply adding a python version matrix won't help. I think it'd be best to work with a fixed Python version as long as we're using the openmc container.

Another option would be to move away from the openmc container and simply use ubuntu-latest. However, whenever I try running examples locally, I'm met with complaints about missing .xml files, and I'm not familiar enough with the workings of openmc to solve these issues. If we can figure out a way to fetch the necessary .xml files from within ubtuntu-latest, I think testing multiple Python versions would then be fairly straightforward.

shimwell commented 2 years ago

Ah yes the openmc docker image has just the one version of python inside. So it is not quite as straight forward as it could be.

I guess the missing xml message just needs some minimal xml files. Perhaps the ones attached help. openmc_xml_files.zip

Another option is to make use of a miniconda docker image and install openmc using conda install -c conda-forge openmc then create different python envirments with conda create --name py37 python=3.7