diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 1a28b61..4ccdfeb 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -24,7 +24,7 @@ jobs: - name: Create venv and install dependencies run: | uv venv - uv pip install -r requirements.txt + uv pip install -e ".[dev,nixtlaverse]" - name: Run tests run: uv run pytest 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 diff --git a/parser.py b/mkdocstrings_parser/parser.py similarity index 100% rename from parser.py rename to mkdocstrings_parser/parser.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..535ffd0 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[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" + +[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 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():