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

TimeManager interface module #209

Merged
merged 1 commit into from
Jan 11, 2023
Merged

TimeManager interface module #209

merged 1 commit into from
Jan 11, 2023

Conversation

juliasloan25
Copy link
Member

@juliasloan25 juliasloan25 commented Jan 5, 2023

Purpose

Move functions from coupler_utils/calendar_timer.jl to src/CallbackManager.jl module, and ensure that they are thoroughly commented and tested.
Part of SDI #134

To-do

PHASE 1 - moving and documentation

  • Copy file(s) to module in src/
  • Add module to ClimaCoupler.jl
  • Docstring for each function
    • Add input/output types in docstring if not type annotated
    • Add docstring info to docs/src, docs/make.jl
  • Add exports for externally-used functions
  • Flag potentially-removable parts of code

PHASE 2 - testing

  • Create test file in test/, add to test/runtests.jl
  • Unit test for each exported function in module

PHASE 3 - cleanup

  • Remove flagged parts of code
  • Formatting
  • Read through comments

  • I have read and checked the items on the review checklist.

@juliasloan25 juliasloan25 changed the title CallbackManager interface CallbackManager interface module Jan 5, 2023
@juliasloan25 juliasloan25 changed the title CallbackManager interface module TimeManager interface module Jan 6, 2023
@juliasloan25 juliasloan25 marked this pull request as ready for review January 6, 2023 20:00
Copy link
Collaborator

@LenkaNovak LenkaNovak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job! Feel free to merge after addressing the minor comments.

- `cs`: [CoupledSimulation] or [CouplerSimulation] containing info about the simulation
- `t`: [Integer] number of seconds since simulation began
"""
current_date(cs, t) = cs.dates.date0[1] + Dates.Second(t)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify the argument types here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better way I should specify the types than [CoupledSimulation] or [CouplerSimulation] and [Integer]? I wasn't sure how to be more specific since there are multiple valid types.

src/TimeManager.jl Outdated Show resolved Hide resolved
test/time_manager_tests.jl Show resolved Hide resolved
@juliasloan25 juliasloan25 mentioned this pull request Jan 9, 2023
13 tasks
@juliasloan25 juliasloan25 force-pushed the js/interface-callback branch 2 times, most recently from 0217214 to b1660d7 Compare January 10, 2023 22:44
@juliasloan25
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 11, 2023

@bors bors bot merged commit f87c56f into main Jan 11, 2023
@bors bors bot deleted the js/interface-callback branch January 11, 2023 17:47
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.

None yet

2 participants