Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds vocs documentation #42

Merged
merged 7 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# For more information about the CODEOWNERS file, see:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Owners of * in the repo & Default PR reviewers for the repository
* @MultifokalHirn

# Example for a specific directory
# /docs/* @some_user
88 changes: 0 additions & 88 deletions .github/workflows/ci.yaml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Deploy vocs site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
node_modules-${{ runner.os }}-
id: cache
- name: Setup npm environment
if: steps.cache.outputs.cache-hit != 'true'
run: npm install --no-save --include=dev

- name: Build docs site and put it in _site/
run: npm run docs:build
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
16 changes: 2 additions & 14 deletions .github/workflows/python-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ jobs:
restore-keys: |
venv-${{ runner.os }}-${{ matrix.python-version }}-
id: cache
- name: Setup virtual environment
- name: Setup dev environment
if: steps.cache.outputs.cache-hit != 'true'
run: make bootstrap

- name: Install prod and dev dependencies
run: make prod dev
run: make bootstrap-dev

- name: Run tests
run: make test
Expand All @@ -69,12 +66,3 @@ jobs:

- name: Lint
run: make lint

# - name: Install dependencies
# run: |
# python -m pip install --upgrade tox .
# - name: Test with tox
# run: |
# tox --version
# pyversion="${{ matrix.python-version }}"
# tox -e py${pyversion/./}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST

_site
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down Expand Up @@ -162,3 +162,5 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.pdm-python
node_modules
!docs/dist
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
"python.analysis.typeCheckingMode": "basic",
"editor.fontFamily": "\"Geist Mono Medium\", \"LigaSFMonoNerdFont\",\"Hack Nerd Font\", \"Noto Mono\", \"Jetbrains Mono Regular\", Menlo, Monaco, 'Courier New', monospace",
"editor.cursorStyle": "block",
"python.analysis.autoImportCompletions": true
"python.analysis.autoImportCompletions": true,
"cSpell.words": [
"Lennard",
"vocs"
]
}
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,26 @@ bootstrap-dev: ## set up a fresh dev environment
# setting up a fresh dev environment...
$(MAKE) bootstrap
$(MAKE) dev
$(MAKE) setup-docs
$(MAKE) setup-pre-commit
.PHONY: bootstrap-dev

setup-pre-commit: in-venv ## install pre-commit hooks
# installing pre-commit hooks...
$(VENV)/pre-commit autoupdate
$(VENV)/pre-commit install && pre-commit install --hook-type commit-msg
$(VENV)/pre-commit install && $(VENV)/pre-commit install --hook-type commit-msg
.PHONY: setup-pre-commit

setup-docs: ## install docs dependencies
# installing docs dependencies...
@npm install
.PHONY: setup-docs

build-docs: setup-docs ## build docs
# building docs...
@npm run docs:build
.PHONY: build-docs

update: ## update lock file if needed
$(VENV)/pdm self update
$(VENV)/pdm run update-all
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Tests](https://github.com/MultifokalHirn/python_template_repo/actions/workflows/python-checks.yaml/badge.svg?branch=main)](https://github.com/MultifokalHirn/python_template_repo/actions/workflows/python-checks.yaml)
![Coverage](./docs/img/coverage.svg)
![Coverage](./docs/public/img/coverage.svg)
![GitHub last commit](https://img.shields.io/github/last-commit/MultifokalHirn/python_template_repo)
![GitHub issues](https://img.shields.io/github/issues/MultifokalHirn/python_template_repo)
![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/MultifokalHirn/python_template_repo)
Expand Down Expand Up @@ -45,7 +45,7 @@ This is my personal template repository for python projects containing everythin

## Demo
>
[![asciicast](./docs/img/demo.svg)](https://asciinema.org/a/jJnVjjAALevmZBbgnWYGknz9b?autoplay=1&preload=1&loop=1)
[![asciicast](./docs/public/img/demo.svg)](https://asciinema.org/a/jJnVjjAALevmZBbgnWYGknz9b?autoplay=1&preload=1&loop=1)
<!-- omit in toc
TODO: embed as html to specify font family
-->
Expand Down
10 changes: 10 additions & 0 deletions docs/components/about.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as React from "react";

export default function About() {
return (
<div>
<img src="/apple-touch-icon.png" />; Lorem Ipsum
{/* <img src="/logo.svg" /> */}
</div>
);
}
Loading
Loading