Skip to main content

Script to create an indexed code.json for agencies.

Project description

codejson-index-generator

Script to create an indexed code.json for agencies.

About the Project

The GitHub Code.json Index Generator is a Python-based tool that helps federal agencies compile and maintain their code.json files for code.gov compliance. It automatically scans specified GitHub organizations, finds repositories containing code.json files, and combines them into a single indexed file.

Project Vision

To streamline the process of code.gov compliance for federal agencies by automating the collection and aggregation of code.json files across multiple GitHub organizations.

Project Mission

To provide agencies with a reliable, efficient tool for maintaining their code.gov inventory while reducing manual effort and potential for errors in the process.

Core Team

An up-to-date list of core team members can be found in 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.

Local Development

Prerequisites

  • Python 3.x
  • GitHub Personal Access Token (optional, but highly recommended for higher rate limits)

    Create a PAT: GitHub -> Settings -> Developer Settings -> Personal Access Tokens

Installation

  1. Clone the repository:
git clone ...
cd codejson-index-generator
  1. Install required dependencies:
pip install -r requirements.txt
  1. Set up your GitHub Personal Access Token:
export GITHUB_KEY="your-token-here"

NOTE: Use of GitHub PAT is highly recommened due to rate limiting.

Usage

The script can be run from the command line with the following options:

python main.py --agency AGENCY_NAME --orgs "org1,org2" --output code.json --version VERSION_NUMBER

NOTE: Seperate organizations by comma without any spaces!

Required arguments:
  • --agency: The name of your agency
  • --orgs: Comma-separated list of GitHub organizations to scan
Optional arguments:
  • --output: Output filename (default: code.json)
  • --version: Code.json file version (default: 1.0.0)
Example:
python3 main.py --agency CMS --orgs "DSACMS,CMSgov,CMS-Enterprise" --output code.json --version 1.0.0

Coding Style and Linters

Each application has its own linting and testing guidelines. Lint and code tests are run on each commit, so linters and tests should be run locally before committing.

Contributing

Thank you for considering contributing to an Open Source project of the US Government! For more information about our contribution guidelines, see CONTRIBUTING.md.

Codeowners

The contents of this repository are managed by {responsible organization(s)}. Those responsible for the code and documentation in this repository can be found in CODEOWNERS.md.

Community

The codejson-index-generator team is taking a community-first and open source approach to the product development of this tool. We believe government software should be made in the open and be built and licensed such that anyone can download the code, run it themselves without paying money to third parties or using proprietary software, and use it as they will.

We know that we can learn from a wide variety of communities, including those who will use or will be impacted by the tool, who are experts in technology, or who have experience with similar technologies deployed in other spaces. We are dedicated to creating forums for continuous conversation and feedback to help shape the design and development of the tool.

We also recognize capacity building as a key part of involving a diverse open source community. We are doing our best to use accessible language, provide technical and process documents, and offer support to community members with a wide variety of backgrounds and skillsets.

Community Guidelines

Principles and guidelines for participating in our open source community are can be found in 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.

Policies

Open Source Policy

We adhere to the CMS Open Source Policy. If you have any questions, just shoot us an email.

Security and Responsible Disclosure Policy

Submit a vulnerability: Vulnerability reports can be submitted through Bugcrowd. Reports may be submitted anonymously. If you share contact information, we will acknowledge receipt of your report within 3 business days.

For more information about our Security, Vulnerability, and Responsible Disclosure Policies, see SECURITY.md.

Software Bill of Materials (SBOM)

A Software Bill of Materials (SBOM) is a formal record containing the details and supply chain relationships of various components used in building software.

In the spirit of Executive Order 14028 - Improving the Nation’s Cyber Security, a SBOM for this repository is provided here: https://github.com/DSACMS/codejson-index-generator/network/dependencies.

For more information and resources about SBOMs, visit: https://www.cisa.gov/sbom.

Public domain

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication as indicated in LICENSE.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request or issue, you are agreeing to comply with this waiver of copyright interest.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codejson_index_generator-1.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codejson_index_generator-1.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file codejson_index_generator-1.1.0.tar.gz.

File metadata

  • Download URL: codejson_index_generator-1.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.14.6-zen1-1-zen

File hashes

Hashes for codejson_index_generator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 def88f530cad50643290106d4e7c2400135dd8ed22dde30cb8699b086b4d8f08
MD5 80ea58667ead369ad217aae9e851e004
BLAKE2b-256 bd7fbb51784fc166c2bd9974ef1a8ef306d149eccb676996aa735ae400a16cb9

See more details on using hashes here.

File details

Details for the file codejson_index_generator-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codejson_index_generator-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d77979e13ff7b862cf599b8dd2c95abd3d6ff626b009dfa40f6e9ec5583e5241
MD5 625c3921d856a989aa9d9680dd5f5671
BLAKE2b-256 2ad9eb051b96bf5ecb5bd4a1d5626befcffde171be1e0982693f126f7a316c70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page