Skip to content

Commit

Permalink
Merge pull request #192 from DSACMS/dev
Browse files Browse the repository at this point in the history
Merge Dev into Main
  • Loading branch information
natalialuzuriaga authored Oct 29, 2024
2 parents 47e956d + 8b43f30 commit e0eda42
Show file tree
Hide file tree
Showing 17 changed files with 1,212 additions and 183 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:

# The default token is the repolinter token for the DSACMS org
# You can change it if needed.
token: ${{ secrets.REPOLINTER_AUTO_TOKEN }}
token: ${{ secrets.PAT }}
240 changes: 128 additions & 112 deletions tier1/checklist.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def get_scc_labor_hours():
#Otherwise just use previous value as a default value.
return None

def prompt_exemption_text(exemptionType):
print(f"You have selected {exemptionType} for your Usage Type.")
return input("Please provide a one or two sentence justification for the exemption used: ")

def update_code_json(json_file_path):
# Read the JSON
with open(json_file_path, 'r') as file:
Expand All @@ -52,6 +56,12 @@ def update_code_json(json_file_path):
else:
data['laborHours'] = None

if data['permissions']['usageType'].startswith('exempt'):
exemption_text = prompt_exemption_text(data['permissions']['usageType'])
data['permissions']['exemptionText'] = exemption_text
else:
del data['permissions']['exemptionText']

# Update the JSON
with open(json_file_path, 'w') as file:
json.dump(data, file, indent = 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"URL": "LICENSE",
"name": "{{ cookiecutter.license }}"
}
]
],
"usageType": "{{ cookiecutter.usage_type }}",
"exemptionText": ""
},
"organization": "Centers for Medicare & Medicaid Services",
"repositoryURL": "https://github.com/{{ cookiecutter.project_org }}/{{ cookiecutter.project_name }}",
Expand Down
2 changes: 2 additions & 0 deletions tier1/{{cookiecutter.project_slug}}/.github/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"software_type":["standalone/mobile", "standalone/iot", "standalone/desktop", "standalone/web", "standalone/backend", "standalone/other", "addon", "library", "configurationFiles"],
"languages": "None",
"repo_type" : ["Package", "Website", "Standards", "Libraries", "Data", "Apps", "Tools", "APIs", "Docs"],
"usage_type" : ["openSource", "governmentWideReuse", "exemptByLaw", "exemptByNationalSecurity", "exemptByAgencySystem", "exemptByAgencyMission", "exemptByCIO", "exemptByPolicyDate"],
"maintenance": ["internal", "contract", "community", "none"],
"tags": "healthcare",
"contact_email": "[email protected]",
Expand All @@ -41,6 +42,7 @@
"software_type": "What type of software is the project?",
"languages": "What programming language(s) is the software written in? Separate items by commas.",
"repo_type": "What type of repository is this project?",
"usage_type": "What is the usage type for this project?",
"maintenance": "How is the software maintained?",
"tags": "Provide a list of tags to describe the software for search. Separate items by commas.",
"contact_name": "A point of contact is needed for the project. What is the name of the point of contact?",
Expand Down
430 changes: 430 additions & 0 deletions tier2/checklist.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def get_scc_labor_hours():
#Otherwise just use previous value as a default value.
return None

def prompt_exemption_text(exemptionType):
print(f"You have selected {exemptionType} for your Usage Type.")
return input("Please provide a one or two sentence justification for the exemption used: ")

def update_code_json(json_file_path):
# Read the JSON
with open(json_file_path, 'r') as file:
Expand All @@ -52,6 +56,12 @@ def update_code_json(json_file_path):
else:
data['laborHours'] = None

if data['permissions']['usageType'].startswith('exempt'):
exemption_text = prompt_exemption_text(data['permissions']['usageType'])
data['permissions']['exemptionText'] = exemption_text
else:
del data['permissions']['exemptionText']

# Update the JSON
with open(json_file_path, 'w') as file:
json.dump(data, file, indent = 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"URL": "LICENSE",
"name": "{{ cookiecutter.license }}"
}
]
],
"usageType": "{{ cookiecutter.usage_type }}",
"exemptionText": ""
},
"organization": "Centers for Medicare & Medicaid Services",
"repositoryURL": "https://github.com/{{ cookiecutter.project_org }}/{{ cookiecutter.project_name }}",
Expand Down
2 changes: 2 additions & 0 deletions tier2/{{cookiecutter.project_slug}}/.github/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"software_type":["standalone/mobile", "standalone/iot", "standalone/desktop", "standalone/web", "standalone/backend", "standalone/other", "addon", "library", "configurationFiles"],
"languages": "None",
"repo_type" : ["Package", "Website", "Standards", "Libraries", "Data", "Apps", "Tools", "APIs", "Docs"],
"usage_type" : ["openSource", "governmentWideReuse", "exemptByLaw", "exemptByNationalSecurity", "exemptByAgencySystem", "exemptByAgencyMission", "exemptByCIO", "exemptByPolicyDate"],
"maintenance": ["internal", "contract", "community", "none"],
"tags": "healthcare",
"contact_email": "[email protected]",
Expand All @@ -41,6 +42,7 @@
"software_type": "What type of software is the project?",
"languages": "What programming language(s) is the software written in? Separate items by commas.",
"repo_type": "What type of repository is this project?",
"usage_type": "What is the usage type for this project?",
"maintenance": "How is the software maintained?",
"tags": "Provide a list of tags to describe the software for search. Separate items by commas.",
"contact_name": "A point of contact is needed for the project. What is the name of the point of contact?",
Expand Down
Loading

0 comments on commit e0eda42

Please sign in to comment.