Skip to content

Commit bb18283

Browse files
authored
Merge pull request #100 from casework/update_local_uuid_documentation
Document second step in non-random UUID generation
2 parents 9bae915 + f5ac7e5 commit bb18283

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

case_utils/local_uuid.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333

3434

3535
def configure() -> None:
36+
"""
37+
This function is part of setting up demo_uuid() to generate non-random UUIDs. See demo_uuid() documentation for further setup notes.
38+
"""
3639
global DEMO_UUID_BASE
3740

3841
if os.getenv("DEMO_UUID_REQUESTING_NONRANDOM") == "NONRANDOM_REQUESTED":
@@ -112,7 +115,10 @@ def demo_uuid() -> str:
112115
113116
WARNING: This function was developed for use ONLY for reducing (but not eliminating) version-control edits to identifiers when generating sample data. It creates UUIDs that are decidedly NOT random, and should remain consistent on repeated calls to the importing script.
114117
115-
To prevent accidental non-random UUID usage, an environment variable, CASE_DEMO_NONRANDOM_UUID_BASE, must be set to a string provided by the caller. The variable's required value is the path to some directory. The variable's recommended value is the equivalent of the Make variable "top_srcdir" - that is, the root directory of the containing Git repository, some parent of the current process's current working directory.
118+
To prevent accidental non-random UUID usage, two setup steps need to be done before calling this function:
119+
120+
* An environment variable, CASE_DEMO_NONRANDOM_UUID_BASE, must be set to a string provided by the caller. The variable's required value is the path to some directory. The variable's recommended value is the equivalent of the Make variable "top_srcdir" - that is, the root directory of the containing Git repository, some parent of the current process's current working directory.
121+
* The configure() function in this module must be called.
116122
"""
117123
global DEMO_UUID_BASE
118124
global DEMO_UUID_COUNTER

0 commit comments

Comments
 (0)