Skip to content

Commit

Permalink
build: Fix project structure and version (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeMe authored May 15, 2024
1 parent 7806f70 commit 34bfc3d
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 36 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.0
0.0.0.dev0
3 changes: 0 additions & 3 deletions haystack-experimental/evaluation/__init__.py

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ build-backend = "hatchling.build"
[project]
name = "haystack-experimental"
dynamic = ["version"]
version = "0.0.0.dev0"
description = "Experimental components and features for the Haystack LLM framework."
readme = "README.md"
license = "Apache-2.0"
Expand Down
31 changes: 0 additions & 31 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
#
# SPDX-License-Identifier: Apache-2.0
from pathlib import Path
from test.tracing.utils import SpyingTracer
from typing import Generator

import pytest

from haystack import tracing
from haystack.testing.test_utils import set_all_seeds

set_all_seeds(0)
Expand All @@ -16,31 +13,3 @@
@pytest.fixture()
def test_files_path():
return Path(__file__).parent / "test_files"


@pytest.fixture(autouse=True)
def request_blocker(request: pytest.FixtureRequest, monkeypatch):
"""
This fixture is applied automatically to all tests.
Those that are not marked as integration will have the requests module
monkeypatched to avoid making HTTP requests by mistake.
"""
marker = request.node.get_closest_marker("integration")
if marker is not None:
return

def urlopen_mock(self, method, url, *args, **kwargs):
raise RuntimeError(f"The test was about to {method} {self.scheme}://{self.host}{url}")

monkeypatch.setattr("urllib3.connectionpool.HTTPConnectionPool.urlopen", urlopen_mock)


@pytest.fixture()
def spying_tracer() -> Generator[SpyingTracer, None, None]:
tracer = SpyingTracer()
tracing.enable_tracing(tracer)

yield tracer

# Make sure to disable tracing after the test to avoid affecting other tests
tracing.disable_tracing()

0 comments on commit 34bfc3d

Please sign in to comment.