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

Refactor ableton.py to be cleaner and extract methods into separate files #26

Closed
wants to merge 2 commits into from

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Jul 30, 2023

Description

This PR refactors the ableton.py file to improve code organization and readability. Several functions have been extracted into a separate utility file, ableton_utils.py, to make the code cleaner and more maintainable. The global variables in ableton.py have been encapsulated into a class for better organization. The main() function has also been simplified by extracting some of its logic into separate functions.

Summary of Changes

  • Extracted the functions say(text), switch_to_ableton(), and export(track, position) from ableton.py into ableton_utils.py.
  • Encapsulated the global variables NAME, IS_RETINA, OS, PYTHON_EXEC, and STEMS into a class in ableton.py.
  • Simplified the main() function in ableton.py by extracting some of its logic into separate functions.
  • Created the ableton_utils.py file to contain the extracted utility functions.
  • Improved code organization and readability in ableton.py.

Fixes #25.

To checkout this PR branch, run the following command in your terminal:

git checkout sweep/refactor-ableton-py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
1 participant