diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 496bfc9..47dac5f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -62,7 +62,7 @@ jobs: run: python -m pip install --upgrade pip setuptools wheel - name: Install project as a package - run: python -m pip install .[docs] + run: python -m pip install .[docs,properdocs] - name: Build static website env: diff --git a/.github/workflows/lint-and-tests.yml b/.github/workflows/lint-and-tests.yml index 21b96d8..16f0eb6 100644 --- a/.github/workflows/lint-and-tests.yml +++ b/.github/workflows/lint-and-tests.yml @@ -25,6 +25,9 @@ jobs: strategy: fail-fast: false matrix: + static-generator: + - "mkdocs" + - "properdocs" python-version: - "3.10" - "3.11" @@ -49,7 +52,7 @@ jobs: run: python -m pip install --upgrade pip setuptools wheel - name: Install project as a package - run: python -m pip install .[test] + run: python -m pip install .[test,${{ matrix.static-generator }}] - name: Run Unit tests run: python -m pytest @@ -59,7 +62,7 @@ jobs: with: env_vars: PYTHON flags: unittests - name: Code Coverage for unittests on python-${{ matrix.python-version }}] + name: Code Coverage for unittests on ${{ matrix.static-generator }}-python-${{ matrix.python-version }}] env: PYTHON: ${{ matrix.python-version }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index a628452..5887809 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,18 @@ A plugin for [MkDocs](https://www.mkdocs.org), the static site generator, which ## Installation +Since its version 1.20.0, the plugin does not force a documentation generator on you: pick the one you use through an extra. + ```sh -pip install mkdocs-rss-plugin +# with MkDocs +pip install "mkdocs-rss-plugin[mkdocs]" + +# with ProperDocs +pip install "mkdocs-rss-plugin[properdocs]" ``` +> If MkDocs or ProperDocs is already installed in your environment, `pip install mkdocs-rss-plugin` is enough. + ## Usage Minimal [`mkdocs.yml` configuration](https://www.mkdocs.org/user-guide/configuration/#project-information): @@ -96,11 +104,11 @@ python -m pip install -e .[dev] # including documentation dependencies python -m pip install -e .[docs] -# including testing dependencies -python -m pip install -e .[test] +# including testing dependencies, with one documentation generator (mkdocs or properdocs) +python -m pip install -e .[test,mkdocs] # all inclusive -python -m pip install -e .[dev,docs,test] +python -m pip install -e .[dev,docs,test,mkdocs] # install git hooks pre-commit install diff --git a/pyproject.toml b/pyproject.toml index c247faa..4ac03d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,8 +42,6 @@ classifiers = [ dependencies = [ "CacheControl[filecache]>=0.14.3,<1", "GitPython>=3.2.1,<3.3", - "mkdocs==1.6.1", - "properdocs >=1.6.5,<2", "requests>=2.32.5,<3", "tzdata>=2024,<2027 ; sys_platform == 'win32'", ] @@ -59,6 +57,7 @@ dev = [ "Flake8-pyproject>=1.2.3", "pre-commit>=4,<5", ] + docs = [ "mkdocs-git-committers-plugin-2>=2.4.1,<2.6", "mkdocs-git-revision-date-localized-plugin>=1.3,<1.7", @@ -67,6 +66,11 @@ docs = [ "mkdocstrings-python>=1.16.2,<2.1", "termynal>=0.12.2,<0.15", ] + +mkdocs = ["mkdocs>=1.6.1,<2"] + +properdocs = ["properdocs>=1.6.7,<2"] + test = [ "feedparser>=6.0.12,<6.1", "jsonfeed-util>=1.2,<2", @@ -103,7 +107,7 @@ exclude_also = [ # Don't complain about missing debug-only code: "def __repr__", "if self.debug:", - # Don't complain if non-runnable code isn't run: + # Don't complain if non-runnable code isn't run: "if 0:", "if __name__ == .__main__.:", # Don't complain about imports for type checking: