Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FINAM
finam
Commits
821c4522
Commit
821c4522
authored
2 years ago
by
Martin Lange
Browse files
Options
Downloads
Patches
Plain Diff
better document TimeTrigger component
parent
2ff9414d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!152
Better document TimeTrigger component
Pipeline
#124591
passed with stages
in 3 minutes and 4 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/finam/modules/control.py
+29
-2
29 additions, 2 deletions
src/finam/modules/control.py
with
29 additions
and
2 deletions
src/finam/modules/control.py
+
29
−
2
View file @
821c4522
...
...
@@ -20,13 +20,40 @@ class TimeTrigger(TimeComponent):
| |
+-------------+
The typical usage is shown in the example below.
Here, the component will retrieve metadata from it
'
s input,
for all metadata fields that are ```None``.
Because ``out_info`` is ``None``, the received metadata is then forwarded to the output.
The same mechanism can be used in the other direction, by specifying ``out_info``
but not ``in_info`` in the method call.
Examples
--------
.. testcode:: constructor
import datetime as dt
import finam as fm
component = fm.modules.TimeTrigger(
in_info=fm.Info(time=None, grid=None, units=None),
start=dt.datetime(2000, 1, 1),
step=dt.timedelta(days=1),
)
.. testcode:: constructor
:hide:
component.initialize()
Parameters
----------
start : datetime.datetime
Starting time. Can be ``None`` to retrieve it from linked components.
See parameter ``start_from_input`` for details.
st
art
: datetime.timedelta
Time step
st
ep
: datetime.timedelta
T
he component
'
s t
ime step
in_info : Info, optional
Input info, optional. However, one of ``in_info`` or ``out_info`` must be given.
``time`` is ignored and can be set to ``None``.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment