Skip to content
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
6 changes: 1 addition & 5 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ ci-cd:
dependencies:
- changed-files:
- any-glob-to-any-file:
- requirements/*.txt
- requirements.txt
- pyproject.toml

documentation:
- changed-files:
- any-glob-to-any-file:
- "*.md"
- docs/**
- requirements/documentation.txt
- head-branch:
- ^docs
- documentation
Expand All @@ -37,7 +35,6 @@ packaging:
- changed-files:
- any-glob-to-any-file:
- MANIFEST.in
- setup.py
- head-branch:
- ^packaging
- packaging
Expand All @@ -52,7 +49,6 @@ tooling:
- any-glob-to-any-file:
- ".*"
- codecov.yml
- setup.cfg
- .vscode/**/*
- head-branch:
- ^tooling
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ name: "🐳 Docker Builder"
# events but only for the master branch
on:
pull_request:
branches: [main]
branches:
- main
paths-ignore:
- "docs/**"
push:
branches: [main]
branches:
- main
paths-ignore:
- "docs/**"

Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- "*.md"
- ".github/workflows/documentation.yml"
- ./mkdocs_rss_plugin
- requirements/documentation.txt
- pyproject.toml
tags:
- "*"

Expand All @@ -22,19 +22,19 @@ on:
paths:
- .github/workflows/documentation.yml
- docs/
- requirements/documentation.txt
- pyproject.toml

workflow_dispatch:

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

# Allow one concurrent deployment
concurrency:
group: "pages"
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
Expand All @@ -56,13 +56,13 @@ jobs:
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "requirements/documentation.txt"
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r requirements/documentation.txt
run: python -m pip install --upgrade pip setuptools wheel

- name: Install project as a package
run: python -m pip install .[docs]

- name: Build static website
env:
Expand Down
21 changes: 5 additions & 16 deletions .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,13 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements/*.txt"
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r requirements/development.txt
python -m pip install --upgrade -r requirements/testing.txt
- name: Upgrade installation dependencies
run: python -m pip install --upgrade pip setuptools wheel

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Install project
run: python -m pip install -e .
- name: Install project as a package
run: python -m pip install .[test]

- name: Run Unit tests
run: python -m pytest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
url: https://pypi.org/project/mkdocs-rss-plugin/
permissions:
contents: write
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
discussions: write
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing

steps:
- uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
python-version: "3.13"
cache: "pip"
cache-dependency-path: "requirements/base.txt"
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,6 @@ dmypy.json
# ################################

**/*.xml
mkdocs_rss_plugin/_version.py
site/
tests/fixtures/docs/temp_page_not_in_git_log.md
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.14.3"
hooks:
- id: ruff
- id: ruff-check
args:
- --fix-only
- --target-version=py310
Expand Down Expand Up @@ -66,7 +66,6 @@ repos:
- flake8-docstrings<2
language: python
args:
- --config=setup.cfg
- --select=E9,F63,F7,F82
- --docstring-convention=google

Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,24 @@ Following initiative from the author of Material for MkDocs, this plugin provide

## Development

Clone the repository:
Once you cloned the repository:

```sh
# install development dependencies
python -m pip install -U -r requirements/development.txt
# alternatively: pip install -e .[dev]

# install project as editable
python -m pip install -e .

# including development dependencies
python -m pip install -e .[dev]

# including documentation dependencies
python -m pip install -e .[docs]

# including testing dependencies
python -m pip install -e .[test]

# all inclusive
python -m pip install -e .[dev,docs,test]

# install git hooks
pre-commit install
```
Expand All @@ -104,8 +112,7 @@ Then follow the [contribution guidelines](CONTRIBUTING.md).

```sh
# install development dependencies
python -m pip install -U -r requirements/testing.txt
# alternatively: pip install -e .[test]
python -m pip install -e .[test]

# run tests
pytest
Expand All @@ -115,8 +122,7 @@ pytest

```sh
# install dependencies for documentation
python -m pip install -U -r requirements/documentation.txt
# alternatively: pip install -e .[doc]
python -m pip install -e .[docs]

# build the documentation
mkdocs build
Expand Down
73 changes: 52 additions & 21 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ These are mostly guidelines, not rules. Use your best judgment, and feel free to

## Development

Clone the repository:
Once you cloned the repository:

```sh
# install development dependencies
python -m pip install -U -r requirements/development.txt
# alternatively: pip install -e .[dev]

# install project as editable
python -m pip install -e .

# including development dependencies
python -m pip install -e .[dev]

# including documentation dependencies
python -m pip install -e .[docs]

# including testing dependencies
python -m pip install -e .[test]

# all inclusive
python -m pip install -e .[dev,docs,test]

# install git hooks
pre-commit install
```
Expand All @@ -32,8 +40,7 @@ Then follow the [contribution guidelines](#guidelines).

```sh
# install development dependencies
python -m pip install -U -r requirements/testing.txt
# alternatively: pip install -e .[test]
python -m pip install -e .[test]

# run tests
pytest
Expand All @@ -43,8 +50,7 @@ pytest

```sh
# install dependencies for documentation
python -m pip install -U -r requirements/documentation.txt
# alternatively: pip install -e .[doc]
python -m pip install -e .[docs]

# build the documentation
mkdocs build
Expand Down Expand Up @@ -90,10 +96,15 @@ Feel free to use the IDE you love. Here come configurations for some popular IDE

```jsonc
{
// Editor
"files.associations": {
"./requirements/*.txt": "pip-requirements"
// JSON
"[json]": {
"editor.bracketPairColorization.enabled": true,
"editor.defaultFormatter": "vscode.json-language-features",
"editor.formatOnSave": true,
"editor.guides.bracketPairs": "active"
},
"json.format.enable": true,
"json.schemaDownload.enable": true,
// Markdown
"markdown.updateLinksOnFileMove.enabled": "prompt",
"markdown.updateLinksOnFileMove.enableForDirectories": true,
Expand All @@ -104,9 +115,16 @@ Feel free to use the IDE you love. Here come configurations for some popular IDE
"editor.bracketPairColorization.enabled": true,
"editor.formatOnSave": true,
"editor.guides.bracketPairs": "active",
"files.trimTrailingWhitespace": false,
"files.trimTrailingWhitespace": false
},
// Python
"python.analysis.autoFormatStrings": true,
"python.analysis.autoImportCompletions": true,
"python.analysis.typeCheckingMode": "basic",
"python.terminal.activateEnvInCurrentTerminal": true,
"python.terminal.activateEnvironment": true,
"python.testing.unittestEnabled": true,
"python.testing.pytestEnabled": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
Expand All @@ -119,25 +137,38 @@ Feel free to use the IDE you love. Here come configurations for some popular IDE
],
"editor.wordWrapColumn": 88,
},
// Extensions
// YAML
"[yaml]": {
"editor.autoIndent": "keep",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"diffEditor.ignoreTrimWhitespace": false,
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
}
},
// extensions
"autoDocstring.guessTypes": true,
"autoDocstring.docstringFormat": "google-notypes",
"autoDocstring.generateDocstringOnEnter": false,
"flake8.args": [
"--config=setup.cfg",
"--verbose"
],
"isort.args": [
"--profile",
"black"
],
"isort.check": true,
"autoDocstring.guessTypes": true,
"autoDocstring.docstringFormat": "google",
"autoDocstring.generateDocstringOnEnter": false,
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
"!relative scalar",
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
],
]
}
```
Loading