diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e756293..96dfab3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.19.0" + ".": "0.19.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 046016b..71af998 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 5 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-daf4baba7c77b0df59c77b13dd57c56da4900b5b3f95f81a8346ae9762419f95.yml -openapi_spec_hash: 346769e832e482cea4496f92d56dd8b6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/isaacus%2Fisaacus-f97414fc062dd07f3ac5066afe3decb2d6bff49ff129c3633096d59d0d28ded9.yml +openapi_spec_hash: 90f19133c18780ddeeebdf9dd741352b config_hash: 9040e7359f066240ad536041fb2c5185 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d79f0d..402a61f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.19.1 (2026-02-16) + +Full Changelog: [v0.19.0...v0.19.1](https://github.com/isaacus-dev/isaacus-python/compare/v0.19.0...v0.19.1) + +### Chores + +* format all `api.md` files ([df775e3](https://github.com/isaacus-dev/isaacus-python/commit/df775e3230586fbb1dacec902a3fc40c181e7c9b)) +* **internal:** fix lint error on Python 3.14 ([59cc825](https://github.com/isaacus-dev/isaacus-python/commit/59cc825b036e5b7ad55b029d4027eb65563a3aa2)) + + +### Documentation + +* **api:** clarify ilgs span whitespace coverage ([75d28d4](https://github.com/isaacus-dev/isaacus-python/commit/75d28d4abeec47cb0340380e26828857e88f59fb)) +* **api:** improve explanation of extractable dates ([2b81647](https://github.com/isaacus-dev/isaacus-python/commit/2b81647df748c71543b60fa94d579fff0b38a4e6)) + ## 0.19.0 (2026-02-12) Full Changelog: [v0.18.1...v0.19.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.18.1...v0.19.0) diff --git a/api.md b/api.md index 4e5123a..b053fa0 100644 --- a/api.md +++ b/api.md @@ -12,17 +12,7 @@ Methods: # Classifications -## Universal - -Types: - -```python -from isaacus.types.classifications.universal import UniversalClassificationResponse -``` - -Methods: - -- client.classifications.universal.create(\*\*params) -> UniversalClassificationResponse +## [Universal](src/isaacus/resources/classifications/api.md) # Rerankings @@ -38,17 +28,7 @@ Methods: # Extractions -## QA - -Types: - -```python -from isaacus.types.extractions.qa import AnswerExtractionResponse -``` - -Methods: - -- client.extractions.qa.create(\*\*params) -> AnswerExtractionResponse +## [QA](src/isaacus/resources/extractions/api.md) # Enrichments @@ -64,25 +44,4 @@ Methods: # ILGS -## v1 - -Types: - -```python -from isaacus.types.ilgs.v1 import ( - Crossreference, - Date, - Document, - Email, - ExternalDocument, - IDNumber, - Location, - Person, - PhoneNumber, - Quote, - Segment, - Span, - Term, - Website, -) -``` +## [v1](src/isaacus/resources/api.md) diff --git a/pyproject.toml b/pyproject.toml index 601caa8..330da97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "isaacus" -version = "0.19.0" +version = "0.19.1" description = "The official Python library for the isaacus API" dynamic = ["readme"] license = "Apache-2.0" @@ -69,7 +69,7 @@ format = { chain = [ # run formatting again to fix any inconsistencies when imports are stripped "format:ruff", ]} -"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" +"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'" "format:ruff" = "ruff format" "lint" = { chain = [ diff --git a/src/isaacus/_utils/_compat.py b/src/isaacus/_utils/_compat.py index dd70323..2c70b29 100644 --- a/src/isaacus/_utils/_compat.py +++ b/src/isaacus/_utils/_compat.py @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool: else: import types - return tp is Union or tp is types.UnionType + return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap] def is_typeddict(tp: Type[Any]) -> bool: diff --git a/src/isaacus/_version.py b/src/isaacus/_version.py index 5682338..0a51dda 100644 --- a/src/isaacus/_version.py +++ b/src/isaacus/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "isaacus" -__version__ = "0.19.0" # x-release-please-version +__version__ = "0.19.1" # x-release-please-version diff --git a/src/isaacus/resources/classifications/classifications.py b/src/isaacus/resources/classifications/classifications.py index e02c82a..19b4d4b 100644 --- a/src/isaacus/resources/classifications/classifications.py +++ b/src/isaacus/resources/classifications/classifications.py @@ -3,7 +3,8 @@ from __future__ import annotations from ..._compat import cached_property -from .universal import ( +from ..._resource import SyncAPIResource, AsyncAPIResource +from .universal.universal import ( UniversalResource, AsyncUniversalResource, UniversalResourceWithRawResponse, @@ -11,7 +12,6 @@ UniversalResourceWithStreamingResponse, AsyncUniversalResourceWithStreamingResponse, ) -from ..._resource import SyncAPIResource, AsyncAPIResource __all__ = ["ClassificationsResource", "AsyncClassificationsResource"] diff --git a/src/isaacus/resources/classifications/universal/__init__.py b/src/isaacus/resources/classifications/universal/__init__.py new file mode 100644 index 0000000..b3896ea --- /dev/null +++ b/src/isaacus/resources/classifications/universal/__init__.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .universal import ( + UniversalResource, + AsyncUniversalResource, + UniversalResourceWithRawResponse, + AsyncUniversalResourceWithRawResponse, + UniversalResourceWithStreamingResponse, + AsyncUniversalResourceWithStreamingResponse, +) + +__all__ = [ + "UniversalResource", + "AsyncUniversalResource", + "UniversalResourceWithRawResponse", + "AsyncUniversalResourceWithRawResponse", + "UniversalResourceWithStreamingResponse", + "AsyncUniversalResourceWithStreamingResponse", +] diff --git a/src/isaacus/resources/classifications/universal/api.md b/src/isaacus/resources/classifications/universal/api.md new file mode 100644 index 0000000..c8553d0 --- /dev/null +++ b/src/isaacus/resources/classifications/universal/api.md @@ -0,0 +1,11 @@ +# Universal + +Types: + +```python +from isaacus.types.classifications.universal import UniversalClassificationResponse +``` + +Methods: + +- client.classifications.universal.create(\*\*params) -> UniversalClassificationResponse diff --git a/src/isaacus/resources/classifications/universal.py b/src/isaacus/resources/classifications/universal/universal.py similarity index 95% rename from src/isaacus/resources/classifications/universal.py rename to src/isaacus/resources/classifications/universal/universal.py index 0a6e317..9784b9c 100644 --- a/src/isaacus/resources/classifications/universal.py +++ b/src/isaacus/resources/classifications/universal/universal.py @@ -7,19 +7,19 @@ import httpx -from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( +from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given +from ...._utils import maybe_transform, async_maybe_transform +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import make_request_options -from ...types.classifications.universal import universal_create_params -from ...types.classifications.universal.universal_classification_response import UniversalClassificationResponse +from ...._base_client import make_request_options +from ....types.classifications.universal import universal_create_params +from ....types.classifications.universal.universal_classification_response import UniversalClassificationResponse __all__ = ["UniversalResource", "AsyncUniversalResource"] diff --git a/src/isaacus/resources/extractions/extractions.py b/src/isaacus/resources/extractions/extractions.py index ee0b810..6733808 100644 --- a/src/isaacus/resources/extractions/extractions.py +++ b/src/isaacus/resources/extractions/extractions.py @@ -2,7 +2,7 @@ from __future__ import annotations -from .qa import ( +from .qa.qa import ( QAResource, AsyncQAResource, QAResourceWithRawResponse, diff --git a/src/isaacus/resources/extractions/qa/__init__.py b/src/isaacus/resources/extractions/qa/__init__.py new file mode 100644 index 0000000..298c58f --- /dev/null +++ b/src/isaacus/resources/extractions/qa/__init__.py @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .qa import ( + QAResource, + AsyncQAResource, + QAResourceWithRawResponse, + AsyncQAResourceWithRawResponse, + QAResourceWithStreamingResponse, + AsyncQAResourceWithStreamingResponse, +) + +__all__ = [ + "QAResource", + "AsyncQAResource", + "QAResourceWithRawResponse", + "AsyncQAResourceWithRawResponse", + "QAResourceWithStreamingResponse", + "AsyncQAResourceWithStreamingResponse", +] diff --git a/src/isaacus/resources/extractions/qa/api.md b/src/isaacus/resources/extractions/qa/api.md new file mode 100644 index 0000000..43082b1 --- /dev/null +++ b/src/isaacus/resources/extractions/qa/api.md @@ -0,0 +1,11 @@ +# QA + +Types: + +```python +from isaacus.types.extractions.qa import AnswerExtractionResponse +``` + +Methods: + +- client.extractions.qa.create(\*\*params) -> AnswerExtractionResponse diff --git a/src/isaacus/resources/extractions/qa.py b/src/isaacus/resources/extractions/qa/qa.py similarity index 95% rename from src/isaacus/resources/extractions/qa.py rename to src/isaacus/resources/extractions/qa/qa.py index 8f2ca4c..c356ece 100644 --- a/src/isaacus/resources/extractions/qa.py +++ b/src/isaacus/resources/extractions/qa/qa.py @@ -7,19 +7,19 @@ import httpx -from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( +from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given +from ...._utils import maybe_transform, async_maybe_transform +from ...._compat import cached_property +from ...._resource import SyncAPIResource, AsyncAPIResource +from ...._response import ( to_raw_response_wrapper, to_streamed_response_wrapper, async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import make_request_options -from ...types.extractions.qa import qa_create_params -from ...types.extractions.qa.answer_extraction_response import AnswerExtractionResponse +from ...._base_client import make_request_options +from ....types.extractions.qa import qa_create_params +from ....types.extractions.qa.answer_extraction_response import AnswerExtractionResponse __all__ = ["QAResource", "AsyncQAResource"] diff --git a/src/isaacus/resources/ilgs/v1/__init__.py b/src/isaacus/resources/ilgs/v1/__init__.py new file mode 100644 index 0000000..fd8019a --- /dev/null +++ b/src/isaacus/resources/ilgs/v1/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/src/isaacus/resources/ilgs/v1/api.md b/src/isaacus/resources/ilgs/v1/api.md new file mode 100644 index 0000000..32f3ceb --- /dev/null +++ b/src/isaacus/resources/ilgs/v1/api.md @@ -0,0 +1,22 @@ +# v1 + +Types: + +```python +from isaacus.types.ilgs.v1 import ( + Crossreference, + Date, + Document, + Email, + ExternalDocument, + IDNumber, + Location, + Person, + PhoneNumber, + Quote, + Segment, + Span, + Term, + Website, +) +``` diff --git a/src/isaacus/types/ilgs/v1/crossreference.py b/src/isaacus/types/ilgs/v1/crossreference.py index e515b52..62b4b72 100644 --- a/src/isaacus/types/ilgs/v1/crossreference.py +++ b/src/isaacus/types/ilgs/v1/crossreference.py @@ -33,7 +33,9 @@ class Crossreference(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may diff --git a/src/isaacus/types/ilgs/v1/date.py b/src/isaacus/types/ilgs/v1/date.py index 4ca4bff..cc753d2 100644 --- a/src/isaacus/types/ilgs/v1/date.py +++ b/src/isaacus/types/ilgs/v1/date.py @@ -11,9 +11,9 @@ class Date(BaseModel): """ - A date identified in a document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. + An array of dates identified in the document belonging to one of the following types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. - Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into one of the supported date types are extractable. + Only full Gregorian dates (i.e., including a day, month, and year) between the years 1000 and 9999 (inclusive) fitting into one of the supported date types are extractable. """ value: str diff --git a/src/isaacus/types/ilgs/v1/document.py b/src/isaacus/types/ilgs/v1/document.py index 808eae2..d6fcddc 100644 --- a/src/isaacus/types/ilgs/v1/document.py +++ b/src/isaacus/types/ilgs/v1/document.py @@ -49,7 +49,9 @@ class Document(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may @@ -65,7 +67,9 @@ class Document(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may @@ -174,8 +178,9 @@ class Document(BaseModel): types: `creation`, `signature`, `effective`, `expiry`, `delivery`, `renewal`, `payment`, `birth`, or `death`. - Only Gregorian dates between the years 1000 and 9999 (inclusive) fitting into - one of the supported date types are extractable. + Only full Gregorian dates (i.e., including a day, month, and year) between the + years 1000 and 9999 (inclusive) fitting into one of the supported date types are + extractable. """ headings: List[Span] diff --git a/src/isaacus/types/ilgs/v1/external_document.py b/src/isaacus/types/ilgs/v1/external_document.py index f2833e3..64ff411 100644 --- a/src/isaacus/types/ilgs/v1/external_document.py +++ b/src/isaacus/types/ilgs/v1/external_document.py @@ -25,7 +25,9 @@ class ExternalDocument(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may diff --git a/src/isaacus/types/ilgs/v1/location.py b/src/isaacus/types/ilgs/v1/location.py index b84bb94..16c31d5 100644 --- a/src/isaacus/types/ilgs/v1/location.py +++ b/src/isaacus/types/ilgs/v1/location.py @@ -23,7 +23,9 @@ class Location(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may diff --git a/src/isaacus/types/ilgs/v1/person.py b/src/isaacus/types/ilgs/v1/person.py index 0b58fdb..39e636d 100644 --- a/src/isaacus/types/ilgs/v1/person.py +++ b/src/isaacus/types/ilgs/v1/person.py @@ -23,7 +23,9 @@ class Person(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may diff --git a/src/isaacus/types/ilgs/v1/quote.py b/src/isaacus/types/ilgs/v1/quote.py index 82c27c6..fb2c9db 100644 --- a/src/isaacus/types/ilgs/v1/quote.py +++ b/src/isaacus/types/ilgs/v1/quote.py @@ -34,7 +34,9 @@ class Quote(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may diff --git a/src/isaacus/types/ilgs/v1/segment.py b/src/isaacus/types/ilgs/v1/segment.py index 4814fcd..f27cf6c 100644 --- a/src/isaacus/types/ilgs/v1/segment.py +++ b/src/isaacus/types/ilgs/v1/segment.py @@ -139,7 +139,9 @@ class Segment(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may @@ -155,7 +157,9 @@ class Segment(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may @@ -171,7 +175,9 @@ class Segment(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may @@ -202,7 +208,9 @@ class Segment(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may diff --git a/src/isaacus/types/ilgs/v1/span.py b/src/isaacus/types/ilgs/v1/span.py index 51206dd..6201e25 100644 --- a/src/isaacus/types/ilgs/v1/span.py +++ b/src/isaacus/types/ilgs/v1/span.py @@ -10,7 +10,7 @@ class Span(BaseModel): All spans are globally laminar and well-nested similar to XML—it is impossible for any two spans to partially overlap; they can only be disjoint, adjacent, or wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a span's `end` index, being an exclusive index, may obviosuly land on a whitespace character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may need to be translated accordingly (for example, JavaScript slices into UTF-16 code units instead of Unicode code points). """ diff --git a/src/isaacus/types/ilgs/v1/term.py b/src/isaacus/types/ilgs/v1/term.py index 0ead336..582c66f 100644 --- a/src/isaacus/types/ilgs/v1/term.py +++ b/src/isaacus/types/ilgs/v1/term.py @@ -22,7 +22,9 @@ class Term(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may @@ -38,7 +40,9 @@ class Term(BaseModel): wholly nested. Spans of the exact same type (e.g., segments) will never be duplicated. - A span cannot be empty and will never start or end at whitespace. + A span cannot be empty and will never start or end at whitespace (though a + span's `end` index, being an exclusive index, may obviosuly land on a whitespace + character). Note that, when using programming languages other than Python (which uses zero-based, half-open, Unicode code point-spaced string indexing), indices may diff --git a/tests/api_resources/classifications/universal/__init__.py b/tests/api_resources/classifications/universal/__init__.py new file mode 100644 index 0000000..fd8019a --- /dev/null +++ b/tests/api_resources/classifications/universal/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/extractions/qa/__init__.py b/tests/api_resources/extractions/qa/__init__.py new file mode 100644 index 0000000..fd8019a --- /dev/null +++ b/tests/api_resources/extractions/qa/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/ilgs/v1/__init__.py b/tests/api_resources/ilgs/v1/__init__.py new file mode 100644 index 0000000..fd8019a --- /dev/null +++ b/tests/api_resources/ilgs/v1/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.