yuyay 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
yuyay-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,15 @@
1
+ Metadata-Version: 2.4
2
+ Name: yuyay
3
+ Version: 0.2.0
4
+ Summary: YUYAY Intelligence Framework
5
+ Requires-Python: >=3.11
6
+ Requires-Dist: tenacity>=9.0.0
7
+ Provides-Extra: dev
8
+ Requires-Dist: black>=26.3.1; extra == "dev"
9
+ Requires-Dist: ruff>=0.15.9; extra == "dev"
10
+ Requires-Dist: mypy>=1.20.0; extra == "dev"
11
+ Requires-Dist: pytest>=9.0.2; extra == "dev"
12
+ Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
13
+ Requires-Dist: isort>=6.0.1; extra == "dev"
14
+ Requires-Dist: tenacity>=9.0.0; extra == "dev"
15
+ Requires-Dist: pytest-asyncio>=1.4.0; extra == "dev"
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "yuyay"
7
+ version = "0.2.0"
8
+ description = "YUYAY Intelligence Framework"
9
+ requires-python = ">=3.11"
10
+ dependencies = [
11
+ "tenacity>=9.0.0",
12
+ ]
13
+
14
+ [tool.pytest.ini_options]
15
+ testpaths = ["tests"]
16
+ asyncio_mode = "auto"
17
+
18
+ [tool.mypy]
19
+ strict = true
20
+
21
+ [tool.ruff]
22
+ line-length = 88
23
+
24
+ [tool.black]
25
+ line-length = 88
26
+
27
+ [tool.isort]
28
+ profile = "black"
29
+
30
+ [tool.setuptools.packages.find]
31
+ where = ["."]
32
+ include = ["yuyay*"]
33
+
34
+ [project.optional-dependencies]
35
+ dev = [
36
+ "black>=26.3.1",
37
+ "ruff>=0.15.9",
38
+ "mypy>=1.20.0",
39
+ "pytest>=9.0.2",
40
+ "pytest-cov>=7.1.0",
41
+ "isort>=6.0.1",
42
+ "tenacity>=9.0.0",
43
+ "pytest-asyncio>=1.4.0",
44
+ ]
45
+
46
+ [[tool.mypy.overrides]]
47
+ module = [
48
+ "anthropic",
49
+ "openai",
50
+ "google.generativeai",
51
+ "google",
52
+ "tenacity",
53
+ ]
54
+ ignore_missing_imports = true
yuyay-0.2.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,60 @@
1
+ """Tests for the YUYAY archetypes module."""
2
+
3
+ from yuyay.archetypes import ALL_ARCHETYPES, SEER, Archetype, get_archetype_by_name
4
+
5
+
6
+ class TestArchetype:
7
+ """Tests for the Archetype dataclass."""
8
+
9
+ def test_archetype_has_correct_fields(self) -> None:
10
+ """Test that an Archetype instance has all required fields."""
11
+ assert SEER.name == "The Seer"
12
+ assert SEER.function == "Vision, source insight, coherence sensing"
13
+ assert SEER.gifts == "Pattern recognition, intuition, meta-awareness"
14
+ assert SEER.shadow == "Excess abstraction, disconnection"
15
+
16
+ def test_summary_returns_correct_format(self) -> None:
17
+ """Test that summary returns name and function joined by colon."""
18
+ result = SEER.summary()
19
+ assert result == "The Seer: Vision, source insight, coherence sensing"
20
+
21
+ def test_is_shadow_active_returns_true_when_shadow_present(self) -> None:
22
+ """Test that is_shadow_active returns True when a shadow trait is present."""
23
+ assert SEER.is_shadow_active(["disconnection"]) is True
24
+
25
+ def test_is_shadow_active_returns_false_when_no_shadow_present(self) -> None:
26
+ """Test that is_shadow_active returns False when no shadow traits present."""
27
+ assert SEER.is_shadow_active(["creativity", "empathy"]) is False
28
+
29
+ def test_is_shadow_active_case_insensitive(self) -> None:
30
+ """Test that is_shadow_active works regardless of case."""
31
+ assert SEER.is_shadow_active(["DISCONNECTION"]) is True
32
+
33
+
34
+ class TestAllArchetypes:
35
+ """Tests for the ALL_ARCHETYPES registry and lookup function."""
36
+
37
+ def test_all_archetypes_has_twelve_items(self) -> None:
38
+ """Test that ALL_ARCHETYPES contains exactly 12 archetypes."""
39
+ assert len(ALL_ARCHETYPES) == 12
40
+
41
+ def test_all_archetypes_are_archetype_instances(self) -> None:
42
+ """Test that every item in ALL_ARCHETYPES is an Archetype instance."""
43
+ for archetype in ALL_ARCHETYPES:
44
+ assert isinstance(archetype, Archetype)
45
+
46
+ def test_get_archetype_by_name_returns_correct_archetype(self) -> None:
47
+ """Test that searching by name returns the correct archetype."""
48
+ result = get_archetype_by_name("seer")
49
+ assert result == SEER
50
+
51
+ def test_get_archetype_by_name_returns_none_for_unknown(self) -> None:
52
+ """Test that searching for unknown name returns None."""
53
+ result = get_archetype_by_name("unknown")
54
+ assert result is None
55
+
56
+ def test_get_archetype_by_name_case_insensitive(self) -> None:
57
+ """Test that name lookup works regardless of case."""
58
+ assert get_archetype_by_name("SEER") == SEER
59
+ assert get_archetype_by_name("Seer") == SEER
60
+ assert get_archetype_by_name("seer") == SEER
@@ -0,0 +1,61 @@
1
+ """Tests for the YUYAY configuration management module."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import pytest
6
+
7
+ from yuyay.config import YUYAYConfig, load_config
8
+
9
+
10
+ def test_default_provider() -> None:
11
+ """YUYAYConfig defaults to anthropic provider."""
12
+ config = YUYAYConfig()
13
+ assert config.provider == "anthropic"
14
+
15
+
16
+ def test_default_database_url() -> None:
17
+ """YUYAYConfig defaults to SQLite database URL."""
18
+ config = YUYAYConfig()
19
+ assert config.database_url == "sqlite:///yuyay.db"
20
+
21
+
22
+ def test_default_debug() -> None:
23
+ """YUYAYConfig defaults to debug disabled."""
24
+ config = YUYAYConfig()
25
+ assert config.debug is False
26
+
27
+
28
+ def test_load_config_returns_yuyay_config() -> None:
29
+ """load_config returns a YUYAYConfig instance."""
30
+ config = load_config()
31
+ assert isinstance(config, YUYAYConfig)
32
+
33
+
34
+ def test_load_config_reads_provider(monkeypatch: pytest.MonkeyPatch) -> None:
35
+ """load_config reads YUYAY_PROVIDER from environment."""
36
+ monkeypatch.setenv("YUYAY_PROVIDER", "openai")
37
+ config = load_config()
38
+ assert config.provider == "openai"
39
+
40
+
41
+ def test_load_config_reads_database_url(monkeypatch: pytest.MonkeyPatch) -> None:
42
+ """load_config reads YUYAY_DATABASE_URL from environment."""
43
+ monkeypatch.setenv("YUYAY_DATABASE_URL", "postgresql://localhost/yuyay")
44
+ config = load_config()
45
+ assert config.database_url == "postgresql://localhost/yuyay"
46
+
47
+
48
+ def test_load_config_reads_debug_true(monkeypatch: pytest.MonkeyPatch) -> None:
49
+ """load_config sets debug to True when YUYAY_DEBUG is 'true'."""
50
+ monkeypatch.setenv("YUYAY_DEBUG", "true")
51
+ config = load_config()
52
+ assert config.debug is True
53
+
54
+
55
+ def test_load_config_reads_debug_case_insensitive(
56
+ monkeypatch: pytest.MonkeyPatch,
57
+ ) -> None:
58
+ """load_config handles uppercase YUYAY_DEBUG value."""
59
+ monkeypatch.setenv("YUYAY_DEBUG", "TRUE")
60
+ config = load_config()
61
+ assert config.debug is True