{"id":23768581,"url":"https://github.com/nci-gdc/gdcdatamodel","last_synced_at":"2025-09-05T13:31:07.040Z","repository":{"id":21503545,"uuid":"24822528","full_name":"NCI-GDC/gdcdatamodel","owner":"NCI-GDC","description":"Translation layer between the GDC Data Dictionary and psqlgraph","archived":false,"fork":false,"pushed_at":"2025-06-20T19:14:10.000Z","size":13122,"stargazers_count":28,"open_issues_count":15,"forks_count":3,"subscribers_count":33,"default_branch":"develop","last_synced_at":"2025-06-20T19:37:17.844Z","etag":null,"topics":["core","library"],"latest_commit_sha":null,"homepage":"https://gdc.cancer.gov/developers/gdc-data-model","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NCI-GDC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-10-05T18:18:38.000Z","updated_at":"2024-08-13T02:42:07.000Z","dependencies_parsed_at":"2023-02-18T00:01:07.509Z","dependency_job_id":"07f9c278-eb85-49f3-8422-262380f2ef8f","html_url":"https://github.com/NCI-GDC/gdcdatamodel","commit_stats":null,"previous_names":[],"tags_count":129,"template":false,"template_full_name":null,"purl":"pkg:github/NCI-GDC/gdcdatamodel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCI-GDC%2Fgdcdatamodel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCI-GDC%2Fgdcdatamodel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCI-GDC%2Fgdcdatamodel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCI-GDC%2Fgdcdatamodel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NCI-GDC","download_url":"https://codeload.github.com/NCI-GDC/gdcdatamodel/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NCI-GDC%2Fgdcdatamodel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273765502,"owners_count":25164147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["core","library"],"created_at":"2025-01-01T01:37:39.623Z","updated_at":"2025-09-05T13:31:07.025Z","avatar_url":"https://github.com/NCI-GDC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# THIS PROJECT HAS BEEN ARCHIVED!\n\nThe repository has been replaced in full by [gdcdatamodel2](https://github.com/NCI-GDC/gdcdatamodel2) and will no longer be maintained.\n\n---\nGDC Data Model\n==============\n\nRepo to keep information about the GDC data model design.\n\n- [GDC Data Model](#gdc-data-model)\n- [Installation](#installation)\n- [Jupyter + Graphviz](#jupyter--graphviz)\n  - [Documentation](#documentation)\n    - [Visual representation](#visual-representation)\n  - [Dependencies](#dependencies)\n    - [Project Dependencies](#project-dependencies)\n- [Example validation usage](#example-validation-usage)\n- [Tests](#tests)\n- [Setup pre-commit hook to check for secrets](#setup-pre-commit-hook-to-check-for-secrets)\n- [Contributing](#contributing)\n\n# Installation\n\nTo install the gdcdatamodel library run the setup script:\n```\n❯ python setup.py install\n```\n\n# Jupyter + Graphviz\n\nIt's helpful to examine the relationships between nodes visually.  One\nway to do this is to run a Jupyter notebook with a Python2 kernel.\nWhen used with Graphviz's SVG support, you can view a graphical\nrepresentation of a subgraph directly in a REPL. To do so, install the\n`dev-requirements.txt` dependencies.  There is an example Jupyter\nnotebook at `examples/jupyter_example.ipynb` (replicated in\n`examples/jupyter_example.py` for clarity)\n\n```\npip install -r dev-requirements\nPG_USER=* PG_HOST=* PG_DATABASE=* PG_PASSWORD=*   jupyter notebook examples/jupyter_example.ipynb\n```\n\n\n## Documentation\n\n### Visual representation\n\nFor instructions on how to build the Graphviz representation of the\ndatamodel, see the\n[docs readme](https://github.com/NCI-GDC/gdcdatamodel/blob/develop/docs/README.md).\n\n\n## Dependencies\n\nBefore continuing you must have the following programs installed:\n\n- [Python 2.7+](http://python.org/)\n\nThe gdcdatamodel library requires the following pip dependencies\n\n- [avro](https://avro.apache.org/)\n- [graphviz](http://www.graphviz.org/)\n\n### Project Dependencies\n\nProject dependencies are managed using [PIP](https://pip.readthedocs.org/en/latest/)\n\n# Example validation usage\n```\nfrom gdcdatamodel import node_avsc_object\nfrom gdcdatamodel.mappings import get_participant_es_mapping, get_file_es_mapping\nfrom avro.io import validate\nimport json\n\n\nwith open('examples/nodes/aliquot_valid.json', 'r') as f:\n    node = json.loads(f.read())\nprint validate(node_avsc_object, node)  # if valid, prints True\n\n\nprint(get_participant_es_mapping())  # Prints participant elasticsearch mapping\nprint(get_file_es_mapping())         # Prints file elasticsearch mapping\n```\n\n# Tests\n\n```\n❯  nosetests -v\ntest_invalid_aliquot_node (test_avro_schemas.TestAvroSchemaValidation) ... ok\ntest_valid_aliquot_node (test_avro_schemas.TestAvroSchemaValidation) ... ok\n\n----------------------------------------------------------------------\nRan 2 tests in 0.033s\n\nOK\n```\n\n\n\n# Setup pre-commit hook to check for secrets\n\nWe use [pre-commit](https://pre-commit.com/) to setup pre-commit hooks for this repo.\nWe use [detect-secrets](https://github.com/Yelp/detect-secrets) to search for secrets being committed into the repo.\n\nTo install the pre-commit hook, run\n```\npre-commit install\n```\n\nTo update the .secrets.baseline file run\n```\ndetect-secrets scan --update .secrets.baseline\n```\n\n`.secrets.baseline` contains all the string that were caught by detect-secrets but are not stored in plain text. Audit the baseline to view the secrets .\n\n```\ndetect-secrets audit .secrets.baseline\n```\n# Contributing\n\nRead how to contribute [here](https://github.com/NCI-GDC/portal-ui/blob/develop/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnci-gdc%2Fgdcdatamodel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnci-gdc%2Fgdcdatamodel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnci-gdc%2Fgdcdatamodel/lists"}