Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constituent updates #549

Merged
merged 188 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 186 commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
cea2531
Refactor constituent mixing ratio properties
Jul 14, 2022
bce4d22
Avoid RE deprecation warning by moving case fold to state_machine.py
Aug 12, 2022
279c180
Fix doctest
Aug 12, 2022
057588e
Allow '1' to be a valid unit
Dec 12, 2022
678621e
Added molar_mass (molecular weight) value to constituent property type
Jan 2, 2023
27f6851
initial changes
Jan 5, 2023
ca65368
fixes
Jan 6, 2023
10416a9
address review comments
Jan 9, 2023
5e8e33a
hopefully final fixes
Jan 9, 2023
9bb155b
Merge pull request #41 from peverwhee/add_molecular_weight
gold2718 Jan 10, 2023
a2386d6
initial commit
Feb 5, 2023
7657f33
fix function name
Feb 5, 2023
5315500
fix fstring
Feb 6, 2023
84bade6
fix mistakes in routine names and comments
Feb 6, 2023
3494311
split up register and initialize
Mar 1, 2023
d9871c0
cleanup
Mar 1, 2023
a71e1b5
cleanup
Mar 1, 2023
6c7c82a
add temporary hash_table variable to avoid dangling pointer
Mar 1, 2023
d4ad4aa
deallocate hash_table
Mar 2, 2023
f549d64
cleaner way to deallocate hash table in iterator object
Mar 7, 2023
5813d19
change name of const array interfaces
Mar 22, 2023
8ff8d5a
add intialized_in_physics property
Apr 10, 2023
f074f1c
better error handling; fix for copy constituent
Apr 11, 2023
5e839bf
remove unnecessary use statment
Apr 12, 2023
feb8bcb
fix unit tests
Apr 19, 2023
15f52c6
revert changes for unit conversion test
May 11, 2023
3703645
handle constituent edge cases better and differently; revert module v…
May 22, 2023
1e83c4c
fix decimal
May 22, 2023
31919df
Merged changes from new_variables_input
Jun 8, 2023
dad0dbd
remove initialized-in-physics constituent from advection test require…
Jun 9, 2023
c477eaf
Initial commit of containerized GitHub actions to run unit tests.
Jun 27, 2023
43a47e4
Fixing typo from previous commit.
mwaxmonsky Jun 27, 2023
5cc29b5
Fixing typo from previous commit.
mwaxmonsky Jun 27, 2023
aaa12aa
Addming missing python dependency.
mwaxmonsky Jun 27, 2023
92680b7
Removing incorrect flag from pip install.
mwaxmonsky Jun 27, 2023
3ff2d09
Replacing incorrect Dockerfile instruction.
mwaxmonsky Jun 27, 2023
7cce8c5
Returning non-zero if test failures detected.
mwaxmonsky Jun 27, 2023
8ac4c7e
Removing test failing due to not being fully implemented yet.
mwaxmonsky Jun 28, 2023
00edf9a
Addming missing newlines.
mwaxmonsky Jun 28, 2023
f44f377
add default_value to constituent properties object
Jul 3, 2023
d3413c1
Adding testing CI action to pull requests and all branches.
mwaxmonsky Jul 3, 2023
f3fa550
Updating workflow name with more accurate description.
mwaxmonsky Jul 3, 2023
7c5c3fb
Renaming capgen unit test workflow file.
mwaxmonsky Jul 3, 2023
97cd70a
Fixing typo.
mwaxmonsky Jul 3, 2023
e5fdab9
Moving capgen Dockerfile into test directory.
mwaxmonsky Jul 3, 2023
d5cc5f5
Adding print statement to test output for reasong for skipping var_ac…
mwaxmonsky Jul 3, 2023
a10648a
Moving tests to running in github container directly.
mwaxmonsky Jul 5, 2023
374a473
Replacing apt calls with apt-get.
mwaxmonsky Jul 5, 2023
7030d43
Adding sudo to apt-get commands.
mwaxmonsky Jul 5, 2023
d0e2e22
Updating package names to ubuntu packages.
mwaxmonsky Jul 5, 2023
5e70051
Updating path to cd into.
mwaxmonsky Jul 5, 2023
e76bb45
Removing test/Dockerfile as no longer needed.
mwaxmonsky Jul 5, 2023
752f1f1
Removing un-needed python dependencies install step.
mwaxmonsky Jul 5, 2023
62a0d03
Removing sourcing python venv.
mwaxmonsky Jul 5, 2023
2552b69
Filtering CI action to only auto run if in a PR or pushing to the mai…
mwaxmonsky Jul 7, 2023
731a0cb
Testing allowing run of actions manually.
mwaxmonsky Jul 7, 2023
b4ba84c
Adding proper filter to job to run unit test action manually.
mwaxmonsky Jul 7, 2023
af5119b
Fixing format of workflow_dispatch declaration.
mwaxmonsky Jul 7, 2023
813e46a
Changing ordering of workflow triggers.
mwaxmonsky Jul 7, 2023
08c5503
Adding initial pylint configuration.
mwaxmonsky Jul 7, 2023
e28d5d5
Removing pylint job to evaluate in a new PR.
mwaxmonsky Jul 7, 2023
85ce0aa
Merge pull request #2 from mwaxmonsky/test_actions
mwaxmonsky Jul 7, 2023
b87a1f8
add has_default method
Jul 12, 2023
798638f
Merge branch 'add_const_interface' of https://github.com/peverwhee/cc…
Jul 12, 2023
06c9d5d
Add 'thermo_active' property to constituent properties DDT.
nusbaume May 30, 2023
dfe8cb1
Update CCPP constituent standard names.
nusbaume May 31, 2023
9fb2b40
Fix thermo_active syntax errors caught by unit tests.
nusbaume Jun 26, 2023
93eb6b3
Add 'thermo_active' property tests to 'advection_test' unit test coll…
nusbaume Jun 26, 2023
fab788a
Attempt to add more python versions to python tests.
mwaxmonsky Jul 18, 2023
fcd966c
Updating action versions to no longer use deprecated node12.
mwaxmonsky Jul 18, 2023
c9af06c
Updating python.yaml to run on demand.
mwaxmonsky Jul 18, 2023
7417224
Temporarily adding push events back.
mwaxmonsky Jul 18, 2023
861af3e
Updating metadata tests to check updated property name.
mwaxmonsky Jul 18, 2023
c4df7a2
Initial doctest action and associated fixes.
mwaxmonsky Jul 26, 2023
1e760fa
Fixing actions file syntax error.
mwaxmonsky Jul 26, 2023
20d2044
Fixing doctest call.
mwaxmonsky Jul 26, 2023
7b42f73
Fixing shell script syntax error.
mwaxmonsky Aug 1, 2023
6696865
Removing doctest from main unit test script as no longer needed with …
mwaxmonsky Aug 1, 2023
57b2e0d
Fixing no newline in some files.
mwaxmonsky Aug 1, 2023
8065f82
Removing push events.
mwaxmonsky Aug 1, 2023
9f1573f
Initial attempt of removing python 2 code checks.
mwaxmonsky Aug 1, 2023
50fc53c
Removing python code older than 2.7
mwaxmonsky Aug 2, 2023
6803e90
Chaning python unit tests to run in pytest harness.
mwaxmonsky Aug 3, 2023
b48abe5
Removing un-needed pylint statements and fixing imports.
mwaxmonsky Aug 3, 2023
8780abc
Fixing formatting.
mwaxmonsky Aug 4, 2023
820acfc
Removing python2 style is string check.
mwaxmonsky Aug 4, 2023
0b65ba5
Update minimum version to 3.7
mwaxmonsky Aug 4, 2023
8c0045a
Merge pull request #4 from mwaxmonsky/remove_python_2
mwaxmonsky Aug 4, 2023
ffcd582
Update .github/workflows/python.yaml
mwaxmonsky Aug 7, 2023
9f6c9a2
Update .github/workflows/python.yaml
mwaxmonsky Aug 7, 2023
b46f042
Update .github/workflows/python.yaml
mwaxmonsky Aug 7, 2023
85d5e50
Removing un-needed main function that runs doc test.
mwaxmonsky Aug 7, 2023
971bf1b
Removing un-needed main function that runs doctest.
mwaxmonsky Aug 7, 2023
b568453
Adding more python versions to test against.
mwaxmonsky Aug 8, 2023
b82c030
Testing version syntax fix.
mwaxmonsky Aug 8, 2023
ba8d351
Testing updated version syntax fix.
mwaxmonsky Aug 8, 2023
8b08bfc
Fixing version syntax.
mwaxmonsky Aug 8, 2023
ae08563
Reverting version support syntax.
mwaxmonsky Aug 8, 2023
419b4df
Removing pytest from testing of generated fortran script and removing…
mwaxmonsky Aug 8, 2023
0693ebd
Updating pytest.ini to ignore non-unit test files.
mwaxmonsky Aug 8, 2023
4d1ac61
Adding verbose pytest output.
mwaxmonsky Aug 8, 2023
8a6a69b
Re-adding unit test main check to unit tests.
mwaxmonsky Aug 8, 2023
1076f71
Renaming test script to more appropriate name.
mwaxmonsky Aug 9, 2023
8f1c3ad
removing un-needed python requirements.txt install step.
mwaxmonsky Aug 9, 2023
5c6f91e
Updating test script name missing from previous commit.
mwaxmonsky Aug 9, 2023
add2917
Removing requirements.txt as not needed currently.
mwaxmonsky Aug 9, 2023
3c22415
Merge pull request #1 from gold2718/add_const_interface
peverwhee Aug 24, 2023
b8fae25
Fixing typo
mwaxmonsky Aug 24, 2023
3207b59
fix advection test
Aug 24, 2023
475fb9b
Merge branch 'add_const_interface' into pytest_additions
mwaxmonsky Aug 24, 2023
3c987d5
Typo fix.
mwaxmonsky Aug 24, 2023
fd4378f
Merge pull request #3 from mwaxmonsky/pytest_additions
mwaxmonsky Aug 24, 2023
04a1d7e
add new host cap interface to check if a variable is already a scheme…
Aug 25, 2023
ffa3c19
Merge branch 'add_const_interface' of https://github.com/peverwhee/cc…
Aug 25, 2023
48041d8
add testing
Aug 25, 2023
11191fe
Make capgen unit tests less inter-dependent, and perform some cleanup.
nusbaume Aug 25, 2023
85e9292
Merge remote-tracking branch 'peverwhee/add_const_interface' into con…
nusbaume Aug 25, 2023
a0d5d5a
Fix variable intent.
nusbaume Aug 27, 2023
2e53d9e
Merge pull request #5 from nusbaume/const_updates
nusbaume Aug 28, 2023
dc0402a
resolve merge conflicts
Aug 28, 2023
6819f2e
fix check_errflg call
Aug 28, 2023
87f74cb
address reviewer comments
Aug 29, 2023
65824a5
fix function calls
Aug 29, 2023
90339ae
Merge pull request #6 from peverwhee/new-interface
peverwhee Aug 29, 2023
45f0859
Set values for error flag and error message in new is_scheme_const su…
nusbaume Aug 29, 2023
3a970eb
Merge pull request #7 from nusbaume/errflg_fix
peverwhee Aug 30, 2023
0bf3117
Add new 'set_minimum' method which can change min constituent value
nusbaume Sep 6, 2023
cc7fe1a
Add unit tests for new set_minimum method.
nusbaume Sep 7, 2023
f635213
Fixed typos in test_host messages.
nusbaume Sep 20, 2023
627e78f
Merge pull request #8 from nusbaume/qmin_setter
nusbaume Sep 25, 2023
f9d31a5
Add new 'water_species' property and associated methods.
nusbaume Sep 27, 2023
4567410
Add 'water_species' property unit tests.
nusbaume Sep 29, 2023
900b4fc
Fix comments in water species routines.
nusbaume Oct 3, 2023
8b0d1f6
Add space between '.not.' and logical to improve readability.
nusbaume Oct 10, 2023
99cae9f
Merge pull request #9 from nusbaume/water_species_prop
nusbaume Oct 12, 2023
a722da8
sort sets before writing to files to ease comparison between runs
Nov 7, 2023
935fb72
fix attempt to sort list
Nov 7, 2023
adb81b5
Merge pull request #10 from peverwhee/sorted_sets
nusbaume Nov 8, 2023
0e55626
Add setter methods for molecular weight, and add some additional prop…
nusbaume Jan 11, 2024
7f3e7da
Add new unit tests, and fix bugs found during testing.
nusbaume Jan 11, 2024
76fb682
Replace 'molec_weight' with 'molar_mass', as it is likely a more accu…
nusbaume Jan 12, 2024
1880a3c
Merge pull request #12 from nusbaume/mol_weight_set
nusbaume Jan 12, 2024
d89b65e
initial commit; metadata table and parsing working
Feb 5, 2024
443c37e
code works; may need cleanup
Feb 9, 2024
e7804b9
fix comment order - CRUCIAL
Feb 9, 2024
f5b7250
merge to head of feature/capgen
Feb 12, 2024
8aaa8ff
Merge branch 'dynamic_constituents' into peverwhee-fork-dynamic-const…
Feb 12, 2024
bd0ae2e
clean-up and switch constituents.py to fstrings
Feb 12, 2024
e48faa5
expand testing
Feb 13, 2024
2401436
update register_constituents error handling; misc review requests
Feb 25, 2024
744de3e
add doctests to ccpp_datafile.py
Feb 28, 2024
2c58eed
review comments; add in vertical transform bugfix
Mar 1, 2024
8d2bd61
Merge pull request #13 from peverwhee/peverwhee-fork-dynamic-constitu…
peverwhee Mar 1, 2024
f952b8b
merge to head of feature/capgen
Mar 6, 2024
d8b706a
fix merge
Mar 11, 2024
b1ffd3f
another merge fix
Mar 11, 2024
950d99a
merge to head of feature/capgen
Mar 18, 2024
89688b1
Merge remote-tracking branch 'NCAR/main' into add_const_interface
Mar 18, 2024
3988c44
merge in NCAR/main
Mar 18, 2024
a0a3ea2
fix merge
Mar 18, 2024
d4029f1
fix test; bring back python.yaml workflow
Mar 18, 2024
a4548a0
remove target attribute from dyn_const_prop variable declarations
Mar 21, 2024
930c3db
code cleanup; review requests; include python3.12 in ci testing
Apr 22, 2024
86ddbce
merge to head of main
Apr 22, 2024
7c3a0cd
back off 3.12 doctests for now
Apr 22, 2024
2906220
add script to check fortran vs metadata without a host model
Apr 24, 2024
adff339
add check that routine exists in fortran; use module-level dynamic co…
Apr 24, 2024
d29a035
fix typo
Apr 24, 2024
9ce41ee
code cleanup; code review
Apr 24, 2024
eee30cb
allow for skipping of ddt check; skip ddt check from offline script
Apr 24, 2024
807d35a
handle dimensions for promoted variables
Apr 26, 2024
da55869
check for compatibility before adding constituent; add more testing
Apr 28, 2024
2a23124
add unit comparison
Apr 28, 2024
4c4807b
code review
Apr 28, 2024
12b4eab
update logic to exclude nested subroutines from routine parsing
Apr 29, 2024
3a6a3e2
update vardictionary doctests and add 3.12 testing
Apr 30, 2024
8c90217
Merge remote-tracking branch 'NCAR/main' into group-fix
May 6, 2024
9e43b78
code cleanup; review requests
May 16, 2024
b668b2e
code clean-up; add test for promoted variable with no horiz dimension
May 16, 2024
1e139b5
code review; cleanup
May 16, 2024
522ad25
Merge remote-tracking branch 'NCAR/main' into add_const_interface
May 16, 2024
15a16ea
only run pytests on test/ directory in python.yaml workflow
May 16, 2024
c06600e
merge in optional fortran v metadata checker
May 20, 2024
0b8f23a
Merge remote-tracking branch 'origin/group-fix' into add_const_interface
May 20, 2024
c781edc
Merge remote-tracking branch 'NCAR/main' into add_const_interface
May 28, 2024
6e165e5
address review comments
May 29, 2024
8297a6b
fix incorrect subname
Jun 6, 2024
97c3cc5
fix indexing
Jun 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python package

