boarddata 6.6.1__tar.gz → 6.6.2__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.
- {boarddata-6.6.1 → boarddata-6.6.2}/PKG-INFO +1 -1
- {boarddata-6.6.1 → boarddata-6.6.2}/__init__.py +1 -1
- boarddata-6.6.2/_committees.py +16 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/boarddata.egg-info/PKG-INFO +1 -1
- {boarddata-6.6.1 → boarddata-6.6.2}/boarddata.egg-info/SOURCES.txt +4 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/client.py +2 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/pyproject.toml +1 -1
- boarddata-6.6.2/tests/test_committees.py +32 -0
- boarddata-6.6.2/types/committees.py +27 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/CLAUDE.md +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/README.md +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_assemblies.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_auditors.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_base.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_comex.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_companies.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_criteria.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_directors.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_documents.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_esg.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_indexes.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_persons.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_risks.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_sentinel.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/_utilities.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/boarddata.egg-info/dependency_links.txt +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/boarddata.egg-info/requires.txt +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/boarddata.egg-info/top_level.txt +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/cache.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/errors.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/py.typed +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/setup.cfg +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/__init__.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/conftest.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_assemblies.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_auditors.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_base.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_build_payload.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_cache.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_comex.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_companies.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_config.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_criteria.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_directors.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_documents.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_esg.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_exports.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_indexes.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_persons.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_risks.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_sentinel.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/tests/test_utilities.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/__init__.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/assemblies.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/auditors.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/comex.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/companies.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/core.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/criteria.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/directors.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/documents.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/esg.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/indexes.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/persons.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/risks.py +0 -0
- {boarddata-6.6.1 → boarddata-6.6.2}/types/sentinel.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Board-committee batch methods."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .types.committees import CommitteeBatchItemPayload, CommitteeBatchResultItem
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class CommitteesMixin:
|
|
9
|
+
def batch_create_committees(
|
|
10
|
+
self, items: list[CommitteeBatchItemPayload]
|
|
11
|
+
) -> list[CommitteeBatchResultItem]:
|
|
12
|
+
"""Batch upsert board committees. Each item is keyed by issuer ISIN;
|
|
13
|
+
the backend resolves members to existing persons and idempotently
|
|
14
|
+
upserts Committee + CommitteeMembership. Returns one result per item
|
|
15
|
+
(action: loaded / skipped_unknown_company / error)."""
|
|
16
|
+
return self._post("committees/batch/", items) # type: ignore[attr-defined]
|
|
@@ -5,6 +5,7 @@ _assemblies.py
|
|
|
5
5
|
_auditors.py
|
|
6
6
|
_base.py
|
|
7
7
|
_comex.py
|
|
8
|
+
_committees.py
|
|
8
9
|
_companies.py
|
|
9
10
|
_criteria.py
|
|
10
11
|
_directors.py
|
|
@@ -26,6 +27,7 @@ pyproject.toml
|
|
|
26
27
|
./_auditors.py
|
|
27
28
|
./_base.py
|
|
28
29
|
./_comex.py
|
|
30
|
+
./_committees.py
|
|
29
31
|
./_companies.py
|
|
30
32
|
./_criteria.py
|
|
31
33
|
./_directors.py
|
|
@@ -53,6 +55,7 @@ tests/test_base.py
|
|
|
53
55
|
tests/test_build_payload.py
|
|
54
56
|
tests/test_cache.py
|
|
55
57
|
tests/test_comex.py
|
|
58
|
+
tests/test_committees.py
|
|
56
59
|
tests/test_companies.py
|
|
57
60
|
tests/test_config.py
|
|
58
61
|
tests/test_criteria.py
|
|
@@ -69,6 +72,7 @@ types/__init__.py
|
|
|
69
72
|
types/assemblies.py
|
|
70
73
|
types/auditors.py
|
|
71
74
|
types/comex.py
|
|
75
|
+
types/committees.py
|
|
72
76
|
types/companies.py
|
|
73
77
|
types/core.py
|
|
74
78
|
types/criteria.py
|
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
from ._assemblies import AssemblyMixin
|
|
6
6
|
from ._auditors import AuditorMixin
|
|
7
7
|
from ._base import Base
|
|
8
|
+
from ._committees import CommitteesMixin
|
|
8
9
|
from ._comex import ComexMixin
|
|
9
10
|
from ._companies import CompanyMixin
|
|
10
11
|
from ._criteria import CriteriaMixin
|
|
@@ -26,6 +27,7 @@ class BoardDataClient(
|
|
|
26
27
|
AuditorMixin,
|
|
27
28
|
DocumentMixin,
|
|
28
29
|
AssemblyMixin,
|
|
30
|
+
CommitteesMixin,
|
|
29
31
|
ESGMixin,
|
|
30
32
|
RisksMixin,
|
|
31
33
|
SentinelMixin,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Tests for CommitteesMixin methods."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from unittest.mock import MagicMock
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def make_client():
|
|
9
|
+
from boarddata._base import Base
|
|
10
|
+
from boarddata._committees import CommitteesMixin
|
|
11
|
+
|
|
12
|
+
class TestClient(CommitteesMixin, Base):
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
client = TestClient.__new__(TestClient)
|
|
16
|
+
client._request = MagicMock()
|
|
17
|
+
client._get_token = MagicMock(return_value="fake-token")
|
|
18
|
+
client.base_url = "https://api.example.com"
|
|
19
|
+
client.timeout = 30
|
|
20
|
+
return client
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class TestBatchCreateCommittees:
|
|
24
|
+
def test_batch_create_committees_posts_to_endpoint(self):
|
|
25
|
+
c = make_client()
|
|
26
|
+
c._request.return_value = [{"company": "FR0000000020", "action": "loaded"}]
|
|
27
|
+
items = [{"company": "FR0000000020", "year": 2025, "committees": []}]
|
|
28
|
+
out = c.batch_create_committees(items)
|
|
29
|
+
args, kwargs = c._request.call_args
|
|
30
|
+
assert args == ("POST", "committees/batch/")
|
|
31
|
+
assert kwargs["json"] is items
|
|
32
|
+
assert out[0]["action"] == "loaded"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Committee batch types. The nested committee/member dicts are issuer-shaped;
|
|
2
|
+
the authoritative schema lives in the extractor + apps/committees loader."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import sys
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
if sys.version_info >= (3, 11):
|
|
10
|
+
from typing import NotRequired, TypedDict
|
|
11
|
+
else:
|
|
12
|
+
from typing_extensions import NotRequired, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CommitteeBatchItemPayload(TypedDict):
|
|
16
|
+
company: str # issuer ISIN
|
|
17
|
+
year: int
|
|
18
|
+
committees: list[dict[str, Any]]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class CommitteeBatchResultItem(TypedDict):
|
|
22
|
+
company: str
|
|
23
|
+
action: str # "loaded" | "skipped_unknown_company" | "error"
|
|
24
|
+
committees_loaded: NotRequired[int]
|
|
25
|
+
memberships_loaded: NotRequired[int]
|
|
26
|
+
members_unmatched: NotRequired[list[str]]
|
|
27
|
+
detail: NotRequired[str]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|