Skip to content

Commit

Permalink
changed domain split policy in Create Database and A La Carte tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ethoms-usgs committed Oct 5, 2023
1 parent 8e53705 commit 21f909e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions Scripts/GeMS_ALaCarte.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Add GeMS objects a la carte to a geodatabased
"""Add GeMS objects a la carte to a geodatabase
Create or augment a GeMS or GeMS-like file geodatabase by adding one or more
objects as needed
Expand Down Expand Up @@ -36,7 +36,7 @@
from pathlib import Path
import sys

versionString = "GeMS_ALaCarte.py, version of 27 June 2023"
versionString = "GeMS_ALaCarte.py, version of 10/5/23"
rawurl = "https://raw.githubusercontent.com/DOI-USGS/gems-tools-pro/master/Scripts/GeMS_ALaCarte.py"
guf.checkVersion(versionString, rawurl, "gems-tools-pro")

Expand Down Expand Up @@ -121,7 +121,9 @@ def conf_domain(gdb):
if not "ExIDConfidenceValues" in l_domains:
conf_vals = gdef.DefaultExIDConfidenceValues
arcpy.AddMessage("adding domain ExIDConfidenceValues")
arcpy.CreateDomain_management(gdb, "ExIDConfidenceValues", "", "TEXT", "CODED")
arcpy.CreateDomain_management(
gdb, "ExIDConfidenceValues", "", "TEXT", "CODED", "DUPLICATE"
)
for val in conf_vals:
arcpy.AddMessage(f"adding value {val[0]}")
arcpy.AddCodedValueToDomain_management(
Expand Down Expand Up @@ -173,7 +175,7 @@ def add_geomaterial(db, out_path, padding):
conf_vals = gdef.GeoMaterialConfidenceValues
arcpy.AddMessage(f"{padding}adding domain GeoMaterialConfidenceValues")
arcpy.CreateDomain_management(
db, "GeoMaterialConfidenceValues", "", "TEXT", "CODED"
db, "GeoMaterialConfidenceValues", "", "TEXT", "CODED", "DUPLICATE"
)
for val in conf_vals:
arcpy.AddMessage(f"{padding} adding value {val}")
Expand Down
6 changes: 3 additions & 3 deletions Scripts/GeMS_CreateDatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from GeMS_utilityFunctions import *
import copy

versionString = "GeMS_CreateDatabase.py, version of 9/18/23"
versionString = "GeMS_CreateDatabase.py, version of 10/5/23"
rawurl = "https://raw.githubusercontent.com/DOI-USGS/gems-tools-pro/master/Scripts/GeMS_CreateDatabase.py"
checkVersion(versionString, rawurl, "gems-tools-pro")

Expand Down Expand Up @@ -396,7 +396,7 @@ def main(thisDB, coordSystem, nCrossSections):
)
# Make GeoMaterialConfs domain, attach it to DMU field GeoMaterialConf
arcpy.CreateDomain_management(
thisDB, "GeoMaterialConfidenceValues", "", "TEXT", "CODED"
thisDB, "GeoMaterialConfidenceValues", "", "TEXT", "CODED", "DUPLICATE"
)
for val in GeoMaterialConfidenceValues:
arcpy.AddCodedValueToDomain_management(
Expand All @@ -416,7 +416,7 @@ def main(thisDB, coordSystem, nCrossSections):
# create domain, add domain values, and link domain to appropriate fields
addMsgAndPrint(" Creating domain, linking domain to appropriate fields")
arcpy.CreateDomain_management(
thisDB, "ExIDConfidenceValues", "", "TEXT", "CODED"
thisDB, "ExIDConfidenceValues", "", "TEXT", "CODED", "DUPLICATE"
)
for item in DefaultExIDConfidenceValues: # items are [term, definition, source]
code = item[0]
Expand Down

0 comments on commit 21f909e

Please sign in to comment.