Skip to content

Commit

Permalink
Update cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
cutoffthetop committed Jan 15, 2024
1 parent 735e11b commit 83fa8ce
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"checkout": null,
"commit": "233277b9593a0a8f763ba3351e969b0f625ffb64",
"commit": "c58458330ea33a3c2a2f18662442b92b6e5b5f4d",
"context": {
"cookiecutter": {
"project_name": "common",
Expand Down
34 changes: 13 additions & 21 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
# Ticket Number
<!--- Number of the ticket of this PR. -->
# PR Context
<!-- Additional info for the reviewer -->

# Uncovered Acceptance Criteria
<!--- Acceptance criteria that you did not cover and why you did not cover them. -->

# Open Questions
<!--- Questions that you have. -->
# Added
<!-- New features and interfaces -->

# Changes
<!-- Changes in existing functionality -->

## Added
<!--- For new features. -->

## Changes
<!--- For changes in existing functionality. -->

## Deprecated
<!--- For soon-to-be removed features. -->
# Deprecated
<!-- Soon-to-be removed features -->

## Removed
<!--- For now removed features. -->
# Removed
<!-- Definitely removed features -->

## Fixed
<!--- For any bug fixes. -->
# Fixed
<!-- Fixed bugs -->

## Security
<!--- In case of fixed vulnerabilities. -->
# Security
<!-- Fixed vulnerabilities -->
42 changes: 42 additions & 0 deletions .github/workflows/cookiecutter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Cookiecutter

on:
push:
branches: ["main"]
workflow_dispatch:

env:
PIP_NO_OPTION: on
PIP_NO_CLEAN: on
PIP_PREFER_BINARY: on

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Cache requirements
uses: actions/cache@v3
env:
cache-name: cache-requirements
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ env.cache-name }}-
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install requirements
run: make setup

- name: Check template
run: cruft check
10 changes: 10 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ jobs:
restore-keys: |
${{ env.cache-name }}-
- name: Cache poetry
uses: actions/cache@v3
env:
cache-name: cache-poetry
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ env.cache-name }}-
- name: Setup python
uses: actions/setup-python@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
python: python3.11
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.1.13
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ docs:
# use sphinx to auto-generate html docs from code
@ echo generating api docs; \
poetry run sphinx-apidoc -f -o docs/source mex; \
poetry run sphinx-build -b dirhtml docs docs/dist; \
poetry run sphinx-build -aE -b dirhtml docs docs/dist; \
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# sphinx configuration

html_theme = "sphinx_book_theme"
extensions = ["sphinx.ext.napoleon"]
html_theme = "alabaster"
napoleon_google_docstring = True
napoleon_include_init_with_doc = True
napoleon_include_private_with_doc = True
project = "mex-common"
templates_path = ["."]
7 changes: 5 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
mex-common
===
Documentation
=============

Common library for MEx python projects.

.. toctree::
:maxdepth: 2
:glob:

source/*
18 changes: 18 additions & 0 deletions docs/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{% extends '!layout.html' %}

{% block footer %}
<div class="footer">
<a href="https://www.rki.de/DE/Content/Forsch/MEx/MEx_inhalt.html" rel="nofollow">
MEx Project
</a> |
<a href="https://www.rki.de/DE/Service/Impressum/impressum_node.html" rel="nofollow">
RKI Imprint
</a> |
<a href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" rel="nofollow">
GitHub Privacy
</a> |
<a href="https://docs.github.com/en/site-policy/privacy-policies/github-cookies" rel="nofollow">
GitHub Cookies
</a>
</div>
{% endblock %}
4 changes: 2 additions & 2 deletions mex.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exit /b %errorlevel%
:docs
@REM use sphinx to auto-generate html docs from code
echo generating api docs
poetry run sphinx-apidoc -f -o docs/source mex
poetry run sphinx-apidoc -f -o docs\source mex
if %errorlevel% neq 0 exit /b %errorlevel%
poetry run sphinx-build -b dirhtml docs docs/dist
poetry run sphinx-build -aE -b dirhtml docs docs\dist
exit /b %errorlevel%
Loading

0 comments on commit 83fa8ce

Please sign in to comment.