Skip to content

Commit

Permalink
updated with latest prettified files
Browse files Browse the repository at this point in the history
  • Loading branch information
Milstein committed Aug 7, 2024
1 parent 15f9b1e commit a0fb31e
Show file tree
Hide file tree
Showing 118 changed files with 4,043 additions and 3,556 deletions.
108 changes: 54 additions & 54 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,67 @@ name: Build and Deploy Documentation using MkDocs
# Controls when the action will run. Triggers the workflow on push events on main branch
# but pull request events on any branch but deployement happens only for the main branch
on:
push:
branches: [main]
pull_request:
# branches: [main]
push:
branches: [main]
pull_request:
# branches: [main]

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

# permissions:
# contents: read

jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.12]
build:
name: Build Documentation
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.12]

steps:
- name: Checkout Main
uses: actions/checkout@v4
steps:
- name: Checkout Main
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and setup git config
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Clean Build
run: |
mkdocs build --clean
deploy:
name: Deploy Documentation
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.12]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and setup git config
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Clean Build
run: |
mkdocs build --clean
deploy:
name: Deploy Documentation
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10.12]

# this part will only run if the PR has been merged
# if: github.event.pull_request.merged == true
# this part will only run if the branch or tag ref
# that triggered the workflow is main i.e. pushed or PR merged in main
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout Main
uses: actions/checkout@v4
# this part will only run if the PR has been merged
# if: github.event.pull_request.merged == true
# this part will only run if the branch or tag ref
# that triggered the workflow is main i.e. pushed or PR merged in main
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout Main
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and setup git config
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Deploy
run: |
mkdocs gh-deploy --force
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and setup git config
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Deploy
run: |
mkdocs gh-deploy --force
44 changes: 22 additions & 22 deletions .github/workflows/precommit.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Run pre-commit checks

on:
push:
pull_request:
push:
pull_request:

jobs:
run-linters:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
run-linters:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ^3.10
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ^3.10

- name: Configure caching
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: precommit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Configure caching
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: precommit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Install requirements
run: |
pip install -r test-requirements.txt
- name: Install requirements
run: |
pip install -r test-requirements.txt
- name: Run linters
run: |
pre-commit run --all-files
- name: Run linters
run: |
pre-commit run --all-files
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ ENV/

# Others
.DS_Store

# Node
node_modules/
19 changes: 19 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"aliveStatusCodes": [200, 206, 403],
"ignorePatterns": [
{
"pattern": "^https://www\\.autosar\\.org/*"
},
{
"pattern": "^http://localhost"
},
{
"pattern": "^http://127\\.0\\.0\\.1"
},
{
"pattern": "^https://github.com/.*/discussions/new"
}
],
"retryOn429": true,
"retryCount": 10
}
4 changes: 0 additions & 4 deletions .markdownlint.json

This file was deleted.

13 changes: 10 additions & 3 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for all rules.
default: true
MD013:
code_blocks: false
tables: false
headings: false
code_blocks: false
tables: false
headings: false
MD029:
style: ordered
MD030: false
MD033: false
MD041: false
MD046: false
MD049: false
6 changes: 6 additions & 0 deletions .pre-commit-config-optional.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/tcort/markdown-link-check
rev: v3.12.2
hooks:
- id: markdown-link-check
args: [--quiet, --config=.markdown-link-check.json]
126 changes: 68 additions & 58 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,63 +1,73 @@
ci:
autofix_commit_msg: "style(pre-commit): autofix"
autoupdate_commit_msg: "ci(pre-commit): autoupdate"
autofix_commit_msg: "style(pre-commit): autofix"
autoupdate_commit_msg: "ci(pre-commit): autoupdate"

repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-yaml
args: [--unsafe, --allow-multiple-documents]
- id: check-symlinks
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
exclude: .*.param.yaml

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.40.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [--baseline, .secrets.baseline]
exclude: .*/tests/.*

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
args:
# these are errors that will be ignored by flake8
# check out their meaning here
# https://flake8.pycqa.org/en/latest/user/error-codes.html
- --ignore=E501,F401
exclude: ^testing/(data|examples)/
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: forbid-crlf
- id: remove-crlf
- id: forbid-tabs
- id: remove-tabs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-merge-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-yaml
args: [--unsafe, --allow-multiple-documents]
- id: check-symlinks
- id: detect-private-key

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
exclude: .*.param.yaml

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
- id: markdownlint
args: [-c, .markdownlint.yaml, --fix]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args:
- --ignore-path
- .prettierignore
- --config
- .prettierrc.yaml

- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [--baseline, .secrets.baseline]
exclude: .*/tests/.*

- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
args:
# these are errors that will be ignored by flake8
# check out their meaning here
# https://flake8.pycqa.org/en/latest/user/error-codes.html
- --ignore=E501,F401
exclude: ^testing/(data|examples)/

exclude: .svg
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.param.yaml
2 changes: 2 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
printWidth: 100
tabWidth: 4
Loading

0 comments on commit a0fb31e

Please sign in to comment.