boarddata 4.4.2__tar.gz → 4.4.6__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.
Files changed (59) hide show
  1. {boarddata-4.4.2 → boarddata-4.4.6}/PKG-INFO +1 -1
  2. {boarddata-4.4.2 → boarddata-4.4.6}/__init__.py +1 -1
  3. {boarddata-4.4.2 → boarddata-4.4.6}/_auditors.py +21 -1
  4. {boarddata-4.4.2 → boarddata-4.4.6}/boarddata.egg-info/PKG-INFO +1 -1
  5. {boarddata-4.4.2 → boarddata-4.4.6}/pyproject.toml +1 -1
  6. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_auditors.py +20 -0
  7. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_documents.py +22 -0
  8. {boarddata-4.4.2 → boarddata-4.4.6}/CLAUDE.md +0 -0
  9. {boarddata-4.4.2 → boarddata-4.4.6}/README.md +0 -0
  10. {boarddata-4.4.2 → boarddata-4.4.6}/_assemblies.py +0 -0
  11. {boarddata-4.4.2 → boarddata-4.4.6}/_base.py +0 -0
  12. {boarddata-4.4.2 → boarddata-4.4.6}/_comex.py +0 -0
  13. {boarddata-4.4.2 → boarddata-4.4.6}/_companies.py +0 -0
  14. {boarddata-4.4.2 → boarddata-4.4.6}/_criteria.py +0 -0
  15. {boarddata-4.4.2 → boarddata-4.4.6}/_directors.py +0 -0
  16. {boarddata-4.4.2 → boarddata-4.4.6}/_documents.py +0 -0
  17. {boarddata-4.4.2 → boarddata-4.4.6}/_esg.py +0 -0
  18. {boarddata-4.4.2 → boarddata-4.4.6}/_indexes.py +0 -0
  19. {boarddata-4.4.2 → boarddata-4.4.6}/_persons.py +0 -0
  20. {boarddata-4.4.2 → boarddata-4.4.6}/_sentinel.py +0 -0
  21. {boarddata-4.4.2 → boarddata-4.4.6}/_utilities.py +0 -0
  22. {boarddata-4.4.2 → boarddata-4.4.6}/boarddata.egg-info/SOURCES.txt +0 -0
  23. {boarddata-4.4.2 → boarddata-4.4.6}/boarddata.egg-info/dependency_links.txt +0 -0
  24. {boarddata-4.4.2 → boarddata-4.4.6}/boarddata.egg-info/requires.txt +0 -0
  25. {boarddata-4.4.2 → boarddata-4.4.6}/boarddata.egg-info/top_level.txt +0 -0
  26. {boarddata-4.4.2 → boarddata-4.4.6}/cache.py +0 -0
  27. {boarddata-4.4.2 → boarddata-4.4.6}/client.py +0 -0
  28. {boarddata-4.4.2 → boarddata-4.4.6}/errors.py +0 -0
  29. {boarddata-4.4.2 → boarddata-4.4.6}/py.typed +0 -0
  30. {boarddata-4.4.2 → boarddata-4.4.6}/setup.cfg +0 -0
  31. {boarddata-4.4.2 → boarddata-4.4.6}/tests/__init__.py +0 -0
  32. {boarddata-4.4.2 → boarddata-4.4.6}/tests/conftest.py +0 -0
  33. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_assemblies.py +0 -0
  34. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_base.py +0 -0
  35. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_build_payload.py +0 -0
  36. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_cache.py +0 -0
  37. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_comex.py +0 -0
  38. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_companies.py +0 -0
  39. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_config.py +0 -0
  40. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_criteria.py +0 -0
  41. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_directors.py +0 -0
  42. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_esg.py +0 -0
  43. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_indexes.py +0 -0
  44. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_persons.py +0 -0
  45. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_sentinel.py +0 -0
  46. {boarddata-4.4.2 → boarddata-4.4.6}/tests/test_utilities.py +0 -0
  47. {boarddata-4.4.2 → boarddata-4.4.6}/types/__init__.py +0 -0
  48. {boarddata-4.4.2 → boarddata-4.4.6}/types/assemblies.py +0 -0
  49. {boarddata-4.4.2 → boarddata-4.4.6}/types/auditors.py +0 -0
  50. {boarddata-4.4.2 → boarddata-4.4.6}/types/comex.py +0 -0
  51. {boarddata-4.4.2 → boarddata-4.4.6}/types/companies.py +0 -0
  52. {boarddata-4.4.2 → boarddata-4.4.6}/types/core.py +0 -0
  53. {boarddata-4.4.2 → boarddata-4.4.6}/types/criteria.py +0 -0
  54. {boarddata-4.4.2 → boarddata-4.4.6}/types/directors.py +0 -0
  55. {boarddata-4.4.2 → boarddata-4.4.6}/types/documents.py +0 -0
  56. {boarddata-4.4.2 → boarddata-4.4.6}/types/esg.py +0 -0
  57. {boarddata-4.4.2 → boarddata-4.4.6}/types/indexes.py +0 -0
  58. {boarddata-4.4.2 → boarddata-4.4.6}/types/persons.py +0 -0
  59. {boarddata-4.4.2 → boarddata-4.4.6}/types/sentinel.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boarddata
3
- Version: 4.4.2
3
+ Version: 4.4.6
4
4
  Summary: Python SDK for the BoardData V2 REST API
5
5
  License: MIT
6
6
  Classifier: Development Status :: 4 - Beta
@@ -7,7 +7,7 @@ from .errors import BoardDataError
7
7
 
8
8
  from . import types as types # noqa: F401 — makes types accessible as boarddata.types
9
9
 
10
- __version__ = "4.4.2"
10
+ __version__ = "4.4.6"
11
11
  __all__ = [
12
12
  "Base",
13
13
  "BoardDataClient",
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
  import logging
6
6
  from typing import Any
7
7
 
8
- from .types.auditors import AuditorCompensationItem, AuditorCreateResponse, AuditorDetail
8
+ from .types.auditors import AuditorCompanyItem, AuditorCompensationItem, AuditorCreateResponse, AuditorDetail
9
9
  from .types.core import FieldSourcePayload, PaginatedResponse
10
10
 
11
11
  logger = logging.getLogger("boarddata")
@@ -153,6 +153,26 @@ class AuditorMixin:
153
153
  """
154
154
  return self._get("auditor-companies/", **params) # type: ignore[attr-defined]
155
155
 
156
+ def create_auditor_company(
157
+ self,
158
+ name: str,
159
+ country: str = "",
160
+ ) -> AuditorCompanyItem:
161
+ """Create an auditor company (get-or-create on the server).
162
+
163
+ Args:
164
+ name: Audit firm name (e.g. ``"Deloitte & Associés"``).
165
+ country: ISO 3166-1 alpha-2 country code (e.g. ``"FR"``).
166
+
167
+ Returns:
168
+ AuditorCompanyItem with id, name, and country.
169
+
170
+ Raises:
171
+ BoardDataError: On non-2xx API response.
172
+ """
173
+ payload = self._build_payload(name=name, country=country) # type: ignore[attr-defined]
174
+ return self._post("auditor-companies/", payload) # type: ignore[attr-defined]
175
+
156
176
  # ------------------------------------------------------------------
157
177
  # Auditor compensations
158
178
  # ------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boarddata
3
- Version: 4.4.2
3
+ Version: 4.4.6
4
4
  Summary: Python SDK for the BoardData V2 REST API
5
5
  License: MIT
6
6
  Classifier: Development Status :: 4 - Beta
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "boarddata"
7
- version = "4.4.2"
7
+ version = "4.4.6"
8
8
  description = "Python SDK for the BoardData V2 REST API"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -38,6 +38,26 @@ class TestCreateAuditor:
38
38
  assert payload["auditor_type"] == "PRINCIPAL"
39
39
 
40
40
 
41
+ class TestCreateAuditorCompany:
42
+ def test_sends_name_and_country(self):
43
+ c = make_client()
44
+ c._request.return_value = {"id": "ac1", "name": "Deloitte", "country": "FR"}
45
+ result = c.create_auditor_company("Deloitte", "FR")
46
+ _, kwargs = c._request.call_args
47
+ payload = kwargs["json"]
48
+ assert payload["name"] == "Deloitte"
49
+ assert payload["country"] == "FR"
50
+ assert result["id"] == "ac1"
51
+
52
+ def test_country_defaults_to_empty(self):
53
+ c = make_client()
54
+ c._request.return_value = {"id": "ac2", "name": "KPMG", "country": ""}
55
+ c.create_auditor_company("KPMG")
56
+ _, kwargs = c._request.call_args
57
+ payload = kwargs["json"]
58
+ assert payload["country"] == ""
59
+
60
+
41
61
  class TestCreateAuditorCompensation:
42
62
  def test_sends_audit_fields(self):
43
63
  c = make_client()
@@ -31,6 +31,28 @@ class TestCreateDocument:
31
31
  assert payload["fiscal_year"] == 2024
32
32
 
33
33
 
34
+ class TestUpdateDocument:
35
+ def test_sends_patch_with_payload(self):
36
+ c = make_client()
37
+ c._request.return_value = {"id": "doc1", "title": "Updated"}
38
+ c.update_document("doc-uuid", title="Updated", fiscal_year=2025)
39
+ args, kwargs = c._request.call_args
40
+ assert args == ("PATCH", "documents/doc-uuid/")
41
+ payload = kwargs["json"]
42
+ assert payload["title"] == "Updated"
43
+ assert payload["fiscal_year"] == 2025
44
+ assert "document_type" not in payload
45
+
46
+ def test_ignores_none_values(self):
47
+ c = make_client()
48
+ c._request.return_value = {"id": "doc1", "title": "T"}
49
+ c.update_document("doc-uuid", title="T")
50
+ _, kwargs = c._request.call_args
51
+ payload = kwargs["json"]
52
+ assert "fiscal_year" not in payload
53
+ assert "isin" not in payload
54
+
55
+
34
56
  class TestGetPresignedUrl:
35
57
  def test_calls_correct_path(self):
36
58
  c = make_client()
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