Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Commits on Sep 28, 2020
Commits on Sep 29, 2020
Issue: #83
Commits on Sep 30, 2020
PR: #160
Commits on Oct 14, 2020
Commits on Oct 23, 2020
Pull request: #164
Co-authored-by: Timothée Mazzucotelli <pawamoy@pm.me>
Pull request: #165
Commits on Nov 01, 2020
Fixes #166
The current character set currently seems tailored to the Python handler, but can be not enough for others
(example identifier for a planned Crystal handler: `Foo::Type#bar(a,b)`)

And it doesn't seem like there's any strong reason to limit these?
Commits on Nov 03, 2020
feat: Allow any characters in identifiers
fix: Detecting paths relative to template directory in logging
refactor: Use ChainMap instead of copying dicts
Fixes #169.
PR #175.

Co-authored-by: Timothée Mazzucotelli <pawamoy@pm.me>
Commits on Nov 04, 2020
This also refactors the regex to use the MULTILINE flag instead of the complex "manual" alternative for detecting newlines.

Pull request: #170
Commits on Nov 06, 2020
Commits on Nov 19, 2020
Commits on Dec 06, 2020
Issue: #107
PR: #159
Co-authored-by: Reece Dunham <me@rdil.rocks>
Add initial support for the ReadTheDocs theme
Define a "transport representation" for autorefs:

    <span data-mkdocstrings-identifier="SomeIdentifier">SomeHTML</span>

First a native Markdown extension translates from the usual `[SomeMarkdown][SomeIdentifier]` to the above, and then the post-process replacement mechanism (which is kept in the same place as before) doesn't need to be so careful and complicated, it just indiscriminately replaces such exact strings.

This is a very big boost in performance and I think is more future-proof.

Other mkdocstrings handlers are also free to use this mechanism: define whatever syntax for autorefs that they need and then insert this exact HTML themselves, for the postprocessing to pick up later. It used to be possible to insert the square-brackets Markdown before, but that was very fragile.

Issue #187: #187
PR #188: #188
If there's any xref inside docs/index.md, `url_a` ends up being '', and `url_a[-1]` fails.

Issue #184: #184
PR #185: #185
Commits on Dec 08, 2020
This makes `handlers_cache` no longer be global but instead be confined to the Plugin. There will be only one instance of the plugin so it doesn't matter anyway. But actually this is also more correct, because what if someone tried to instantiate multiple handlers with different configs? It would work incorrectly previously.

But my main goal for this is to expose `MkdocstringsPlugin.get_handler(name)`. Then someone can use this inside a mkdocs hook:

    def on_files(self, files: Files, config: Config):
        crystal = config['plugins']['mkdocstrings'].get_handler('python').collector

So this is basically a prerequisite for issue #179: one could query the collector to know which files to generate.