on:
workflow_dispatch:
pull_request:
branches: [feature/capgen, main]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Test with pytest
run: |
export PYTHONPATH=$(pwd)/scripts:$(pwd)/scripts/parse_tools
pytest -v test/

doctest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Doctest
run: |
export PYTHONPATH=$(pwd)/scripts:$(pwd)/scripts/parse_tools
pytest -v scripts/ --doctest-modules
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
addopts = -ra --ignore=scripts/metadata2html.py --ignore-glob=test/**/test_reports.py

84 changes: 73 additions & 11 deletions scripts/ccpp_capgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,29 @@ def compare_fheader_to_mheader(meta_header, fort_header, logger):
# end if
for mind, mvar in enumerate(mlist):
lname = mvar.get_prop_value('local_name')
mname = mvar.get_prop_value('standard_name')
arrayref = is_arrayspec(lname)
fvar, find = find_var_in_list(lname, flist)
# Check for consistency between optional variables in metadata and
# optional variables in fortran. Error if optional attribute is
# missing from fortran declaration.
# first check: if metadata says the variable is optional, does the fortran match?
mopt = mvar.get_prop_value('optional')
if find and mopt:
fopt = fvar.get_prop_value('optional')
if (not fopt):
errmsg = 'Missing optional attribute in fortran declaration for variable {}, in file {}'
errors_found = add_error(errors_found, errmsg.format(mname,title))
errmsg = f'Missing "optional" attribute in fortran declaration for variable {mname}, ' \
f'for {title}'
errors_found = add_error(errors_found, errmsg)
# end if
# end if
# now check: if fortran says the variable is optional, does the metadata match?
if fvar:
fopt = fvar.get_prop_value('optional')
if (fopt and not mopt):
errmsg = f'Missing "optional" metadata property for variable {mname}, ' \
f'for {title}'
errors_found = add_error(errors_found, errmsg)
# end if
# end if
if mind >= flen:
Expand Down Expand Up @@ -387,7 +399,8 @@ def compare_fheader_to_mheader(meta_header, fort_header, logger):

###############################################################################
def check_fortran_against_metadata(meta_headers, fort_headers,
mfilename, ffilename, logger):
mfilename, ffilename, logger,
dyn_routines=None, fortran_routines=None):
###############################################################################
"""Compare a set of metadata headers from <mfilename> against the
code in the associated Fortran file, <ffilename>.
Expand Down Expand Up @@ -439,6 +452,17 @@ def check_fortran_against_metadata(meta_headers, fort_headers,
's' if num_errors > 1 else '',
mfilename, ffilename))
# end if
# Check that any dynamic constituent routines declared in the metadata are
# present in the Fortran
if dyn_routines:
for routine in dyn_routines:
if routine not in fortran_routines:
# throw an error - it's not in the Fortran
errmsg = f"Dynamic constituent routine {routine} not found in fortran {ffilename}"
raise CCPPError(errmsg)
# end if
# end for
# end if
# No return, an exception is raised on error

###############################################################################
Expand Down Expand Up @@ -470,7 +494,7 @@ def parse_host_model_files(host_filenames, host_name, run_env):
# parse metadata file
mtables = parse_metadata_file(filename, known_ddts, run_env)
fort_file = find_associated_fortran_file(filename)
ftables = parse_fortran_file(fort_file, run_env)
ftables, _ = parse_fortran_file(fort_file, run_env)
# Check Fortran against metadata (will raise an exception on error)
mheaders = list()
for sect in [x.sections() for x in mtables]:
Expand Down Expand Up @@ -511,7 +535,7 @@ def parse_host_model_files(host_filenames, host_name, run_env):
return host_model

###############################################################################
def parse_scheme_files(scheme_filenames, run_env):
def parse_scheme_files(scheme_filenames, run_env, skip_ddt_check=False):
###############################################################################
"""
Gather information from scheme files (e.g., init, run, and finalize
Expand All @@ -524,9 +548,10 @@ def parse_scheme_files(scheme_filenames, run_env):
for filename in scheme_filenames:
logger.info('Reading CCPP schemes from {}'.format(filename))
# parse metadata file
mtables = parse_metadata_file(filename, known_ddts, run_env)
mtables = parse_metadata_file(filename, known_ddts, run_env,
skip_ddt_check=skip_ddt_check)
fort_file = find_associated_fortran_file(filename)
ftables = parse_fortran_file(fort_file, run_env)
ftables, additional_routines = parse_fortran_file(fort_file, run_env)
mwaxmonsky marked this conversation as resolved.
Show resolved Hide resolved
# Check Fortran against metadata (will raise an exception on error)
mheaders = list()
for sect in [x.sections() for x in mtables]:
Expand All @@ -536,8 +561,16 @@ def parse_scheme_files(scheme_filenames, run_env):
for sect in [x.sections() for x in ftables]:
fheaders.extend(sect)
# end for
dyn_routines = []
for table in mtables:
if table.dyn_const_routine:
dyn_routines.append(table.dyn_const_routine)
# end if
# end for
mwaxmonsky marked this conversation as resolved.
Show resolved Hide resolved
check_fortran_against_metadata(mheaders, fheaders,
filename, fort_file, logger)
filename, fort_file, logger,
dyn_routines=dyn_routines,
fortran_routines=additional_routines)
# Check for duplicate tables, then add to dict
for table in mtables:
if table.table_name in table_dict:
Expand All @@ -560,6 +593,23 @@ def parse_scheme_files(scheme_filenames, run_env):
# end if
# end for
# end for
# Check for duplicate dynamic constituent routine names
dyn_val_dict = {}
for table in table_dict:
routine_name = table_dict[table].dyn_const_routine
if routine_name:
if routine_name in dyn_val_dict:
# dynamic constituent routines must have unique names
scheme_name = dyn_val_dict[routine_name]
errmsg = f"ERROR: Dynamic constituent routine names must be unique. Cannot add " \
f"{routine_name} for {table}. Routine already exists in {scheme_name}. "
raise CCPPError(errmsg)
else:
dyn_val_dict[routine_name] = table
# end if
# end if
# end for

