Skip to content

Commit

Permalink
Merge pull request #5 from Knowledge-Graph-Hub/poetry_setup
Browse files Browse the repository at this point in the history
Set up poetry, workflows, and docs
  • Loading branch information
caufieldjh authored Nov 18, 2024
2 parents 6be744c + 5526935 commit 56c85c4
Show file tree
Hide file tree
Showing 17 changed files with 2,240 additions and 128 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help us improve KG-COVID-19
about: Create a report to help us improve KG-Registry
labels: bug

---
Expand All @@ -19,7 +19,7 @@ A clear and concise description of what you expected to happen.

### Version

Which version of KG-COVID-19 are you seeing the bug with? An md5 hash is most useful.
Which version are you seeing the bug with? An md5 hash is most useful.

### Additional context

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature request
about: Suggest a new feature to add to the KG-COVID-19 software framework
about: Suggest a new feature to add to the KG-Registry software framework
title: ''
labels: enhancement
assignees: ''
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Documentation

on:
workflow_dispatch:
push:
branches: [ main ]

paths:
- 'docs/*/*.md'

jobs:
build-docs:

runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python3
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: Install Poetry
uses: snok/[email protected]

#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction

#----------------------------------------------
# Create documentation and deploy.
#----------------------------------------------
- name: Create local docs
run: |
touch docs/.nojekyll
poetry run make all_docs
poetry run make gh-deploy
34 changes: 0 additions & 34 deletions .github/workflows/main.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: kg-registry QC

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10" ]

steps:
- uses: actions/[email protected]

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/[email protected]
- name: Install dependencies
run: poetry install --no-interaction

- name: Run linter
run: poetry run tox -e lint

- name: Check code quality with flake8
run: poetry run tox -e flake8

- name: Check static typing with MyPy
run: poetry run tox -e mypy

- name: Run tests
run: poetry run python -m unittest discover tests
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# kg-registry
A simple registry for KGHub projects

To add a new project, make a PR for this repo which updates registry.yaml to include information about your KG.
A simple registry for knowledge graphs, including KG-Hub projects.
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction to KG-Registry

KG-Registry is a registry for knowledge graphs.
Empty file removed kg_registry/__init__.py
Empty file.
2 changes: 0 additions & 2 deletions kg_registry/__version__.py

This file was deleted.

29 changes: 29 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
site_name: "KG-Registry"
theme:
name: material
analytics:
gtag: G-2SYBSJVZ23
palette:
- media: '(prefers-color-scheme: light)'
scheme: default
primary: indigo
accent: blue grey
toggle:
icon: material/lightbulb
name: Switch to light mode
- media: '(prefers-color-scheme: dark)'
scheme: slate
primary: indigo
accent: blue grey
toggle:
icon: material/lightbulb-outline
name: Switch to dark mode
features:
- content.tabs.link
plugins:
- search
nav:
- Introduction: index.md
site_url: https://knowledge-graph-hub.github.io/kg-registry/
repo_url: https://github.com/Knowledge-Graph-Hub/kg-registry
Loading

0 comments on commit 56c85c4

Please sign in to comment.