diff --git a/.github/workflows/burn_cell_primordial_chem.yml b/.github/workflows/burn_cell_primordial_chem.yml index b1c506ba90..bdc52cc939 100644 --- a/.github/workflows/burn_cell_primordial_chem.yml +++ b/.github/workflows/burn_cell_primordial_chem.yml @@ -47,7 +47,7 @@ jobs: value2=$(awk 'NR=='"$line_number"' {match($0, /[+-]?[0-9]+([.][0-9]+)?[eE]?[+-]?[0-9]+/); if (RSTART) print substr($0, RSTART, RLENGTH)}' reference_solution.out) difference=$(awk -v val1="$value1" -v val2="$value2" 'BEGIN { printf "%.2f", (val1 - val2) / val2 }') - + if (( $(echo "$difference > $threshold" | bc -l) )); then echo "Line number: $line_number" echo "Value in test.out: $value1" diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 2e7d0fba2e..3d021ab174 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -2,8 +2,8 @@ on: push: # Sequence of patterns matched against refs/tags tags: - - '[0-9][0-9].[0-9][0-9]' - + - '[0-9][0-9].[0-9][0-9]' + name: Create Release jobs: diff --git a/.github/workflows/find_changed_files.py b/.github/workflows/find_changed_files.py index 0e7f4e3e06..8a81d06995 100644 --- a/.github/workflows/find_changed_files.py +++ b/.github/workflows/find_changed_files.py @@ -28,7 +28,7 @@ def find_files(SHAs=None): if stderr is not None: raise Exception('git diff encountered an error') - files = [f for f in stdout.decode('utf-8').strip().split('\n') + files = [f for f in stdout.decode('utf-8').strip().split('\n') if f.startswith('networks/')] print(files) diff --git a/.github/workflows/get_release_txt.py b/.github/workflows/get_release_txt.py index 50530c14ec..e14f92dc28 100644 --- a/.github/workflows/get_release_txt.py +++ b/.github/workflows/get_release_txt.py @@ -26,9 +26,9 @@ txt = txt[m.end():].strip() else: txt = "" - - # we now need to substitute characters in the string so that - # the action can deal with line breaks + + # we now need to substitute characters in the string so that + # the action can deal with line breaks txt = txt.replace('%', '%25') txt = txt.replace('\n', '%0A') txt = txt.replace('\r', '%0D') diff --git a/CMakeLists.txt b/CMakeLists.txt index c3e2702b96..d1aceaff72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,13 +32,13 @@ function(setup_target_for_microphysics_compilation network_name output_dir) set(networkdir "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks/general_null/") set(networkheadertemplatefile "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks/general_null/network_header.template") - set (gamma_law_dirs ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/gcem/include + set (gamma_law_dirs ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/gcem/include ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/interfaces ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/EOS ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/EOS/gamma_law - ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks/general_null + ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks/general_null ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/constants PARENT_SCOPE) - execute_process(COMMAND python3 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/build_scripts/write_probin.py" --pa "${EOSparamfile} ${networkparamfile} + execute_process(COMMAND python3 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/build_scripts/write_probin.py" --pa "${EOSparamfile} ${networkparamfile} ${VODEparamfile} ${integrationparamfile}" --use_namespace WORKING_DIRECTORY ${output_dir}/) set(gamma_law_sources ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/interfaces/eos_data.cpp @@ -57,12 +57,12 @@ function(setup_target_for_microphysics_compilation network_name output_dir) set(networkheadertemplatefile "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks/general_null/network_header.template") #DO NOT change the order of the directories below! - set (primordial_chem_dirs ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/gcem/include - ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/integration/VODE ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/integration/utils + set (primordial_chem_dirs ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/gcem/include + ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/integration/VODE ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/integration/utils ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/integration ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/interfaces ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/EOS ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/EOS/primordial_chem - ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks/primordial_chem ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks - ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/constants + ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks/primordial_chem ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/networks + ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/constants PARENT_SCOPE) #we need to have extern_parameters.cpp be available at configure time @@ -72,11 +72,11 @@ function(setup_target_for_microphysics_compilation network_name output_dir) #to generate updated header files if(BUILD_UNIT_TEST) - execute_process(COMMAND python3 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/build_scripts/write_probin.py" --pa "${paramfile} ${EOSparamfile} + execute_process(COMMAND python3 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/build_scripts/write_probin.py" --pa "${paramfile} ${EOSparamfile} ${networkpcparamfile} ${networkparamfile} ${VODEparamfile} ${integrationparamfile} ${unittestparamfile}" --use_namespace WORKING_DIRECTORY ${output_dir}/) else() #do not need paramfile and unittestparamfile - execute_process(COMMAND python3 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/build_scripts/write_probin.py" --pa "${EOSparamfile} ${networkpcparamfile} + execute_process(COMMAND python3 "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/util/build_scripts/write_probin.py" --pa "${EOSparamfile} ${networkpcparamfile} ${networkparamfile} ${VODEparamfile} ${integrationparamfile} " --use_namespace WORKING_DIRECTORY ${output_dir}/) endif() diff --git a/deploy_docs_action.sh b/deploy_docs_action.sh index 8e03fff881..734cbf30ce 100755 --- a/deploy_docs_action.sh +++ b/deploy_docs_action.sh @@ -9,10 +9,10 @@ TARGET_BRANCH="gh-pages" mkdir out -# if on the dev branch, use the dev_layout.html template to get the +# if on the dev branch, use the dev_layout.html template to get the # links correct if [ "$GITHUB_BRANCH" = "$DEV_BRANCH" ]; then - mv sphinx_docs/source/_templates/dev_layout.html sphinx_docs/source/_templates/layout.html + mv sphinx_docs/source/_templates/dev_layout.html sphinx_docs/source/_templates/layout.html fi # Build the Sphinx documentation @@ -24,7 +24,7 @@ mkdir -p out/docs/ if [ "$GITHUB_BRANCH" = "$MAIN_BRANCH" ]; then mkdir -p out/docs mv sphinx_docs/build/html/* out/docs -else +else mkdir -p out/docs/dev/ mv sphinx_docs/build/html/* out/docs/dev fi diff --git a/networks/ase/ase.py b/networks/ase/ase.py index 81663403ce..273bcbc310 100644 --- a/networks/ase/ase.py +++ b/networks/ase/ase.py @@ -56,14 +56,14 @@ def get_library(): print("removing: ", r) _r = subch.get_rate_by_name(r) subch.remove_rate(_r) - + # additional neutron rates to remove for r in subch.get_rates(): if (r == subch.get_rate_by_name("mg24(n,a)ne21") or r == subch.get_rate_by_name("ne21(a,n)mg24") or r == subch.get_rate_by_name("na22(n,g)na23") or r == subch.get_rate_by_name("na23(g,n)na22") or r == subch.get_rate_by_name("ne21(g,n)ne20") or r == subch.get_rate_by_name("ne20(n,g)ne21")): continue - + if pyna.Nucleus("n") in r.reactants or pyna.Nucleus("n") in r.products: print("removing neutron rates: ", r) subch.remove_rate(r) diff --git a/networks/ignition_chamulak/notes.txt b/networks/ignition_chamulak/notes.txt index d4c78368f9..08b20cda0f 100644 --- a/networks/ignition_chamulak/notes.txt +++ b/networks/ignition_chamulak/notes.txt @@ -38,12 +38,12 @@ Basic idea: --- --- this means that 60% of the time, we will create Ne20 + O16 and - 40% of the time we will create Na23 + C13. + 40% of the time we will create Na23 + C13. So the number of nuclei made from consuming 6 C12 is ~ 1.2 Ne20, 1.2 O16, 0.8 Na23, 0.8 C13. - + Doing this, the ash has an A = 18 and a Z = 8.8 We also note that since we are operating in a high temperature @@ -61,4 +61,4 @@ Basic idea: release per C12 consumed), as a function of density. - + diff --git a/networks/rprox/reaclib/make_rates_module.py b/networks/rprox/reaclib/make_rates_module.py index 12960965d1..48c4cf20b9 100644 --- a/networks/rprox/reaclib/make_rates_module.py +++ b/networks/rprox/reaclib/make_rates_module.py @@ -50,7 +50,7 @@ def modulePreamble(): def tFactorData(): """Add a routine to initialize the tfactors given the temperature. Return this text.""" - + text=""" contains @@ -74,7 +74,7 @@ def tFactorData(): def buildRateRoutine(name,aFactors): """Given a reaction name and the list of aFactors from the ReacLib rate - file, build the appropriate structure for the reaction rate as a + file, build the appropriate structure for the reaction rate as a subroutine. Return this text.""" text= """ subroutine %s(tfactors,rate,dratedt) @@ -142,7 +142,7 @@ def buildRateRoutine(name,aFactors): if not aFactors[start+4] == 0.0: str += " +ct9 &\n" if not aFactors[start+5] == 0.0: - str += " +FIVE3RD*ct953 &\n" + str += " +FIVE3RD*ct953 &\n" if not aFactors[start+6] == 0.0: str += " +(%sd0))" % (aFactors[start+6]) else: @@ -177,7 +177,7 @@ def buildRateRoutine(name,aFactors): return text def numReactantsProducts(chapter): - """Return the number of reactants and products (in particles) for a + """Return the number of reactants and products (in particles) for a reaction of ReacLib Chapter type chapter.""" r,p = 1,1 if chapter in [2,5,9,10]: p+= 1 @@ -190,11 +190,11 @@ def numReactantsProducts(chapter): return r,p def parseRateFile(file): - """Given a ReacLib v 1 rate file, file, parse it and determine an + """Given a ReacLib v 1 rate file, file, parse it and determine an appropriate name and the "a" factors that build the rate. Return the name as a string and the "a" factors as a list.""" - try: + try: fh = open(file,'r') except IOError: print "Couldn't open file %f for reading" % file @@ -207,7 +207,7 @@ def parseRateFile(file): foundLabels = False rateString = "rate" - + aFactors = [] for line in data[numHeaderLines:]: @@ -226,7 +226,7 @@ def parseRateFile(file): for term in range(nterms): start = term*lengthEntry stop = start + lengthEntry - + aFactors.append(float(line[start:stop])) if len(aFactors) % numTerms is not 0: @@ -261,8 +261,8 @@ def weakRate(name,factor): return textParameter, textSubroutine def make_rates_module(rateFiles): - """Build the F90 module containing the subroutines for the reactions - given in the list of ReacLib rate files, rateFiles, along with the helper + """Build the F90 module containing the subroutines for the reactions + given in the list of ReacLib rate files, rateFiles, along with the helper routine to set the common temperature factors. Return all this as a string for easy piping.""" diff --git a/sphinx_docs/notes.txt b/sphinx_docs/notes.txt index a15e64f36b..9b6348fcd3 100644 --- a/sphinx_docs/notes.txt +++ b/sphinx_docs/notes.txt @@ -6,10 +6,10 @@ https://stackoverflow.com/questions/11347505/what-are-some-approaches-to-outputting-a-python-data-structure-to-restructuredte - + ** index: - use + use ..index:: burn_t diff --git a/sphinx_docs/source/basics.rst b/sphinx_docs/source/basics.rst index b5c8933bef..dcf86aafcd 100644 --- a/sphinx_docs/source/basics.rst +++ b/sphinx_docs/source/basics.rst @@ -38,7 +38,7 @@ This will create an executable called ``main3d.gnu.ex``. Then you can run it as ./main3d.gnu.ex inputs_aprox21 By default, the test is built with the 21-isotope ``aprox21`` network. -Here ``inputs_aprox21`` is the inputs file that sets options. +Here ``inputs_aprox21`` is the inputs file that sets options. diff --git a/sphinx_docs/source/integrators.rst b/sphinx_docs/source/integrators.rst index 77c59767df..c06320f946 100644 --- a/sphinx_docs/source/integrators.rst +++ b/sphinx_docs/source/integrators.rst @@ -22,7 +22,7 @@ The equations we integrate to do a nuclear burn are: Here, :math:`X_k` is the mass fraction of species :math:`k`, :math:`e` is the specific nuclear energy created through reactions. Also needed are density :math:`\rho`, -temperature :math:`T`, and the specific heat. The function :math:`f` provides the energy release from reactions and can often be expressed in terms of the +temperature :math:`T`, and the specific heat. The function :math:`f` provides the energy release from reactions and can often be expressed in terms of the instantaneous reaction terms, :math:`\dot{X}_k`. As noted in the previous section, this is implemented in a network-specific manner. @@ -70,7 +70,7 @@ routine (at the moment this can be ``VODE``, ``BackwardEuler``, ``ForwardEuler`` AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void burner (burn_t& state, Real dt) -The input is a ``burn_t``. +The input is a ``burn_t``. .. note:: @@ -369,7 +369,7 @@ the allowed options are: The spectral radius is estimated by default using the power method, built into RKC. Alternately, by setting ``integrator.use_circle_theorem=1``, - the `Gershgorin circle theorem `_ + the `Gershgorin circle theorem `_ is used instead. * ``VODE``: the VODE :cite:`vode` integration package. We ported this @@ -383,7 +383,7 @@ robust. .. important:: The integrator will not abort if it encounters trouble. Instead it will - set ``burn_t burn_state.success = false`` on exit. It is up to the + set ``burn_t burn_state.success = false`` on exit. It is up to the application code to handle the failure. .. note:: diff --git a/sphinx_docs/source/networks-overview.rst b/sphinx_docs/source/networks-overview.rst index ec67cc2fd7..f4beb95e9a 100644 --- a/sphinx_docs/source/networks-overview.rst +++ b/sphinx_docs/source/networks-overview.rst @@ -42,7 +42,7 @@ for the ability to swap integrators as desired. We discuss the integrators in a later section. A network is defined by a ``.net`` file which provides a list of species -and some data about each species (its name and some isotopic data). +and some data about each species (its name and some isotopic data). An example is ``Microphysics/networks/iso7/iso7.net``: diff --git a/sphinx_docs/source/networks.rst b/sphinx_docs/source/networks.rst index 2552e0d953..065a3d0f00 100644 --- a/sphinx_docs/source/networks.rst +++ b/sphinx_docs/source/networks.rst @@ -158,7 +158,7 @@ X_a / (A_a m_u)`, our rate equation is \begin{align} \frac{dX_f}{dt} &= - \frac{r_0}{m_u} \rho X_f^2 \frac{1}{A_f} \left (\frac{T}{T_0}\right)^\nu \equiv \omegadot_f \\ - \frac{dX_a}{dt} &= \frac{1}{2}\frac{r_0}{m_u} \rho X_f^2 \frac{A_a}{A_f^2} \left (\frac{T}{T_0}\right)^\nu = \frac{r_0}{m_u} \rho X_f^2 \frac{1}{A_f} \left (\frac{T}{T_0}\right)^\nu + \frac{dX_a}{dt} &= \frac{1}{2}\frac{r_0}{m_u} \rho X_f^2 \frac{A_a}{A_f^2} \left (\frac{T}{T_0}\right)^\nu = \frac{r_0}{m_u} \rho X_f^2 \frac{1}{A_f} \left (\frac{T}{T_0}\right)^\nu \end{align} We define a new rate constant, :math:`\rt` with units of :math:`[\mathrm{s^{-1}}]` as @@ -287,6 +287,6 @@ to disable rates: :math:`\isotm{N}{13}(\alpha,p)\isotm{O}{16}` and its inverse are disabled. -Together, these parameters allow us to turn off the sequence +Together, these parameters allow us to turn off the sequence :math:`\isotm{C}{12}(p,\gamma)\isotm{N}{13}(\alpha, p)\isotm{O}{16}` that acts as a bypass for :math:`\isotm{C}{12}(\alpha, \gamma)\isotm{O}{16}`. diff --git a/sphinx_docs/source/nse.rst b/sphinx_docs/source/nse.rst index d94816ba8b..c4a207d6ce 100644 --- a/sphinx_docs/source/nse.rst +++ b/sphinx_docs/source/nse.rst @@ -254,7 +254,7 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. An example of such reaction cycle would be: .. math:: - + \isotm{S}{32} (\gamma, p)(\gamma, p)(\gamma, n)(\gamma, n) \isotm{Si}{28} (\alpha, \gamma) \isotm{S}{32} @@ -265,11 +265,11 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. If there are no isotope present in the network that would form a closed-cycle, we move on to the next nuclei. We break out of the iteration once we found a fast reaction cycle. - + * If the previous two check pass, we proceed to nuclei grouping. Initially, :math:`p`, :math:`n`, and :math:`\alpha` are grouped into a single group called the light-isotope-group, or LIG. Other isotopes belong to their own group, - which only contains themselves. During each iteration, we find all valid reaction, + which only contains themselves. During each iteration, we find all valid reaction, :math:`k`, that has the fastest time-scale, :math:`t_{i,k} = \tilde{Y}_i/\textbf{min}(b_f(k), b_r(k))`, for :math:`i` to be the isotope involved with the reaction that is different from :math:`p`, :math:`n`, and :math:`\alpha`. @@ -283,13 +283,13 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. .. math:: t_{i,k} < \epsilon t_s - + * .. math:: 2|b_f(k) - b_r(k)|/(b_f(k) + b_r(k) < \epsilon - + Here we only consider two cases of reactions: * There are exactly two isotopes involved in reaction, :math:`k`, that are not in the @@ -307,7 +307,7 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. * Reactions that involve more than 2 reactants and products * Reactions that have more than 2 non-light-isotope-group. - + * The nuclei that participate in the reaction is either in LIG or in another group. This means that the non-LIG nuclei have already merged. @@ -320,8 +320,8 @@ There are 3 main criteria discussed in the :cite:`Kushnir_2020`. a single group due to the missing neutron rates. Therefore, there is an alternative criteria of defining a "single group" when neutron is not present in the network: for isotopes, :math:`Z >= 14`, isotopes with odd and even :math:`N` form two - distinct groups. - + distinct groups. + Additional Options ------------------ diff --git a/sphinx_docs/source/sdc.rst b/sphinx_docs/source/sdc.rst index 8db7a2d41b..379874f75f 100644 --- a/sphinx_docs/source/sdc.rst +++ b/sphinx_docs/source/sdc.rst @@ -53,9 +53,9 @@ The reactions don’t modify the total density, :math:`\rho`, or momentum, .. math:: - \frac{d}{dt}\left ( - \begin{array}{c} \rho X_k \\ \rho e \end{array} - \right ) = + \frac{d}{dt}\left ( + \begin{array}{c} \rho X_k \\ \rho e \end{array} + \right ) = \left ( \begin{array}{c} \Adv{\rho X_k}^{n+1/2} \\ \Adv{\rho e}^{n+1/2} \\ \end{array} \right ) + diff --git a/sphinx_docs/source/templated_networks.rst b/sphinx_docs/source/templated_networks.rst index e8342dc195..c6bb55cdae 100644 --- a/sphinx_docs/source/templated_networks.rst +++ b/sphinx_docs/source/templated_networks.rst @@ -181,7 +181,7 @@ special cases (e.g., for approximate nets): This indicates that each branch happens 50% of the time. -* ``apply_identical_particle_factor`` : +* ``apply_identical_particle_factor`` : Normally for rates involving identical nuclei, we divide the rate by a factor (:math:`n!`, where `n` is the number of the same nuclei participating). This @@ -216,7 +216,7 @@ special cases (e.g., for approximate nets): To save on computation, we can create a table of reaction rates by evaluating over a grid of temperature and then interpolating - in temperature as needed. This operates only on the + in temperature as needed. This operates only on the :math:`N_A \langle \sigma v \rangle` portion of the rate. Some rates are more complex than fits into the rate tabulation diff --git a/sphinx_docs/source/unit_tests.rst b/sphinx_docs/source/unit_tests.rst index 638e739556..39b6954836 100644 --- a/sphinx_docs/source/unit_tests.rst +++ b/sphinx_docs/source/unit_tests.rst @@ -164,7 +164,7 @@ Screening Test routine, using the ``aprox21`` reaction network. This uses the same basic ideas as the tests above---a cube of data is setup and the rates are evaluated using each zone's thermodynamic -conditions. +conditions. This works for both the Fortran and C++ implementations (via ``do_cxx``). diff --git a/unit_test/test_react/test_network_combinations.py b/unit_test/test_react/test_network_combinations.py index be1f9b4dd5..eadd7fdc09 100755 --- a/unit_test/test_react/test_network_combinations.py +++ b/unit_test/test_react/test_network_combinations.py @@ -192,7 +192,7 @@ def doit(): for k, v in sorted(outcomes.items()): print("{}: {}".format(k, v)) - + if __name__ == "__main__": doit() diff --git a/util/code_checker/code_checker.py b/util/code_checker/code_checker.py index 93217100c0..9a4695d63b 100644 --- a/util/code_checker/code_checker.py +++ b/util/code_checker/code_checker.py @@ -11,7 +11,7 @@ ignore_dirs = ['tmp_build_dir', 't', 'python_library'] def find_fortran_files(): - # find Microphysics Fortran source files + # find Microphysics Fortran source files try: microphysics_home = os.environ['MICROPHYSICS_HOME'] except KeyError: @@ -31,7 +31,7 @@ def pytest_generate_tests(metafunc): def test_double_precision(filename): if any([f'/{s}/' in str(filename) for s in ignore_dirs]): - return + return with open(filename, 'r') as file_dat: @@ -43,11 +43,11 @@ def test_double_precision(filename): assert re.search(double_prec, l.split('!')[0]) is None except UnicodeDecodeError: - return + return def test_dexp(filename): if any([f'/{s}/' in str(filename) for s in ignore_dirs]): - return + return with open(filename, 'r') as file_dat: @@ -59,11 +59,11 @@ def test_dexp(filename): assert re.search(dexp, l.split('!')[0]) is None except UnicodeDecodeError: - return + return def test_dlog(filename): if any([f'/{s}/' in str(filename) for s in ignore_dirs]): - return + return with open(filename, 'r') as file_dat: @@ -77,7 +77,7 @@ def test_dlog(filename): assert re.search(dlog10, l.split('!')[0]) is None except UnicodeDecodeError: - return + return @@ -85,9 +85,9 @@ def test_check_rt(filename): """ make sure that all of the numerical constants use _rt and are defined as real(rt) """ - + if any([f'/{s}/' in str(filename) for s in ignore_dirs]): - return + return elif 'extern.F90' in str(filename): return @@ -106,4 +106,4 @@ def test_check_rt(filename): # assert 'use amrex_constants_module' not in l.split('!')[0] except UnicodeDecodeError: - return \ No newline at end of file + return \ No newline at end of file