Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
Signed-off-by: Julien <dev@ingeoveritas.com>
  • Loading branch information
Guts authored Jan 12, 2024
2 parents dd12cf8 + 6cd1d10 commit 9437205
Show file tree
Hide file tree
Showing 52 changed files with 11,470 additions and 417 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Test Docker Build
run: |
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ on:
pull_request:
branches: [main]
paths:
- ".github/workflows/documentation.yml"
- .github/workflows/documentation.yml
- docs/
- requirements/documentation.txt

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand All @@ -40,12 +41,12 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
Expand All @@ -58,6 +59,13 @@ jobs:
python -m pip install --upgrade -r requirements/documentation.txt
- name: Build static website
env:
MKDOCS_ENABLE_PLUGIN_GIT_COMMITTERS: true
MKDOCS_ENABLE_PLUGIN_GIT_DATES: true
MKDOCS_ENABLE_PLUGIN_MKDOCSTRINGS: true
MKDOCS_ENABLE_PLUGIN_PRIVACY: true
MKDOCS_ENABLE_PLUGIN_RSS: true
MKDOCS_ENABLE_PLUGIN_SOCIAL: true
run: mkdocs build --verbose

- name: Save build doc as artifact
Expand All @@ -69,11 +77,11 @@ jobs:
retention-days: 30

- name: Setup Pages
uses: actions/configure-pages@v3
uses: actions/configure-pages@v4
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
with:
# Upload entire repository
Expand All @@ -82,4 +90,4 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
12 changes: 6 additions & 6 deletions .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get source code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "requirements/*.txt"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
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/documentation.txt
python -m pip install --upgrade -r requirements/testing.txt
- name: Lint with flake8
run: |
Expand All @@ -53,7 +53,7 @@ jobs:
run: python -m pip install -e .

- name: Run Unit tests
run: pytest
run: python -m pytest

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,27 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/mkdocs-rss-plugin/
permissions:
contents: write
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
discussions: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade build
Expand All @@ -48,11 +55,13 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
print-hash: true

- name: Create/update release on GitHub
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
discussion_category_name: announcements
fail_on_unmatched_files: true
files: dist/*
generate_release_notes: true
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude: "node_modules|migrations|.venv|.direnv|tests/dev/|tests/fixtures/"
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
Expand All @@ -14,6 +14,7 @@ repos:
- id: check-json
- id: check-toml
- id: check-yaml
args: [--unsafe]
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
Expand All @@ -23,41 +24,40 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0 # Use the ref you want to point at
rev: v1.10.0
hooks:
- id: python-use-type-annotations

- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.15.0
hooks:
- id: pyupgrade
args:
- "--py38-plus"

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.270"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.9"
hooks:
- id: ruff
args: ["--fix-only"]
args: ["--fix-only", "--target-version=py38"]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.12.1
hooks:
- id: black
args: ["--target-version=py38"]

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
language: python
files: ^mkdocs_rss_plugin/.*\.py$
types: [python]
args: ["--config=setup.cfg", "--select=E9,F63,F7,F82"]

ci:
Expand Down
70 changes: 70 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,76 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-->

## 1.11.1 - 2024-01-11

### Features and enhancements 🎉

* fix #229 allow date.created to get creation date by @copdips in <https://github.com/Guts/mkdocs-rss-plugin/pull/237>

## New Contributors

* @copdips made their first contribution in <https://github.com/Guts/mkdocs-rss-plugin/pull/237>

## 1.11.0 - 2023-12-19

### Features and enhancements 🎉

* improvement: if social card not found, try to retrieve length from remote URL by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/225>

### Tooling 🔧

* ci: add a link between release and discussion by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/224>
* docs: explicitly enable plugins with env vars by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/227>

### Documentation 📖

* docs: add API autodocumentation with mkdocstrings by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/226>

## 1.10.0 - 2023-12-17

### Features and enhancements 🎉

* Feature: support material social cards plugin by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/217>
* feature: use plugin logger as recomended by Mkdocs (road to Mkdocs>=1.4) by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/221>
* quality: add tests against social cards integration by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/222>

### Tooling 🔧

* ci: set PyPi environment by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/215>

### Documentation 📖

* docs: switch to Material theme and revamp sections by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/216>
* docs: add missing git_use option by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/218>
* Documentation: fix anchors in JSON schema by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/220>

## 1.9.0 - 2023-12-07

### Bugs fixes 🐛

* fix: deprecation of Theme._vars by using config attributes by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/212> thanks to the excellent work of @alexvoss on <https://github.com/Guts/mkdocs-rss-plugin/issues/205> and <https://github.com/Guts/mkdocs-rss-plugin/pull/206>

### Features and enhancements 🎉

* Road to Mkdocs >= 1.4: plugin's configuration by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/195>
* Road to Mkdocs 1.4: use config attributes by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/211>
* Project: split dev and test dependencies by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/213>
* refacto: move global variables to constants module and rename customtypes into models by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/210>

### Tooling 🔧

* packaging: add Python 3.12 as supported version by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/214>

## 1.8.0 - 2023-07-24

### Bugs fixes 🐛

* Fix tests config by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/196>

### Features and enhancements 🎉

* Add option to enable/disable git use. by @Guts in <https://github.com/Guts/mkdocs-rss-plugin/pull/187>

## 1.7.0 - 2023-05-28

### Bugs fixes 🐛
Expand Down
71 changes: 1 addition & 70 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,70 +1 @@
# Contributing Guidelines

First off, thanks for considering to contribute to this project!

These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

## Git hooks

We use git hooks through [pre-commit](https://pre-commit.com/) to enforce and automatically check some "rules". Please install it before to push any commit.

See the relevant configuration file: `.pre-commit-config.yaml`.

## Code Style

Make sure your code *roughly* follows [PEP-8](https://www.python.org/dev/peps/pep-0008/) and keeps things consistent with the rest of the code:

- docstrings: [sphinx-style](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format) is used to write technical documentation.
- formatting: [black](https://black.readthedocs.io/) is used to automatically format the code without debate.
- sorted imports: [isort](https://pycqa.github.io/isort/) is used to sort imports
- static analysis: [flake8](https://flake8.pycqa.org/en/latest/) is used to catch some dizziness and keep the source code healthy.

----

## IDE

Feel free to use the IDE you love. Here come configurations for some popular IDEs to fit those guidelines.

### Visual Studio Code

```jsonc
{
"python.defaultInterpreterPath": ".venv/bin/python",
// 👆 For Windows, change it to "./.venv/Scripts/python.exe".
// Or you can manually select one when VS Code asks for it.
// Editor
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs":"active",
"editor.rulers": [
88
],
"editor.wordWrapColumn": 88,
"files.associations": {
"./requirements/*.txt": "pip-requirements"
},
// Formatter
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--target-version=py38"
],
// Linter
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.linting.flake8Args": [
"--config=setup.cfg",
"--verbose"
],
"python.linting.pylintEnabled": false,
// Tests
"python.testing.pytestArgs": [],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
// Git
"git.enableCommitSigning": true,
// Extensions
"autoDocstring.docstringFormat": "sphinx",
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs*.yml"
}
}
```
Contributing guidelines are now published on [the online documentation](https://guts.github.io/mkdocs-rss-plugin/contributing/).
Loading

0 comments on commit 9437205

Please sign in to comment.