behavior_machines 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -0
- data/lib/behavior_machines/tree.rb +1 -0
- data/lib/behavior_machines/version.rb +1 -1
- data/lib/behavior_machines.rb +4 -2
- metadata +20 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1d28d3451daf3c9ee0e657cdb6275daaea60b11106ed9664dcc37f333f32a0e
|
|
4
|
+
data.tar.gz: f540b2225acde186a6a2388bf71f0675be690a3f14f2297c4e118627b18e86a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05307bd138c558b175edac91f692a5cb281565a597e763cfb590c5183e0863a41708a588dc0594c1b20dcc6feb503f2be6456c470fb67fb457cf99c7c766c5bb
|
|
7
|
+
data.tar.gz: 57ca3bfe22f77525cd90738a5dab4dc0d8922c6bc7d6a8f4d7a8120e795e95f0ba58cca10d19ebdeb0c3122d766a4ad48b4c33b592ff932d230de636a701e4b3
|
data/README.md
CHANGED
|
@@ -122,6 +122,24 @@ $ BEHAVIOR_MACHINES_NATIVE=1 ruby app.rb
|
|
|
122
122
|
Leaves stay Ruby, so the gain is limited to the tree walk itself. The test
|
|
123
123
|
suite runs against both backends (`bundle exec rake test:both`).
|
|
124
124
|
|
|
125
|
+
## Releases
|
|
126
|
+
|
|
127
|
+
Release Please manages the Ruby gem and both publishable Rust crates. Use
|
|
128
|
+
conventional commits and merge its release PR to update versions, changelogs,
|
|
129
|
+
the release manifest, and workspace dependency requirements. Do not push
|
|
130
|
+
hand-written version bumps or changelog entries.
|
|
131
|
+
|
|
132
|
+
The release manifest records the last released version of each package, not
|
|
133
|
+
the next planned version. Circuit is registered at its published `0.1.0`;
|
|
134
|
+
its one-time `release-as` override requests `0.3.0` in the next release PR.
|
|
135
|
+
Remove that override from `release-please-config.json` after the release so
|
|
136
|
+
later versions are calculated from conventional commits.
|
|
137
|
+
|
|
138
|
+
Crate-only releases do not trigger Ruby gem publishing. The workflow creates
|
|
139
|
+
GitHub releases for the crates but does not upload them to crates.io. After
|
|
140
|
+
merging the release PR and checking out its release tag, run the Rust tests
|
|
141
|
+
and a `cargo publish --dry-run` for the relevant crate before publishing.
|
|
142
|
+
|
|
125
143
|
## License
|
|
126
144
|
|
|
127
145
|
BSD-3-Clause. See [LICENSE](LICENSE).
|
|
@@ -37,6 +37,7 @@ module BehaviorMachines
|
|
|
37
37
|
# `ticked(node_id, status)` and `halted(node_id)`; node ids number the
|
|
38
38
|
# definition in pre-order, and children report before their parent.
|
|
39
39
|
def tick(ctx = nil, now: BehaviorMachines.now, observer: nil)
|
|
40
|
+
DeadlineMachines.check!
|
|
40
41
|
now = BehaviorMachines.check_time(now)
|
|
41
42
|
exclusive { @engine.tick(ctx, now, Observers.wrap(observer)) }
|
|
42
43
|
end
|
data/lib/behavior_machines.rb
CHANGED
|
@@ -7,6 +7,8 @@ require_relative 'behavior_machines/definition'
|
|
|
7
7
|
require_relative 'behavior_machines/engine'
|
|
8
8
|
require_relative 'behavior_machines/tree'
|
|
9
9
|
require_relative 'behavior_machines/machine'
|
|
10
|
+
require 'deadline_machines'
|
|
11
|
+
|
|
10
12
|
require_relative 'behavior_machines/native_extension'
|
|
11
13
|
|
|
12
14
|
# Behavior trees with explicit halt semantics, following the behavior-tree
|
|
@@ -15,8 +17,8 @@ module BehaviorMachines
|
|
|
15
17
|
STATUSES = %i[success failure running].freeze
|
|
16
18
|
|
|
17
19
|
class << self
|
|
18
|
-
# The current monotonic time in nanoseconds.
|
|
19
|
-
def now =
|
|
20
|
+
# The current monotonic time in nanoseconds, from the family's clock.
|
|
21
|
+
def now = DeadlineMachines.clock.now_ns
|
|
20
22
|
|
|
21
23
|
# Whether the native backend is loaded (opt-in, see NativeExtension).
|
|
22
24
|
def native_available? = NativeExtension.loaded?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: behavior_machines
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Abdelkader Boudih
|
|
@@ -9,6 +9,20 @@ bindir: bin
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: deadline_machines
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '0.1'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '0.1'
|
|
12
26
|
- !ruby/object:Gem::Dependency
|
|
13
27
|
name: state_machines
|
|
14
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -16,7 +30,7 @@ dependencies:
|
|
|
16
30
|
- - ">="
|
|
17
31
|
- !ruby/object:Gem::Version
|
|
18
32
|
version: '0.202'
|
|
19
|
-
type: :
|
|
33
|
+
type: :development
|
|
20
34
|
prerelease: false
|
|
21
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
36
|
requirements:
|
|
@@ -102,13 +116,13 @@ files:
|
|
|
102
116
|
- lib/behavior_machines/node.rb
|
|
103
117
|
- lib/behavior_machines/tree.rb
|
|
104
118
|
- lib/behavior_machines/version.rb
|
|
105
|
-
homepage: https://github.com/seuros/
|
|
119
|
+
homepage: https://github.com/seuros/behavior_machines
|
|
106
120
|
licenses:
|
|
107
121
|
- BSD-3-Clause
|
|
108
122
|
metadata:
|
|
109
|
-
homepage_uri: https://github.com/seuros/
|
|
110
|
-
source_code_uri: https://github.com/seuros/
|
|
111
|
-
bug_tracker_uri: https://github.com/seuros/
|
|
123
|
+
homepage_uri: https://github.com/seuros/behavior_machines
|
|
124
|
+
source_code_uri: https://github.com/seuros/behavior_machines
|
|
125
|
+
bug_tracker_uri: https://github.com/seuros/behavior_machines/issues
|
|
112
126
|
rubygems_mfa_required: 'true'
|
|
113
127
|
cargo_crate_name: behavior_machines_native
|
|
114
128
|
cargo_manifest_path: ext/behavior_machines_native/ffi/Cargo.toml
|