diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..6b7a787 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/python:2-3.9-bullseye", + "features": { + "ghcr.io/devcontainers/features/python:1": { + "installTools": true, + "version": "3.9" + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "pip3 install --user -r requirements.txt" + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.github/workflows/renate-od.yml b/.github/workflows/renate-od.yml index 307db3e..2fe8888 100644 --- a/.github/workflows/renate-od.yml +++ b/.github/workflows/renate-od.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -23,11 +23,11 @@ jobs: python -m unittest -v crm_solver.odetest.OdeTest python -m unittest -v crm_solver.crmsystemtest.CrmRegressionTest python -m unittest -v crm_solver.crmsystemtest.CrmAcceptanceTest - python -m unittest -v crm_solver.atomic_dbtest.AtomicDBTest python -m unittest -v crm_solver.beamlettest.BeamletTest - python -m unittest -v crm_solver.atomic_dbtest.RenateDBTest - python -m unittest -v crm_solver.neutral_dbtest.NeutralDBTest python -m unittest -v crm_solver.coefficientmatrixtest.CoefficientMatrixTest + python -m unittest -v atomic.atomic_dbtest.AtomicDBTest + python -m unittest -v atomic.atomic_dbtest.RenateDBTest + python -m unittest -v atomic.neutral_dbtest.NeutralDBTest python -m unittest -v utility.accessdatatest.AccessDataTest python -m unittest -v utility.getdatatest.GetDataTest python -m unittest -v utility.putdatatest.PutDataTest diff --git a/crm_solver/beamlettest.py b/crm_solver/beamlettest.py index d9b4212..6ec9e56 100644 --- a/crm_solver/beamlettest.py +++ b/crm_solver/beamlettest.py @@ -8,7 +8,7 @@ class BeamletTest(unittest.TestCase): EXPECTED_ATTR = ['param', 'components', 'profiles', 'coefficient_matrix', 'atomic_db', 'initial_condition'] - EXPECTED_INITIAL_CONDITION = [4832583106.4753895, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + EXPECTED_INITIAL_CONDITION = [4832583046.75342, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] EXPECTED_PARAM_ATTR = ['beamlet_source', 'beamlet_energy', 'beamlet_species', 'beamlet_current'] EXPECTED_COMPONENTS_KEYS = ['q', 'Z', 'A'] EXPECTED_COMPONENTS_SPECIES = ['electron', 'ion1', 'ion2'] @@ -42,8 +42,8 @@ def test_initial_conditions(self): for element in range(len(self.beamlet.initial_condition)): self.assertIsInstance(self.beamlet.initial_condition[element], float, msg='Expected type for initial' ' conditions is float.') - self.assertEqual(self.beamlet.initial_condition[element], self.EXPECTED_INITIAL_CONDITION[element], - msg='Computed Init conditions do not match expected init conditions.') + self.assertAlmostEqual(self.beamlet.initial_condition[element], self.EXPECTED_INITIAL_CONDITION[element], + delta=1e-1, msg='Computed Init conditions do not match expected init conditions.') def test_param_xml(self): self.assertIsInstance(self.beamlet.param, etree._ElementTree, diff --git a/requirements.txt b/requirements.txt index 73b92c7..11d0e26 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -scipy==1.7.3 -numpy==1.22.4 +scipy==1.8.0 +numpy==1.23.1 pandas==1.4.2 h5py==3.6.0 matplotlib==3.6.0 @@ -7,4 +7,4 @@ lxml==4.8.0 tables==3.6.1 paramiko==2.8.1 scp==0.14.4 -pycollisiondb==0.1.3 \ No newline at end of file +pycollisiondb==0.1.3