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

Introduce new package "automation" #14

Merged
merged 3 commits into from
Oct 12, 2022
Merged

Introduce new package "automation" #14

merged 3 commits into from
Oct 12, 2022

Conversation

smyrman
Copy link
Contributor

@smyrman smyrman commented Sep 25, 2022

Used by https://github.com/clarify/template-clarify-automation (repo is private for now, but will be made public when PR is merged).


commit 3c085ed (HEAD -> automation, origin/automation)
Author: Sindre Myren sindre@clarify.io
Date: Wed Oct 12 14:28:23 2022 +0200

.github/workflows/go.yml: update actions

commit d8bf0b6
Author: Sindre Myren sindre@clarify.io
Date: Wed Oct 5 13:01:20 2022 +0200

README: update features list and link to template repo

commit 201d6f3
Author: Sindre Myren sindre@clarify.io
Date: Wed Oct 5 11:43:09 2022 +0200

examples/publish_signals: update to use automation

Update example to use new automation package. This greatly reduce the
code-size for the publish signals example.

commit efd5355
Author: Sindre Myren sindre@clarify.io
Date: Sun Sep 25 22:45:04 2022 +0200

automation: new package, add PublishSignals type

The new automation package is an utility package to allow setting up
automations on top of Clarify.

As a first automation type, we are adding a PublishSignals automation,
which allow more easily publishing signals as items through a defined
set of rules.

@smyrman smyrman force-pushed the automation branch 5 times, most recently from 61b347b to a1617d2 Compare September 28, 2022 11:09
@smyrman smyrman changed the title automation Introduce new package "automation" Sep 28, 2022
// operations.
Verbose bool

// Out describe the destination writer for logs. If unset, all logging is
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe write logs by default to stdout?

Copy link
Contributor Author

@smyrman smyrman Oct 12, 2022

Choose a reason for hiding this comment

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

Probably you mean Stderr. I did so initially. but it makes it harder to disable the logs, as you can't disable it by setting it to nil. Also, it's common in go to let logging be disabled by default in library packages.

E.g. if you have a program using structured logging (usually JSON), you would not want unstructured logs to end up among the output without you having actively enabled it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I meant stdout, but now I understand that it's best practice to log to stderr 👍

The new automation package is an utility package to allow setting up
automations on top of Clarify.

As a first automation type, we are adding a PublishSignals automation,
which allow more easily publishing signals as items through a defined
set of rules.
Update example to use new automation package. This greatly reduce the
code-size for the publish signals example.
@smyrman smyrman merged commit 5715857 into main Oct 12, 2022
@smyrman smyrman deleted the automation branch October 12, 2022 14:24
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.

2 participants