Skip to content

[automated] Update plugin list #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 23, 2024
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
68 changes: 10 additions & 58 deletions docs/source/plugin_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ Plugin List
PyPI projects that match "pytask-\*" are considered plugins and are listed
automatically. Packages classified as inactive are excluded.

.. The following conditional uses a different format for this list when
creating a PDF, because otherwise the table gets far too wide for the
page.
.. warning::

This list contains 7 plugins.
Please be aware that this list is not a curated collection of projects and does not
undergo a systematic review process. It serves purely as an informational resource to
aid in the discovery of ``pytask`` plugins.

Do not presume any endorsement from the ``pytask`` project or its developers, and
always conduct your own quality assessment before incorporating any of these plugins
into your own projects.

.. only:: not latex
This list contains 7 plugins.

========================== ==================================================================== ============== ========= ==============
name summary last release status requires
Expand All @@ -22,59 +26,7 @@ This list contains 7 plugins.
:pypi:`pytask-julia` A Pytask plugin for Julia Oct 07, 2023 4 - Beta pytask >=0.4.0
:pypi:`pytask-latex` Compile LaTeX documents with pytask. Nov 30, 2023 4 - Beta pytask >=0.4.0
:pypi:`pytask-parallel` Parallelize the execution of tasks with pytask. Jan 12, 2024 4 - Beta pytask >=0.4.5
:pypi:`pytask-r` Run R scripts with pytask. Oct 07, 2023 4 - Beta pytask >=0.4.0
:pypi:`pytask-r` Run R scripts with pytask. Apr 20, 2024 4 - Beta pytask>=0.4.5
:pypi:`pytask-stata` Execute do-files with Stata and pytask. Jan 23, 2023 4 - Beta pytask (>=0.3)
:pypi:`pytask-vscode` Additional Logging for VS Code integration Nov 21, 2023 3 - Alpha pytask >=0.4.2
========================== ==================================================================== ============== ========= ==============

.. only:: latex


:pypi:`pytask-environment`
*last release*: Feb 10, 2023,
*status*: 4 - Beta,
*requires*: pytask (>=0.2)

Detect changes in your pytask environment and abort a project build.

:pypi:`pytask-julia`
*last release*: Oct 07, 2023,
*status*: 4 - Beta,
*requires*: pytask >=0.4.0

A Pytask plugin for Julia

:pypi:`pytask-latex`
*last release*: Nov 30, 2023,
*status*: 4 - Beta,
*requires*: pytask >=0.4.0

Compile LaTeX documents with pytask.

:pypi:`pytask-parallel`
*last release*: Jan 12, 2024,
*status*: 4 - Beta,
*requires*: pytask >=0.4.5

Parallelize the execution of tasks with pytask.

:pypi:`pytask-r`
*last release*: Oct 07, 2023,
*status*: 4 - Beta,
*requires*: pytask >=0.4.0

Run R scripts with pytask.

:pypi:`pytask-stata`
*last release*: Jan 23, 2023,
*status*: 4 - Beta,
*requires*: pytask (>=0.3)

Execute do-files with Stata and pytask.

:pypi:`pytask-vscode`
*last release*: Nov 21, 2023,
*status*: 3 - Alpha,
*requires*: pytask >=0.4.2

Additional Logging for VS Code integration
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ test = [
"aiohttp",
"coiled",
]
plugin-list = [
"httpx>=0.27.0",
"tabulate[widechars]>=0.9.0",
"tqdm>=4.66.2",
]

[project.urls]
Changelog = "https://pytask-dev.readthedocs.io/en/stable/changes.html"
Expand Down
36 changes: 11 additions & 25 deletions scripts/update_plugin_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import datetime
import pathlib
import re
from textwrap import dedent
from textwrap import indent
from typing import Generator

Expand All @@ -52,9 +51,15 @@
PyPI projects that match "pytask-\*" are considered plugins and are listed
automatically. Packages classified as inactive are excluded.

.. The following conditional uses a different format for this list when
creating a PDF, because otherwise the table gets far too wide for the
page.
.. warning::

Please be aware that this list is not a curated collection of projects and does not
undergo a systematic review process. It serves purely as an informational resource to
aid in the discovery of ``pytask`` plugins.

Do not presume any endorsement from the ``pytask`` project or its developers, and
always conduct your own quality assessment before incorporating any of these plugins
into your own projects.

"""

Expand Down Expand Up @@ -87,7 +92,7 @@ def _escape_rst(text: str) -> str:
def _iter_plugins() -> Generator[dict[str, str], None, None]: # noqa: C901
"""Iterate over all plugins and format entries."""
regex = r">([\d\w-]*)</a>"
response = httpx.get("https://pypi.org/simple", timeout=20)
response = httpx.get("https://pypi.org/simple/", timeout=20)

matches = [
match
Expand Down Expand Up @@ -157,21 +162,6 @@ def _version_sort_key(version_string: str) -> packaging.version.Version:
}


def _plugin_definitions(plugins: list[dict[str, str]]) -> Generator[str, None, None]:
"""Return RST for the plugin list that fits better on a vertical page."""
for plugin in plugins:
yield dedent(
f"""
{plugin['name']}
*last release*: {plugin["last release"]},
*status*: {plugin["status"]},
*requires*: {plugin["requires"]}

{plugin["summary"]}
"""
)


def main() -> None:
plugins = list(_iter_plugins())

Expand All @@ -181,15 +171,11 @@ def main() -> None:
with plugin_list.open("w") as f:
f.write(_FILE_HEAD)
f.write(f"This list contains {len(plugins)} plugins.\n\n")
f.write(".. only:: not latex\n\n")

assert wcwidth # reference library that must exist for tabulate to work
plugin_table = tabulate.tabulate(plugins, headers="keys", tablefmt="rst")
f.write(indent(plugin_table, " "))
f.write("\n\n")

f.write(".. only:: latex\n\n")
f.write(indent("".join(_plugin_definitions(plugins)), " "))
f.write("\n")


if __name__ == "__main__":
Expand Down
Loading