return header_dict.values(), table_dict

###############################################################################
Expand Down Expand Up @@ -623,13 +673,25 @@ def capgen(run_env, return_db=False):
# end if
# First up, handle the host files
host_model = parse_host_model_files(host_files, host_name, run_env)
# Next, parse the scheme files
# We always need to parse the ccpp_constituent_prop_ptr_t DDT
dustinswales marked this conversation as resolved.
Show resolved Hide resolved
const_prop_mod = os.path.join(src_dir, "ccpp_constituent_prop_mod.meta")
if const_prop_mod not in scheme_files:
scheme_files = [const_prop_mod] + scheme_files
scheme_files= [const_prop_mod] + scheme_files
# end if
# Next, parse the scheme files
scheme_headers, scheme_tdict = parse_scheme_files(scheme_files, run_env)
# Pull out the dynamic constituent routines, if any
dyn_const_dict = {}
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
dyn_val_dict = {}
for table in scheme_tdict:
routine_name = scheme_tdict[table].dyn_const_routine
if routine_name is not None:
if routine_name not in dyn_val_dict:
dyn_const_dict[table] = routine_name
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
dyn_val_dict[routine_name] = table
# end if
# end if
# end for
if run_env.verbose:
ddts = host_model.ddt_lib.keys()
if ddts:
Expand Down Expand Up @@ -660,7 +722,7 @@ def capgen(run_env, return_db=False):
# end if
os.makedirs(outtemp_dir)
# end if
ccpp_api = API(sdfs, host_model, scheme_headers, run_env)
ccpp_api = API(sdfs, host_model, scheme_headers, run_env, dyn_const_dict)
cap_filenames = ccpp_api.write(outtemp_dir, run_env)
if run_env.generate_host_cap:
# Create a cap file
Expand Down
Loading
Loading