-
-
Notifications
You must be signed in to change notification settings - Fork 2
chore: unify incendium and incendium-stubs #248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR restructures the project to treat the core library and its type stubs as two parallel distributions by reorganizing Tox environments, CI pipelines, and pre-commit hooks, and by introducing a standalone stubs package with its own build and packaging metadata. Class diagram for new stubs types in incendium-stubsclassDiagram
class DisposableConnection {
+__init__(database: AnyStr, retries: int)
+database: AnyStr
+status: AnyStr
+__enter__() DisposableConnection
+__exit__(exc_type, exc_val, exc_tb)
}
class Param {
+__init__(name_or_index: Union[int, AnyStr], type_code: int, value: Optional[Any])
+name_or_index: Union[int, AnyStr]
+type_code: int
+value: Optional[Any]
}
class InParam {
+__init__(name_or_index: Union[int, AnyStr], type_code: int, value: Any)
}
class OutParam {
+__init__(name_or_index: Union[int, AnyStr], type_code: int)
}
class TransactionManager {
+tx_id: AnyStr
+__init__(database: AnyStr, isolation_level: Optional[int], timeout: Optional[int])
+__enter__() AnyStr
+__exit__(exc_type, exc_val, exc_tb)
}
class IncendiumUser {
+__init__(user: PyUser)
+contact_info: List[ContactInfo]
+email: List[AnyStr]
+first_name: AnyStr
+full_name: AnyStr
+last_name: AnyStr
+locale: AnyStr
+roles: List[AnyStr]
}
class Error {
+message: AnyStr
+__init__(message: AnyStr)
}
class JavaError {
+cause: Optional[Throwable]
+inner_exception: InnerException
+message: AnyStr
+__init__(message: AnyStr, inner_exception: InnerException, cause: Optional[Throwable], remove_substring: Optional[AnyStr])
}
class ApplicationError {
}
class GatewayError {
+__init__(message: AnyStr, inner_exception: InnerException, cause: Optional[Throwable])
}
class MSSQLError {
+__init__(message: AnyStr, inner_exception: InnerException, cause: Optional[Throwable])
}
class TagError {
}
class _NanoXML {
+indent: AnyStr
+root: AnyStr
+__init__(root: AnyStr, indent: AnyStr)
+add_element(name: AnyStr)
+add_sub_element(name: AnyStr, value: AnyStr)
+close_element(name: AnyStr)
+to_string()
}
Param <|-- InParam
Param <|-- OutParam
JavaError <|-- ApplicationError
JavaError <|-- GatewayError
JavaError <|-- MSSQLError
Error <|-- TagError
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @cesarcoatl - I've reviewed your changes - here's some feedback:
- Consider simplifying the duplicated tox
[testenv:*]definitions by using inheritance or factors (e.g.basepython=anddeps=references) so you don’t have to repeat nearly identical blocks for pkg vs stubs. - In the pip-compile-upgrade workflow you’re calling two different actions (
pip-compile-upgradevsuv-pip-compile-upgrade)—either standardize on one or add a comment explaining why they differ to avoid confusion. - It would help to add a pre-commit mypy hook targeting
.pyifiles so stub changes get type-checked automatically during commits.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider simplifying the duplicated tox `[testenv:*]` definitions by using inheritance or factors (e.g. `basepython=` and `deps=` references) so you don’t have to repeat nearly identical blocks for pkg vs stubs.
- In the pip-compile-upgrade workflow you’re calling two different actions (`pip-compile-upgrade` vs `uv-pip-compile-upgrade`)—either standardize on one or add a comment explaining why they differ to avoid confusion.
- It would help to add a pre-commit mypy hook targeting `.pyi` files so stub changes get type-checked automatically during commits.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Unify the main package and stub distribution within a single repository by restructuring testing environments, CI workflows, packaging, and versioning for both the Python package and its stubs.
New Features:
Enhancements:
Build:
CI:
Documentation: