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

Implement a new capsula.run decorator #148

Merged
merged 51 commits into from
Jan 28, 2024
Merged

Implement a new capsula.run decorator #148

merged 51 commits into from
Jan 28, 2024

Conversation

shunichironomura
Copy link
Owner

  • Rename capsule.py to _capsule.py and update imports
  • Add default method to GitRepositoryContext class
  • Add Reporter to all in capsula/reporter/init.py
  • Update json reporter to handle exceptions and tracebacks
  • Refactor normalize_copy_dst_path to its own method
  • Update import path for Capsule in encapsulator.py
  • Add capsule decorator for encapsulation logic
  • Add decorator example for pi calculation
  • Fix for Python 3.8 compatibility
  • Add context_manager example in capsula module
  • Refine type annotations in capsule decorator
  • Add record function to capsula module
  • Update calculate_pi method and import Encapsulator
  • Add thread-local context stack to Encapsulator class
  • Implement record method in _record.py
  • Refactor Encapsulator instantiation in context_manager
  • Add mkdir option to JsonDumpReporter constructor
  • Refactor context_manager.py for cleaner code
  • Rename _get_encapsulator_context_stack to _get_context_stack
  • Update context manager in capsula.run usage
  • Update context manager in capsula run method
  • Rename _record.py to _root.py in capsula module
  • Update import statement in capsula/init.py
  • Refactor decorators and add TimeWatcher in decorator.py
  • Rename submodule context to _context
  • Rename submodule reporter to _reporter
  • Add new context classes and reporter to init.py
  • Refactor: Move watcher and reporter modules to private scope
  • Add Watcher, TimeWatcher, UncaughtExceptionWatcher to init.py
  • Refactor code to use fully qualified names
  • Refactor Run to Encapsulator in context_manager
  • Rename context_manager.py to enc_context_manager.py
  • Add watcher, reporter and context decorators
  • Add new decorators to capsula init.py
  • Refactor GitRepositoryContext to use CapsuleParams
  • Rename classes to end with 'Base' for clarity
  • Add run.py with Run class and encapsulation methods
  • Refactor decorators to support Run objects
  • Add 'run' to decorators in capsula init file
  • Update decorator and calculate_pi function call
  • Add directory creation and phase updates in Run class
  • Add FileContext decorator to calculate_pi function
  • Update context_manager_stack.get to non-blocking
  • Refactor encapsulator context stack naming and get
  • Add thread-local run stack to Run class

@shunichironomura shunichironomura self-assigned this Jan 28, 2024
@shunichironomura shunichironomura merged commit c039775 into main Jan 28, 2024
@shunichironomura shunichironomura deleted the decorator-v2 branch January 28, 2024 15:22
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