Skip to content

Commit

Permalink
Merge pull request #426 from ncihtan/htan-docs
Browse files Browse the repository at this point in the history
feat: htan-docs
  • Loading branch information
aditigopalan authored Jun 14, 2024
2 parents 16a611a + 49c5d36 commit 248850c
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build Docs
on:
push:
branches:
- main
paths:
- 'docs/**/*.md'
- 'HTAN.model.csv'
- 'mkdocs.yml'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/[email protected]
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/[email protected]
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material mkdocs-table-reader-plugin pandas
- run: mkdocs gh-deploy --force
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Ignore files
.DS_Store
.DS_Store
.DS_Store
.github/.DS_Store
Binary file added docs/.DS_Store
Binary file not shown.
Binary file added docs/assets/htan-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/dictionary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ read_csv('../HTAN.model.csv', usecols=['Attribute','Description','DependsOn','Required']) }}
28 changes: 28 additions & 0 deletions docs/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<h1 align="center">
HTAN Data Model Dictionary
</h1>

<p align="center">
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/release/ncihtan/data-models?label=latest%20release&display_name=release&style=flat-square
">
</p>

**Welcome!** 👋 Explore metadata terms used by HTAN
project by attributes, description and dependencies.

### How to Use

1. ↑ Use the search bar above for a specific term

2. ← Use the left navigation to explore all existing terms by category

---

### Found an error?

We are always looking for ways to improve our data models. If there is
an issue with an existing term - or if you have a suggestion - [let us know](https://github.com/ncihtan/data-models/issues/new?assignees=aditigopalan&labels=bug&projects=&template=bug-report.md&title=%5Bbug%5D+)!

Please note that changing existing terminology may result in breaking
changes downstream, so not all suggestions will be considered unless
they are well-justified.
58 changes: 58 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Project
site_name: "HTAN Data Model Dictionary"
site_description: >
Versioned history of the HTAN data model.
# Repository
repo_url: https://github.com/ncihtan/data-models
repo_name: data-models

# Navigation
nav:
- Home: home.md
- Dictionary:
- Dictionary: dictionary.md

# Theme configuration
theme:
name: material
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: indigo
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: deep purple
toggle:
icon: material/toggle-switch
name: Switch to light mode
logo: assets/htan-logo.png
icon:
admonition:
note: octicons/tag-16
info: octicons/info-16
features:
- content.code.copy
- navigation.tabs
- navigation.footer
- navigation.sections
- search.highlight
- search.share
- search.suggest
- toc.follow

plugins:
- search
- table-reader:
data_path: "modules"
select_readers:
- read_csv

markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- toc:
permalink: true

0 comments on commit 248850c

Please sign in to comment.