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

Autumn cleaning part 2 - split transactron/lib.py #464

Merged
merged 11 commits into from
Oct 7, 2023

Conversation

lekcyjna123
Copy link
Contributor

As a next step I have chosen to split transactron/lib.py into smaller files. There is no changes, other than required to pass tests, to keep this merge request small. Please feel free to comment about directory names.

@lekcyjna123 lekcyjna123 added the refactor Doesn't change functionality, but makes stuff nicer label Oct 5, 2023
Base automatically changed from lekcyjna/autumn-cleaning-1 to master October 5, 2023 18:06
@Kristopher38
Copy link
Member

Bikeshedding time - I'd rename:
connections -> connectors (noun for more of a physical rather than abstract thing)
methods -> transformers (those classes share a theme of transforming method inputs/outputs in some way)

Also with this scheme it feels like stuff in transactions should land in connectors and transformers. I think my point of view boils down to a notion of "what something does" (vs. "what something is" is how you classified it). I'm not sure my classification is better or worse, so I'm not dead set on these changes.

It also feels like the overall directory structure is reversed? Internal stuff like core.py, graph.py and tracing.py is in the main transactron directory, and the user-facing stuff is in lib subdirectory. Shouldn't this be the other way around?

@tilk
Copy link
Member

tilk commented Oct 5, 2023

I very like @Kristopher38's suggestions.

@lekcyjna123
Copy link
Contributor Author

I pushed patches with @Kristopher38 ideas. Please say if they are according to your expectations.

It also feels like the overall directory structure is reversed? Internal stuff like core.py, graph.py and tracing.py is in the main transactron directory, and the user-facing stuff is in lib subdirectory. Shouldn't this be the other way around?

This is also a great idea, but let leave it for separate PR. core.py also should be split as it has over 1200 lines. After that we can move rest of files to directory internal, so the directory tree would look like:

transactron/
+ core/
|   [...]
+ lib/
|   [...]
- internal/
    [...]

Copy link
Member

@Kristopher38 Kristopher38 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

but let leave it for separate PR

alright, sounds good to me :)

@lekcyjna123
Copy link
Contributor Author

In orginal code there was a bug in docstrings and API for ArgumentsToResultsZipper wasn't generated (see current docs). After move it was detected by sphinx and an error was raised. The newest commit modifed docstring to solve the issue.

@tilk tilk merged commit aff89a1 into master Oct 7, 2023
6 checks passed
@tilk tilk deleted the lekcyjna/autumn-cleaning-2 branch October 7, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Doesn't change functionality, but makes stuff nicer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants