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

tools.codegenerator subdirectory package part 1 #546

Merged
merged 2 commits into from
May 21, 2024

Conversation

junkmd
Copy link
Collaborator

@junkmd junkmd commented May 21, 2024

I have been contributing to the tools.codegenerator module for several years.

The CodeGenerator class was already large when I began my contributions.
Since then, I have refactored it by redistributing responsibilities that were once overloaded onto a single class to other classes and functions.

Despite these efforts, the module remains over 1000 lines and is challenging to maintain. The recursive method that generates the codebase from typedesc objects complicates unit testing.
While the client's tests confirm the code's executability, they do not assess the readability of line spacing and annotations.

This PR and next ones aim to enhance future refactoring and testability by restructuring tools.codegenerator into a subdirectory package, store with an __init__.py file and appropriately placed modules.

junkmd added 2 commits May 22, 2024 08:49
- split `tools.codegenerator` into `codegenerator` and `helpers`
- add `__init__.py`
@junkmd junkmd added this to the 1.4.3 milestone May 21, 2024
@junkmd junkmd merged commit e9e620a into enthought:main May 21, 2024
25 checks passed
@junkmd junkmd deleted the codegen_pkg_part1 branch May 21, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant