Fix update-states target

... and regenerate svg files.

Change-Id: I903774597e07a4184213df284207eeac5f329d5e
This commit is contained in:
Takashi Kajinami 2024-04-15 14:43:43 +09:00
parent db020073ec
commit ff45bd3d2d
9 changed files with 25 additions and 21 deletions

1
.gitignore vendored
View File

@ -57,6 +57,7 @@ ChangeLog
# doc
doc/build/
.diagram-tools/
.idea
env

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -40,6 +40,7 @@ class DummyRuntime(object):
self.completer = mock.MagicMock()
self.scheduler = mock.MagicMock()
self.storage = mock.MagicMock()
self.selector = mock.MagicMock()
def make_machine(start_state, transitions, event_name_cb):
@ -129,7 +130,7 @@ def main():
elif options.engines:
source_type = "Engines"
b = builder.MachineBuilder(DummyRuntime(), mock.MagicMock())
source, memory = b.build()
source, memory = b.build({})
internal_states.extend(builder.META_STATES)
ordering = 'out'
elif options.wbe_requests:

View File

@ -13,7 +13,7 @@ if [ ! -d "$PWD/.diagram-tools" ]; then
fi
script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
img_dir="$script_dir/../doc/source/img"
img_dir="$script_dir/../doc/source/user/img"
echo "---- Updating task state diagram ----"
python $script_dir/state_graph.py -t -f /tmp/states.svg
@ -31,9 +31,10 @@ echo "---- Updating retry state diagram ----"
python $script_dir/state_graph.py -r -f /tmp/states.svg
$xsltproc $PWD/.diagram-tools/notugly.xsl /tmp/states.svg > $img_dir/retry_states.svg
echo "---- Updating wbe request state diagram ----"
python $script_dir/state_graph.py -w -f /tmp/states.svg
$xsltproc $PWD/.diagram-tools/notugly.xsl /tmp/states.svg > $img_dir/wbe_request_states.svg
# NOTE(tkajinam): This is broken since 148963805626f6246554961bd3ff39055de3e317
# echo "---- Updating wbe request state diagram ----"
# python $script_dir/state_graph.py -w -f /tmp/states.svg
# $xsltproc $PWD/.diagram-tools/notugly.xsl /tmp/states.svg > $img_dir/wbe_request_states.svg
echo "---- Updating job state diagram ----"
python $script_dir/state_graph.py -j -f /tmp/states.svg

View File

@ -26,8 +26,9 @@ commands =
[testenv:update-states]
deps =
{[testenv]deps}
pydot3
commands = {toxinidir}/tools/update_states.sh
allowlist_externals =
{toxinidir}/tools/update_states.sh
[testenv:pep8]
commands = pre-commit run -a