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

Python API - Refactor Commonly Used Functions #104

Closed
david-cattermole opened this issue May 18, 2019 · 3 comments
Closed

Python API - Refactor Commonly Used Functions #104

david-cattermole opened this issue May 18, 2019 · 3 comments
Assignees
Labels
maya tool A user tool inside Maya. maya utility Python modules to be used across the mmSolver project. python api The Python API for mmSolver
Milestone

Comments

@david-cattermole
Copy link
Owner

Description

Since the Python API for mmSolver has been designed many new tools have been written. Some of these tools contain duplicate functions (to avoid adding code into the API). Since the initial Python API we have also created a new utilities sub-package.
We should refactor these duplicate functions into either the API (mmSolver.api) or utilities (mmSolver.utils).

However, we also want to avoid bloating the API too much, it should be minimalist.

mmSolver.utils should not have dependencies on mmSolver.api.
mmSolver.api should not have dependencies on mmSolver.tools.
mmSolver.api may have dependencies on mmSolver.utils.
mmSolver.tools may have dependencies on mmSolver.api and mmSolver.utils.

For example;
Move mmSolver.tools.selection.convert to mmSolver.api
Move mmSolver.tools.selection.filternodes to mmSolver.api

All of these changes should be backwards compatible, but with a deprecation warning printed (using Python standard library "warnings" module), if the original function is called.

@david-cattermole david-cattermole added maya tool A user tool inside Maya. python api The Python API for mmSolver maya utility Python modules to be used across the mmSolver project. labels May 18, 2019
@david-cattermole david-cattermole added this to the v0.3.0 milestone May 18, 2019
@david-cattermole david-cattermole self-assigned this May 18, 2019
david-cattermole added a commit that referenced this issue Jun 2, 2019
Moved mmSolver.tools.selection.filternodes into mmSolver API, and changed function names.
Moved mmSolver.tools.selection.convert into mmSolver API, and changed function names.
Moved functions into mmSolver.utils.
david-cattermole added a commit that referenced this issue Jun 2, 2019
Bug fix Collection progress and status logging. Issue #104.
@david-cattermole
Copy link
Owner Author

The modules have been refactored.
This is now merged with the master branch.

david-cattermole added a commit that referenced this issue Jun 23, 2019
…han deprecated 'mmSolver.tools.selection.filternodes' module.

Issue #104.
@david-cattermole
Copy link
Owner Author

Special effort should be made to ensure this refactor maintains the exact same mmSolver API and, where possible, the same selection helper utility modules.

Of course, these moved functions should be marked as deprecated and will be removed at a later date.

The biggest offenders will likely be:

  • mmSolver.tools.selection.filternodes
  • mmSolver.tools.selection.convert
  • mmSolver._api.utils

@david-cattermole david-cattermole modified the milestones: v0.3.0, v0.3.1 Oct 8, 2019
@david-cattermole david-cattermole modified the milestones: v0.3.1, v0.3.2 Oct 20, 2019
@david-cattermole
Copy link
Owner Author

I don't think this is a big problem, I'm going to close this again, unless a user brings it up as a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maya tool A user tool inside Maya. maya utility Python modules to be used across the mmSolver project. python api The Python API for mmSolver
Projects
None yet
Development

No branches or pull requests

1 participant