Skip to content

Commit fb70b2f

Browse files
authored
Merge pull request #5 from ProperDocs/fix
Add an autofix workflow, enforce YAML style as well
2 parents ccc674b + a6f349a commit fb70b2f

File tree

6 files changed

+99
-23
lines changed

6 files changed

+99
-23
lines changed

.github/workflows/autofix.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Auto-fix
2+
on:
3+
push:
4+
pull_request:
5+
jobs:
6+
style:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Download source
10+
uses: actions/checkout@v6
11+
- name: Install Python
12+
uses: actions/setup-python@v6
13+
with:
14+
python-version: '3.13'
15+
- name: Install dependencies
16+
run: |
17+
pip install --no-deps -r requirements/requirements-style.txt
18+
- name: Fix code style
19+
run: |
20+
ruff check --fix --unsafe-fixes
21+
ruff format
22+
- name: Fix YAML style
23+
run: |
24+
yamlfix projects.yaml
25+
- name: Check if any edits are necessary
26+
run: |
27+
git diff --color --exit-code
28+
- name: Apply automatic fixes using pre-commit-ci-lite
29+
if: failure() && github.event_name == 'pull_request'
30+
uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0

.yamlfix.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
explicit_start = false
2+
line_length = 1000
3+
indent_offset = 0
4+
indent_mapping = 2
5+
indent_sequence = 2
6+
none_representation = "null"

projects.yaml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
configuration:
2-
markdown_header_file: "config/header.md"
3-
markdown_footer_file: "config/footer.md"
2+
markdown_header_file: config/header.md
3+
markdown_footer_file: config/footer.md
44
min_description_length: 0
55
max_description_length: 1000 # don't truncate descriptions
66
min_stars: 0
77
min_projectrank: 0
88
require_homepage: false
99
require_license: false
10-
allowed_licenses: ["all"]
10+
allowed_licenses: [all]
1111
project_inactive_months: 12
1212
project_dead_months: 99999 # "dead" is a somewhat strong assumption, so we avoid making it
13-
1413
categories:
1514
- category: theming
1615
title: 🎨 Theming
@@ -46,7 +45,6 @@ categories:
4645
title: 🔧 Site building, site management
4746
- category: snippets-include
4847
title: 📁 Snippets & includes (reusing contents)
49-
5048
labels:
5149
- label: plugin
5250
image: https://cdn.icon-icons.com/icons2/1465/PNG/32/701electricplug_100845.png
@@ -60,7 +58,6 @@ labels:
6058
- label: markdown
6159
image: https://cdn.icon-icons.com/icons2/1459/PNG/32/2799201-jigsaw-processing_99781.png
6260
description: Markdown extension(s)
63-
6461
projects:
6562
- name: MkDocs theme
6663
properdocs_theme: [mkdocs]
@@ -270,7 +267,6 @@ projects:
270267
pypi_id: mkdocs-shadcn
271268
labels: [theme, plugin]
272269
category: theming
273-
274270
- name: automacdoc
275271
github_id: AlexandreKempf/automacdoc
276272
pypi_id: automacdoc
@@ -421,7 +417,6 @@ projects:
421417
pypi_id: mkdocs-apidescribed-plugin
422418
labels: [plugin]
423419
category: api-docs
424-
425420
- name: blog
426421
mkdocs_plugin: blog
427422
github_id: andyoakley/mkdocs-blog
@@ -465,7 +460,6 @@ projects:
465460
pypi_id: mkdocs-publisher
466461
labels: [plugin]
467462
category: blogging
468-
469463
- name: mkdocs_puml
470464
mkdocs_plugin: plantuml
471465
github_id: MikhailKravets/mkdocs_puml
@@ -706,7 +700,6 @@ projects:
706700
pypi_id: mkdocs-matplotlib
707701
labels: [plugin]
708702
category: charts
709-
710703
- name: pheasant
711704
mkdocs_plugin: pheasant
712705
github_id: daizutabi/pheasant
@@ -847,7 +840,6 @@ projects:
847840
labels: [plugin]
848841
license: Apache-2
849842
category: code-exec-templating
850-
851843
- name: recently-updated
852844
mkdocs_plugin: recently-updated
853845
github_id: jaywhj/mkdocs-recently-updated-docs
@@ -922,7 +914,6 @@ projects:
922914
pypi_id: mkdocs-github-changelog
923915
labels: [plugin]
924916
category: git-info
925-
926917
- name: docstyler
927918
mkdocs_plugin: docstyler
928919
github_id: hfagerlund/mkdocs-docstyler-plugin
@@ -1022,7 +1013,6 @@ projects:
10221013
mkdocs_plugin: mk-append-to-head
10231014
labels: [plugin]
10241015
category: html-css
1025-
10261016
- name: static-i18n
10271017
mkdocs_plugin: i18n
10281018
github_id: ultrabug/mkdocs-static-i18n
@@ -1042,7 +1032,6 @@ projects:
10421032
pypi_id: mkdocs-translations
10431033
labels: [plugin]
10441034
category: i18n-l10n
1045-
10461035
- name: swagger
10471036
mkdocs_plugin: swagger
10481037
github_id: allevo/mkdocs-swagger-plugin
@@ -1119,7 +1108,6 @@ projects:
11191108
pypi_id: mkdocs-copy-to-llm
11201109
labels: [plugin]
11211110
category: integrations
1122-
11231111
- name: Autolink References
11241112
mkdocs_plugin: autolink_references
11251113
github_id: theskumar/autolink-references-mkdocs-plugin
@@ -1263,7 +1251,6 @@ projects:
12631251
pypi_id: mkdocs-backlinks-section-plugin
12641252
labels: [plugin]
12651253
category: links-refs
1266-
12671254
- name: markdown-callouts
12681255
markdown_extension: [callouts, github-callouts]
12691256
github_id: oprypin/markdown-callouts
@@ -1432,7 +1419,6 @@ projects:
14321419
license: ISC
14331420
labels: [markdown]
14341421
category: markdown
1435-
14361422
- name: exclude
14371423
mkdocs_plugin: exclude
14381424
github_id: apenwarr/mkdocs-exclude
@@ -1609,7 +1595,6 @@ projects:
16091595
pypi_id: mkdocs-authors-plugin
16101596
labels: [plugin]
16111597
category: nav-pages
1612-
16131598
- name: mkdocs-spellcheck
16141599
mkdocs_plugin: spellcheck
16151600
github_id: pawamoy/mkdocs-spellcheck
@@ -1645,7 +1630,6 @@ projects:
16451630
labels: [plugin]
16461631
license: MIT
16471632
category: quality
1648-
16491633
- name: mkdocs-task-collector
16501634
mkdocs_plugin: task-collector
16511635
github_id: costantinoai/mkdocs-task-collector
@@ -1683,7 +1667,6 @@ projects:
16831667
pypi_id: mkdocs-extract-listings-plugin
16841668
labels: [plugin]
16851669
category: search-toc
1686-
16871670
- name: mkdocs-with-pdf
16881671
mkdocs_plugin: with-pdf
16891672
github_id: orzih/mkdocs-with-pdf
@@ -1743,7 +1726,6 @@ projects:
17431726
pypi_id: mkdocs-exporter
17441727
labels: [plugin]
17451728
category: site-conversion
1746-
17471729
- name: markdown-docs
17481730
github_id: ldeluigi/markdown-docs
17491731
dockerhub_id: deloo/markdown-docs
@@ -1851,7 +1833,7 @@ projects:
18511833
- name: mkdocs-required-frontmatter-plugin
18521834
mkdocs_plugin: required-frontmatter
18531835
github_id: unmc-vcr/mkdocs-required-frontmatter-plugin
1854-
pypi_id: mkdocs-required-frontmatter-plugin
1836+
pypi_id: mkdocs-required-frontmatter-plugin
18551837
labels: [plugin]
18561838
category: site-management
18571839
- name: Publisher for MkDocs - debugger
@@ -1873,7 +1855,6 @@ projects:
18731855
pypi_id: mkdocs-note
18741856
labels: [plugin]
18751857
category: site-management
1876-
18771858
- name: mkdocs-embed-external-markdown
18781859
mkdocs_plugin: external-markdown
18791860
github_id: fire1ce/mkdocs-embed-external-markdown

requirements/requirements-style.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ruff
2+
yamlfix
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This file was autogenerated by uv via the following command:
2+
# uv pip compile --universal --strip-extras requirements/requirements-style.in -o requirements/requirements-style.txt
3+
annotated-doc==0.0.4
4+
# via typer
5+
annotated-types==0.7.0
6+
# via pydantic
7+
click==8.3.1
8+
# via
9+
# typer
10+
# yamlfix
11+
colorama==0.4.6 ; sys_platform == 'win32'
12+
# via
13+
# click
14+
# loguru
15+
distro==1.9.0
16+
# via ruyaml
17+
loguru==0.7.3
18+
# via maison
19+
maison==2.0.2
20+
# via yamlfix
21+
markdown-it-py==4.0.0
22+
# via rich
23+
mdurl==0.1.2
24+
# via markdown-it-py
25+
platformdirs==4.9.4
26+
# via maison
27+
pydantic==2.12.5
28+
# via yamlfix
29+
pydantic-core==2.41.5
30+
# via pydantic
31+
pygments==2.19.2
32+
# via rich
33+
rich==14.3.3
34+
# via typer
35+
ruff==0.15.7
36+
# via -r requirements/requirements-style.in
37+
ruyaml==0.91.0
38+
# via yamlfix
39+
setuptools==82.0.1
40+
# via ruyaml
41+
shellingham==1.5.4
42+
# via typer
43+
typer==0.24.1
44+
# via maison
45+
typing-extensions==4.15.0
46+
# via
47+
# maison
48+
# pydantic
49+
# pydantic-core
50+
# typing-inspection
51+
typing-inspection==0.4.2
52+
# via pydantic
53+
win32-setctime==1.2.0 ; sys_platform == 'win32'
54+
# via loguru
55+
yamlfix==1.19.1
56+
# via -r requirements/requirements-style.in

ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
target-version = "py311"
12
line-length = 120
23

34
[lint]

0 commit comments

Comments
 (0)