PR #191: #191
Commits on Dec 16, 2020
Fix lack of isolation of Markdown calls from the top-level Markdown
Commits on Dec 19, 2020
First introduced in #188, there's a regression: if something messes with the final HTML before mkdocstrings plugin gets to it, it can't be detected and replaced.
A known case is with 'minify' plugin if it appears before our plugin in the config (which it shouldn't anyway).

So workaround this specific case. Make the attribute quotes optional to also catch minified HTML.
Hard to do much else, though perhaps a warning would make sense.
Commits on Dec 21, 2020
As shared by @zuru in #193. Thanks!
fix: More lenient regex for data-mkdocstrings-identifier
Commits on Dec 22, 2020
Issue #186: #186
Issue #193: #193
PR #199: #199
Commits on Dec 23, 2020
Any time a template is referenced, even though it's cached in memory, Jinja ends up doing a filesystem access, to check whether the template file has been modified and so would need to be recompiled.
But it's not even useful to be able to modify a template file on disk in the middle of a mkdocs build.
Commits on Dec 26, 2020
The follow-up calls for each block make no difference at all, and are getting quite expensive.
Commits on Dec 28, 2020
perf: Call `update_env` only once per `Markdown` instance
PR #198: #198
Commits on Dec 30, 2020
PR #203: #203
There's no real issue with this but it's invalid and doesn't do anything.

PR #204: #204
I conclude that it's unused because the condition necessarily requires finding something with class 'autodoc' -- but there is nothing that creates anything with class 'autodoc'!

PR #206: #206
```markdown
foo
**foo**
::: some.identifier
```

In the previous state, the "foo" text would be completely obliterated, but now it will be kept, and the autodoc will be rendered as well.

PR #207: #207
Commits on Dec 31, 2020
This fixes random test failures that for some reason showed up only on Windows Python 3.6
Commits on Jan 01, 2021
Commits on Jan 03, 2021
refactor: BlockProcessor already receives strings, use them as such
* Remove wemake-python-styleguide
* Re-add some flake8 plugins that previously WPS pulled in
* Upgrade isort invocation
This was a regression from #203.
This ended up disabling permalinks outright for all docs.
fix: Don't mutate the original Markdown config for permalinks
fix: Fix double code tags
Commits on Jan 06, 2021
Showing with 2,117 additions and 1,214 deletions.
  1. +1 −1 .copier-answers.yml
  2. +27 −26 .github/workflows/ci.yml
  3. +51 −0 CHANGELOG.md
  4. +8 −9 CONTRIBUTING.md
  5. +10 −11 CREDITS.md
  6. +17 −22 Makefile
  7. +17 −8 README.md
  8. +1 −2 config/coverage.ini
  9. +0 −11 config/flake8.ini
  10. +0 −1 docs/changelog.md
  11. +1 −0 docs/changelog.md
  12. +0 −1 docs/code_of_conduct.md
  13. +1 −0 docs/code_of_conduct.md
  14. +0 −1 docs/contributing.md
  15. +1 −0 docs/contributing.md
  16. +0 −1 docs/credits.md
  17. +1 −0 docs/credits.md
  18. +7 −1 docs/css/mkdocstrings.css
  19. +88 −6 docs/handlers/overview.md
  20. +96 −16 docs/handlers/python.md
  21. +0 −1 docs/index.md
  22. +1 −0 docs/index.md
  23. +0 −6 docs/reference/handlers/__init__.md
  24. +3 −0 docs/reference/handlers/base.md
  25. 0 docs/snippets/{function_annotations.py → function_annotations_google.py}
  26. +16 −0 docs/snippets/function_annotations_rst.py
  27. +70 −1 docs/troubleshooting.md
  28. +32 −3 docs/usage.md
  29. +408 −0 duties.py
  30. +39 −40 mkdocs.yml
  31. +19 −49 pyproject.toml
  32. +0 −65 scripts/gen_credits_data.py
  33. +9 −5 scripts/{run_task.sh → multirun.sh}
  34. +0 −33 scripts/regen_docs.py
  35. +2 −1 scripts/setup.sh
  36. +0 −128 scripts/update_changelog.py
  37. +0 −19 src/mkdocstrings/__init__.py
  38. +80 −99 src/mkdocstrings/extension.py
  39. +0 −252 src/mkdocstrings/handlers/__init__.py
  40. +468 −0 src/mkdocstrings/handlers/base.py
  41. +22 −23 src/mkdocstrings/handlers/python.py
  42. +139 −0 src/mkdocstrings/loggers.py
  43. +36 −18 src/mkdocstrings/plugin.py
  44. +71 −98 src/mkdocstrings/references.py
  45. +8 −6 src/mkdocstrings/templates/python/material/attribute.html
  46. +2 −1 src/mkdocstrings/templates/python/material/attributes.html
  47. +1 −0 src/mkdocstrings/templates/python/material/children.html
  48. +5 −3 src/mkdocstrings/templates/python/material/class.html
  49. +2 −1 src/mkdocstrings/templates/python/material/docstring.html
  50. +2 −1 src/mkdocstrings/templates/python/material/examples.html
  51. +2 −1 src/mkdocstrings/templates/python/material/exceptions.html
  52. +8 −8 src/mkdocstrings/templates/python/material/function.html
  53. +8 −8 src/mkdocstrings/templates/python/material/method.html
  54. +5 −3 src/mkdocstrings/templates/python/material/module.html
  55. +2 −1 src/mkdocstrings/templates/python/material/parameters.html
  56. +1 −0 src/mkdocstrings/templates/python/material/properties.html
  57. +2 −1 src/mkdocstrings/templates/python/material/return.html
  58. +13 −4 src/mkdocstrings/templates/python/material/signature.html
  59. +19 −0 src/mkdocstrings/templates/python/readthedocs/exceptions.html
  60. +19 −0 src/mkdocstrings/templates/python/readthedocs/parameters.html
  61. +17 −0 src/mkdocstrings/templates/python/readthedocs/return.html
  62. +0 −213 tasks.py
  63. +3 −0 tests/fixtures/cross_reference.py
  64. +15 −0 tests/fixtures/footnotes.py
  65. +8 −0 tests/fixtures/headings.py
  66. +114 −4 tests/test_extension.py
  67. +5 −0 tests/test_plugin.py
  68. +114 −1 tests/test_references.py
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: a06692b
_commit: 0.1.10
_src_path: gh:pawamoy/copier-poetry
author_email: pawamoy@pm.me
author_fullname: "Timoth\xE9e Mazzucotelli"
@@ -2,8 +2,6 @@ name: ci

on:
push:
branches:
- master
pull_request:
branches:
- master
@@ -12,6 +10,13 @@ defaults:
run:
shell: bash

env:
LANG: "en_US.utf-8"
LC_ALL: "en_US.utf-8"
POETRY_VIRTUALENVS_IN_PROJECT: "true"
PYTHONIOENCODING: "UTF-8"
PYTHONPATH: docs

jobs:

quality:
@@ -22,42 +27,43 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python 3.6
uses: actions/setup-python@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.8

- name: Set up the cache
uses: actions/cache@v1
with:
path: .venv
key: cache-python-packages
key: quality-venv-cache-2

- name: Set up the project
run: |
pip install poetry invoke safety
poetry config virtualenvs.in-project true
make setup
pip install poetry
poetry install -vvv || { rm -rf .venv; poetry install -vvv; }
poetry update
- name: Check if the documentation builds correctly
run: make check-docs
run: poetry run duty check-docs

- name: Check the code quality
run: make check-code-quality
run: poetry run duty check-code-quality

- name: Check if the code is correctly typed
run: make check-types
run: poetry run duty check-types

- name: Check for vulnerabilities in dependencies
run: make check-dependencies
run: |
pip install safety
poetry run duty check-dependencies
tests:

strategy:
max-parallel: 6
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.6,3.7,3.8]
python-version: [3.6, 3.7, 3.8, 3.9]

