Skip to content

Commit

Permalink
revert changes related to sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marijncv committed Nov 21, 2023
1 parent 07f7d63 commit 47dbbc2
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Run tests
run: |
source venv/bin/activate
python -m pytest -m '((s3 or azure) and integration) or not integration and not benchmark' --doctest-modules --doctest-glob='*.rst'
python -m pytest -m '((s3 or azure) and integration) or not integration and not benchmark' --doctest-modules
- name: Test without pandas
run: |
Expand Down
2 changes: 1 addition & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ check-python: ## Run check on Python
.PHONY: unit-test
unit-test: ## Run unit test
$(info --- Run Python unit-test ---)
python -m pytest --doctest-modules --doctest-glob='*.rst'
python -m pytest --doctest-modules

.PHONY: test-pyspark
test-pyspark:
Expand Down
11 changes: 0 additions & 11 deletions python/conftest.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import os
import pathlib
import shutil

import pytest

_REQUIRES_TEST_DATA_IN_TMP_PATH = ["usage.rst"]


@pytest.fixture(autouse=True)
def doctest_setup(
Expand All @@ -14,14 +11,6 @@ def doctest_setup(
tmp_path: pathlib.Path,
):
if isinstance(request.node, pytest.DoctestItem):
if request.node.name in _REQUIRES_TEST_DATA_IN_TMP_PATH:
# Mirror repository folder structure and copy data into temp path
python_path = tmp_path / "python"
data_path = tmp_path / "crates" / "deltalake-core" / "tests" / "data"
python_path.mkdir()
shutil.copytree("../crates/deltalake-core/tests/data", str(data_path))
tmp_path = python_path

# disable color for doctests so we don't have to include
# escape codes in docstrings
monkeypatch.setitem(os.environ, "NO_COLOR", "1")
Expand Down
4 changes: 1 addition & 3 deletions python/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import pathlib
import sys

import toml
Expand All @@ -25,8 +24,7 @@ def get_release_version() -> str:
:return:
"""
cargo_path = pathlib.Path(__file__).parent.parent.parent / "Cargo.toml"
cargo_content = toml.load(str(cargo_path))
cargo_content = toml.load("../../Cargo.toml")
return cargo_content["package"]["version"]


Expand Down
Loading

0 comments on commit 47dbbc2

Please sign in to comment.