diff --git a/.github/CODEOWNERS.md b/.github/CODEOWNERS.md new file mode 100644 index 0000000..b9fa34e --- /dev/null +++ b/.github/CODEOWNERS.md @@ -0,0 +1,11 @@ +# Code Owners + +- [@natalialuzuriaga](https://github.com/natalialuzuriaga) +- [@decause-gov](https://github.com/decause-gov) +- [@sachin-panayil](https://github.com/sachin-panayil) +- [@DinneK](https://github.com/DinneK) + +## Repo Domains + +/docs @natalialuzuriaga @decause-gov @sachin-panayil +/schema/ @natalialuzuriaga @decause-gov diff --git a/.github/codejson/cookiecutter.json b/.github/codejson/cookiecutter.json deleted file mode 100644 index 41312d4..0000000 --- a/.github/codejson/cookiecutter.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "project_name": "gov-codejson", - "project_org": "DSACMS", - "short_description": "A short description of the project.", - "long_description": "A longer description of the project.", - "subset_in_healthcare": "Policy, Operational", - "user_type": "Providers, Patients, Government", - "user_input": ["Yes", "No"], - "group": "CMS/OA/DSAC", - "repository_host": ["Github.com", "GitHub ENT", "GitHub Cloud", "GitLab.com", "GitLab ENT", "GitLab ENT CCSQ"], - "status": ["ideation", "development", "alpha", "beta", "release candidate", "production", "archival"], - "fisma_level": ["Low", "Moderate", "High"], - "license": ["CC0-1.0", "Apache-2.0", "MIT", "MPL-2.0", "GPL-2.0-only", "GPL-3.0-only", "GPL-3.0-or-later", "LGPL-2.1-only", "LGPL-3.0-only", "BSD-2-Clause", "BSD-3-Clause", "EPL-2.0", "Other"], - "vcs": ["git", "hg", "svn", "rcs", "bzr"], - "platforms": ["web", "windows", "mac", "linux", "ios", "android", "other"], - "categories": "healthcare", - "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": "opensource@cms.hhs.gov", - "contact_name": "CMS Open Source Program Office", - "localisation": ["true", "false"], - "__prompts__": { - "project_name": "Project name:", - "project_org": "GitHub organization:", - "short_description": "Provide a short description of the software. It should be a single line containing a single sentence. Maximum 150 characters are allowed.", - "long_description": "Provide longer description of the software, between 150 and 10000 chars. It is meant to provide an overview of the capabilities of the software for a potential user.", - "subset_in_healthcare": "Which subset of healthcare does the project belong to?", - "user_type": "Who are the intended users?", - "user_input": "Does the project accept user input? (e.g. allows user to query a database, allows login by users, upload files, etc.)", - "group": "Which group at CMS is the project part of?", - "repository_host": "Where is the repository hosted?", - "status": "What is the status of the project?", - "fisma_level": "What FISMA level is this project classified as? Learn more: https://security.cms.gov/learn/federal-information-security-modernization-act-fisma#perform-system-risk-categorization", - "license": "What license is the project under?", - "vcs": "What version control system is used?", - "platforms": "What platform does the software runs on?", - "categories": "What categories best describes the project? Separate items by commas. List of categories here: https://yml.publiccode.tools/categories-list.html?highlight=categories", - "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?", - "contact_email": "What is email address of the point of contact?", - "localisation": "Does the software support multiple spoken languages?" - } -} \ No newline at end of file diff --git a/.github/codejson/hooks/post_gen_project.py b/.github/codejson/hooks/post_gen_project.py deleted file mode 100644 index 211c1a0..0000000 --- a/.github/codejson/hooks/post_gen_project.py +++ /dev/null @@ -1,132 +0,0 @@ -import subprocess -import shutil -import json -import os -import shutil - -def get_date_fields(): - # Run git commands and capture as string - output = subprocess.run(['git', 'log', '--date=iso', '--pretty=%cI', '--max-parents=0', '-n', '1'], capture_output=True, text=True) - - # Store string and strip of leading / trailing whitespace - date = output.stdout.strip() - - # Create a dictionary for date information to be pushed to JSON - date_information = {"created": f"{date}", - "lastModified": "{% now 'utc', '%Y-%m-%dT%H:%M:%S%z' %}", - "metadataLastUpdated": "{% now 'utc', '%Y-%m-%dT%H:%M:%S%z' %}"} - - return date_information - -def get_scc_labor_hours(): - if shutil.which('scc') is not None: - try: - #Run scc and load results into a dictionary - #assuming we are in the .git directory of the repo - cmd = ['scc', '..', '--format', 'json2', '--exclude-file'] - - # Currently only supports specific files - files_to_exclude = [ - "checks.yml,auto-changelog.yml,contributors.yml,repoStructure.yml,code.json,checklist.md,checklist.pdf,README.md,CONTIRBUTING.md,LICENSE,MAINTAINERS.md,repolinter.json,SECURITY.md,CODE_OF_CONDUCT.md,CODEOWNERS.md,COMMUNITY_GUIDELINES.md,GOVERANCE.md" - ] - - cmd.extend(files_to_exclude) - - d = json.loads(subprocess.run(cmd,check=True, capture_output=True).stdout) - - l_hours = d['estimatedScheduleMonths'] * 730.001 - - return round(l_hours,2) - - except (subprocess.CalledProcessError, KeyError) as e: - print(e) - return None - else: - print("scc (https://github.com/boyter/scc) not found on system") - - #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 format_multi_select_fields(text): - new_text = text.split(",") - - new_text = [text.strip() for text in new_text] - - return new_text - -def update_code_json(json_file_path): - # Read the JSON - with open(json_file_path, 'r') as file: - data = json.load(file) - - # Add date_information and labor hours to the JSON - data['date'] = get_date_fields() - - # Calculate labor hours - hours = get_scc_labor_hours() - if hours: - data['laborHours'] = hours - else: - data['laborHours'] = None - - # Check if usageType is an exemption - if data['permissions']['usageType'].startswith('exempt'): - exemption_text = prompt_exemption_text(data['permissions']['usageType']) - data['permissions']['exemptionText'] = exemption_text - else: - del data['permissions']['exemptionText'] - - # Format multi-select options - data['categories'] = format_multi_select_fields(data['categories'][0]) - data['languages'] = format_multi_select_fields(data['languages'][0]) - data['tags'] = format_multi_select_fields(data['tags'][0]) - - # Update the JSON - with open(json_file_path, 'w') as file: - json.dump(data, file, indent = 2) - -def main(): - try: - # Change to the parent directory - os.chdir('..') - - # Define the codejson directory to remove - dir_name = "codejson" - - # Check if codejson directory exists and remove it - if os.path.exists(dir_name): - shutil.rmtree(dir_name) - - # Get the project name from cookiecutter - sub_project_dir = "{{cookiecutter.project_name}}" - codejson_file = "code.json" - project_root_dir = os.path.abspath('..') - - json_file_path = os.path.join(sub_project_dir, codejson_file) - - if os.path.exists(json_file_path): - # Move code.json file to parent directory - new_json_path = os.path.join(project_root_dir, codejson_file) - shutil.move(json_file_path, new_json_path) - - # Remove the source directory - shutil.rmtree(sub_project_dir) - - # Update the json with date and scc information - update_code_json(new_json_path) - print("Succesfully generated code.json file!") - - else: - print(f"Error: {codejson_file} not found in {sub_project_dir}") - - except OSError as error: - print(f"Error during OS operations: {error}") - except shutil.Error as error: - print(f"Error during shutil operations: {error}") - -if __name__ == "__main__": - main() diff --git a/.github/codejson/{{cookiecutter.project_name}}/code.json b/.github/codejson/{{cookiecutter.project_name}}/code.json deleted file mode 100644 index 014804a..0000000 --- a/.github/codejson/{{cookiecutter.project_name}}/code.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "{{ cookiecutter.project_name }}", - "description": { - "en": { - "shortDescription": "{{ cookiecutter.short_description }}", - "longDescription": "{{ cookiecutter.long_description }}" - } - }, - "status": "{{ cookiecutter.status }}", - "permissions": { - "licenses": [ - { - "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 }}", - "vcs": "{{ cookiecutter.vcs }}", - "laborHours": [""], - "platforms": [ "{{ cookiecutter.platforms }}" ], - "categories": [ "{{ cookiecutter.categories }}" ], - "softwareType": "{{ cookiecutter.software_type }}", - "languages": [ "{{ cookiecutter.languages }}" ], - "maintenance": "{{ cookiecutter.maintenance }}", - "date": [""], - "tags": [ "{{ cookiecutter.tags }}" ], - "contact": { - "email": "{{ cookiecutter.contact_email }}", - "name": "{{ cookiecutter.contact_name }}" - }, - "localisation": "{{ cookiecutter.localisation }}", - "repoType": "{{ cookiecutter.repo_type }}", - "userInput": "{{ cookiecutter.user_input }}", - "fismaLevel": "{{ cookiecutter.fisma_level }}", - "group": "{{ cookiecutter.group }}", - "subsetInHealthcare": "{{ cookiecutter.subset_in_healthcare }}", - "userType": "{{ cookiecutter.user_type }}", - "repositoryHost": "{{ cookiecutter.repository_host }}", - "maturityModelTier": "1" -} \ No newline at end of file diff --git a/.github/workflows/auto-changelog.yml b/.github/workflows/auto-changelog.yml index b406d84..fc53c09 100644 --- a/.github/workflows/auto-changelog.yml +++ b/.github/workflows/auto-changelog.yml @@ -3,6 +3,8 @@ on: release: types: - created +permissions: + contents: write jobs: changelog: runs-on: ubuntu-latest @@ -10,6 +12,4 @@ jobs: - name: "Auto Generate changelog" uses: heinrichreimer/action-github-changelog-generator@v2.3 with: - token: ${{ secrets.GITHUB_TOKEN }} - \ No newline at end of file diff --git a/.github/workflows/contributors.yml b/.github/workflows/contributors.yml index ab17322..1c9cec6 100644 --- a/.github/workflows/contributors.yml +++ b/.github/workflows/contributors.yml @@ -2,9 +2,6 @@ name: Update Contributors Information on: workflow_dispatch: {} - schedule: - # Weekly on Saturdays. - - cron: "30 1 * * 6" push: branches: [main] @@ -19,60 +16,56 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 - - name: Update contributor list - id: contrib_list - uses: akhilmhdh/contributors-readme-action@v2.3.10 + - name: Check if update needed + id: check_changes env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - with: - readme_path: MAINTAINERS.md - use_username: false - commit_message: "update contributors information" - - - name: Get contributors count - id: get_contributors - env: - - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: | - OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) - REPO=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) - QUERY='query { repository(owner: \"'"$OWNER"'\", name: \"'"$REPO"'\") { collaborators { totalCount } } }' - - CONTRIBUTORS=$(gh api \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "/repos/$OWNER/$REPO/contributors?per_page=100" | \ - jq '[.[] | select(.type != "Bot" and (.login | test("\\[bot\\]$") | not) and (.login | test("-bot$") | not))] | length') - - echo "Total contributors: $CONTRIBUTORS" - echo "contributors=$CONTRIBUTORS" >> $GITHUB_OUTPUT + OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) + REPO=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) + CURRENT=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "/repos/$OWNER/$REPO/contributors?per_page=100" | \ + jq -r '[.[] | select(.type != "Bot" and (.login | test("\\[bot\\]$") | not) and (.login | test("-bot$") | not)) | .login] | sort | join(",")') - - name: Update MAINTAINERS.md - run: | - - CONTRIBUTORS="${{ steps.get_contributors.outputs.contributors }}" - + EXISTING=$(grep -oP '(?<=github.com/)[^"]+(?=">)' COMMUNITY.md | \ + grep -v "^$" | sort | uniq | tr '\n' ',' | sed 's/,$//') - perl -i -pe 's/().*?()/$1 '"$CONTRIBUTORS"' $2/' MAINTAINERS.md + echo "Current contributors: $CURRENT" + echo "Existing contributors: $EXISTING" - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - git add MAINTAINERS.md - git commit -m "update contributors count to $CONTRIBUTORS" || exit 0 + if [ "$CURRENT" = "$EXISTING" ]; then + echo "has_changes=false" >> $GITHUB_OUTPUT + echo "No new contributors found. Skipping update!" + else + echo "has_changes=true" >> $GITHUB_OUTPUT + echo "New contributors detected. Running update!" + fi - - name: Push protected - uses: CasperWA/push-protected@v2 + - name: Update contributor list + if: steps.check_changes.outputs.has_changes == 'true' + id: update_contributors + uses: akhilmhdh/contributors-readme-action@v2.3.10 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - - token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }} - + readme_path: COMMUNITY.md + commit_message: "updating contributors list" + pr_title_on_protected: "docs: update contributors information" + committer_username: "github-actions[bot]" + committer_email: "github-actions[bot]@users.noreply.github.com" + + - name: Update PR + if: steps.check_changes.outputs.has_changes == 'true' && steps.update_contributors.outputs.pr_id != '' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_NUMBER="${{ steps.update_contributors.outputs.pr_id }}" - branch: main \ No newline at end of file + gh pr edit $PR_NUMBER \ + --body "New contributors detected! This PR updates the contributors list in COMMUNITY.md." \ + --add-label "documentation" diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml index 94ae3f0..71b04d7 100644 --- a/.github/workflows/gitleaks.yml +++ b/.github/workflows/gitleaks.yml @@ -1,15 +1,16 @@ name: Check for Secrets on: - pull_request: - push: - + pull_request: + push: +permissions: + contents: read jobs: scan-for-secrets: name: Run gitleaks runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: {fetch-depth: 0} + with: { fetch-depth: 0 } - name: Check for GitLeaks - uses: gacts/gitleaks@v1 \ No newline at end of file + uses: gacts/gitleaks@v1 diff --git a/.github/workflows/repoHygieneCheck.yml b/.github/workflows/repoHygieneCheck.yml index 41180b1..6c3a85e 100644 --- a/.github/workflows/repoHygieneCheck.yml +++ b/.github/workflows/repoHygieneCheck.yml @@ -2,7 +2,7 @@ name: "Repository Hygiene Check" on: push: branches: - - 'main' + - "main" workflow_dispatch: jobs: @@ -10,9 +10,8 @@ jobs: name: Check For First Run runs-on: ubuntu-latest outputs: - should_run: ${{ steps.check.outputs.should_run }} - + permissions: contents: read pull-requests: write @@ -21,13 +20,13 @@ jobs: - id: check run: | # If manually triggered, always run - + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - + echo "should_run=true" >> $GITHUB_OUTPUT exit 0 fi - + # Check if initialization label exists has_label=$(gh label list --json name | jq '.[] | select(.name=="repolinter-initialized")') @@ -39,42 +38,38 @@ jobs: echo "should_run=false" >> $GITHUB_OUTPUT fi env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - resolve-repolinter-json: name: Get Repolinter Config needs: check-first-run - if: needs.check-first-run.outputs.should_run == 'true' - + permissions: + contents: read uses: DSACMS/repo-scaffolder/.github/workflows/extendJSONFile.yml@main - with: - url_to_json: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier3/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json' - + with: + url_to_json: "https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier3/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json" + repolinter-checks: name: Tier 3 Checks needs: [check-first-run, resolve-repolinter-json] - + if: needs.check-first-run.outputs.should_run == 'true' - + runs-on: ubuntu-latest permissions: contents: write pull-requests: write env: - RAW_JSON: ${{ needs.resolve-repolinter-json.outputs.raw-json }} - + steps: - uses: actions/checkout@v4 - run: echo $RAW_JSON > repolinter.json - uses: DSACMS/repolinter-action@main with: - config_file: 'repolinter.json' - output_type: 'pull-request' - pull_request_labels: 'repolinter-initialized, cms-oss, cms-gov' - + config_file: "repolinter.json" + output_type: "pull-request" + pull_request_labels: "repolinter-initialized, cms-oss, cms-gov" + token: ${{ secrets.REPOLINTER_AUTO_TOKEN }} - \ No newline at end of file diff --git a/CODEOWNERS.md b/CODEOWNERS.md deleted file mode 100644 index 8ead0de..0000000 --- a/CODEOWNERS.md +++ /dev/null @@ -1,9 +0,0 @@ -# Code Owners - -- @natalialuzuriaga -- @decause-gov - -## Repo Domains - -/docs @natalialuzuriaga @decause-gov @sachin-panayil -/schema/ @natalialuzuriaga @decause-gov diff --git a/COMMUNITY.md b/COMMUNITY.md new file mode 100644 index 0000000..02062ac --- /dev/null +++ b/COMMUNITY.md @@ -0,0 +1,108 @@ +# COMMUNITY.md + +codejson-generator is supported by a dedicated team of individuals fulfilling various roles to ensure its success, security, and alignment with government standards and agency goals. + +## Project Members + +| Role | Name | Affiliation | +| :---------------- | :---------------- | :---------- | +| Open Source Lead | Remy DeCausemaker | CMS OSPO | +| Software Engineer | Natalia Luzuriaga | CMS OSPO | +| Software Engineer | Dinne Kopelevich | CMS OSPO | +| Software Engineer | Sachin Panayil | CMS OSPO | + +See [CODEOWNERS.md](.github/CODEOWNERS.md) for a list of those responsible for the code and documentation in this repository. + +See [Community Guidelines](#codejson-generator-open-source-community-guidelines) on principles and guidelines for participating in this open source project. + +## Roles & Responsibilities + +The members of codejson-generator community are responsible for guiding its development, ensuring quality standards, and fostering a collaborative environment. They play a vital role in making decisions about code contributions, handling releases, and ensuring the project meets its goals and objectives. Below is a list of the key members and their specific roles and responsibilities. We are eagerly seeking individuals who are interested in joining the community and helping shape and support these roles. + +### Maintainers: + +- [@natalialuzuriaga](https://github.com/natalialuzuriaga) +- [@decause-gov](https://github.com/decause-gov) +- [@sachin-panayil](https://github.com/sachin-panayil) +- [@DinneK](https://github.com/DinneK) + + + +### Approvers: + +- [@natalialuzuriaga](https://github.com/natalialuzuriaga) +- [@decause-gov](https://github.com/decause-gov) + + + +### Reviewers: + +- [@sachin-panayil](https://github.com/sachin-panayil) +- [@DinneK](https://github.com/DinneK) + + + +| Roles | Responsibilities | Requirements | Defined by | +| ---------- | :--------------------------------------------- | :-------------------------------------------------------------------------------- | :-------------------------------------------------------- | +| member | active contributor in the community | multiple contributions to the project. | PROJECT GitHub org Committer Team | +| reviewer | review contributions from other members | history of review and authorship in a sub-project | COMMUNITY file reviewer entry, and GitHub Org Triage Team | +| approver | approve accepting contributions | highly experienced and active reviewer + contributor to a sub-project | COMMUNITY file approver entry and GitHub Triage Team | +| maintainer | set direction and priorities for a sub-project | demonstrated responsibility and excellent technical judgement for the sub-project | COMMUNITY file owner entry and GitHub Org Admin Team | + + + +## Contributors + + + +![]() + + + + +### Alumni + +We'd like to acknowledge the following individuals for their past contributions of this project: + +- [@IsaacMilarky](https://github.com/IsaacMilarky) + +## codejson-generator Open Source Community Guidelines + +This document contains principles and guidelines for participating in the {{ cookiecutter.project_name }} open source community. + +### Principles + +These principles guide our data, product, and process decisions, architecture, and approach. + +- Open means transparent and participatory. +- We take a modular and modern approach to software development. +- We build open-source software and open-source process. +- We value ease of implementation. +- Fostering community includes building capacity and making our software and processes accessible to participants with diverse backgrounds and skillsets. +- Data (and data science) is as important as software and process. We build open data sets where possible. +- We strive for transparency for algorithms and places we might be introducing bias. + +### Community Guidelines + +All community members are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md). + +Information on contributing to this repository is available in our [Contributing file](CONTRIBUTING.md). + +When participating in codejson-generator open source community conversations and spaces, we ask individuals to follow the following guidelines: + +- When joining a conversation for the first time, please introduce yourself by providing a brief intro that includes: + - your related organization (if applicable) + - your pronouns + - your superpower, and how you hope to use it for codejson-generator +- Embrace a culture of learning, and educate each other. We are all entering this conversation from different starting points and with different backgrounds. There are no dumb questions. +- Take space and give space. We strive to create an equitable environment in which all are welcome and able to participate. We hope individuals feel comfortable voicing their opinions and providing contributions and will do our best to recognize and make space for individuals who may be struggling to find space here. Likewise, we expect individuals to recognize when they are taking up significant space and take a step back to allow room for others. + +- Be respectful. +- Default to positive. Assume others' contributions are legitimate and valuable and that they are made with good intention. + +### Acknowledgements + +The Community Guidelines sections were originally forked from the [United States Digital Service](https://usds.gov) [Justice40](https://thejustice40.com) open source [repository](https://github.com/usds/justice40-tool), and we would like to acknowledge and thank the community for their contributions. diff --git a/COMMUNITY_GUIDELINES.md b/COMMUNITY_GUIDELINES.md deleted file mode 100644 index 790a78d..0000000 --- a/COMMUNITY_GUIDELINES.md +++ /dev/null @@ -1,37 +0,0 @@ -# gov-codejson Open Source Community Guidelines - -This document contains principles and guidelines for participating in the gov-codejson open source community. - -## Principles - -These principles guide our data, product, and process decisions, architecture, and approach. - -- Open means transparent and participatory. -- We take a modular and modern approach to software development. -- We build open-source software and open-source process. -- We value ease of implementation. -- Fostering community includes building capacity and making our software and processes accessible to participants with diverse backgrounds and skillsets. -- Data (and data science) is as important as software and process. We build open data sets where possible. -- We strive for transparency for algorithms and places we might be introducing bias. - -## Community Guidelines - -All community members are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md). - -Information on contributing to this repository is available in our [Contributing file](CONTRIBUTING.md). - -When participating in gov-codejson open source community conversations and spaces, we ask individuals to follow the following guidelines: - -- When joining a conversation for the first time, please introduce yourself by providing a brief intro that includes: - - your related organization (if applicable) - - your pronouns - - your superpower, and how you hope to use it for gov-codejson -- Embrace a culture of learning, and educate each other. We are all entering this conversation from different starting points and with different backgrounds. There are no dumb questions. -- Take space and give space. We strive to create an equitable environment in which all are welcome and able to participate. We hope individuals feel comfortable voicing their opinions and providing contributions and will do our best to recognize and make space for individuals who may be struggling to find space here. Likewise, we expect individuals to recognize when they are taking up significant space and take a step back to allow room for others. - -- Be respectful. -- Default to positive. Assume others' contributions are legitimate and valuable and that they are made with good intention. - -## Acknowledgements - -This COMMUNITY_GUIDELINES.md was originally forked from the [United States Digital Service](https://usds.gov) [Justice40](https://thejustice40.com) open source [repository](https://github.com/usds/justice40-tool), and we would like to acknowledge and thank the community for their contributions. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17fc112..d5f29dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,19 +7,21 @@ you'll be politely asked to change something. We appreciate all friendly contributions. We encourage you to read this project's CONTRIBUTING policy (you are here), its -[LICENSE](LICENSE.md), and its [README](README.md). +[LICENSE](LICENSE), and its [README](README.md). ## Getting Started -If you would like to comment and provide feedback on the metadata standard, please let us know by filing an **issue on our GitHub repository.** +If you would like to comment and provide feedback on the metadata standard, please let us know by filing an **issue on our GitHub repository**. + +### For agencies We encourage agencies to contribute by [submitting an agency schema addition issue](https://github.com/DSACMS/gov-codejson/issues) to [include their extended schema in the repository](../schemas). This helps foster collaboration and ensures shared improvements benefit the wider community. -For CMS, we are open to adding more fields to CMS code.json for any metadata the agency sees value in collecting. Request new metadata fields by filing a metadata field addition issue [here](https://github.com/DSACMS/gov-codejson/issues/new?template=metadata-field-addition.md). +We are open to adding more fields to maximal schema of government-wide code.json standard for any metadata the government sees value in collecting. Request new metadata fields by filing a metadata field addition issue [here](https://github.com/DSACMS/gov-codejson/issues/new?template=metadata-field-addition.md). ### Team Specific Guidelines -The project is led by the CMS Open Source Program Office team as detailed in [MAINTAINERS.md](/MAINTAINERS.md) +The project is led by the CMS Open Source Program Office team as detailed in [COMMUNITY.md](/COMMUNITY.md). ### Building dependencies @@ -54,7 +56,9 @@ N/A If you would like to comment on the metadata standard, please let us know by filing an **issue on our GitHub repository.** -For CMS, we are open to adding more fields to CMS code.json for any metadata the agency sees value in collecting. Request new metadata fields by filing a metadata field addition issue [here](https://github.com/DSACMS/gov-codejson/issues/new?template=metadata-field-addition.md). +#### For agencies + +We are open to adding more fields to maximal schema of government-wide code.json standard for any metadata the government sees value in collecting. Request new metadata fields by filing a metadata field addition issue [here](https://github.com/DSACMS/gov-codejson/issues/new?template=metadata-field-addition.md). ### Writing Pull Requests @@ -94,7 +98,7 @@ Some important notes regarding the summary line: ## Reviewing Pull Requests -Pull requests will be reviewed by the CMS Open Source Program Office team as detailed in [MAINTAINERS.md](/MAINTAINERS.md) +Pull requests will be reviewed by the CMS Open Source Program Office team as detailed in [COMMUNITY.md](/COMMUNITY.md) -This project is governed by our [Community Guidelines](COMMUNITY_GUIDELINES.md) and [Code of Conduct](CODE_OF_CONDUCT.md). +This project is governed by our [Community Guidelines](COMMUNITY.md) and [Code of Conduct](CODE_OF_CONDUCT.md). diff --git a/MAINTAINERS.md b/MAINTAINERS.md deleted file mode 100644 index 43ceb24..0000000 --- a/MAINTAINERS.md +++ /dev/null @@ -1,292 +0,0 @@ -# Maintainers - -This is a list of maintainers for this project. See [CODEOWNERS.md](./CODEOWNERS.md) for list of reviewers for different parts of the codebase. Team members include: - -## Maintainers: - -- @natalialuzuriaga -- @decause-gov - -## Approvers: - -- @natalialuzuriaga -- @decause-gov - -## Reviewers: - -- @IsaacMilarky -- @DinneK -- @sachin-panayil - -| Roles | Responsibilities | Requirements | Defined by | -| -------- | :--------------------------------------------- | :-------------------------------------------------------------------------------- | :---------------------------------------------------------- | -| member | active contributor in the community | multiple contributions to the project. | PROJECT GitHub org Committer Team | -| reviewer | review contributions from other members | history of review and authorship in a sub-project | MAINTAINERS file reviewer entry, and GitHub Org Triage Team | -| approver | approve accepting contributions | highly experienced and active reviewer + contributor to a sub-project | MAINTAINERS file approver entry and GitHub Triage Team | -| lead | set direction and priorities for a sub-project | demonstrated responsibility and excellent technical judgement for the sub-project | MAINTAINERS file owner entry and GitHub Org Admin Team | - -## Contributors - - - -Total number of contributors: - - - - - - - - - - - -
- - natalialuzuriaga -
- Natalia Luzuriaga -
-
- - sachin-panayil -
- Sachin Panayil -
-
- - decause-gov -
- decause-gov -
-
- - cms-eo14168 -
- cms-eo14168 -
-
- - -# Tier 3 Release Guidelines - -gov-codejson will see regular updates and new releases. This document describes the general guidelines around how and when a new release is cut. - -## Table of Contents - -- [Versioning](#versioning) - - - [Ongoing version support](#ongoing-version-support) -- [Release Process](#release-process) - - [Goals](#goals) - - [Schedule](#schedule) - - [Communication and Workflow](#communication-and-workflow) - -- [Preparing a Release Candidate](#preparing-a-release-candidate) - - [Incorporating feedback from review](#incorporating-feedback-from-review) -- [Making a Release](#making-a-release) -- [Auto Changelog](#auto-changelog) -- [Hotfix Releases](#hotfix-releases) - -## Versioning - -gov-codejson uses [Semantic Versioning](https://semver.org/). Each release is associated with a [`git tag`](github.com/DSACMS/gov-codejson/tags) of the form `X.Y.Z`. - -Given a version number in the `MAJOR.MINOR.PATCH` (eg., `X.Y.Z`) format, here are the differences in these terms: - -- **MAJOR** version - make breaking/incompatible API changes -- **MINOR** version - add functionality in a backwards compatible manner -- **PATCH** version - make backwards compatible bug fixes - - - - - -### Ongoing version support - - - - - -## Release Process - -The sections below define the release process itself, including timeline, roles, and communication best practices. - -### Goals - - - -. - -### Schedule - - - -### Communication and Workflow - - - - - -## Preparing a Release Candidate - -The following steps outline the process to prepare a Release Candidate of gov-codejson. This process makes public the intention and contents of an upcoming release, while allowing work on the next release to continue as usual in `dev`. - -1. Create a _Release branch_ from the tip of `dev` named `release-x.y.z`, where `x.y.z` is the intended version of the release. This branch will be used to prepare the Release Candidate. For example, to prepare a Release Candidate for `0.5.0`: - - ```bash - git fetch - git checkout origin/dev - git checkout -b release-0.5.0 - git push -u origin release-0.5.0 - ``` - - Changes generated by the steps below should be committed to this branch later. - -2. Create a tag like `x.y.z-rcN` for this Release Candidate. For example, for the first `0.5.0` Release Candidate: - - ```bash - git fetch - git checkout origin/release-0.5.0 - git tag 0.5.0-rc1 - git push --tags - ``` - -3. Publish a [pre-Release in GitHub](proj-releases-new): - - ```md - Tag version: [tag you just pushed] - Target: [release branch] - Release title: [X.Y.Z Release Candidate N] - Description: [copy in ReleaseNotes.md created earlier] - This is a pre-release: Check - ``` - -4. Open a Pull Request to `main` from the release branch (eg. `0.5.0-rc1`). This pull request is where review comments and feedback will be collected. - -5. Conduct Review of the Pull Request that was opened. - -### Incorporating feedback from review - -The review process may result in changes being necessary to the release candidate. - -For example, if the second Release Candidate for `0.5.0` is being prepared, after committing necessary changes, create a tag on the tip of the release branch like `0.5.0-rc2` and make a new [GitHub pre-Release](proj-releases-new) from there: - -```bash -git fetch -git checkout origin/release-0.5.0 -# more commits per OMF review -git tag 0.5.0-rc2 -git push --tags -``` - -Repeat as-needed for subsequent Release Candidates. Note the release branch will be pushed to `dev` at key points in the approval process to ensure the community is working with the latest code. - -## Making a Release - -The following steps describe how to make an approved [Release Candidate](#preparing-a-release-candidate) an official release of gov-codejson: - -1. **Approved**. Ensure review has been completed and approval granted. - -2. **Main**. Merge the Pull Request created during the Release Candidate process to `main` to make the release official. - -3. **Dev**. Open a Pull Request from the release branch to `dev`. Merge this PR to ensure any changes to the Release Candidate during the review process make their way back into `dev`. - -4. **Release**. Publish a [Release in GitHub](proj-releases-new) with the following information - - - Tag version: [X.Y.Z] (note this will create the tag for the `main` branch code when you publish the release) - - Target: main - - Release title: [X.Y.Z] - - Description: copy in Release Notes created earlier - - This is a pre-release: DO NOT check - -5. **Branch**. Finally, keep the release branch and don't delete it. This allows easy access to a browsable spec. - -## Auto Changelog - -It is recommended to use the provided auto changelog github workflow to populate the project’s CHANGELOG.md file: - -```yml -name: Changelog -on: - release: - types: - - created -jobs: - changelog: - runs-on: ubuntu-latest - steps: - - name: "Auto Generate changelog" - uses: heinrichreimer/action-github-changelog-generator@v2.3 - with: - token: ${{{{ secrets.GITHUB_TOKEN }}}} -``` - -This provided workflow will automatically populate the CHANGELOG.md with all of the associated changes created since the last release that are included in the current release. - -This workflow will be triggered when a new release is created. - -If you do not wish to use automatic changelogs, you can delete the workflow and update the CHANGELOG.md file manually. Although, this is not recommended. - -## Hotfix Releases - -In rare cases, a hotfix for a prior release may be required out-of-phase with the normal release cycle. For example, if a critical bug is discovered in the `0.3.x` line after `0.4.0` has already been released. - -1. Create a _Support branch_ from the tag in `main` at which the hotfix is needed. For example if the bug was discovered in `0.3.2`, create a branch from this tag: - - ```bash - git fetch - git checkout 0.3.2 - git checkout -b 0.3.x - git push -u origin 0.3.x - ``` - -2. Merge (or commit directly) the hotfix work into this branch. - -3. Tag the support branch with the hotfix version. For example if `0.3.2` is the version being hotfixed: - - ```bash - git fetch - git checkout 0.3.x - git tag 0.3.3 - git push --tags - ``` - -4. Create a [GitHub Release](proj-releases-new) from this tag and the support branch. For example if `0.3.3` is the new hotfix version: - - ```md - Tag version: 0.3.3 - Target: 0.3.x - Release title: 0.3.3 - Description: [copy in ReleaseNotes created earlier] - This is a pre-release: DO NOT check - ``` - -[proj-releases-new]: https://github.com/DSACMS/gov-codejson/releases/new diff --git a/README.md b/README.md index 666e642..f7eb52d 100644 --- a/README.md +++ b/README.md @@ -32,28 +32,28 @@ TODO: Good to include since this is an agency-led project --> ## Core Team -An up-to-date list of core team members can be found in [MAINTAINERS.md](MAINTAINERS.md). At this time, the project is still building the core team and defining roles and responsibilities. We are eagerly seeking individuals who would like to join the community and help us define and fill these roles. - -## Documentation Index - -- [docs](./docs) +An up-to-date list of core team members can be found in [COMMUNITY.md](COMMUNITY.md). ## Repository Structure -##### Documentation - -- [schemas](./schemas) -- [docs](./docs) +``` +. +├── assets # Assets for docs +├── docs # Directory containing information on code.json metadata standard +├── schemas # Schemas for software inventory metadata: code.json, agency extended code.json schemas, and agency-index.json +│ ├── agency-index # Schema for agency index +│ └── cms # CMS code.json extended agency schema +└── tests # JSON schema validation tests + └── examples # Examples of completed code.jsons +``` -##### Files +### Documentation Index -- [CONTRIBUTING.md](./CONTRIBUTING.md) -- [MAINTAINERS.md](./MAINTAINERS.md) -- [CODEOWNERS.md](./CODEOWNERS.md) -- [COMMUNITY_GUIDELINES.md](./COMMUNITY_GUIDELINES.md) -- [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) -- [SECURITY.md](./SECURITY.md) -- [LICENSE](./LICENSE) +- [CONTRIBUTING.md](./CONTRIBUTING.md): Guidelines for contributing to the project +- [COMMUNITY.md](./COMMUNITY.md) & [CODEOWNERS.md](./.github/CODEOWNERS.md): Core team information and guidelines for community participation +- [GOVERNANCE.md](./GOVERNANCE.md) - Project governance information +- [SECURITY.md](./SECURITY.md) - Security and vulnerability disclosure policies +- [LICENSE](./LICENSE) - CC0 1.0 Universal public domain dedication # Development and Software Delivery Lifecycle @@ -91,7 +91,7 @@ Thank you for considering contributing to an Open Source project of the US Gover ## Codeowners -The contents of this repository are managed by the CMS Open Source Program Office. Those responsible for the code and documentation in this repository can be found in [CODEOWNERS.md](CODEOWNERS.md). +The contents of this repository are managed by the CMS Open Source Program Office. Those responsible for the code and documentation in this repository can be found in [CODEOWNERS.md](./github/CODEOWNERS.md). ## Community @@ -103,7 +103,7 @@ We also recognize capacity building as a key part of involving a diverse open so ### Community Guidelines -Principles and guidelines for participating in our open source community are can be found in [COMMUNITY_GUIDELINES.md](COMMUNITY_GUIDELINES.md). Please read them before joining or starting a conversation in this repo or one of the channels listed below. All community members and participants are expected to adhere to the community guidelines and code of conduct when participating in community spaces including: code repositories, communication channels and venues, and events. +Principles and guidelines for participating in our open source community are can be found in [COMMUNITY.md](COMMUNITY.md). Please read them before joining or starting a conversation in this repo or one of the channels listed below. All community members and participants are expected to adhere to the community guidelines and code of conduct when participating in community spaces including: code repositories, communication channels and venues, and events.