runs-on: ${{ matrix.os }}

@@ -66,26 +72,21 @@ jobs:
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set up the cache
uses: actions/cache@v1
env:
cache-name: cache-python-packages
with:
path: .venv
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ env.cache-name }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
${{ matrix.os }}-
key: tests-venv-cache-${{ matrix.os }}-py${{ matrix.python-version }}

- name: Set up the project
run: |
pip install poetry invoke
poetry config virtualenvs.in-project true
make setup
pip install poetry
poetry install -vvv || { rm -rf .venv; poetry install -vvv; }
poetry update
- name: Run the test suite
run: make test
run: poetry run duty test
@@ -5,6 +5,57 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- insertion marker -->
## [0.14.0](https://github.com/pawamoy/mkdocstrings/releases/tag/0.14.0) - 2021-01-06

<small>[Compare with 0.13.6](https://github.com/pawamoy/mkdocstrings/compare/0.13.6...0.14.0)</small>

Special thanks to Oleh [@oprypin](https://github.com/oprypin) Prypin who did an amazing job (this is a euphemism)
at improving MkDocstrings, fixing hard-to-fix bugs with clever solutions, implementing great new features
and refactoring the code for better performance and readability! Thanks Oleh!

### Bug Fixes
- Fix double code tags ([e84d401](https://github.com/pawamoy/mkdocstrings/commit/e84d401c6dcb9aecb8cc1a58d3a0f339e1c3e78f) by Timothée Mazzucotelli).
- Don't mutate the original Markdown config for permalinks ([8f6b163](https://github.com/pawamoy/mkdocstrings/commit/8f6b163b50551da22f65e9b736e042562f77f2d7) by Oleh Prypin).
- Preserve text immediately before an autodoc ([07466fa](https://github.com/pawamoy/mkdocstrings/commit/07466fafb54963a4e35e69007b6291a0382aaeb4) by Oleh Prypin). [PR #207](https://github.com/pawamoy/mkdocstrings/pull/207)
- Remove `href` attributes from headings in templates ([d5602ff](https://github.com/pawamoy/mkdocstrings/commit/d5602ff3bb1a75ac1c8c457e972271b6c66eb8dd) by Oleh Prypin). [PR #204](https://github.com/pawamoy/mkdocstrings/pull/204)
- Don't let `toc` extension append its permalink twice ([a154f5c](https://github.com/pawamoy/mkdocstrings/commit/a154f5c4c6ef9abd221e1f89e44847ae2cf25436) by Oleh Prypin). [PR #203](https://github.com/pawamoy/mkdocstrings/pull/203)
- Fix undefined entity for `&para;` ([2c29211](https://github.com/pawamoy/mkdocstrings/commit/2c29211002d515db40e5bdabf6cbf32ec8633a05) by Timothée Mazzucotelli).
- Make ids of Markdown sub-documents prefixed with the parent item id ([d493d33](https://github.com/pawamoy/mkdocstrings/commit/d493d33b3827d93e84a7b2e39f0a10dfcb782402) by Oleh Prypin). [Issue #186](https://github.com/pawamoy/mkdocstrings/issues/186) and [#193](https://github.com/pawamoy/mkdocstrings/issues/193), [PR #199](https://github.com/pawamoy/mkdocstrings/pull/199)
- More lenient regex for data-mkdocstrings-identifier ([dcfec8e](https://github.com/pawamoy/mkdocstrings/commit/dcfec8edfdff050debc5856dfc213d3119a84792) by Oleh Prypin).
- Shift Markdown headings according to the current `heading_level` ([13f41ae](https://github.com/pawamoy/mkdocstrings/commit/13f41aec5a95c82c1229baa4ac3caf4abb2add51) by Oleh Prypin). [Issue #192](https://github.com/pawamoy/mkdocstrings/issues/192), [PR #195](https://github.com/pawamoy/mkdocstrings/pull/195)
- Fix footnotes appearing in all following objects ([af24bc2](https://github.com/pawamoy/mkdocstrings/commit/af24bc246a6938ebcae7cf6ff677b194cf1af95c) by Oleh Prypin). [Issue #186](https://github.com/pawamoy/mkdocstrings/issues/186), [PR #195](https://github.com/pawamoy/mkdocstrings/pull/195)
- Fix cross-references from the root index page ([9c9f2a0](https://github.com/pawamoy/mkdocstrings/commit/9c9f2a04af94e0d88f57fd76249f7985166a9b88) by Oleh Prypin). [Issue #184](https://github.com/pawamoy/mkdocstrings/issues/184), [PR #185](https://github.com/pawamoy/mkdocstrings/pull/185)
- Fix incorrect argument name passed to Markdown ([10ce502](https://github.com/pawamoy/mkdocstrings/commit/10ce502d5fd58f1e5a4e14308ffad1bc3d7116ee) by Timothée Mazzucotelli).
- Fix error when a digit immediately follows a code tag ([9b92341](https://github.com/pawamoy/mkdocstrings/commit/9b9234160edc54b53c81a618b12095e7dd829059) by Oleh Prypin). [Issue #169](https://github.com/pawamoy/mkdocstrings/issues/169), [PR #175](https://github.com/pawamoy/mkdocstrings/pull/175)
- Detecting paths relative to template directory in logging ([a50046b](https://github.com/pawamoy/mkdocstrings/commit/a50046b5d58d62df4ba13f4c197e80edd1995eb9) by Oleh Prypin). [Issue #166](https://github.com/pawamoy/mkdocstrings/issues/166)

### Code Refactoring
- BlockProcessor already receives strings, use them as such ([bcf7da9](https://github.com/pawamoy/mkdocstrings/commit/bcf7da911a310a63351c5082e84bb763d90d5b3b) by Oleh Prypin).
- Remove some unused code ([8504084](https://github.com/pawamoy/mkdocstrings/commit/850408421cc027be8374673cc74c71fff26f3833) by Oleh Prypin). [PR #206](https://github.com/pawamoy/mkdocstrings/pull/206)
- Improve XML parsing error handling ([ad86410](https://github.com/pawamoy/mkdocstrings/commit/ad864100b644ab1ee8daaa0d3923bc87dee1c5ca) by Timothée Mazzucotelli).
- Explicitly use MarkupSafe ([6b9ebe7](https://github.com/pawamoy/mkdocstrings/commit/6b9ebe7d510e82971acef89e9e946af3c0cc96d3) by Oleh Prypin).
- Split out the handler cache, expose it through the plugin ([6453026](https://github.com/pawamoy/mkdocstrings/commit/6453026fac287387090a67cce70c078377d107dd) by Oleh Prypin). [Issue #179](https://github.com/pawamoy/mkdocstrings/issues/179), [PR #191](https://github.com/pawamoy/mkdocstrings/pull/191)
- Use ChainMap instead of copying dicts ([c634d2c](https://github.com/pawamoy/mkdocstrings/commit/c634d2ce6377de26caa553048bb28ef1e672f7aa) by Oleh Prypin). [PR #171](https://github.com/pawamoy/mkdocstrings/pull/171)
- Rename logging to loggers to avoid confusion ([7a119cc](https://github.com/pawamoy/mkdocstrings/commit/7a119ccf27cf77cf2cbd114e7fad0a9e4e97bbd8) by Timothée Mazzucotelli).
- Simplify logging ([409f93e](https://github.com/pawamoy/mkdocstrings/commit/409f93ed26d7d8292a8bc7a6c32cb270b3769409) by Timothée Mazzucotelli).

### Features
- Allow specifying `heading_level` as a Markdown heading ([10efc28](https://github.com/pawamoy/mkdocstrings/commit/10efc281e04b2a430cec53e49208ccc09e591667) by Oleh Prypin). [PR #170](https://github.com/pawamoy/mkdocstrings/pull/170)
- Allow any characters in identifiers ([7ede68a](https://github.com/pawamoy/mkdocstrings/commit/7ede68a0917b494eda2198931a8ad1c97fc8fce4) by Oleh Prypin). [PR #174](https://github.com/pawamoy/mkdocstrings/pull/174)
- Allow namespace packages for handlers ([39b0465](https://github.com/pawamoy/mkdocstrings/commit/39b046548f57dc59993241b24d2cf12fb5e488eb) by Timothée Mazzucotelli).
- Add template debugging/logging ([33b32c1](https://github.com/pawamoy/mkdocstrings/commit/33b32c1410bf6e8432768865c8aa86b8e091ab59) by Timothée Mazzucotelli).
- Add initial support for the ReadTheDocs theme ([1028115](https://github.com/pawamoy/mkdocstrings/commit/1028115682ed0806d6570c749af0e382c67d6120) by Timothée Mazzucotelli). [Issue #107](https://github.com/pawamoy/mkdocstrings/issues/107), [PR #159](https://github.com/pawamoy/mkdocstrings/pull/159)
- Add option to show type annotations in signatures ([f94ce9b](https://github.com/pawamoy/mkdocstrings/commit/f94ce9bdb2afc2c41c21a53636980ca077b757ce) by Timothée Mazzucotelli). [Issue #106](https://github.com/pawamoy/mkdocstrings/issues/106)

### Packaging
- Accept verions of `pytkdocs` up to 0.10.x (see [changelog](https://pawamoy.github.io/pytkdocs/changelog/#0100-2020-12-06)).

### Performance Improvements
- Call `update_env` only once per `Markdown` instance ([b198c74](https://github.com/pawamoy/mkdocstrings/commit/b198c74338dc3b54b999eadeef9946d69277ad77) by Oleh Prypin). [PR #201](https://github.com/pawamoy/mkdocstrings/pull/201)
- Disable Jinja's `auto_reload` to reduce disk reads ([3b28c58](https://github.com/pawamoy/mkdocstrings/commit/3b28c58c77642071419d4a98e007d5a854b7984f) by Oleh Prypin). [PR #200](https://github.com/pawamoy/mkdocstrings/pull/200)
- Rework autorefs replacement to not re-parse the final HTML ([22a9e4b](https://github.com/pawamoy/mkdocstrings/commit/22a9e4bf1b73f9b9b1a7c4876f0c677f919bc4d7) by Oleh Prypin). [Issue #187](https://github.com/pawamoy/mkdocstrings/issues/187), [PR #188](https://github.com/pawamoy/mkdocstrings/pull/188)


## [0.13.6](https://github.com/pawamoy/mkdocstrings/releases/tag/0.13.6) - 2020-09-28

<small>[Compare with 0.13.5](https://github.com/pawamoy/mkdocstrings/compare/0.13.5...0.13.6)</small>
@@ -16,16 +16,15 @@ make setup

!!! note
If it fails for some reason,
you'll need to install these tools manually:
[Poetry](https://github.com/python-poetry/poetry) and
[Invoke](https://github.com/pyinvoke/invoke).
you'll need to install
[Poetry](https://github.com/python-poetry/poetry)
manually.

You can install them with:
You can install it with:

```bash
python3 -m pip install --user pipx
pipx install poetry
pipx install invoke
```

Now you can try running `make setup` again,
@@ -37,15 +36,15 @@ Run `make help` to see all the available actions!

## Tasks

This project uses [Invoke](https://github.com/pyinvoke/invoke) to run tasks.
A Makefile is also provided. The Makefile will try to run the task
This project uses [Duty](https://github.com/pawamoy/duty) to run tasks.
A Makefile is also provided. The Makefile will try to run certain tasks
on multiple Python versions. If for some reason you don't want to run the task
on multiple Python versions, you can do one of the following:

1. `export PYTHON_VERSIONS= `: this will run the task
with only the current Python version
2. run the task directly with `poetry run invoke TASK`,
or `invoke TASK` if the environment was already activated
2. run the task directly with `poetry run duty TASK`,
or `duty TASK` if the environment was already activated
through `poetry shell`

The Makefile detects if the Poetry environment is activated,
@@ -11,10 +11,8 @@ These projects were used to build `mkdocstrings`. **Thank you!**

### Direct dependencies
[`autoflake`](https://github.com/myint/autoflake) |
[`beautifulsoup4`](http://www.crummy.com/software/BeautifulSoup/bs4/) |
[`black`](https://github.com/psf/black) |
[`coverage`](https://github.com/nedbat/coveragepy) |
[`failprint`](https://github.com/pawamoy/failprint) |
[`duty`](https://github.com/pawamoy/duty) |
[`flake8-black`](https://github.com/peterjc/flake8-black) |
[`flake8-builtins`](https://github.com/gforcada/flake8-builtins) |
[`flake8-pytest-style`](https://pypi.org/project/flake8-pytest-style) |
@@ -23,10 +21,13 @@ These projects were used to build `mkdocstrings`. **Thank you!**
[`flakehell`](None) |
[`git-changelog`](https://github.com/pawamoy/git-changelog) |
[`httpx`](https://github.com/encode/httpx) |
[`invoke`](http://docs.pyinvoke.org) |
[`ipython`](https://ipython.org) |
[`isort`](https://github.com/timothycrosley/isort) |
[`Jinja2`](https://palletsprojects.com/p/jinja/) |
[`jinja2-cli`](https://github.com/mattrobenolt/jinja2-cli) |
[`Markdown`](https://Python-Markdown.github.io/) |
[`markdown-include`](https://github.com/cmacmackin/markdown-include/) |
[`MarkupSafe`](https://palletsprojects.com/p/markupsafe/) |
[`mkdocs`](https://www.mkdocs.org) |
[`mkdocs-material`](https://squidfunk.github.io/mkdocs-material/) |
[`mypy`](http://www.mypy-lang.org/) |
@@ -38,8 +39,7 @@ These projects were used to build `mkdocstrings`. **Thank you!**
[`pytest-xdist`](https://github.com/pytest-dev/pytest-xdist) |
[`pytkdocs`](https://github.com/pawamoy/pytkdocs) |
[`toml`](https://github.com/uiri/toml) |
[`wemake-python-styleguide`](https://wemake-python-stylegui.de) |
[`wrapt`](https://github.com/GrahamDumpleton/wrapt)
[`wemake-python-styleguide`](https://wemake-python-stylegui.de)

### Indirect dependencies
[`ansimarkup`](https://github.com/gvalkov/python-ansimarkup) |
@@ -57,13 +57,15 @@ These projects were used to build `mkdocstrings`. **Thank you!**
[`click`](https://palletsprojects.com/p/click/) |
[`colorama`](https://github.com/tartley/colorama) |
[`contextvars`](http://github.com/MagicStack/contextvars) |
[`coverage`](https://github.com/nedbat/coveragepy) |
[`darglint`](None) |
[`dataclasses`](https://github.com/ericvsmith/dataclasses) |
[`decorator`](https://github.com/micheles/decorator) |
[`docutils`](http://docutils.sourceforge.net/) |
[`entrypoints`](https://github.com/takluyver/entrypoints) |
[`eradicate`](https://github.com/myint/eradicate) |
[`execnet`](https://execnet.readthedocs.io/en/latest/) |
[`failprint`](https://github.com/pawamoy/failprint) |
[`flake8`](https://gitlab.com/pycqa/flake8) |
[`flake8-bandit`](https://github.com/tylerwince/flake8-bandit) |
[`flake8-broken-line`](https://github.com/sobolevn/flake8-broken-line) |
@@ -86,17 +88,14 @@ These projects were used to build `mkdocstrings`. **Thank you!**
[`httpcore`](https://github.com/encode/httpcore) |
[`idna`](https://github.com/kjd/idna) |
[`immutables`](https://github.com/MagicStack/immutables) |
[`importlib-metadata`](http://importlib-metadata.readthedocs.io/) |
[`importlib-metadata`](https://github.com/python/importlib_metadata) |
[`iniconfig`](http://github.com/RonnyPfannschmidt/iniconfig) |
[`ipython-genutils`](http://ipython.org) |
[`jedi`](https://github.com/davidhalter/jedi) |
[`Jinja2`](https://palletsprojects.com/p/jinja/) |
[`joblib`](https://joblib.readthedocs.io) |
[`lazy-object-proxy`](https://github.com/ionelmc/python-lazy-object-proxy) |
[`livereload`](https://github.com/lepture/python-livereload) |
[`lunr`](https://github.com/yeraydiazdiaz/lunr.py) |
[`Markdown`](https://Python-Markdown.github.io/) |
[`MarkupSafe`](https://palletsprojects.com/p/markupsafe/) |
[`mccabe`](https://github.com/pycqa/mccabe) |
[`mkdocs-material-extensions`](https://github.com/facelessuser/mkdocs-material-extensions) |
[`mypy-extensions`](https://github.com/python/mypy_extensions) |
@@ -127,7 +126,6 @@ These projects were used to build `mkdocstrings`. **Thank you!**
[`smmap`](https://github.com/gitpython-developers/smmap) |
[`sniffio`](https://github.com/python-trio/sniffio) |
[`snowballstemmer`](https://github.com/snowballstem/snowball) |
[`soupsieve`](https://github.com/facelessuser/soupsieve) |
[`stevedore`](https://docs.openstack.org/stevedore/latest/) |
[`termcolor`](http://pypi.python.org/pypi/termcolor) |
[`testfixtures`](https://github.com/Simplistix/testfixtures) |
@@ -138,6 +136,7 @@ These projects were used to build `mkdocstrings`. **Thank you!**
[`typing-extensions`](https://github.com/python/typing/blob/master/typing_extensions/README.rst) |
[`urllib3`](https://urllib3.readthedocs.io/) |
[`wcwidth`](https://github.com/jquast/wcwidth) |
[`wrapt`](https://github.com/GrahamDumpleton/wrapt) |
[`zipp`](https://github.com/jaraco/zipp)

**[More credits from the author](http://pawamoy.github.io/credits/)**
@@ -1,14 +1,17 @@
.DEFAULT_GOAL := help
SHELL := bash

INVOKE_OR_POETRY = $(shell command -v invoke &>/dev/null || echo poetry run) invoke
INVOKE_AND_POETRY = $(shell [ -n "${VIRTUAL_ENV}" ] || echo poetry run) invoke
DUTY = $(shell [ -n "${VIRTUAL_ENV}" ] || echo poetry run) duty

PYTHON_VERSIONS ?= 3.6 3.7 3.8
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
check_code_quality_args = files
docs_serve_args = host port
release_args = version
test_args = match

POETRY_TASKS = \
BASIC_DUTIES = \
changelog \
combine \
clean \
coverage \
docs \
docs-deploy \
@@ -17,34 +20,26 @@ POETRY_TASKS = \
format \
release

QUALITY_TASKS = \
QUALITY_DUTIES = \
check \
check-code-quality \
check-dependencies \
check-docs \
check-types \
test

INVOKE_TASKS = \
clean


.PHONY: help
help:
@$(INVOKE_OR_POETRY) --list
@$(DUTY) --list

.PHONY: setup
setup:
@env PYTHON_VERSIONS="$(PYTHON_VERSIONS)" bash scripts/setup.sh

.PHONY: $(POETRY_TASKS)
$(POETRY_TASKS):
@$(INVOKE_AND_POETRY) $@ $(args)
@bash scripts/setup.sh

.PHONY: $(QUALITY_TASKS)
$(QUALITY_TASKS):
@env PYTHON_VERSIONS="$(PYTHON_VERSIONS)" bash scripts/run_task.sh $(INVOKE_AND_POETRY) $@ $(args)
.PHONY: $(BASIC_DUTIES)
$(BASIC_DUTIES):
@$(DUTY) $@ $(call args,$@)

.PHONY: $(INVOKE_TASKS)
$(INVOKE_TASKS):
@$(INVOKE_OR_POETRY) $@ $(args)
.PHONY: $(QUALITY_DUTIES)
$(QUALITY_DUTIES):
@bash scripts/multirun.sh duty $@ $(call args,$@)

No commit comments for this range