Refactor: Improve code organization and naming #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the codebase for better maintainability and clearer APIs.
Changes
1. Move display logic from library to CLI (
47b3052)print_uri→get_uris_formatted, etc.print_pastes→get_pastes_formattedprint_whoami→get_whoamiprint_secret, useget_secretdirectly2. Convert maniphest.py to package structure (
ffa4e6c)core.py: Main Maniphest class orchestratorutils.py: Utility functionsvalidators.py: Input validationresolvers.py: PHID resolutionfetchers.py: API data fetchingfilters.py: Task filteringformatters.py: Data formatting__init__.pyre-exports3. Improve Conduit access denied error message (
3df5a42)Access denied, visit {url}/K{id} to allow Conduit4. Improve method naming (
c7a2bd6)create_task_cli→create_taskcreate_from_config→create_tasks_from_yamlget_whoami→whoamiadd_comment→add_task_commentinfo→get_task_infodays_to_unix→days_ago_to_timestamp_load_search_from_yaml→_load_search_configTesting
All 257 tests pass.