Skip to content
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

Compose Actor class of smaller components #327

Open
Pijukatel opened this issue Nov 18, 2024 · 1 comment
Open

Compose Actor class of smaller components #327

Pijukatel opened this issue Nov 18, 2024 · 1 comment
Labels
debt Code quality improvement or decrease of technical debt. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@Pijukatel
Copy link
Contributor

Pijukatel commented Nov 18, 2024

_ActorType aliased as Actor is very big class with many methods.
https://github.com/apify/apify-sdk-python/blob/master/src/apify/_actor.py#L42

It is entry point of SDK and it would be nice if it was nicely structured. Having too many methods on such "mega class" makes it harder to understand and use. Refactor this class and move it's methods into components, so that user can use SDK through logically structured groups of functionality.

Generic example:
Instead of:
actor.some_function_to_handle_inputs
actor.other_function_to_handle_inputs

it should be:
actor.inputs.some_function_to_handle_inputs
actor.inputs.other_function_to_handle_inputs

#326 (comment)

@Pijukatel Pijukatel added debt Code quality improvement or decrease of technical debt. t-tooling Issues with this label are in the ownership of the tooling team. labels Nov 18, 2024
@B4nan
Copy link
Member

B4nan commented Nov 18, 2024

I wanted to see some concrete example, and this generic one really sounds like you want to change the public API, which is not an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Code quality improvement or decrease of technical debt. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

2 participants