From 62f97a41bdc499c56f2626960160930933eb322a Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:35:39 -0500 Subject: [PATCH 1/8] add a pyproject.toml --- pyproject.toml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..221abaf --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,38 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "mkdocstrings-parser" +version = "0.0.1" +description = "A simple parser for mkdocstrings signature blocks" +readme = "README.md" +requires-python = ">=3.8" +dependencies = [ + "griffe2md", + "pyyaml", + "rich", +] + +[project.optional-dependencies] +dev = [ + "pytest", + "pytest-cov", +] +nixtlaverse = [ + "coreforecast", + "utilsforecast", + "datasetsforecast", + "mlforecast[dask]", + "hierarchicalforecast", + "neuralforecast", + "statsforecast", + "nixtla" +] + + +[tool.setuptools] +packages = ["mkdocstrings_parser"] + +[tool.setuptools.package-dir] +parser = "mkdocstrings_parser" From 82f4c02288e6ee94e5a3c27f956107c6c496ff25 Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:36:06 -0500 Subject: [PATCH 2/8] move --- parser.py => mkdocstrings_parser/parser.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename parser.py => mkdocstrings_parser/parser.py (100%) diff --git a/parser.py b/mkdocstrings_parser/parser.py similarity index 100% rename from parser.py rename to mkdocstrings_parser/parser.py From 8f8701d28a752d08a47935ab59cdcf748c277119 Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:36:12 -0500 Subject: [PATCH 3/8] init --- mkdocstrings_parser/__init__.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 mkdocstrings_parser/__init__.py diff --git a/mkdocstrings_parser/__init__.py b/mkdocstrings_parser/__init__.py new file mode 100644 index 0000000..3a283fe --- /dev/null +++ b/mkdocstrings_parser/__init__.py @@ -0,0 +1,3 @@ +__version__ = "0.0.1" + +from .parser import MkDocstringsParser # noqa: F401 \ No newline at end of file From 31077e6cea4138f32fa9fd7898e13cdd95f713d6 Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:36:20 -0500 Subject: [PATCH 4/8] update confest --- tests/conftest.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index e5c7f14..3a7b7c2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,11 +1,7 @@ -import os -import sys - -sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) -from parser import MkDocstringsParser - import pytest +from mkdocstrings_parser import MkDocstringsParser + @pytest.fixture(scope="module") def setup_parser(): From 42b693fc919ef0ca60a522afb4ea9e9f27efed88 Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:38:24 -0500 Subject: [PATCH 5/8] migrate pytest config to project.toml --- pyproject.toml | 5 +++++ pytest.ini | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 pytest.ini diff --git a/pyproject.toml b/pyproject.toml index 221abaf..535ffd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,3 +36,8 @@ packages = ["mkdocstrings_parser"] [tool.setuptools.package-dir] parser = "mkdocstrings_parser" + +[tool.pytest.ini_options] +testpaths = "tests" +addopts = "-vv" +markers = "datasets: tests for datasetsforecast" \ No newline at end of file diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 102ad37..0000000 --- a/pytest.ini +++ /dev/null @@ -1,5 +0,0 @@ -[pytest] -testpaths = tests -addopts = -vv -markers = - datasets: tests for datasetsforecast \ No newline at end of file From 7768bd8fa4aac408bce3a4d7ea593989ff3a214e Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:40:54 -0500 Subject: [PATCH 6/8] switch to uv --- .github/workflows/pytest.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 0899d49..18ef90c 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -16,14 +16,13 @@ jobs: uses: actions/checkout@v4 - name: Setup python - uses: actions/setup-python@v4 + uses: astral-sh/setup-uv@v7 with: - python-version: 3.11 - cache: 'pip' + version: 3.11 + enable-cache: "auto" - name: Install dependencies - run: | - pip install -r requirements.txt + run: uv pip install -e ".[dev,nixtlaverse]" - name: Run tests - run: pytest + run: uv run pytest From a3b13feba6bfb0680eb76638e28e2c0170aef8a2 Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:46:02 -0500 Subject: [PATCH 7/8] python-version --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 18ef90c..3b0e259 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -18,7 +18,7 @@ jobs: - name: Setup python uses: astral-sh/setup-uv@v7 with: - version: 3.11 + python-version: 3.11 enable-cache: "auto" - name: Install dependencies From addfb0fcb4e62ad69a6aa9f8d41b50072b70bccb Mon Sep 17 00:00:00 2001 From: deven367 Date: Wed, 19 Nov 2025 16:50:17 -0500 Subject: [PATCH 8/8] venv and install dep --- .github/workflows/pytest.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 3b0e259..4ccdfeb 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -21,8 +21,10 @@ jobs: python-version: 3.11 enable-cache: "auto" - - name: Install dependencies - run: uv pip install -e ".[dev,nixtlaverse]" + - name: Create venv and install dependencies + run: | + uv venv + uv pip install -e ".[dev,nixtlaverse]" - name: Run tests run: uv run pytest