mirror of
https://github.com/shinyobjectz/raea.git
synced 2026-12-01 12:44:11 -10:00
Compare commits
407
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b90ee0728c | ||
|
|
5eb8b1e40e | ||
|
|
bce27988ab | ||
|
|
c02a02d902 | ||
|
|
b26da1cc95 | ||
|
|
cf0282f550 | ||
|
|
561e7a569c | ||
|
|
0649788f7f | ||
|
|
1a77da4980 | ||
|
|
1a913e6b06 | ||
|
|
7db0e7e149 | ||
|
|
ab63120653 | ||
|
|
8938819947 | ||
|
|
79cda1dc8c | ||
|
|
f0a266718e | ||
|
|
c8af179033 | ||
|
|
a0f6a95fe7 | ||
|
|
afaeaa0a7a | ||
|
|
65f2a6ae1e | ||
|
|
00deff035c | ||
|
|
7611a96e34 | ||
|
|
6fb27ef9e8 | ||
|
|
0c0de9b3d6 | ||
|
|
84f6c59dd0 | ||
|
|
96adb3ecfb | ||
|
|
4e12541984 | ||
|
|
4cc8f58e0a | ||
|
|
1873676251 | ||
|
|
374426411e | ||
|
|
e435bff43e | ||
|
|
4b2b39edd3 | ||
|
|
063ae93f30 | ||
|
|
2a63d75e1b | ||
|
|
2a005e0e30 | ||
|
|
04098af5af | ||
|
|
22834de9b1 | ||
|
|
300e094b9d | ||
|
|
7e214fedbb | ||
|
|
280437c111 | ||
|
|
11f28ffc52 | ||
|
|
107b591555 | ||
|
|
b7cc2694aa | ||
|
|
2bd30c5fad | ||
|
|
d169848689 | ||
|
|
0d92089f7d | ||
|
|
5885f86ff3 | ||
|
|
e02151cf49 | ||
|
|
49c2c96a1a | ||
|
|
346cacd71a | ||
|
|
ad766214e0 | ||
|
|
745c5f98c8 | ||
|
|
d36b0604bc | ||
|
|
03c2e2ee15 | ||
|
|
21859a5a31 | ||
|
|
f02348c397 | ||
|
|
64d97bac8f | ||
|
|
b9d1beaa2f | ||
|
|
b1a8d57616 | ||
|
|
9adc87dcd9 | ||
|
|
3a1cff770b | ||
|
|
09d87cfa1c | ||
|
|
afa6702c05 | ||
|
|
38f49d623f | ||
|
|
7ded6a7612 | ||
|
|
6416e4ec1b | ||
|
|
2556f42366 | ||
|
|
f2351359c8 | ||
|
|
7595c81782 | ||
|
|
1926af81a5 | ||
|
|
5d5da4f3d8 | ||
|
|
760d8e53c1 | ||
|
|
40757526f8 | ||
|
|
50a7e94f5e | ||
|
|
6735bd940f | ||
|
|
505103dacb | ||
|
|
8cbf438488 | ||
|
|
4447ff2425 | ||
|
|
53f9cba215 | ||
|
|
86f9aa310f | ||
|
|
388285cc7d | ||
|
|
5c6f2fd63b | ||
|
|
7e09ad474a | ||
|
|
420e753583 | ||
|
|
9471ceb76b | ||
|
|
2ff6676cb1 | ||
|
|
a1c8492e8f | ||
|
|
6b12b58ca5 | ||
|
|
fb19fa48a6 | ||
|
|
f321704e77 | ||
|
|
efac2ad5e0 | ||
|
|
3081ab72c6 | ||
|
|
13cc0d7eb5 | ||
|
|
fb37428ddf | ||
|
|
3b24037ceb | ||
|
|
13092a5cfc | ||
|
|
b491a27771 | ||
|
|
38bd094357 | ||
|
|
8c868f23c5 | ||
|
|
8f4f3648c8 | ||
|
|
fdf58ffa16 | ||
|
|
1f17872816 | ||
|
|
ea96626433 | ||
|
|
f95b9072e7 | ||
|
|
28cc2eb72b | ||
|
|
8152c9cfb7 | ||
|
|
cefb0e36a8 | ||
|
|
d55a74c472 | ||
|
|
2c3bcfa0eb | ||
|
|
ba65d342a5 | ||
|
|
d0d283ecaf | ||
|
|
487e62c97b | ||
|
|
a22b940a97 | ||
|
|
12f8521003 | ||
|
|
95d8236e71 | ||
|
|
675aa18daf | ||
|
|
b034e31a61 | ||
|
|
c0417d91ab | ||
|
|
c0d94f8f0c | ||
|
|
8345d76223 | ||
|
|
e9a7b9fd16 | ||
|
|
477b14a0ae | ||
|
|
407dbc5bec | ||
|
|
c1eaaa37f1 | ||
|
|
538bc30f37 | ||
|
|
5d411345ef | ||
|
|
16abfb08b7 | ||
|
|
27b70f7366 | ||
|
|
8b774295e1 | ||
|
|
04cd051788 | ||
|
|
ce46f5151f | ||
|
|
1386761981 | ||
|
|
898a7f8b0e | ||
|
|
6f6362040b | ||
|
|
66eb15448f | ||
|
|
153fbc6267 | ||
|
|
0575660417 | ||
|
|
0b8ec429cb | ||
|
|
0bdc8714a6 | ||
|
|
ac009cb5c5 | ||
|
|
0cd00209bf | ||
|
|
356dacd53f | ||
|
|
3532c93e4c | ||
|
|
5f252f9c13 | ||
|
|
7fe204fe0e | ||
|
|
b8a78ece86 | ||
|
|
0be19d9c5e | ||
|
|
ee9400fcfd | ||
|
|
0a73d6f72f | ||
|
|
fa705757ed | ||
|
|
e3d681b645 | ||
|
|
0735b03adc | ||
|
|
fc8b2198a1 | ||
|
|
9f5b00f0b5 | ||
|
|
16687e6d8b | ||
|
|
ec0e9f0c37 | ||
|
|
735b11054e | ||
|
|
2da197a2f7 | ||
|
|
9b3ad124f8 | ||
|
|
02cd40eb5f | ||
|
|
15bd90ff62 | ||
|
|
2b36c21264 | ||
|
|
20f07dd93f | ||
|
|
05decaa4c9 | ||
|
|
7450537a46 | ||
|
|
02a1050580 | ||
|
|
ab5f4cd138 | ||
|
|
cf369a45aa | ||
|
|
66a190ff46 | ||
|
|
0deac6fe0a | ||
|
|
cedf2607c6 | ||
|
|
bfd69cc2eb | ||
|
|
0af5da5879 | ||
|
|
cb8b06ff7b | ||
|
|
b250367b6c | ||
|
|
813bc24097 | ||
|
|
2127b369d3 | ||
|
|
5650d65c65 | ||
|
|
974148442e | ||
|
|
89fd926258 | ||
|
|
dd9be82976 | ||
|
|
784e156895 | ||
|
|
2161fa0ba0 | ||
|
|
e745f91ae4 | ||
|
|
a0f685b043 | ||
|
|
5c4ddb6989 | ||
|
|
17518a3ac1 | ||
|
|
a4898b764f | ||
|
|
6d6e81d7f4 | ||
|
|
6cd3a2f29f | ||
|
|
a616f42b7c | ||
|
|
2aabccbda3 | ||
|
|
873179a540 | ||
|
|
69c631b662 | ||
|
|
a572288148 | ||
|
|
5879f67686 | ||
|
|
fcbdd55282 | ||
|
|
23220fa002 | ||
|
|
aa9dc07369 | ||
|
|
db596714ab | ||
|
|
16c9932b2a | ||
|
|
b8eee1249d | ||
|
|
212186d907 | ||
|
|
caabca1d90 | ||
|
|
0fec51f6d9 | ||
|
|
f6af08fd69 | ||
|
|
dcb0cf8f49 | ||
|
|
f0372580bb | ||
|
|
79e8ac7af9 | ||
|
|
22dffb4170 | ||
|
|
b6dd19a649 | ||
|
|
0d853cff8e | ||
|
|
cab9f4bb28 | ||
|
|
7e2df514de | ||
|
|
a18b7c757c | ||
|
|
a2f91a82c3 | ||
|
|
be71820281 | ||
|
|
1c63d49e8b | ||
|
|
e3b55f2990 | ||
|
|
584be72747 | ||
|
|
8bc4afdd4a | ||
|
|
2dbedfe1d2 | ||
|
|
cdd44b172d | ||
|
|
4797b5ca61 | ||
|
|
3c8fc66bc0 | ||
|
|
c2e10d5181 | ||
|
|
eb5ce854ca | ||
|
|
cd03baf109 | ||
|
|
f8c16d2656 | ||
|
|
c6c165ca4c | ||
|
|
97e3fc3892 | ||
|
|
2487f40dd1 | ||
|
|
e9909de88f | ||
|
|
ee42e31469 | ||
|
|
d30c4a687a | ||
|
|
f2bf93cbee | ||
|
|
1dee25c609 | ||
|
|
cb40dca08b | ||
|
|
177f74e376 | ||
|
|
b3c2394cb7 | ||
|
|
737468b8cd | ||
|
|
82f1fb4052 | ||
|
|
99c3f52524 | ||
|
|
a691968e57 | ||
|
|
8bd79bd034 | ||
|
|
3796d708db | ||
|
|
2929ce6a04 | ||
|
|
929c03d5e4 | ||
|
|
4d5deeedac | ||
|
|
9efe6f8919 | ||
|
|
79d304f87d | ||
|
|
d0eb2424a6 | ||
|
|
b45cbe4085 | ||
|
|
5a4060df5e | ||
|
|
4a5612ae10 | ||
|
|
b8e2a3d6d2 | ||
|
|
4506c0ca2b | ||
|
|
9ae63e33c2 | ||
|
|
cb0d9c5482 | ||
|
|
aaa6f50339 | ||
|
|
87f8ac9a85 | ||
|
|
d1faf4f06f | ||
|
|
4cec0645fb | ||
|
|
cdc7ad98a4 | ||
|
|
a058f87048 | ||
|
|
304604231e | ||
|
|
d58fade59c | ||
|
|
9edcbf507c | ||
|
|
fc7edcdc49 | ||
|
|
30edd5d1a6 | ||
|
|
52ee3e0438 | ||
|
|
1c7b3afeb8 | ||
|
|
b1fafa9bf9 | ||
|
|
fe1383442f | ||
|
|
59bfe93107 | ||
|
|
089e62ee4c | ||
|
|
2ab92392d4 | ||
|
|
2ca930d81e | ||
|
|
4946bf9c00 | ||
|
|
a0dad6afbc | ||
|
|
425d7439b9 | ||
|
|
ca161bcb73 | ||
|
|
da31c4b3c6 | ||
|
|
e35a7769c0 | ||
|
|
0dfab1dbfd | ||
|
|
39369393f7 | ||
|
|
4202a87850 | ||
|
|
2fd0c7f14a | ||
|
|
1c5993d5a4 | ||
|
|
8cc12db395 | ||
|
|
bc42f11ff2 | ||
|
|
0c9fc255f2 | ||
|
|
7a1520bc3b | ||
|
|
9d237cf06a | ||
|
|
abead7eae4 | ||
|
|
c2044c2899 | ||
|
|
e8eafcdedb | ||
|
|
20e3eba1e7 | ||
|
|
1cf7dbf59a | ||
|
|
7be6b93b3f | ||
|
|
590ec633f8 | ||
|
|
35ce4cfdb3 | ||
|
|
15af3be4b1 | ||
|
|
7bc06bb777 | ||
|
|
67d85113fd | ||
|
|
3a98e0a52d | ||
|
|
2aa85c456a | ||
|
|
8f92302403 | ||
|
|
d2242ed6e6 | ||
|
|
666acf6050 | ||
|
|
94dae14946 | ||
|
|
ec01569901 | ||
|
|
56ff2a7031 | ||
|
|
88ff2b6967 | ||
|
|
e708783013 | ||
|
|
90182e445b | ||
|
|
edbcb15e81 | ||
|
|
0a77ecb65e | ||
|
|
90f138fba0 | ||
|
|
bdd30b7c65 | ||
|
|
71ee5ab583 | ||
|
|
3469759329 | ||
|
|
18b37c421c | ||
|
|
f70360f1ee | ||
|
|
fcbfba57b9 | ||
|
|
8b1cef58d5 | ||
|
|
da20262976 | ||
|
|
6dc089b82c | ||
|
|
34bf8eb021 | ||
|
|
6e1d7ceee0 | ||
|
|
4bdc4749e4 | ||
|
|
d83975535f | ||
|
|
f7147d52c0 | ||
|
|
9d311f5fde | ||
|
|
ba2dc6ade7 | ||
|
|
c3dd6b7d52 | ||
|
|
f4b524f896 | ||
|
|
0d01e4ef43 | ||
|
|
83d8f8e305 | ||
|
|
9e03e5fe4b | ||
|
|
5a73a7d5b4 | ||
|
|
2c0d626432 | ||
|
|
031d1357ca | ||
|
|
a6f59c198f | ||
|
|
6073b116b7 | ||
|
|
6298d127e5 | ||
|
|
5a57a5e128 | ||
|
|
328aba8849 | ||
|
|
af925441a8 | ||
|
|
d203d64944 | ||
|
|
af2b35f439 | ||
|
|
1858bf9bef | ||
|
|
0daaeb5b38 | ||
|
|
6a4ff18a0b | ||
|
|
24b8bf33e4 | ||
|
|
68433ab526 | ||
|
|
70cb98d3e8 | ||
|
|
6c7bf70a4e | ||
|
|
dc956173f1 | ||
|
|
d90b05017e | ||
|
|
5f55c55d57 | ||
|
|
86fe5d3673 | ||
|
|
822b73fc7d | ||
|
|
db53845b01 | ||
|
|
3ffe34bb7d | ||
|
|
0706baee4e | ||
|
|
1b7450fb4b | ||
|
|
84acab1f50 | ||
|
|
25280d1eba | ||
|
|
6350c5deb0 | ||
|
|
b6dad1b8aa | ||
|
|
4c3a3ba799 | ||
|
|
6d076868f0 | ||
|
|
119f458018 | ||
|
|
1899d29dff | ||
|
|
a9ecc06820 | ||
|
|
191314a69a | ||
|
|
865e608857 | ||
|
|
56cf86c5c8 | ||
|
|
ee1f3bc32e | ||
|
|
040153449c | ||
|
|
b60d901473 | ||
|
|
457121f804 | ||
|
|
3f9d5eda2d | ||
|
|
3a08d33f37 | ||
|
|
917bc94f59 | ||
|
|
69fb3d8f87 | ||
|
|
a669144986 | ||
|
|
b39dd4e7de | ||
|
|
f46529b461 | ||
|
|
c3e7206581 | ||
|
|
96c450fb75 | ||
|
|
85f4b98616 | ||
|
|
fcdcf1c883 | ||
|
|
3f99e479cd | ||
|
|
bb8b497b58 | ||
|
|
c37509d17f | ||
|
|
913931ad9a | ||
|
|
02051ee992 | ||
|
|
adec0aef74 | ||
|
|
84b7659b09 | ||
|
|
e8e3500466 | ||
|
|
abc6828def | ||
|
|
d184deb4d1 | ||
|
|
80ffc0f8e3 | ||
|
|
80cc01f11d | ||
|
|
7d71973476 | ||
|
|
8581fac811 |
No files matched your search
@@ -0,0 +1,5 @@
|
||||
# vendor/bevy_pbr's shaders keep LF on every checkout. raea replaces some of them with its own forks only after checking
|
||||
# Bevy's is still the one the fork was taken from, by its bytes' hash (raea_sys_frame::bevy_api::swap_embedded_shader),
|
||||
# and a Windows checkout turns LF into CRLF: 0.1.9-rc1's Windows build panicked on volumetric_fog.wesl at its first render
|
||||
vendor/bevy_pbr/**/*.wesl text eol=lf
|
||||
vendor/bevy_pbr/**/*.wgsl text eol=lf
|
||||
@@ -0,0 +1,54 @@
|
||||
name: Bug report
|
||||
description: Something raea did wrong, with a way to see it happen.
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
For a security problem, use the Security tab, not a public issue. Leave out keys and anything private.
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What `raea --version` prints, or the app's version from its About screen.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: where
|
||||
attributes:
|
||||
label: Where
|
||||
options:
|
||||
- raea CLI (render, play, check, media, ...)
|
||||
- SDK (TypeScript, React)
|
||||
- raea app (desktop)
|
||||
- Install or update
|
||||
- Not sure
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: machine
|
||||
attributes:
|
||||
label: Machine
|
||||
description: OS and version, CPU, and for a picture problem the GPU.
|
||||
placeholder: macOS 27.2, Apple Silicon
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: ran
|
||||
attributes:
|
||||
label: What you ran
|
||||
description: The command, and the smallest composition that shows it (paste the TSX).
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: happened
|
||||
attributes:
|
||||
label: What happened
|
||||
description: The output as printed. For a picture or sound problem, the frame or time and a screenshot.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: What you expected
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Security problem
|
||||
url: https://github.com/shinyobjectz/raea/security/advisories/new
|
||||
about: Report it privately, not in an issue.
|
||||
- name: Documentation
|
||||
url: https://raea.io/docs
|
||||
about: The CLI and SDK reference and the guides.
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Feature request
|
||||
description: Something you want to make that raea can't do yet, or makes hard.
|
||||
body:
|
||||
- type: textarea
|
||||
id: making
|
||||
attributes:
|
||||
label: What you're trying to make
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: today
|
||||
attributes:
|
||||
label: What you do today
|
||||
description: The command, SDK part or app screen you use now, and where it falls short.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: want
|
||||
attributes:
|
||||
label: What you'd like
|
||||
description: An example of how you'd use it helps most.
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,11 @@
|
||||
## What changes
|
||||
|
||||
<!-- What triggered it, what raea did before, and what it does now. Link the issue. -->
|
||||
|
||||
## How it was checked
|
||||
|
||||
<!-- The commands you ran and what they printed. For a picture or sound change: the composition, the frame, your OS and GPU. -->
|
||||
|
||||
## What wasn't checked
|
||||
|
||||
<!-- Platforms or paths you couldn't try, and anything a reviewer should look at closely. -->
|
||||
@@ -118,4 +118,21 @@ jobs:
|
||||
# debug info off: with it the test binaries of the app crates filled 27 GB of a runner's disk (#90)
|
||||
env:
|
||||
CARGO_PROFILE_TEST_DEBUG: "0"
|
||||
run: cargo test --locked -p raea-runtime-plugins -p raea-io-media -p raea-core-fonts -p raea-native -p raea-core-brief -p raea-core-k -p raea-bundle -p raea-app-check -p raea-app-check-flash -p raea-io-ffmpeg -p raea-app-workspace -p raea-app-tools -p raea-app-targets
|
||||
# raea-bundle in a call of its own: Rolldown's crates turn on serde_json's arbitrary_precision, features unify
|
||||
# across one cargo call, and with it on an untagged enum can't read a number (raea-core-brief's make dials failed
|
||||
# here from 11-23 while passing alone). raea itself never links Rolldown: it loads it as a library at run time
|
||||
run: |
|
||||
cargo test --locked -p raea-runtime-plugins -p raea-io-media -p raea-core-fonts -p raea-native -p raea-core-brief -p raea-core-k -p raea-app-check -p raea-app-check-flash -p raea-io-ffmpeg -p raea-app-workspace -p raea-app-tools -p raea-app-targets
|
||||
cargo test --locked -p raea-bundle
|
||||
- name: Windows' and Linux's own (#169)
|
||||
# what a Windows or Linux user meets that no other step ran: QuickJS's Intl (raea-runtime-jsengine's
|
||||
# quickjs_formats_as_javascriptcore_does, on Linux), openh264 at --quality master (raea-io-soft), git found or
|
||||
# fetched (raea-io-assets), and raea's Node core under the agent shell (raea-native's tests/node.rs: Node's names
|
||||
# for the system, Windows' paths); tests/node.rs needs raea-native's modules feature and tests/quality.rs
|
||||
# raea-io-soft's h264
|
||||
env:
|
||||
CARGO_PROFILE_TEST_DEBUG: "0"
|
||||
run: |
|
||||
cargo test --locked -p raea-native --features modules --test node
|
||||
cargo test --locked -p raea-io-soft --features h264
|
||||
cargo test --locked -p raea-runtime-jsengine -p raea-io-assets
|
||||
@@ -2,6 +2,7 @@
|
||||
# Apple Silicon, Linux on x86_64 and Windows on x86_64 are built from the tag on GitHub's runners, packed by
|
||||
# tools/release.sh, checked by tools/release-check.sh, attested (anyone can check a download with
|
||||
# `gh attestation verify raea-VERSION-macos-arm64.tar.gz -R shinyobjectz/raea`) and attached to the tag's release.
|
||||
# Linux also packages and checks an AppImage from the same verified archive (tools/release-appimage.sh).
|
||||
# The skills gate reads the feed app, which is private, so it runs in a maintainer's checkout first
|
||||
# (tools/skills.sh check), and the tag names the commit it passed on; tools/release.sh checks the gate's inputs haven't
|
||||
# changed since (tools/release/skills-passed.sh):
|
||||
@@ -181,6 +182,11 @@ jobs:
|
||||
v=${TAG#v}
|
||||
if [ "$RUNNER_OS" = Linux ]; then xvfb-run -a -s "-screen 0 1280x1024x24" bash tools/release.sh "$v" ship HEAD
|
||||
else bash tools/release.sh "$v" ship HEAD; fi
|
||||
- name: Package and check the Linux AppImage
|
||||
if: runner.os == 'Linux'
|
||||
env:
|
||||
RAEA_CHECK_DIR: ${{ runner.temp }}/appimage-check
|
||||
run: xvfb-run -a -s "-screen 0 1280x1024x24" bash tools/release-appimage.sh "${TAG#v}" "dist/raea-${TAG#v}-linux-x86_64.tar.gz"
|
||||
# a failed check's own files (the app check's frames, every step's log), not the unpacked release
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
@@ -189,6 +195,8 @@ jobs:
|
||||
path: |
|
||||
${{ runner.temp }}/release-check/app
|
||||
${{ runner.temp }}/release-check/**/*.log
|
||||
${{ runner.temp }}/appimage-check/app
|
||||
${{ runner.temp }}/appimage-check/**/*.log
|
||||
retention-days: 7
|
||||
if-no-files-found: ignore
|
||||
# the stripped binaries' symbols (#88), for symbolicating a crash report from this release; never published
|
||||
@@ -202,6 +210,10 @@ jobs:
|
||||
if: ${{ !inputs.dry_run }}
|
||||
with:
|
||||
subject-path: dist/raea-*.tar.gz
|
||||
- uses: actions/attest-build-provenance@v2
|
||||
if: ${{ runner.os == 'Linux' && !inputs.dry_run }}
|
||||
with:
|
||||
subject-path: dist/raea-*.AppImage
|
||||
- name: Attach to the release
|
||||
if: ${{ !inputs.dry_run }}
|
||||
env:
|
||||
@@ -209,19 +221,28 @@ jobs:
|
||||
run: |
|
||||
gh release view "$TAG" >/dev/null 2>&1 || gh release create "$TAG" ${{ contains(env.TAG, '-') && '--prerelease' || '' }} --title "raea ${TAG#v}" --notes "Built by .github/workflows/release.yml; notes follow."
|
||||
gh release upload "$TAG" dist/raea-*.tar.gz dist/raea-*.tar.gz.sha256 --clobber
|
||||
if [ "$RUNNER_OS" = Linux ]; then
|
||||
gh release upload "$TAG" dist/raea-*.AppImage dist/raea-*.AppImage.sha256 --clobber
|
||||
fi
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ inputs.dry_run }}
|
||||
with:
|
||||
name: dry-run-${{ runner.os }}
|
||||
path: dist/raea-*.tar.gz*
|
||||
path: |
|
||||
dist/raea-*.tar.gz*
|
||||
dist/raea-*.AppImage*
|
||||
retention-days: 3
|
||||
compression-level: 0
|
||||
|
||||
# Windows in Git's bash on GitHub's runner, with the Visual Studio Build Tools in its image (their image terms; we
|
||||
# accept no licence and download no Microsoft files). The C runtime is the DLL one (the VC++ redistributable): ort's
|
||||
# prebuilt ONNX Runtime is built against it, so crt-static doesn't link (LNK2019 on __imp_ symbols, 10-29).
|
||||
# Windows in Git's bash on GitHub's runner, with Visual Studio in its image. The C runtime is the DLL one: ONNX
|
||||
# Runtime is built against it (crt-static didn't link: LNK2019 on __imp_ symbols, 10-29), and Microsoft's
|
||||
# onnxruntime.dll imports it too, so the VC++ runtime's DLLs ship beside raea.exe from this image's Visual Studio
|
||||
# (tools/release/win-bundle.sh), as Microsoft documents for app-local deployment.
|
||||
windows:
|
||||
runs-on: ${{ (vars.RELEASE_WINDOWS_RUNNER && fromJSON(vars.RELEASE_WINDOWS_RUNNER)) || 'windows-latest' }}
|
||||
# the signing identity's federated credential trusts this repository's environment "signing" and nothing else
|
||||
# (Azure app raea-release-signing); with no identity set there is no environment, and the zip is unsigned
|
||||
environment: ${{ vars.AZURE_SIGN_CLIENT_ID != '' && 'signing' || '' }}
|
||||
timeout-minutes: 350
|
||||
env:
|
||||
# the compile cache, as build's
|
||||
@@ -333,12 +354,16 @@ jobs:
|
||||
# static runtime ort links by default is built for AVX2 and stopped raea.exe at start on CPUs without it
|
||||
- name: ONNX Runtime (tools/release/onnxruntime.sh)
|
||||
run: bash tools/release/onnxruntime.sh target/dist
|
||||
# which DLLs raea needs from the machine (the CRT's come from the VC++ redistributable)
|
||||
# and what a PC with nothing installed and no downloads needs beside raea.exe: the VC++ runtime (from this
|
||||
# runner's Visual Studio), FFmpeg (raea's LGPL build) and uv, each with its licence
|
||||
- name: The Windows bundle (tools/release/win-bundle.sh)
|
||||
run: bash tools/release/win-bundle.sh target/dist
|
||||
# which DLLs raea needs from the machine (the CRT's now ship beside it: win-bundle.sh)
|
||||
- name: What raea.exe imports
|
||||
run: |
|
||||
{ echo '### what raea.exe, raea_bundle.dll, raea-perceive.exe and onnxruntime.dll import'; echo '```'
|
||||
dumpbin=$(ls "/c/Program Files/Microsoft Visual Studio"/*/*/VC/Tools/MSVC/*/bin/HostX64/x64/dumpbin.exe | head -1)
|
||||
"$dumpbin" -nologo -dependents target/dist/raea.exe target/dist/raea_bundle.dll target/dist/raea-perceive.exe target/dist/onnxruntime.dll | grep -iE '\.dll$|Dump of' | sed 's/^ *//'
|
||||
"$dumpbin" -nologo -dependents target/dist/raea.exe target/dist/raea_bundle.dll target/dist/raea-perceive.exe target/dist/onnxruntime.dll target/dist/ffmpeg.exe | grep -iE '\.dll$|Dump of' | sed 's/^ *//'
|
||||
echo '```'; } | tee -a "$GITHUB_STEP_SUMMARY" || true
|
||||
# release.sh's checks render on Mesa's lavapipe (software Vulkan, MIT; on the runner only, never in the zip): the
|
||||
# runner has no GPU, and WARP, Windows' own software DX12, crashes compiling one of Bevy's compute shaders there
|
||||
@@ -347,9 +372,24 @@ jobs:
|
||||
run: bash tools/release/lavapipe.sh
|
||||
- name: Where the skills gate passed
|
||||
run: bash tools/release/skills-passed.sh "$TAG" "${{ inputs.skills_passed }}"
|
||||
# raea's own Windows programs signed (#221), once the repository has the signing identity: the variables
|
||||
# AZURE_SIGN_CLIENT_ID, AZURE_SIGN_TENANT_ID and AZURE_SIGN_SUBSCRIPTION_ID name an Azure app whose federated
|
||||
# credential trusts this workflow and which holds the Artifact Signing Certificate Profile Signer role on the
|
||||
# account (no secret is stored: the job's own token is exchanged). Without them the zip is unsigned, as before
|
||||
- name: Sign in to Azure for signing
|
||||
if: ${{ vars.AZURE_SIGN_CLIENT_ID != '' }}
|
||||
uses: azure/login@v2
|
||||
with:
|
||||
client-id: ${{ vars.AZURE_SIGN_CLIENT_ID }}
|
||||
tenant-id: ${{ vars.AZURE_SIGN_TENANT_ID }}
|
||||
subscription-id: ${{ vars.AZURE_SIGN_SUBSCRIPTION_ID }}
|
||||
- name: jsign (signs raea's programs)
|
||||
if: ${{ vars.AZURE_SIGN_CLIENT_ID != '' }}
|
||||
run: choco install jsign -y --no-progress
|
||||
- name: Pack and check (tools/release.sh)
|
||||
env:
|
||||
RAEA_CHECK_DIR: ${{ runner.temp }}/release-check
|
||||
RAEA_WIN_SIGN: ${{ vars.AZURE_SIGN_CLIENT_ID != '' && '1' || '' }}
|
||||
run: bash tools/release.sh "${TAG#v}" target/dist HEAD
|
||||
# live play on Windows (PT20 left it unproven): bevy-ts's play cases, `play --offscreen` with an input script and
|
||||
# a snapshot's pixels probed, run by the raea just built; check.sh reads the pixels with ImageMagick, which the
|
||||
@@ -419,6 +459,7 @@ jobs:
|
||||
lfs: false
|
||||
sparse-checkout: |
|
||||
tools/release-check.sh
|
||||
tools/release/win-bundle.files
|
||||
tools/release/lavapipe.sh
|
||||
sparse-checkout-cone-mode: false
|
||||
path: check
|
||||
@@ -432,7 +473,8 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
v=${TAG#v}
|
||||
cp check/tools/release-check.sh "$RUNNER_TEMP/"
|
||||
# and the list of what bin\ must carry, where release-check.sh looks for it (release/ beside it)
|
||||
cp check/tools/release-check.sh "$RUNNER_TEMP/" && mkdir -p "$RUNNER_TEMP/release" && cp check/tools/release/win-bundle.files "$RUNNER_TEMP/release/"
|
||||
rm -rf check
|
||||
cd "$RUNNER_TEMP/zip"
|
||||
sha256sum -c "raea-$v-windows-x86_64.zip.sha256"
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# FFmpeg for Windows as raea ships it (tools/release/ffmpeg-win.sh): built on Linux with mingw-w64 and published once
|
||||
# as the prerelease tools-ffmpeg-<version>-lgpl, with FFmpeg's source tarball, its signature and the script, which are
|
||||
# its complete source (LGPL 2.1 or later). io/assets/src/setup.rs pins the zip by its
|
||||
# sha256, so a published zip is never replaced: a run whose release already holds one only builds it and says
|
||||
# whether its own sha256 differs.
|
||||
name: tools-ffmpeg
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths: [tools/release/ffmpeg-win.sh, .github/workflows/tools-ffmpeg.yml]
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: false
|
||||
# the x86_64 cross compiler only, and non-interactive: an install that asks (needrestart, debconf) waits forever.
|
||||
# The runner's own EC2 mirror has trickled (35 MB in 11 minutes, 11-19), so apt reads Ubuntu's archive first
|
||||
# and Azure's mirror after it, gives up on a stalled request and retries.
|
||||
- name: mingw-w64
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
NEEDRESTART_MODE: a
|
||||
run: |
|
||||
printf 'http://archive.ubuntu.com/ubuntu/\tpriority:1\nhttp://azure.archive.ubuntu.com/ubuntu/\tpriority:2\n' | sudo tee /etc/apt/apt-mirrors.txt
|
||||
o="-o Acquire::Retries=5 -o Acquire::http::Timeout=30"
|
||||
sudo -E apt-get $o update -q
|
||||
sudo -E apt-get $o install -y -q --no-install-recommends gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 libz-mingw-w64-dev nasm make pkg-config xz-utils zip
|
||||
timeout-minutes: 25
|
||||
- name: build
|
||||
run: bash tools/release/ffmpeg-win.sh out
|
||||
- name: publish (once)
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
v=$(sed -n 's/^v=//p' tools/release/ffmpeg-win.sh)
|
||||
tag=tools-ffmpeg-$v-lgpl; zip=ffmpeg-$v-lgpl-win64.zip
|
||||
if gh release view "$tag" --json assets -q '.assets[].name' 2>/dev/null | grep -qx "$zip"; then
|
||||
echo "$tag already has $zip (never replaced); this run's: $(cat out/$zip.sha256)"; exit 0
|
||||
fi
|
||||
curl -fsSL -o "out/ffmpeg-$v.tar.xz.asc" "https://ffmpeg.org/releases/ffmpeg-$v.tar.xz.asc"
|
||||
cp tools/release/ffmpeg-win.sh out/
|
||||
gh release view "$tag" >/dev/null 2>&1 || gh release create "$tag" --prerelease --title "FFmpeg $v for Windows (LGPL), as raea ships it" \
|
||||
--notes "FFmpeg $v cross-built for Windows x64 by tools/release/ffmpeg-win.sh: static, FFmpeg's own code, zlib and libvpx's decoders (BSD), LGPL 2.1 or later; its H.264 encoder is Windows' own (Media Foundation). Its complete source is ffmpeg-$v.tar.xz (with FFmpeg's signature), the libvpx tarball and ffmpeg-win.sh, attached here. raea ships it beside raea.exe on Windows and fetches it where it isn't."
|
||||
gh release upload "$tag" "out/$zip" "out/$zip.sha256" "out/ffmpeg-$v.tar.xz" "out/ffmpeg-$v.tar.xz.asc" out/libvpx-*.tar.gz out/ffmpeg-win.sh
|
||||
@@ -0,0 +1,34 @@
|
||||
# The complete corresponding source of the Git for Windows the Windows app ships (tools/release/git-sources.sh),
|
||||
# published once as the prerelease tools-git-<tag>-sources, which the app's git\SOURCE.txt names: GPLv2 section 3
|
||||
# asks whoever distributes Git to make it available, and dugite-native's own repository isn't all of it (Git for
|
||||
# Windows' MSYS2 runtime, bash, curl and the rest are built from their own source packages). A run whose release
|
||||
# already holds the archive changes nothing.
|
||||
name: tools-git-sources
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths: [tools/release/git-sources.sh, .github/workflows/tools-git-sources.yml]
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
sources:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: false
|
||||
- name: publish (once)
|
||||
run: |
|
||||
t=$(sed -n 's/^tag=//p' tools/release/git-sources.sh)
|
||||
tag=tools-git-$t-sources; tar=git-for-windows-$t-sources.tar
|
||||
if gh release view "$tag" --json assets -q '.assets[].name' 2>/dev/null | grep -qx "$tar"; then
|
||||
echo "$tag already has $tar"; exit 0
|
||||
fi
|
||||
bash tools/release/git-sources.sh out
|
||||
cp tools/release/git-sources.sh out/
|
||||
gh release view "$tag" >/dev/null 2>&1 || gh release create "$tag" --prerelease --title "Git for Windows ($t) sources, as raea's Windows app ships it" \
|
||||
--notes "The complete corresponding source of the Git for Windows (dugite-native $t) that raea's Windows app ships in its git folder: each package of its etc/package-versions.txt as the source package it was built from, from Git for Windows' pacman repository or MSYS2's source mirror (SOURCES.tsv inside says which), collected by git-sources.sh, attached here. raea runs Git as a separate program."
|
||||
gh release upload "$tag" "out/$tar" "out/$tar.sha256" out/git-sources.sh
|
||||
@@ -0,0 +1,175 @@
|
||||
# raea built natively for Windows on ARM (#82: a Snapdragon X runs the x64 build under emulation, and asked for its
|
||||
# own). GitHub's windows-11-arm runner builds what release.yml's windows job builds, for aarch64-pc-windows-msvc, runs
|
||||
# `raea --version`, packs and checks raea-VERSION-windows-arm64.zip with tools/release.sh (RAEA_WIN_ARCH=arm64)
|
||||
# without drawing (RAEA_CHECK_NO_GPU=1: WARP segfaults in Bevy's compute shaders here as on x64, and Mesa's lavapipe has
|
||||
# no ARM64 build; a Snapdragon PC is what draws, #82), and on a v* tag attaches it to that
|
||||
# release. It runs beside release.yml, not in it, so a release never waits on or fails with the ARM64 build; a
|
||||
# promoted release (release-go.sh) builds it again from the tag. install.ps1 takes it on an ARM64 PC when it's there.
|
||||
name: windows-arm
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: "commit, branch or tag to build"
|
||||
required: false
|
||||
version:
|
||||
description: "the version the zip is named for (raea-VERSION-windows-arm64.zip)"
|
||||
required: false
|
||||
push:
|
||||
branches: [windows-arm64]
|
||||
tags: ["v*"]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-11-arm
|
||||
timeout-minutes: 350
|
||||
env:
|
||||
# the release builds' compile cache (tools/release/compile-cache.sh), under this OS and architecture's own prefix
|
||||
RELEASE_CACHE_ENDPOINT: ${{ secrets.RELEASE_CACHE_ENDPOINT }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.RELEASE_CACHE_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.RELEASE_CACHE_SECRET }}
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
submodules: true
|
||||
lfs: false
|
||||
- name: Toolchain (rust-toolchain.toml's pin)
|
||||
run: |
|
||||
if ! command -v rustup >/dev/null; then
|
||||
curl -fsSL --retry 3 -o "$RUNNER_TEMP/rustup-init.exe" https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
|
||||
"$RUNNER_TEMP/rustup-init.exe" -y --default-toolchain none --profile minimal
|
||||
echo "$USERPROFILE/.cargo/bin" >> "$GITHUB_PATH"
|
||||
export PATH="$USERPROFILE/.cargo/bin:$PATH"
|
||||
fi
|
||||
rustup show active-toolchain || rustup toolchain install
|
||||
rustc -vV
|
||||
# ring builds its aarch64 assembly with clang (and only clang) on Windows
|
||||
- name: clang (ring's assembly)
|
||||
run: |
|
||||
if ! command -v clang >/dev/null; then
|
||||
for d in "/c/Program Files/LLVM/bin" "/c/Program Files/Microsoft Visual Studio"/*/*/VC/Tools/Llvm/ARM64/bin; do
|
||||
[ -x "$d/clang.exe" ] && { echo "$d" >> "$GITHUB_PATH"; export PATH="$d:$PATH"; break; }
|
||||
done
|
||||
fi
|
||||
command -v clang >/dev/null || { winget install -e --id LLVM.LLVM --accept-source-agreements --accept-package-agreements --silent; echo "/c/Program Files/LLVM/bin" >> "$GITHUB_PATH"; export PATH="/c/Program Files/LLVM/bin:$PATH"; }
|
||||
clang --version
|
||||
- name: jq that writes LF
|
||||
run: |
|
||||
mkdir -p "$RUNNER_TEMP/jq"
|
||||
printf '#!/bin/bash\nexec "%s" -b "$@"\n' "$(command -v jq)" > "$RUNNER_TEMP/jq/jq"
|
||||
chmod +x "$RUNNER_TEMP/jq/jq"
|
||||
echo "$RUNNER_TEMP/jq" >> "$GITHUB_PATH"
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: 1.4.2
|
||||
- name: The runtime's packages
|
||||
run: for d in sdk/react/js sdk/react/tw; do (cd "$d" && bun install --frozen-lockfile); done
|
||||
# (an sccache the action can't fetch for ARM64 Windows leaves the build uncached, as compile-cache.sh does)
|
||||
- name: Compile cache (sccache, as release.yml's)
|
||||
if: env.AWS_ACCESS_KEY_ID != ''
|
||||
continue-on-error: true
|
||||
uses: mozilla-actions/[email protected]
|
||||
- name: Use the compile cache
|
||||
if: env.AWS_ACCESS_KEY_ID != ''
|
||||
run: bash tools/release/compile-cache.sh
|
||||
- name: Build
|
||||
run: |
|
||||
feat=$(bash tools/bevy-plugins.sh features sdk/raea/bench/bevy-plugins)
|
||||
t() { s=$SECONDS; "$@"; echo "::notice::Windows ARM64 $(( (SECONDS - s) / 60 )) min: ${*:7}"; }
|
||||
t cargo build --profile dist --locked -p raea-cli --bin raea --no-default-features --features "$feat"
|
||||
t cargo build --profile dist --locked -p raea-rune-host
|
||||
t cargo build --profile dist --locked -p raea-page-host --features window
|
||||
t cargo build --profile dist --locked -p raea-perceive
|
||||
- name: What raea.exe is and imports
|
||||
run: |
|
||||
file target/dist/raea.exe || true
|
||||
dumpbin=$(ls "/c/Program Files/Microsoft Visual Studio"/*/*/VC/Tools/MSVC/*/bin/Hostarm64/arm64/dumpbin.exe 2>/dev/null | head -1)
|
||||
[ -n "$dumpbin" ] && "$dumpbin" -nologo -headers -dependents target/dist/raea.exe | grep -iE 'machine|\.dll$' | sed 's/^ *//' | tee -a "$GITHUB_STEP_SUMMARY" || true
|
||||
target/dist/raea.exe --version | tee -a "$GITHUB_STEP_SUMMARY"
|
||||
- name: Models (pinned by URL and sha256 in tools/release/models.tsv)
|
||||
run: |
|
||||
while IFS=$'\t' read -r path url sha; do
|
||||
case $path in ''|'#'*) continue ;; esac
|
||||
mkdir -p "$HOME/.local/share/raea-models/$(dirname "$path")"
|
||||
curl -fsSL "$url" -o "$HOME/.local/share/raea-models/$path"
|
||||
echo "$sha $HOME/.local/share/raea-models/$path" | sha256sum -c -
|
||||
done < <(tr -d '\r' < tools/release/models.tsv)
|
||||
# bin\ as release.yml's windows job fills it, with the ARM64 runtime, uv and DXC (RAEA_WIN_ARCH=arm64), then the
|
||||
# zip packed and checked by tools/release.sh as raea-VERSION-windows-arm64.zip. The skills gate is this commit's
|
||||
# (public raea has no feed app; cli.md is still checked against this build's help); nothing is drawn
|
||||
- name: Pack and check (tools/release.sh)
|
||||
env:
|
||||
RAEA_WIN_ARCH: arm64
|
||||
RAEA_CHECK_DIR: ${{ runner.temp }}/release-check
|
||||
RAEA_CHECK_NO_GPU: "1"
|
||||
run: |
|
||||
bash tools/release/onnxruntime.sh target/dist
|
||||
bash tools/release/win-bundle.sh target/dist
|
||||
v="${{ inputs.version }}"
|
||||
case $GITHUB_REF in
|
||||
refs/tags/v*)
|
||||
v=${v:-${GITHUB_REF_NAME#v}}
|
||||
# where the skills gate passed, as release.yml reads it (the tag's skills-passed line)
|
||||
eval "$(GITHUB_ENV= bash tools/release/skills-passed.sh "$GITHUB_REF_NAME" | grep '^RAEA_SKILLS_PASSED=')" ;;
|
||||
*) RAEA_SKILLS_PASSED=$(git rev-parse HEAD) ;;
|
||||
esac
|
||||
export RAEA_SKILLS_PASSED
|
||||
bash tools/release.sh "${v:-0.0.0-arm64}" target/dist HEAD
|
||||
# on a v* tag, beside release.yml's archives (the release made here if release.yml hasn't yet)
|
||||
- name: Attach to the release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
pre=; case $GITHUB_REF_NAME in *-*) pre=--prerelease ;; esac
|
||||
gh release view "$GITHUB_REF_NAME" -R "$GITHUB_REPOSITORY" >/dev/null 2>&1 ||
|
||||
gh release create "$GITHUB_REF_NAME" -R "$GITHUB_REPOSITORY" $pre --title "raea ${GITHUB_REF_NAME#v}" --notes "Built by .github/workflows/release.yml; notes follow." ||
|
||||
gh release view "$GITHUB_REF_NAME" -R "$GITHUB_REPOSITORY" >/dev/null
|
||||
gh release upload "$GITHUB_REF_NAME" -R "$GITHUB_REPOSITORY" dist/raea-*-windows-arm64.zip dist/raea-*-windows-arm64.zip.sha256 --clobber
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: windows-arm64-zip
|
||||
path: dist/raea-*-windows-arm64.zip*
|
||||
retention-days: 7
|
||||
compression-level: 0
|
||||
if-no-files-found: ignore
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: windows-arm64-bins
|
||||
path: |
|
||||
target/dist/raea.exe
|
||||
target/dist/raea_bundle.dll
|
||||
target/dist/raea-rune-host.exe
|
||||
target/dist/raea-page-host.exe
|
||||
target/dist/raea-perceive.exe
|
||||
retention-days: 7
|
||||
if-no-files-found: ignore
|
||||
|
||||
# vendor/metis-sys's header change reaches release.yml's x64 build too (windows-latest's Visual Studio): metis-sys
|
||||
# alone, in a scratch crate, compiled there
|
||||
metis-x64:
|
||||
runs-on: windows-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
sparse-checkout: vendor/metis-sys
|
||||
- name: metis-sys on x64 MSVC
|
||||
run: |
|
||||
c="$RUNNER_TEMP/metis-x64"; mkdir -p "$c/src" && : > "$c/src/lib.rs"
|
||||
printf '[package]\nname = "metis-x64"\nversion = "0.0.0"\nedition = "2021"\n[dependencies]\nmetis-sys = { path = "%s" }\n[workspace]\n' "$(cygpath -m "$GITHUB_WORKSPACE/vendor/metis-sys")" > "$c/Cargo.toml"
|
||||
cl 2>&1 | head -1 || true
|
||||
cd "$c" && cargo build
|
||||
@@ -104,5 +104,8 @@ sdk/raea/.scratch-*/
|
||||
|
||||
# the Tripo CLI writes its last task id into the directory it runs in
|
||||
.tripo/
|
||||
# examples/materials/wear: its house is made by make-house.ts (media/) and baked at render time (assets/wear/)
|
||||
/examples/materials/wear/media/
|
||||
/examples/materials/wear/assets/
|
||||
# tools/bevy-parity links each example folder's assets/ to Bevy's checkout at run time (an absolute, per-machine path)
|
||||
/sdk/raea/bench/bevy-parity/**/assets
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
# gitleaks: the default rules, minus raea's asset ledgers, whose "key" field is a content hash of the made file
|
||||
# (prompt, seed and model), not a credential; and Bevy's batching code, whose `prev_key = item.sort_key.0` is a
|
||||
# render-phase sort key.
|
||||
# render-phase sort key and whose `Opaque3dBinKey` and `Wireframe3dBinKey` (vendor/bevy_pbr) are bin keys' type names.
|
||||
[extend]
|
||||
useDefault = true
|
||||
|
||||
[allowlist]
|
||||
description = "asset ledgers and Bevy sort keys"
|
||||
description = "asset ledgers and Bevy sort and bin keys"
|
||||
paths = ['''(^|/)assets/made\.jsonl$''']
|
||||
regexTarget = "line"
|
||||
regexes = ['''prev_key = item\.sort_key''']
|
||||
regexes = ['''prev_key = item\.sort_key''', '''(bin_key|BinKey) = [A-Za-z0-9]+BinKey\b''']
|
||||
@@ -0,0 +1,55 @@
|
||||
# Code of conduct
|
||||
|
||||
raea's issues, pull requests, reviews and other project-managed community spaces
|
||||
should let people discuss and improve the work without harassment. This applies
|
||||
to maintainers, contributors and people using automated or AI-assisted tools.
|
||||
Participants remain responsible for the material they submit through those tools.
|
||||
|
||||
## Expected behavior
|
||||
|
||||
- Discuss the code, evidence and ideas respectfully. Technical disagreement is
|
||||
welcome; personal attacks and assumptions about another person's motives are not.
|
||||
- Give actionable feedback, accept corrections and respect requests to stop a
|
||||
conversation or move it out of a thread.
|
||||
- Make room for different experience levels, backgrounds and communication styles.
|
||||
- Respect privacy. Share only logs, screenshots and other information you have
|
||||
permission to publish, with credentials and personal information removed.
|
||||
|
||||
Harassment, discriminatory insults, threats, sexual harassment, unwanted repeated
|
||||
contact, disclosure of private information, deliberate disruption and retaliation
|
||||
against someone raising a concern are unacceptable.
|
||||
|
||||
## Reporting a concern
|
||||
|
||||
For content on GitHub, use the content menu's **Report content** action where it
|
||||
is available. Choose **Report to repository admins** if GitHub offers it.
|
||||
Maintainer reporting depends on repository settings and the reporter's access.
|
||||
For abuse covered by GitHub's rules, use **Report abuse to GitHub Support** or
|
||||
[GitHub's abuse-reporting route](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam).
|
||||
GitHub handles those reports under its own policies; it is not the project's
|
||||
appeal body for every technical or moderation disagreement.
|
||||
|
||||
A separate private maintainer inbox for conduct reports has not been designated
|
||||
in this repository. If GitHub's maintainer-reporting option is unavailable, ask
|
||||
for a private contact without posting the incident, personal information or
|
||||
accusations in a public issue. Maintainers can document an additional contact
|
||||
after confirming who will handle it. Use [the security policy](SECURITY.md) for vulnerabilities,
|
||||
not as a general conduct-report channel.
|
||||
|
||||
Include links, the relevant context and your preferred way to be contacted when
|
||||
reporting privately. Do not retaliate, publicly investigate the reporter or
|
||||
pressure someone to disclose an incident.
|
||||
|
||||
## Moderation
|
||||
|
||||
Repository maintainers may clarify expectations, ask participants to change
|
||||
behavior, close or remove disruptive content, restrict interactions, or block
|
||||
continued participation as appropriate to severity and repetition. A technical
|
||||
disagreement or a rejected contribution alone is not misconduct.
|
||||
|
||||
Maintainers should consider context and available evidence, protect sensitive
|
||||
information, explain decisions when doing so does not compromise privacy, and
|
||||
allow a participant to provide relevant additional context privately through the
|
||||
same reporting route. A maintainer involved in a concern should seek an uninvolved
|
||||
reviewer where one is available. This policy does not promise a response deadline
|
||||
or confidentiality beyond what the chosen reporting service and process provide.
|
||||
Generated
+420
-172
File diff suppressed because it is too large.
Load diff
+38
-1
@@ -4,7 +4,10 @@
|
||||
resolver = "2"
|
||||
members = [
|
||||
"core/animate",
|
||||
"core/ask",
|
||||
"core/brief",
|
||||
"core/zfight",
|
||||
"core/modelbox",
|
||||
"core/facts",
|
||||
"core/ease",
|
||||
"core/fonts",
|
||||
@@ -44,6 +47,7 @@ members = [
|
||||
"engine/native",
|
||||
"io/npm",
|
||||
"engine/page",
|
||||
"engine/page/ax",
|
||||
"engine/page/host",
|
||||
"engine/rune",
|
||||
"engine/rune/page",
|
||||
@@ -61,6 +65,7 @@ members = [
|
||||
"io/codec",
|
||||
"io/media",
|
||||
"io/assets",
|
||||
"io/clef",
|
||||
"io/gen",
|
||||
"io/gen-comfy",
|
||||
"io/gen-core",
|
||||
@@ -80,6 +85,7 @@ members = [
|
||||
"systems/k",
|
||||
"systems/tone",
|
||||
"systems/mix",
|
||||
"systems/mix/level",
|
||||
"systems/ml",
|
||||
"systems/mlx",
|
||||
"systems/kimodo",
|
||||
@@ -88,6 +94,7 @@ members = [
|
||||
"systems/vision",
|
||||
"systems/columns",
|
||||
"systems/index",
|
||||
"systems/fixes",
|
||||
"systems/fingerprint",
|
||||
"systems/fingerprint-use",
|
||||
"systems/fingerprint-things",
|
||||
@@ -102,17 +109,18 @@ members = [
|
||||
"systems/canvas",
|
||||
"systems/tweak",
|
||||
"systems/filters",
|
||||
"systems/wear",
|
||||
"systems/weathering",
|
||||
"systems/runoff",
|
||||
"systems/touch",
|
||||
"systems/exposure",
|
||||
"systems/damage",
|
||||
"systems/glb",
|
||||
"systems/procmat",
|
||||
"systems/page",
|
||||
"systems/page-net",
|
||||
"systems/page-ops",
|
||||
"systems/frame",
|
||||
"systems/engine-shaders",
|
||||
"systems/shots",
|
||||
"systems/hold",
|
||||
"systems/body",
|
||||
@@ -120,11 +128,14 @@ members = [
|
||||
"systems/layers",
|
||||
"systems/splat",
|
||||
"systems/sprite",
|
||||
"systems/stage",
|
||||
"systems/rt",
|
||||
"systems/gi",
|
||||
"systems/text3d",
|
||||
"runtime/gpuframe",
|
||||
"runtime/scene3d",
|
||||
"systems/copies",
|
||||
"systems/share",
|
||||
"systems/screen",
|
||||
"systems/matchmove",
|
||||
"systems/grid",
|
||||
@@ -158,14 +169,17 @@ members = [
|
||||
"tools/perceive",
|
||||
"engine/render",
|
||||
"engine/render/raytrace",
|
||||
"engine/render/denoise/bench",
|
||||
"engine/seedling",
|
||||
"engine/web",
|
||||
"runtime/react",
|
||||
"runtime/track",
|
||||
"runtime/pagestore",
|
||||
"runtime/cssurls",
|
||||
"runtime/pid",
|
||||
"bench/bridge",
|
||||
"bench/bevy-parity",
|
||||
"bench/lightbench",
|
||||
"bench/bridge/swatch",
|
||||
"bench/rerender/ios",
|
||||
"core/alloc",
|
||||
@@ -178,6 +192,10 @@ members = [
|
||||
"runtime/wear",
|
||||
"runtime/canvas",
|
||||
"runtime/export",
|
||||
"runtime/endchecks",
|
||||
"runtime/lod-plan",
|
||||
"runtime/cut-plan",
|
||||
"runtime/goal-plan",
|
||||
"runtime/live",
|
||||
"runtime/page",
|
||||
"runtime/appscreen",
|
||||
@@ -186,10 +204,18 @@ members = [
|
||||
"runtime/scene",
|
||||
"runtime/scene2d",
|
||||
"runtime/shared",
|
||||
"apps/ask",
|
||||
"apps/lightbake",
|
||||
"systems/lightbake",
|
||||
"systems/atlas",
|
||||
"apps/double",
|
||||
"apps/check",
|
||||
"apps/check/cause",
|
||||
"apps/check/flash",
|
||||
"apps/check/inbox",
|
||||
"apps/check/make",
|
||||
"apps/check/read",
|
||||
"apps/check/text",
|
||||
"apps/direction",
|
||||
"apps/notes",
|
||||
"apps/fingerprint",
|
||||
@@ -202,7 +228,10 @@ members = [
|
||||
"apps/engines",
|
||||
"apps/interchange",
|
||||
"apps/judge",
|
||||
"apps/make",
|
||||
"apps/solid",
|
||||
"apps/scene",
|
||||
"apps/voice",
|
||||
"apps/media",
|
||||
"apps/targets",
|
||||
"apps/game",
|
||||
@@ -317,10 +346,16 @@ split-debuginfo = "packed"
|
||||
[patch.crates-io]
|
||||
# the MP4 muxer, vendored
|
||||
muxide = { path = "vendor/muxide" }
|
||||
# metis-sys 0.3.2 (bevy_pbr's meshlets) with GKlib's own stdint.h and inttypes.h stand-ins used only before Visual
|
||||
# Studio 2013: Visual Studio 18's stdint.h types int_fast16_t differently, and every C file failed (raea#82; the change
|
||||
# is marked "raea:" in vendor/GKlib/gk_arch.h). Its test graphs, manual and programs are left out
|
||||
metis-sys = { path = "vendor/metis-sys" }
|
||||
# usvg 0.48.1 spacing a chunk's last letter as Chrome does (changes marked "raea:", docs/layout-reads.feature LR10)
|
||||
usvg = { path = "vendor/usvg" }
|
||||
# bevy_seedling 0.8.0 without its cpal 0.18 paths, ported to Bevy 0.20 (changes marked "raea:")
|
||||
bevy_seedling = { path = "vendor/bevy_seedling" }
|
||||
# bevy_rich_text3d 0.8.0 whose glyph that grows the atlas is drawn whole (changes marked "raea:", docs/stage-guards.feature SG3)
|
||||
bevy_rich_text3d = { path = "vendor/bevy_rich_text3d" }
|
||||
# bevy_text 0.20.0 on parley 0.12, so one parley builds (changes marked "raea:", docs/bevy-upgrade.md)
|
||||
bevy_text = { path = "vendor/bevy_text" }
|
||||
# bevy_ui 0.20.0 on Taffy 0.15, Blitz's, so one Taffy builds (changes marked "raea:", docs/bevy-upgrade.md)
|
||||
@@ -329,6 +364,8 @@ bevy_ui = { path = "vendor/bevy_ui" }
|
||||
# uv_transform, and a panorama's sun sampled as a light rather than found by reflection rays alone (changes marked
|
||||
# "raea:", docs/raytracing.feature RT6). Back to upstream once Solari has these.
|
||||
bevy_solari = { path = "vendor/bevy_solari" }
|
||||
# the sun's far shadow map (raea-sys-rt far.rs) bound in Bevy's mesh view group (docs/bevy-upgrade.md, docs/realism.feature LT21)
|
||||
bevy_pbr = { path = "vendor/bevy_pbr" }
|
||||
# bevy_ui_widgets 0.20.0 on parley 0.12, Blitz's (docs/blitz-bevy.feature B0a)
|
||||
bevy_ui_widgets = { path = "vendor/bevy_ui_widgets" }
|
||||
# blitz-paint 0.3.0-beta.4 with angled gradients in tiles laid out around the tile, many-tile gradient layers drawn
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2020 Dario Nieuwenhuis
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,202 +0,0 @@
|
||||
SPDX-License-Identifier: ISC AND (Apache-2.0 OR ISC)
|
||||
|
||||
|
||||
Apache 2.0 license
|
||||
-------------------------------------
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
ISC license
|
||||
-------------------------------------
|
||||
|
||||
|
||||
Copyright Amazon.com, Inc. or its affiliates.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
@@ -1,316 +0,0 @@
|
||||
AWS Libcrypto (AWS-LC)
|
||||
|
||||
AWS-LC is a fork of BoringSSL, which is itself a fork of OpenSSL.
|
||||
Content from these and other sources retains their original licensing,
|
||||
as described below. New files from AWS-LC are made available under the Apache-2.0 license OR the ISC
|
||||
license. These licenses are reproduced at the bottom of this file.
|
||||
|
||||
```
|
||||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
SPDX-License-Identifier: Apache-2.0 OR ISC
|
||||
```
|
||||
|
||||
|
||||
================================================================================
|
||||
BoringSSL
|
||||
================================================================================
|
||||
|
||||
BoringSSL is a Google-maintained fork of OpenSSL. Historically, code
|
||||
authored by Google for BoringSSL was licensed under the ISC License.
|
||||
BoringSSL has since relicensed upstream to Apache License 2.0. Existing
|
||||
AWS-LC code originating from BoringSSL retains its ISC license, while
|
||||
newer code taken from BoringSSL is licensed under Apache License 2.0.
|
||||
|
||||
```
|
||||
Copyright (c) 2014-2024 Google Inc.
|
||||
SPDX-License-Identifier: ISC
|
||||
```
|
||||
|
||||
Additional individual contributions to BoringSSL-derived code are
|
||||
covered under the ISC license:
|
||||
|
||||
- Brian Smith (Copyright 2016)
|
||||
- Robert Nagy (Copyright 2022)
|
||||
- Arm Ltd (Copyright 2020)
|
||||
|
||||
```
|
||||
Copyright (c) 2025-2026 Google Inc.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
```
|
||||
|
||||
================================================================================
|
||||
OpenSSL
|
||||
================================================================================
|
||||
|
||||
Code derived from the OpenSSL project is licensed under the
|
||||
Apache License, Version 2.0.
|
||||
|
||||
```
|
||||
Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
```
|
||||
|
||||
Some OpenSSL-derived files also carry the original SSLeay copyright:
|
||||
|
||||
```
|
||||
Copyright (c) 1995-1998 Eric Young ([email protected]). All rights reserved.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
```
|
||||
|
||||
Portions of OpenSSL-derived code include contributions from:
|
||||
|
||||
- Sun Microsystems, Inc. (Copyright 2002)
|
||||
- Nokia (Copyright 2005)
|
||||
- Intel Corporation (Copyright 2012-2021)
|
||||
|
||||
These contributions are covered under the Apache-2.0 license.
|
||||
|
||||
================================================================================
|
||||
mlkem-native
|
||||
================================================================================
|
||||
|
||||
Code from the mlkem-native project is licensed under Apache License 2.0 or MIT or ISC.
|
||||
|
||||
```
|
||||
Copyright (c) The mlkem-native project authors.
|
||||
SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
|
||||
```
|
||||
|
||||
================================================================================
|
||||
mldsa-native
|
||||
================================================================================
|
||||
|
||||
Code from the mldsa-native project is licensed under Apache License 2.0 or MIT or ISC
|
||||
|
||||
```
|
||||
Copyright (c) The mldsa-native project authors.
|
||||
SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
|
||||
```
|
||||
|
||||
================================================================================
|
||||
Third-Party Libraries (compiled into libcrypto/libssl)
|
||||
================================================================================
|
||||
|
||||
Fiat Cryptography
|
||||
-----------------
|
||||
Synthesizing Correct-by-Construction Code for Cryptographic Primitives.
|
||||
See third_party/fiat/LICENSE.
|
||||
|
||||
```
|
||||
Copyright (c) 2015-2020 the fiat-crypto authors.
|
||||
SPDX-License-Identifier: MIT
|
||||
```
|
||||
|
||||
s2n-bignum
|
||||
----------
|
||||
Integer arithmetic routines for cryptography.
|
||||
See third_party/s2n-bignum/s2n-bignum-imported/LICENSE.
|
||||
|
||||
```
|
||||
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT-0
|
||||
```
|
||||
|
||||
Note: ML-KEM/SHA3 code within s2n-bignum is licensed as
|
||||
Apache-2.0 OR ISC OR MIT (with attribution), sourced from the
|
||||
mlkem-native project.
|
||||
|
||||
Jitter Entropy RNG
|
||||
-------------------
|
||||
CPU Jitter Random Number Generator Library.
|
||||
See third_party/jitterentropy/jitterentropy-library/LICENSE.
|
||||
|
||||
The Jitter Entropy library is dual-licensed under a BSD-style license
|
||||
and the GNU General Public License Version 2. Amazon expressly elects
|
||||
to distribute the package under the 3-Clause BSD License and NOT under
|
||||
GNU General Public License Version 2.
|
||||
|
||||
```
|
||||
Copyright (C) 2017 - 2025, Stephan Mueller <[email protected]>.
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
```
|
||||
|
||||
Keccak / AES Reference Implementations
|
||||
---------------------------------------
|
||||
Public domain (CC0) contributions.
|
||||
https://creativecommons.org/public-domain/cc0
|
||||
|
||||
Code from sources and by authors listed in comments on top of the respective files.
|
||||
|
||||
|
||||
================================================================================
|
||||
Third-Party Libraries (NOT compiled into libcrypto/libssl)
|
||||
================================================================================
|
||||
|
||||
The following are used for testing and build tooling only. Distributing
|
||||
code linked against AWS-LC (libcrypto/libssl) does NOT trigger these
|
||||
license obligations.
|
||||
|
||||
Google Test
|
||||
-----------
|
||||
See third_party/googletest/LICENSE.
|
||||
|
||||
```
|
||||
Copyright 2008 Google Inc.
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
```
|
||||
|
||||
Go Standard Library
|
||||
-------------------
|
||||
Code in ssl/test/runner/ is derived from the Go standard library.
|
||||
|
||||
```
|
||||
Copyright (c) The Go Authors. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
```
|
||||
|
||||
Wycheproof Test Vectors
|
||||
------------------------
|
||||
Project Wycheproof is a community managed repository of test vectors that can be used by cryptography library
|
||||
developers to test against known attacks, specification inconsistencies, and other various implementation bugs.
|
||||
|
||||
See third_party/wycheproof_testvectors/LICENSE.
|
||||
|
||||
```
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
```
|
||||
|
||||
|
||||
================================================================================
|
||||
Full License Texts
|
||||
================================================================================
|
||||
|
||||
Apache License 2.0
|
||||
------------------
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
ISC License
|
||||
-----------
|
||||
Permission to use, copy, modify, and/or distribute this software for
|
||||
any purpose with or without fee is hereby granted, provided that the
|
||||
above copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
MIT License
|
||||
-----------
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
BSD 3-Clause License
|
||||
--------------------
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
MIT No Attribution (MIT-0)
|
||||
--------------------------
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,37 +0,0 @@
|
||||
ctt 0.5.0 ships no licence file of its own. Its Cargo.toml declares MIT OR Apache-2.0 OR Zlib, by The ctt developers.
|
||||
|
||||
---- Apache-2.0: the text is LICENSES/texts/Apache-2.0.txt ----
|
||||
|
||||
---- MIT ----
|
||||
|
||||
Copyright (c) The ctt developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---- Zlib ----
|
||||
|
||||
Copyright (c) The ctt developers
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
|
||||
liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter
|
||||
it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If
|
||||
you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not
|
||||
required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original
|
||||
software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
@@ -1,178 +0,0 @@
|
||||
Copyright (C) 2018-2021 Binomial LLC
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,20 +0,0 @@
|
||||
ctt-bc7enc-rdo-prebuilt 0.5.0 ships no licence file of its own. Its Cargo.toml declares (MIT OR Apache-2.0) AND Apache-2.0, by The ctt developers, Rich Geldreich <[email protected]>.
|
||||
|
||||
---- Apache-2.0: the text is LICENSES/texts/Apache-2.0.txt ----
|
||||
|
||||
---- MIT ----
|
||||
|
||||
Copyright (c) The ctt developers, Rich Geldreich <[email protected]>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files(the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions :
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -1,26 +0,0 @@
|
||||
etcpak, an extremely fast ETC compression utility (https://github.com/wolfpld/etcpak)
|
||||
|
||||
Copyright (c) 2013-2026, Bartosz Taudul <wolf@nereid.pl>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the <organization> nor the
|
||||
names of its contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,176 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright 2017 Intel Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,20 +0,0 @@
|
||||
ctt-intel-texture-compressor-prebuilt 0.5.0 ships no licence file of its own. Its Cargo.toml declares (MIT OR Apache-2.0) AND MIT, by The ctt developers, Traverse Research <[email protected]>, Graham Wihlidal <[email protected]>, Intel Corporation.
|
||||
|
||||
---- Apache-2.0: the text is LICENSES/texts/Apache-2.0.txt ----
|
||||
|
||||
---- MIT ----
|
||||
|
||||
Copyright (c) The ctt developers, Traverse Research <[email protected]>, Graham Wihlidal <[email protected]>, Intel Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2020-2025 The RustCrypto Project Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Kirill Kuzminykh
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,176 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2023 Thomas Pendock
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Denis Kurilenko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2018 Jorge Aparicio
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2017 Jorge Aparicio
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2020 Andrew Straw
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2020 Andrew D. Straw
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2020 Andrew Straw
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2020 Andrew D. Straw
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,37 +0,0 @@
|
||||
ispc-build-utils 0.5.0 ships no licence file of its own. Its Cargo.toml declares MIT OR Apache-2.0 OR Zlib, by The ctt developers.
|
||||
|
||||
---- Apache-2.0: the text is LICENSES/texts/Apache-2.0.txt ----
|
||||
|
||||
---- MIT ----
|
||||
|
||||
Copyright (c) The ctt developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---- Zlib ----
|
||||
|
||||
Copyright (c) The ctt developers
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
|
||||
liable for any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter
|
||||
it and redistribute it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If
|
||||
you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not
|
||||
required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original
|
||||
software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Dzmitry Malyshau
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2019 Anthony James Munns
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,12 +0,0 @@
|
||||
Copyrights in the Rand project are retained by their contributors. No
|
||||
copyright assignment is required to contribute to the Rand project.
|
||||
|
||||
For full authorship information, see the version control history.
|
||||
|
||||
Except as otherwise noted (below and/or in individual files), Rand is
|
||||
licensed under the Apache License, Version 2.0 <LICENSE-APACHE> or
|
||||
<http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
<LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.
|
||||
|
||||
The Rand project includes code from the Rust project
|
||||
published under these same licenses.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
https://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,26 +0,0 @@
|
||||
Copyright 2018 Developers of the Rand project
|
||||
Copyright (c) 2014 The Rust Project Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,10 +0,0 @@
|
||||
Rustls is distributed under the following three licenses:
|
||||
|
||||
- Apache License version 2.0.
|
||||
- MIT license.
|
||||
- ISC license.
|
||||
|
||||
These are included as LICENSE-APACHE, LICENSE-MIT and LICENSE-ISC
|
||||
respectively. You may use this software under the terms of any
|
||||
of these licenses, at your option.
|
||||
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,15 +0,0 @@
|
||||
ISC License (ISC)
|
||||
Copyright (c) 2016, Joseph Birr-Pixton <[email protected]>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for
|
||||
any purpose with or without fee is hereby granted, provided that the
|
||||
above copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2016 Joseph Birr-Pixton <[email protected]>
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,20 +0,0 @@
|
||||
rustls-platform-verifier-android 0.2.0 ships no licence file of its own. Its Cargo.toml declares MIT OR Apache-2.0, by its authors.
|
||||
|
||||
---- Apache-2.0: the text is LICENSES/texts/Apache-2.0.txt ----
|
||||
|
||||
---- MIT ----
|
||||
|
||||
Copyright (c) its authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,6 +0,0 @@
|
||||
Copyright 2021 Travis Veazey
|
||||
|
||||
Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
|
||||
http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
|
||||
http://opensource.org/licenses/MIT>, at your option. This file may not be
|
||||
copied, modified, or distributed except according to those terms.
|
||||
@@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2016 The Amethyst Project Developers
|
||||
|
||||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
||||
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
||||
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Mathijs van de Nes
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,20 +0,0 @@
|
||||
© 2016 Bertram Truong
|
||||
© 2021 Kornel Lesiński
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -1,28 +0,0 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2026, Alexandre Bury
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,28 +0,0 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2026, Alexandre Bury
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,28 +0,0 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2026, Alexandre Bury
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,32 +0,0 @@
|
||||
The auto-generated bindings are under the 3-clause BSD license:
|
||||
|
||||
BSD License
|
||||
|
||||
For Zstandard software
|
||||
|
||||
Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name Facebook, nor Meta, nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -20,8 +20,22 @@ animato (MIT OR Apache-2.0), usvg and resvg (Apache-2.0 OR MIT), mediabunny (MPL
|
||||
|
||||
The Windows build (docs/ports.feature PT20) adds: junction 1.4.2 (MIT, node_modules' links in io/npm) and windows-sys
|
||||
0.61.2 (Microsoft, MIT OR Apache-2.0, in io/trace); every build has dunce 1.0.5 (CC0-1.0 OR MIT-0 OR Apache-2.0, plain
|
||||
paths for Windows in runtime/bundle). It ships none of Microsoft's C runtime or SDK files: the runtime comes from the
|
||||
Microsoft Visual C++ Redistributable, installed on the machine.
|
||||
paths for Windows in runtime/bundle). Its bin\ also carries, each with its licence beside it (tools/release/win-bundle.sh):
|
||||
Microsoft's Visual C++ runtime (vcruntime140.dll, vcruntime140_1.dll, msvcp140.dll, msvcp140_1.dll), redistributed
|
||||
under Microsoft's Visual Studio licence terms; ONNX Runtime's onnxruntime.dll (Microsoft, MIT);
|
||||
FFmpeg 9.0.2 (ffmpeg.exe, ffprobe.exe; LGPL-2.1-or-later), built from FFmpeg's release with FFmpeg's own code, zlib
|
||||
and libvpx 1.17.0's decoders (BSD-3-Clause with the WebM project's patent grant: libvpx-LICENSE.txt,
|
||||
libvpx-PATENTS.txt) by tools/release/ffmpeg-win.sh, its H.264 encoder Windows' own (Media Foundation), its source
|
||||
published as the release tools-ffmpeg-9.0.2-lgpl;
|
||||
uv (uv.exe; Astral, MIT OR Apache-2.0);
|
||||
Microsoft's DirectX Shader Compiler v1.8.2502 (dxcompiler.dll, dxil.dll), DX12's shader compiler, redistributed under
|
||||
its licence terms (dxc-LICENSE-MS.txt; its LLVM parts under dxc-LICENSE-LLVM.txt and dxc-LICENSE-MIT.txt).
|
||||
The Windows app adds Git for Windows with Git LFS (dugite-native; GPLv2 and its parts' licences, in git\), which raea
|
||||
runs as a separate program; its complete corresponding source is published as the release tools-git-<tag>-sources.
|
||||
raea.exe, on a PC with no Git, fetches the same build once into its tools cache (io/assets git()).
|
||||
The Windows and Linux builds' JavaScript engine, QuickJS (rquickjs, MIT), carries FormatJS's Intl polyfills (MIT,
|
||||
Copyright FormatJS) and the Unicode CLDR locale data they're made with (Unicode-3.0), packed in
|
||||
runtime/jsengine/js/intl.pack; both licences are in runtime/jsengine/js/intl/LICENSE-FormatJS.md and in the pack.
|
||||
The native target (engine/rune, docs/targets.feature) builds on Rune (https://github.com/anomalyco/rune, Copyright
|
||||
2026 Anomaly, MIT; LICENSES/rune-0.0.1/repository-LICENSE): rune, rune-kit and their crates, by a pinned rev.
|
||||
|
||||
@@ -54,7 +68,6 @@ LICENSES/<crate>-<version>/.
|
||||
async-recursion 1.2.0: MIT OR Apache-2.0
|
||||
async-signal 0.2.14: Apache-2.0 OR MIT
|
||||
atomic-arena 0.1.2: MIT OR Apache-2.0
|
||||
atomic-polyfill 1.0.3: MIT OR Apache-2.0
|
||||
atspi-common 0.13.0: Apache-2.0 OR MIT
|
||||
atspi-proxies 0.13.0: Apache-2.0 OR MIT
|
||||
atspi 0.29.0: Apache-2.0 OR MIT
|
||||
@@ -62,8 +75,6 @@ LICENSES/<crate>-<version>/.
|
||||
avian_derive 0.2.3: MIT OR Apache-2.0
|
||||
avian2d 0.8.0: MIT OR Apache-2.0
|
||||
avian3d 0.8.0: MIT OR Apache-2.0
|
||||
aws-lc-rs 1.18.2: ISC AND (Apache-2.0 OR ISC)
|
||||
aws-lc-sys 0.46.0: ISC AND (Apache-2.0 OR ISC) AND Apache-2.0 AND MIT AND BSD-3-Clause AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR ISC OR MIT-0)
|
||||
az 1.3.0: MIT/Apache-2.0
|
||||
basis-universal-sys 0.3.1: MIT OR Apache-2.0
|
||||
basis-universal 0.3.1: MIT OR Apache-2.0
|
||||
@@ -155,20 +166,11 @@ LICENSES/<crate>-<version>/.
|
||||
cssparser 0.37.0: MPL-2.0
|
||||
csv-core 0.1.13: Unlicense/MIT
|
||||
csv 1.4.0: Unlicense/MIT
|
||||
ctt-astcenc 0.5.0: (MIT OR Apache-2.0 OR Zlib) AND Apache-2.0
|
||||
ctt-bc7enc-rdo-prebuilt 0.5.0: (MIT OR Apache-2.0) AND Apache-2.0
|
||||
ctt-bc7enc-rdo 0.5.0: (MIT OR Apache-2.0 OR Zlib) AND Apache-2.0
|
||||
ctt-compressonator 0.5.0: (MIT OR Apache-2.0 OR Zlib) AND MIT
|
||||
ctt-etcpak 0.5.0: (MIT OR Apache-2.0 OR Zlib) AND BSD-3-Clause
|
||||
ctt-intel-texture-compressor-prebuilt 0.5.0: (MIT OR Apache-2.0) AND MIT
|
||||
ctt-intel-texture-compressor 0.5.0: (MIT OR Apache-2.0) AND MIT
|
||||
ctt 0.5.0: MIT OR Apache-2.0 OR Zlib
|
||||
dashmap 6.2.1: MIT
|
||||
default-struct-builder 0.5.1: MIT OR Apache-2.0
|
||||
deluxe-core 0.5.0: MIT
|
||||
deluxe-macros 0.5.0: MIT
|
||||
deluxe 0.5.0: MIT
|
||||
der_derive 0.8.0: Apache-2.0 OR MIT
|
||||
der-parser 10.0.0: MIT OR Apache-2.0
|
||||
deranged 0.5.9: MIT OR Apache-2.0
|
||||
derive-getters 0.5.0: MIT
|
||||
@@ -188,16 +190,12 @@ LICENSES/<crate>-<version>/.
|
||||
enumflags2 0.7.12: MIT OR Apache-2.0
|
||||
epaint_default_fonts 0.36.2: (MIT OR Apache-2.0) AND OFL-1.1 AND Ubuntu-font-1.0
|
||||
epaint 0.36.2: MIT OR Apache-2.0
|
||||
fast_image_resize 6.1.0: MIT OR Apache-2.0
|
||||
fastbloom 0.17.0: MIT OR Apache-2.0
|
||||
fastnoise-lite 1.1.1: MIT
|
||||
fid-rs 0.2.0: MIT OR Apache-2.0
|
||||
file-id 0.2.3: MIT OR Apache-2.0
|
||||
fixed 1.31.0: MIT/Apache-2.0
|
||||
flagset 0.4.7: Apache-2.0
|
||||
float_next_after 2.0.0: MIT
|
||||
float-ord 0.3.2: MIT / Apache-2.0
|
||||
fs_extra 1.3.0: MIT
|
||||
fsevent-sys 4.1.0: MIT
|
||||
futures-timer 3.0.4: MIT/Apache-2.0
|
||||
fuzzy-matcher 0.3.7: MIT
|
||||
@@ -210,8 +208,6 @@ LICENSES/<crate>-<version>/.
|
||||
glam 0.19.0: MIT OR Apache-2.0
|
||||
gloo-timers 0.3.0: MIT OR Apache-2.0
|
||||
governor 0.10.4: MIT
|
||||
hash32 0.2.1: MIT OR Apache-2.0
|
||||
heapless 0.7.17: MIT OR Apache-2.0
|
||||
heck 0.4.1: MIT OR Apache-2.0
|
||||
httlib-huffman 0.3.4: MIT
|
||||
i_float 1.16.0: MIT
|
||||
@@ -219,14 +215,11 @@ LICENSES/<crate>-<version>/.
|
||||
i_overlay 4.5.2: MIT OR Apache-2.0
|
||||
i_shape 1.18.0: MIT
|
||||
i_tree 0.18.0: MIT
|
||||
iana-time-zone-haiku 0.1.2: MIT OR Apache-2.0
|
||||
iana-time-zone 0.1.65: MIT OR Apache-2.0
|
||||
ilattice 0.1.0: MIT OR Apache-2.0
|
||||
imagesize 0.13.0: MIT
|
||||
inout 0.1.4: MIT OR Apache-2.0
|
||||
interpolation 0.3.0: MIT
|
||||
is-terminal 0.4.17: MIT
|
||||
ispc-build-utils 0.5.0: MIT OR Apache-2.0 OR Zlib
|
||||
itertools 0.10.5: MIT/Apache-2.0
|
||||
iyes_progress 0.18.0: MIT OR Apache-2.0
|
||||
jzon 0.12.5: MIT/Apache-2.0
|
||||
@@ -276,7 +269,6 @@ LICENSES/<crate>-<version>/.
|
||||
metis 0.2.2: MIT OR Apache-2.0
|
||||
metrics-util 0.20.4: MIT
|
||||
metrics 0.24.6: MIT
|
||||
mint 0.5.9: MIT
|
||||
mock_instant 0.6.1: 0BSD
|
||||
moonshine-save 0.8.0: MIT
|
||||
moonshine-util 0.6.0: MIT
|
||||
@@ -316,7 +308,6 @@ LICENSES/<crate>-<version>/.
|
||||
pollster 1.0.1: Apache-2.0/MIT
|
||||
poly1305 0.8.0: Apache-2.0 OR MIT
|
||||
polyanya 0.18.0: MIT OR Apache-2.0
|
||||
postcard-derive 0.2.2: MIT OR Apache-2.0
|
||||
powerfmt 0.2.1: MIT OR Apache-2.0
|
||||
proc-macro-crate 1.3.1: MIT OR Apache-2.0
|
||||
proc-macro-error-attr 1.0.4: MIT OR Apache-2.0
|
||||
@@ -328,7 +319,6 @@ LICENSES/<crate>-<version>/.
|
||||
quick-xml 0.31.0: MIT
|
||||
quick-xml 0.38.4: MIT
|
||||
radix_trie 0.2.1: MIT
|
||||
rand_chacha 0.3.1: MIT OR Apache-2.0
|
||||
rand_xorshift 0.3.0: MIT OR Apache-2.0
|
||||
rand_xoshiro 0.7.0: MIT OR Apache-2.0
|
||||
rapidhash 4.5.1: MIT OR Apache-2.0
|
||||
@@ -347,13 +337,9 @@ LICENSES/<crate>-<version>/.
|
||||
rune-staging 0.0.1: MIT
|
||||
rune 0.0.1: MIT
|
||||
rusticata-macros 4.1.0: MIT/Apache-2.0
|
||||
rustls-native-certs 0.8.5: Apache-2.0 OR ISC OR MIT
|
||||
rustls-pemfile 2.2.0: Apache-2.0 OR ISC OR MIT
|
||||
rustls-platform-verifier-android 0.2.0: MIT OR Apache-2.0
|
||||
rustls-platform-verifier 0.7.1: MIT OR Apache-2.0
|
||||
seahash 4.1.0: MIT
|
||||
selectors 0.38.0: MPL-2.0
|
||||
serde_arrays 0.2.0: MIT OR Apache-2.0
|
||||
serde_flexitos 0.2.2: Apache-2.0
|
||||
serde_regex 1.2.0: MIT OR Apache-2.0
|
||||
serde_repr 0.1.21: MIT OR Apache-2.0
|
||||
@@ -363,7 +349,6 @@ LICENSES/<crate>-<version>/.
|
||||
sif-itree 0.4.1: MIT OR Apache-2.0
|
||||
sketches-ddsketch 0.3.1: Apache-2.0
|
||||
smart-default 0.7.1: MIT
|
||||
spin 0.9.9: MIT
|
||||
spinning_top 0.3.0: MIT/Apache-2.0
|
||||
spki 0.8.1: Apache-2.0 OR MIT
|
||||
steamworks-sys 0.13.0: MIT / Apache-2.0
|
||||
@@ -394,7 +379,6 @@ LICENSES/<crate>-<version>/.
|
||||
unicode-general-category 1.1.0: Apache-2.0
|
||||
universal-hash 0.5.1: MIT OR Apache-2.0
|
||||
unsafe-libyaml 0.2.11: MIT
|
||||
urlencoding 2.1.3: MIT
|
||||
usvg 0.45.1: Apache-2.0 OR MIT
|
||||
vleue_navigator 0.17.0: MIT OR Apache-2.0
|
||||
voracious_radix_sort 1.2.0: MIT
|
||||
@@ -428,9 +412,6 @@ LICENSES/<crate>-<version>/.
|
||||
zbus 6.2.1: MIT
|
||||
zcheapstr 1.1.0: MIT
|
||||
zruntime 0.2.2: MIT
|
||||
zstd-safe 7.4.0: BSD-3-Clause
|
||||
zstd-sys 2.1.2+zstd.1.5.7: BSD-3-Clause
|
||||
zstd 0.13.4: BSD-3-Clause
|
||||
zvariant_derive 5.15.0: MIT
|
||||
zvariant_utils 4.2.0: MIT
|
||||
zvariant 5.15.0: MIT
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
---
|
||||
|
||||
> **0.1.6** (17 November 2026) is the latest release: the engine and the desktop app on macOS (Apple Silicon), Linux
|
||||
> (x86_64) and, newest and least tested, Windows 10 and 11 (x86_64). raea is young and moves fast, with a release most
|
||||
> days since 0.1.1 on 11 November: expect rough edges, and tell us what you hit in an
|
||||
> [issue](https://github.com/shinyobjectz/raea/issues), or from your agent with `raea bug`.
|
||||
> raea releases experimentally and often, so the newest release is always on
|
||||
> [Releases](https://github.com/shinyobjectz/raea/releases). The app is unstable for now, especially on Linux and
|
||||
> Windows: expect rough edges, and tell us what you hit in an [issue](https://github.com/shinyobjectz/raea/issues), or
|
||||
> from your agent with `raea bug`.
|
||||
|
||||
## The app
|
||||
|
||||
@@ -80,14 +80,21 @@ The installer puts the `raea` command under `~/.raea`, links it into `~/.local/b
|
||||
work. Run it again to update. The engine is free and needs no account. Tarballs and checksums are on the
|
||||
[releases page](https://github.com/shinyobjectz/raea/releases).
|
||||
|
||||
Linux release builds also package an x86_64 AppImage of the engine command and
|
||||
attach it and its SHA256 checksum beside the release archives.
|
||||
Make it executable with `chmod +x raea-*.AppImage`, then run
|
||||
`./raea-VERSION-linux-x86_64.AppImage --help` or pass the usual `raea` arguments.
|
||||
See [the AppImage release recipe](tools/release/README.md#linux-appimage) for build
|
||||
instructions, runtime requirements and running without FUSE.
|
||||
|
||||
On Windows 10 or 11, in PowerShell:
|
||||
|
||||
```powershell
|
||||
irm https://raea.io/install.ps1 | iex
|
||||
```
|
||||
|
||||
It does the same under `~\.raea` and adds raea to your PATH. raea needs the Microsoft Visual C++ Redistributable
|
||||
(x64), which most machines already have, and a DirectX 12 or Vulkan GPU driver.
|
||||
It does the same under `~\.raea` and adds raea to your PATH. raea needs a DirectX 12 or Vulkan GPU driver; what
|
||||
else it needs (the Visual C++ runtime, FFmpeg and uv) is in its `bin\` folder.
|
||||
|
||||
## Hello
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
[package]
|
||||
name = "raea-app-ask"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "FSL-1.1-ALv2"
|
||||
publish = false
|
||||
description = "raea ask: questions about a piece's picture and sound, prepared from what raea knows of it, asked of clef in parallel from the person's plan, and every answer kept"
|
||||
|
||||
[dependencies]
|
||||
# the question format and the standard sets; the one clef client, routed to the person's plan first (docs/ask.feature)
|
||||
raea-core-ask = { path = "../../core/ask" }
|
||||
raea-io-clef = { path = "../../io/clef" }
|
||||
raea-io-home = { path = "../../io/home" }
|
||||
# the fingerprint's AUC, quantile and gates, so a question is calibrated as an axis is (AK7)
|
||||
raea-sys-fingerprint = { path = "../../systems/fingerprint" }
|
||||
# today's date for a calibration
|
||||
raea-io-trace = { path = "../../io/trace" }
|
||||
dunce = "1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
sha2 = "0.10"
|
||||
|
||||
[dev-dependencies]
|
||||
raea-io-assets = { path = "../../io/assets" }
|
||||
@@ -0,0 +1,214 @@
|
||||
//! Calibration (docs/ask.feature AK7): a question's answers held to the person's labels (labels.rs), per version of its
|
||||
//! words. Clef isn't trained on the labels, so its AUC on them is held out already; the one thing fitted is the
|
||||
//! threshold, the problem score that flags 10% of the clean labels. The gates are the fingerprint's (16 labels of each
|
||||
//! kind, from 3 projects, an AUC of 0.8). A question that passes is calibrated at its threshold: its answers are
|
||||
//! findings, and the person's calibration replaces raea's shipped one. One under 0.6 after 32 labels doesn't separate,
|
||||
//! and says which labels it missed, so its words can be fixed. `raea ask try` asks new words of the labelled clips and
|
||||
//! sets both AUCs side by side.
|
||||
|
||||
use std::collections::{BTreeMap, BTreeSet, HashMap};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use raea_core_ask::{Calibration, Question};
|
||||
use raea_io_clef::Media;
|
||||
use raea_sys_fingerprint::head::{auc, quantile};
|
||||
use raea_sys_fingerprint::train::{GATE_AUC, GATE_LABELS, GATE_PROJECTS};
|
||||
use serde::Serialize;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::labels::{self, Label};
|
||||
use crate::prepare::Piece;
|
||||
use crate::record;
|
||||
use crate::runner::{self, Event, Group, Kept, Opts, Summary};
|
||||
|
||||
pub const FILE: &str = "calibration.json";
|
||||
/// An AUC under this after twice the gate's labels: the words don't separate the problem.
|
||||
const SEPARATES: f64 = 0.6;
|
||||
|
||||
/// The person's calibrations that passed the gates, by question version.
|
||||
pub fn local() -> BTreeMap<String, Calibration> {
|
||||
std::fs::read_to_string(record::dir().join(FILE)).ok().and_then(|t| serde_json::from_str(&t).ok()).unwrap_or_default()
|
||||
}
|
||||
|
||||
/// A question with the person's calibration in place of raea's, when it has one.
|
||||
pub fn apply(q: &mut Question, local: &BTreeMap<String, Calibration>) {
|
||||
if let Some(c) = local.get(&q.version()) {
|
||||
q.calibration = Some(c.clone());
|
||||
}
|
||||
}
|
||||
|
||||
/// A label the answers missed: a problem it scored low, or clean work it scored high.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct Miss {
|
||||
pub file: String,
|
||||
pub span: String,
|
||||
pub problem: f64,
|
||||
pub bad: bool,
|
||||
pub note: Option<String>,
|
||||
}
|
||||
|
||||
/// One version's standing.
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct Standing {
|
||||
pub id: String,
|
||||
pub version: String,
|
||||
pub ask: String,
|
||||
pub problems: usize,
|
||||
pub clean: usize,
|
||||
pub projects: usize,
|
||||
pub auc: Option<f64>,
|
||||
pub threshold: Option<f64>,
|
||||
/// calibrated, advice or "doesn't separate"
|
||||
pub state: String,
|
||||
pub why: String,
|
||||
pub misses: Vec<Miss>,
|
||||
/// other eyes' labels on its clips, kept and not counted
|
||||
pub others: usize,
|
||||
}
|
||||
|
||||
/// Each labelled clip's latest problem score for one version, beside its label.
|
||||
fn scored<'a>(version: &str, standing: &HashMap<(String, String), &'a Label>, calls: &HashMap<String, Value>) -> Vec<(f64, &'a Label)> {
|
||||
let mut latest: HashMap<String, (f64, &Label)> = HashMap::new();
|
||||
for a in record::rows("answers.jsonl").iter().filter(|a| a["version"] == version) {
|
||||
let (Some(p), Some(call)) = (a["problem"].as_f64(), calls.get(a["call"].as_str().unwrap_or_default())) else { continue };
|
||||
let key = (a["question"].as_str().unwrap_or_default().to_string(), labels::media_key(call));
|
||||
if let Some(l) = standing.get(&key) {
|
||||
latest.insert(key.1, (p, l));
|
||||
}
|
||||
}
|
||||
latest.into_values().collect()
|
||||
}
|
||||
|
||||
/// One version held to its labels.
|
||||
pub fn standing_of(q: &Question, all: &[Label], calls: &HashMap<String, Value>) -> Standing {
|
||||
let standing = labels::standing(all);
|
||||
let s = scored(&q.version(), &standing, calls);
|
||||
let score = |bad: bool| s.iter().filter(|(_, l)| l.bad == bad).map(|(p, _)| *p as f32).collect::<Vec<f32>>();
|
||||
let (pos, neg) = (score(true), score(false));
|
||||
let projects = s.iter().map(|(_, l)| l.project.as_str()).collect::<BTreeSet<_>>().len();
|
||||
let a = Some(auc(&pos, &neg)).filter(|a| a.is_finite());
|
||||
let threshold = Some(quantile(&neg, 0.9) as f64).filter(|t| t.is_finite());
|
||||
let mut why = Vec::new();
|
||||
if pos.len() < GATE_LABELS || neg.len() < GATE_LABELS {
|
||||
why.push(format!("{} problem and {} clean labels (needs {GATE_LABELS} of each)", pos.len(), neg.len()));
|
||||
}
|
||||
if projects < GATE_PROJECTS {
|
||||
why.push(format!("labels from {projects} projects (needs {GATE_PROJECTS})"));
|
||||
}
|
||||
match a {
|
||||
Some(v) if v < GATE_AUC => why.push(format!("AUC {v:.2} (needs {GATE_AUC})")),
|
||||
None => why.push("no AUC yet: it needs labels of both kinds".into()),
|
||||
_ => {}
|
||||
}
|
||||
let stuck = s.len() >= 2 * GATE_LABELS && a.is_some_and(|v| v < SEPARATES);
|
||||
let mut misses: Vec<Miss> = Vec::new();
|
||||
if stuck {
|
||||
let mut by: Vec<&(f64, &Label)> = s.iter().collect();
|
||||
by.sort_by(|x, y| x.0.total_cmp(&y.0));
|
||||
let low = by.iter().filter(|(_, l)| l.bad).take(5);
|
||||
let high = by.iter().rev().filter(|(_, l)| !l.bad).take(5);
|
||||
misses = low.chain(high).map(|(p, l)| Miss { file: l.file.clone(), span: labels::span(l.from, l.to), problem: *p, bad: l.bad, note: l.note.clone() }).collect();
|
||||
}
|
||||
let others = all.iter().filter(|l| !l.counted() && l.question == q.id).count();
|
||||
let state = match (why.is_empty(), stuck) {
|
||||
(true, _) => "calibrated",
|
||||
(false, true) => "doesn't separate",
|
||||
(false, false) => "advice",
|
||||
};
|
||||
let why = if why.is_empty() { format!("earned: {} labels from {projects} projects, flags past {:.2}", s.len(), threshold.unwrap_or(0.0)) } else { why.join("; ") };
|
||||
Standing { id: q.id.clone(), version: q.version(), ask: q.ask.clone(), problems: pos.len(), clean: neg.len(), projects, auc: a, threshold, state: state.into(), why, misses, others }
|
||||
}
|
||||
|
||||
/// Every labelled question's versions as the record kept them (or only `id`'s), newest wording last.
|
||||
fn versions(only: Option<&str>, all: &[Label]) -> Vec<Question> {
|
||||
let labelled: BTreeSet<&str> = all.iter().map(|l| l.question.as_str()).collect();
|
||||
let mut seen = BTreeSet::new();
|
||||
let mut out = Vec::new();
|
||||
for a in record::rows("answers.jsonl") {
|
||||
let id = a["question"].as_str().unwrap_or_default();
|
||||
if only.is_some_and(|o| o != id) || !labelled.contains(id) || !seen.insert(a["version"].as_str().unwrap_or_default().to_string()) {
|
||||
continue;
|
||||
}
|
||||
out.push(labels::question_of(&a));
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// `raea ask calibrate [ID]`: the feed's labels read again, then every labelled version held to them. The ones that
|
||||
/// pass are kept as the person's calibration; one that no longer passes loses it.
|
||||
pub fn calibrate(only: Option<&str>) -> Result<(Vec<Standing>, (usize, usize)), String> {
|
||||
let feed = labels::from_feed()?;
|
||||
let (all, calls) = (labels::all(), labels::calls());
|
||||
let out: Vec<Standing> = versions(only, &all).iter().map(|q| standing_of(q, &all, &calls)).collect();
|
||||
let mut keep = local();
|
||||
for s in &out {
|
||||
keep.remove(&s.version);
|
||||
if s.state == "calibrated" {
|
||||
let n = (s.problems + s.clean) as u32;
|
||||
let c = Calibration { auc: s.auc.unwrap_or(0.0), n, positives: s.problems as u32, threshold: s.threshold, date: today(), by: "you".into() };
|
||||
keep.insert(s.version.clone(), c);
|
||||
}
|
||||
}
|
||||
record::write_whole(FILE, &serde_json::to_string_pretty(&keep).map_err(|e| e.to_string())?)?;
|
||||
Ok((out, feed))
|
||||
}
|
||||
|
||||
/// YYYY-MM-DD, UTC.
|
||||
fn today() -> String {
|
||||
raea_io_trace::utc(std::time::SystemTime::now()).0.chars().take(10).collect()
|
||||
}
|
||||
|
||||
/// The groups `raea ask try` sends: the new question on each labelled clip set, with the state it was asked with.
|
||||
pub fn try_groups(like: &str, words: &str) -> Result<(Question, Question, Vec<Group>), String> {
|
||||
let all = labels::all();
|
||||
let standing = labels::standing(&all);
|
||||
let rows = record::rows("answers.jsonl");
|
||||
let old = rows.iter().rev().find(|a| a["question"] == like).map(labels::question_of).ok_or_else(|| format!("ask try: no answers to {like} in the record"))?;
|
||||
let new = Question { ask: words.to_string(), calibration: None, ..old.clone() };
|
||||
let calls = labels::calls();
|
||||
let mut groups: Vec<Group> = Vec::new();
|
||||
let mut sent = BTreeSet::new();
|
||||
for call in calls.values().filter(|c| standing.contains_key(&(like.to_string(), labels::media_key(c)))) {
|
||||
let names: Vec<&str> = call["media"].as_array().into_iter().flatten().filter_map(Value::as_str).collect();
|
||||
let Some(kept) = media(&names) else { continue };
|
||||
if !sent.insert(labels::media_key(call)) {
|
||||
continue;
|
||||
}
|
||||
let piece = Arc::new(Piece { file: PathBuf::from(call["file"].as_str().unwrap_or_default()), project: call["project"].as_str().map(PathBuf::from), ..Default::default() });
|
||||
let (from, to) = (call["from"].as_f64().unwrap_or(0.0), call["to"].as_f64());
|
||||
let seconds = to.map_or(60.0, |t| t - from);
|
||||
let kept = Kept { video_seconds: if kept.videos.is_empty() { 0.0 } else { seconds }, sound_seconds: if kept.sounds.is_empty() { 0.0 } else { seconds }, media: kept, state: call["state"].as_str().unwrap_or_default().into() };
|
||||
groups.push(Group { piece, from, to, sees: new.sees, hears: new.hears, with: vec![], questions: vec![new.clone()], kept: Some(Arc::new(kept)) });
|
||||
}
|
||||
if groups.is_empty() {
|
||||
return Err(format!("ask try: none of {like}'s labelled clips are still kept (raea ask calibrate lists its labels)"));
|
||||
}
|
||||
Ok((old, new, groups))
|
||||
}
|
||||
|
||||
/// A call's clips from the kept media, in the kinds they were sent as; None when one has been pruned.
|
||||
fn media(names: &[&str]) -> Option<Media> {
|
||||
let mut m = Media::default();
|
||||
for n in names {
|
||||
let bytes = record::media(n)?;
|
||||
match n.rsplit('.').next() {
|
||||
Some("mp4") => m.videos.push(bytes),
|
||||
Some("mp3") => m.sounds.push(bytes),
|
||||
_ => m.stills.push(bytes),
|
||||
}
|
||||
}
|
||||
Some(m)
|
||||
}
|
||||
|
||||
/// `raea ask try "WORDS" --like ID`: the new words asked of the old question's labelled clips, and both versions held to
|
||||
/// the same labels.
|
||||
pub fn try_words(like: &str, words: &str, o: &Opts, out: &mut dyn FnMut(Event)) -> Result<(Summary, Option<(Standing, Standing)>), String> {
|
||||
let (old, new, groups) = try_groups(like, words)?;
|
||||
let sum = runner::run_groups(groups, Vec::new(), o, out);
|
||||
if o.dry {
|
||||
return Ok((sum, None));
|
||||
}
|
||||
let (all, calls) = (labels::all(), labels::calls());
|
||||
Ok((sum, Some((standing_of(&old, &all, &calls), standing_of(&new, &all, &calls)))))
|
||||
}
|
||||
@@ -0,0 +1,236 @@
|
||||
//! Labels (docs/ask.feature AK6): whether a question's problem was really there in what one call sent, so the question
|
||||
//! can be calibrated on the person's own eye (calibrate.rs). A label belongs to a question and to the clips a call sent
|
||||
//! (by their hashes), never to one answer: the same question reworded, asked again of the same clips, has the same
|
||||
//! labels, which is what lets `raea ask try` measure new words.
|
||||
//!
|
||||
//! Where labels come from:
|
||||
//! - `raea ask verdict ANSWER WORD`: the person answers the question themselves, in its own terms (yes or no, an option,
|
||||
//! a level). Theirs counts first.
|
||||
//! - The feed: a note of the person's on the render (its copy in the project's feed, known by `record::ident`), pinned
|
||||
//! inside the window or not pinned at all, holding one of the question's label words, is a yes; an approved post (done)
|
||||
//! with no such note is a no. Read again by every `raea ask calibrate`.
|
||||
//! - Another eye (`verdict --eye agent`: an agent's own look) is kept as `eye:NAME` and never counted, as the
|
||||
//! fingerprint keeps another eye's readings (FP6d).
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use raea_core_ask::{Kind, Question};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::record;
|
||||
|
||||
pub const FILE: &str = "labels.jsonl";
|
||||
|
||||
/// A note pinned at t covers 1.5 s before it to 0.5 s after (the fingerprint's span).
|
||||
const BEFORE: f64 = 1.5;
|
||||
const AFTER: f64 = 0.5;
|
||||
|
||||
/// Whether a question's problem is there in one call's clips, and who said so.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
pub struct Label {
|
||||
pub question: String,
|
||||
/// the clips the call sent, by hash
|
||||
pub media: String,
|
||||
pub bad: bool,
|
||||
/// "verdict" (the person's), "note" or "approval" (read from the feed), or "eye:NAME" (kept, never counted)
|
||||
pub source: String,
|
||||
pub project: String,
|
||||
pub file: String,
|
||||
pub from: f64,
|
||||
pub to: Option<f64>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub note: Option<String>,
|
||||
pub at: String,
|
||||
}
|
||||
|
||||
impl Label {
|
||||
/// The person's own: a verdict, a note or an approval.
|
||||
pub fn counted(&self) -> bool {
|
||||
self.rank() > 0
|
||||
}
|
||||
fn rank(&self) -> u8 {
|
||||
match self.source.as_str() {
|
||||
"verdict" => 3,
|
||||
"note" => 2,
|
||||
"approval" => 1,
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The clips a call sent, as one key.
|
||||
pub fn media_key(call: &Value) -> String {
|
||||
let mut m: Vec<&str> = call["media"].as_array().into_iter().flatten().filter_map(Value::as_str).collect();
|
||||
m.sort_unstable();
|
||||
m.join("+")
|
||||
}
|
||||
|
||||
/// The feed a call's render was posted to: its project's, else the nearest one above its file.
|
||||
fn feed_of(call: &Value) -> Option<PathBuf> {
|
||||
let file = Path::new(call["file"].as_str().unwrap_or_default());
|
||||
call["project"].as_str().map(Path::new).into_iter().chain(file.ancestors()).map(|d| d.join(".raea/feed")).find(|d| d.is_dir())
|
||||
}
|
||||
|
||||
/// A call's project: the folder holding its brief, else the folder holding the feed it was posted to, else its file's.
|
||||
pub fn project_of(call: &Value) -> String {
|
||||
if let Some(p) = call["project"].as_str() {
|
||||
return p.to_string();
|
||||
}
|
||||
let home = feed_of(call).and_then(|f| f.parent()?.parent().map(Path::to_path_buf));
|
||||
let file = Path::new(call["file"].as_str().unwrap_or_default());
|
||||
home.as_deref().or(file.parent()).map(|p| p.display().to_string()).unwrap_or_default()
|
||||
}
|
||||
|
||||
pub fn all() -> Vec<Label> {
|
||||
record::rows(FILE).into_iter().filter_map(|v| serde_json::from_value(v).ok()).collect()
|
||||
}
|
||||
|
||||
fn write(labels: &[Label]) -> Result<(), String> {
|
||||
record::write_whole(FILE, &labels.iter().filter_map(|l| serde_json::to_string(l).ok()).map(|l| l + "\n").collect::<String>())
|
||||
}
|
||||
|
||||
/// The label that stands for each question and clips: the person's verdict, else a note, else an approval.
|
||||
pub fn standing(labels: &[Label]) -> HashMap<(String, String), &Label> {
|
||||
let mut out: HashMap<(String, String), &Label> = HashMap::new();
|
||||
for l in labels.iter().filter(|l| l.counted()) {
|
||||
let key = (l.question.clone(), l.media.clone());
|
||||
if out.get(&key).is_none_or(|was| l.rank() >= was.rank()) {
|
||||
out.insert(key, l);
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// A question as its answer kept it (the whole question, else its words).
|
||||
pub fn question_of(answer: &Value) -> Question {
|
||||
serde_json::from_value(answer["q"].clone()).unwrap_or_else(|_| Question::plain(answer["question"].as_str().unwrap_or("q"), answer["ask"].as_str().unwrap_or_default()))
|
||||
}
|
||||
|
||||
/// Whether the answer the person gives means the problem is there: yes's flagged answer (yes, or no for a question
|
||||
/// flagged on no), a flagged option, or a grade or rate in its lower half.
|
||||
pub fn means_problem(q: &Question, said: &str) -> Result<bool, String> {
|
||||
let said = said.trim().to_lowercase();
|
||||
let levels = q.levels();
|
||||
if q.kind == Kind::Yes {
|
||||
return match said.as_str() {
|
||||
"yes" | "no" => Ok((said == "yes") != q.flags.first().is_some_and(|f| f == "no")),
|
||||
_ => Err(format!("{}: answer yes or no", q.id)),
|
||||
};
|
||||
}
|
||||
if q.kind == Kind::Choose && q.flags.is_empty() {
|
||||
return Err(format!("{} picks without a wrong answer, so it isn't calibrated", q.id));
|
||||
}
|
||||
let Some(i) = levels.iter().position(|l| l.to_lowercase() == said) else { return Err(format!("{}: answer one of {}", q.id, levels.join(", "))) };
|
||||
Ok(match q.kind {
|
||||
Kind::Choose => q.flags.iter().any(|f| f.to_lowercase() == said),
|
||||
_ => (i as f64) < (levels.len().max(2) - 1) as f64 / 2.0,
|
||||
})
|
||||
}
|
||||
|
||||
/// Every call in the record, by id.
|
||||
pub fn calls() -> HashMap<String, Value> {
|
||||
record::rows("calls.jsonl").into_iter().filter_map(|c| Some((c["id"].as_str()?.to_string(), c))).collect()
|
||||
}
|
||||
|
||||
fn label(q: &str, call: &Value, bad: bool, source: &str, note: Option<String>) -> Label {
|
||||
Label {
|
||||
question: q.to_string(),
|
||||
media: media_key(call),
|
||||
bad,
|
||||
source: source.into(),
|
||||
project: project_of(call),
|
||||
file: call["file"].as_str().unwrap_or_default().into(),
|
||||
from: call["from"].as_f64().unwrap_or(0.0),
|
||||
to: call["to"].as_f64(),
|
||||
note,
|
||||
at: record::now(),
|
||||
}
|
||||
}
|
||||
|
||||
/// `raea ask verdict ANSWER WORD [--eye NAME]`: the person's answer to the question on that answer's clips (or another
|
||||
/// eye's, kept and never counted). A verdict given again replaces the last from the same source.
|
||||
pub fn verdict(answer: &str, said: &str, eye: Option<&str>) -> Result<String, String> {
|
||||
let row = record::rows("answers.jsonl").into_iter().find(|a| a["id"] == answer).ok_or_else(|| format!("ask verdict: no answer {answer} in {}", record::dir().display()))?;
|
||||
let call = calls().remove(row["call"].as_str().unwrap_or_default()).ok_or_else(|| format!("ask verdict: answer {answer}'s call isn't in the record"))?;
|
||||
let q = question_of(&row);
|
||||
let bad = means_problem(&q, said)?;
|
||||
let source = eye.map_or_else(|| "verdict".to_string(), |e| format!("eye:{e}"));
|
||||
let new = label(&q.id, &call, bad, &source, None);
|
||||
let mut labels = all();
|
||||
labels.retain(|l| !(l.question == new.question && l.media == new.media && l.source == new.source));
|
||||
let line = format!("{}: {} on {} ({}){}", q.id, if bad { "the problem is there" } else { "no problem" }, new.file, span(new.from, new.to), if eye.is_some() { format!(", kept as {source} and not counted") } else { String::new() });
|
||||
labels.push(new);
|
||||
write(&labels)?;
|
||||
Ok(line)
|
||||
}
|
||||
|
||||
pub fn span(from: f64, to: Option<f64>) -> String {
|
||||
match to {
|
||||
Some(t) => format!("{from:.1}-{t:.1} s"),
|
||||
None if from > 0.0 => format!("from {from:.1} s"),
|
||||
None => "the whole file".into(),
|
||||
}
|
||||
}
|
||||
|
||||
/// One post of a feed: whether it's approved, its person's notes (pinned second or none, words), and its files.
|
||||
struct Post {
|
||||
done: bool,
|
||||
notes: Vec<(Option<f64>, String)>,
|
||||
files: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
fn posts(feed: &Path) -> Vec<Post> {
|
||||
let project = feed.parent().and_then(Path::parent).unwrap_or(feed);
|
||||
let lib = raea_io_home::user_home().unwrap_or_default().join(".raea/feed/media");
|
||||
let mut out = Vec::new();
|
||||
for e in std::fs::read_dir(feed).into_iter().flatten().flatten() {
|
||||
let Some(p) = std::fs::read_to_string(e.path()).ok().and_then(|t| serde_json::from_str::<Value>(&t).ok()) else { continue };
|
||||
let notes = p["notes"].as_array().into_iter().flatten().filter(|n| n["author"]["kind"] == "person").filter_map(|n| Some((n["pin"]["t"].as_f64(), n["text"].as_str()?.to_lowercase()))).collect();
|
||||
let files = p["media"].as_array().into_iter().flatten().filter_map(|m| m["path"].as_str()).filter_map(|m| [lib.join(m), project.join(m)].into_iter().find(|f| f.is_file())).collect();
|
||||
out.push(Post { done: p["status"] == "done", notes, files });
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// Labels read again from the person's notes and approvals, for every recorded answer whose question has label words.
|
||||
/// The feed's labels replace the last ones read; verdicts and other eyes' stay. Says how many of each it found.
|
||||
pub fn from_feed() -> Result<(usize, usize), String> {
|
||||
let calls = calls();
|
||||
let mut feeds: HashMap<PathBuf, Vec<Post>> = HashMap::new();
|
||||
let mut idents: HashMap<PathBuf, Option<String>> = HashMap::new();
|
||||
let mut found: HashMap<(String, String), Label> = HashMap::new();
|
||||
for row in record::rows("answers.jsonl") {
|
||||
let q = question_of(&row);
|
||||
let Some(call) = calls.get(row["call"].as_str().unwrap_or_default()) else { continue };
|
||||
let (Some(ident), false) = (call["ident"].as_str(), q.label_words.is_empty()) else { continue };
|
||||
let Some(dir) = feed_of(call) else { continue };
|
||||
let len = record::ident_len(ident);
|
||||
let same = |f: &PathBuf, idents: &mut HashMap<PathBuf, Option<String>>| {
|
||||
std::fs::metadata(f).is_ok_and(|m| Some(m.len()) == len) && idents.entry(f.clone()).or_insert_with(|| record::ident(f)).as_deref() == Some(ident)
|
||||
};
|
||||
let (from, to) = (call["from"].as_f64().unwrap_or(0.0), call["to"].as_f64().unwrap_or(f64::INFINITY));
|
||||
let words: Vec<String> = q.label_words.iter().map(|w| w.to_lowercase()).collect();
|
||||
for post in feeds.entry(dir.clone()).or_insert_with(|| posts(&dir)).iter().filter(|p| p.files.iter().any(|f| same(f, &mut idents))) {
|
||||
let inside = |t: &Option<f64>| t.is_none_or(|t| t - BEFORE < to && t + AFTER > from);
|
||||
let seen = post.notes.iter().find(|(t, text)| inside(t) && words.iter().any(|w| text.contains(w.as_str())));
|
||||
let l = match (seen, post.done) {
|
||||
(Some((_, text)), _) => label(&q.id, call, true, "note", Some(text.clone())),
|
||||
(None, true) => label(&q.id, call, false, "approval", None),
|
||||
(None, false) => continue,
|
||||
};
|
||||
let key = (l.question.clone(), l.media.clone());
|
||||
if found.get(&key).is_none_or(|was| l.rank() > was.rank()) {
|
||||
found.insert(key, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut labels = all();
|
||||
labels.retain(|l| !matches!(l.source.as_str(), "note" | "approval"));
|
||||
let yes = found.values().filter(|l| l.bad).count();
|
||||
let no = found.len() - yes;
|
||||
labels.extend(found.into_values());
|
||||
write(&labels)?;
|
||||
Ok((yes, no))
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use raea_core_ask::{Kind, Question, Reading};
|
||||
use raea_io_clef::{Answered, Call, Fail};
|
||||
use serde_json::json;
|
||||
|
||||
use crate::labels::{self, means_problem};
|
||||
use crate::prepare::Piece;
|
||||
use crate::runner::{self, Entry, Opts};
|
||||
use crate::{calibrate, record};
|
||||
|
||||
/// The labels and calibration files are rewritten whole: one test at a time.
|
||||
static LOCK: Mutex<()> = Mutex::new(());
|
||||
|
||||
fn reading(p: f64) -> Reading {
|
||||
Reading { value: p, problem: Some(p), choice: None, says: format!("{p:.2}") }
|
||||
}
|
||||
|
||||
fn question(id: &str, words: &[&str]) -> Question {
|
||||
let mut q = Question::plain(id, &format!("Is there a problem the {id} test names?"));
|
||||
q.label_words = words.iter().map(|w| w.to_string()).collect();
|
||||
q
|
||||
}
|
||||
|
||||
/// A call and its answer kept, as the runner keeps them; the answer's id.
|
||||
fn asked(file: &Path, project: &str, clip: &str, q: &Question, p: f64) -> String {
|
||||
let call = record::call(&file.display().to_string(), Some(project), 0.0, Some(5.0), "a test", &[clip.to_string()], "a test", 0.0, false);
|
||||
record::answer(&call, &file.display().to_string(), q, &reading(p), p >= 0.5)
|
||||
}
|
||||
|
||||
fn write(p: &Path, bytes: &[u8]) {
|
||||
std::fs::create_dir_all(p.parent().unwrap()).unwrap();
|
||||
std::fs::write(p, bytes).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_persons_note_on_the_posted_render_labels_it_and_an_approval_labels_it_clean() {
|
||||
crate::tests::setup();
|
||||
let _one = LOCK.lock().unwrap();
|
||||
let proj = std::env::temp_dir().join(format!("raea-ask-notes-{}", std::process::id()));
|
||||
let (a, b, other) = (proj.join("out/a.mp4"), proj.join("out/b.mp4"), proj.join("old/a.mp4"));
|
||||
write(&a, b"render one");
|
||||
write(&b, b"render two");
|
||||
write(&other, b"another render, the same name");
|
||||
let post = |media: &str, status: &str, notes: serde_json::Value| json!({"media": [{"kind": "video", "path": media}], "status": status, "notes": notes});
|
||||
let person = |text: &str, t: Option<f64>| json!({"author": {"kind": "person", "name": "me"}, "text": text, "pin": t.map(|t| json!({"t": t}))});
|
||||
write(&proj.join(".raea/feed/1.json"), post("out/a.mp4", "seen", json!([person("The caption runs OVER HER FACE here", Some(2.0))])).to_string().as_bytes());
|
||||
let agent = json!({"author": {"kind": "agent"}, "text": "over her face"});
|
||||
write(&proj.join(".raea/feed/2.json"), post("out/b.mp4", "done", json!([agent, person("lovely", None)])).to_string().as_bytes());
|
||||
let q = question("notes.face", &["over her face"]);
|
||||
let project = proj.display().to_string();
|
||||
asked(&a, &project, "na.mp4", &q, 0.7);
|
||||
asked(&b, &project, "nb.mp4", &q, 0.2);
|
||||
asked(&other, &project, "nc.mp4", &q, 0.6);
|
||||
assert_eq!(labels::from_feed().unwrap(), (1, 1));
|
||||
let mine: Vec<_> = labels::all().into_iter().filter(|l| l.question == "notes.face").collect();
|
||||
let on = |clip: &str| mine.iter().find(|l| l.media == clip).unwrap_or_else(|| panic!("{clip}: {mine:?}"));
|
||||
assert!(on("na.mp4").bad && on("na.mp4").source == "note" && on("na.mp4").note.as_deref().is_some_and(|n| n.contains("over her face")));
|
||||
assert!(!on("nb.mp4").bad && on("nb.mp4").source == "approval", "an agent's note isn't the person's");
|
||||
assert!(!mine.iter().any(|l| l.media == "nc.mp4"), "another render with the same name isn't the one posted");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_verdict_reads_in_the_questions_terms_and_another_eyes_isnt_counted() {
|
||||
crate::tests::setup();
|
||||
let _one = LOCK.lock().unwrap();
|
||||
let mut q = question("verdict.logo", &[]);
|
||||
assert!(means_problem(&q, "Yes").unwrap() && !means_problem(&q, "no").unwrap());
|
||||
q.flags = vec!["no".into()];
|
||||
assert!(means_problem(&q, "no").unwrap(), "a question flagged on no: no is the problem");
|
||||
let mut g = q.clone();
|
||||
g.kind = Kind::Grade;
|
||||
assert!(means_problem(&g, "weak").unwrap() && !means_problem(&g, "acceptable").unwrap());
|
||||
g.kind = Kind::Choose;
|
||||
g.options = vec!["first".into(), "second".into()];
|
||||
g.flags = vec![];
|
||||
assert!(means_problem(&g, "first").is_err(), "a pick has no wrong answer");
|
||||
let file = std::env::temp_dir().join("raea-ask-verdict.mp4");
|
||||
let id = asked(&file, "p", "v1.mp4", &q, 0.3);
|
||||
labels::verdict(&id, "no", Some("agent")).unwrap();
|
||||
let said = labels::verdict(&id, "no", None).unwrap();
|
||||
assert!(said.contains("the problem is there"), "{said}");
|
||||
let all = labels::all();
|
||||
let standing = labels::standing(&all);
|
||||
let l = standing.get(&("verdict.logo".to_string(), "v1.mp4".to_string())).unwrap();
|
||||
assert!(l.bad && l.source == "verdict");
|
||||
assert!(all.iter().any(|l| l.source == "eye:agent" && !l.counted()));
|
||||
}
|
||||
|
||||
/// clef as a fake: yes to anything sent a clip whose bytes start "bad".
|
||||
fn sees_bad(call: &Call) -> Result<Answered, Fail> {
|
||||
let p = if call.media.videos.iter().any(|v| v.starts_with(b"bad")) { 0.9 } else { 0.1 };
|
||||
let answers = call.questions.iter().map(|q| (q.id.clone(), json!({"noul": p}))).collect();
|
||||
Ok(Answered { answers, cost: 0.001, cached: false, route: "a test".into(), pool_left: None })
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn labels_from_three_projects_calibrate_a_question_and_new_words_are_measured_on_the_same_clips() {
|
||||
crate::tests::setup();
|
||||
let _one = LOCK.lock().unwrap();
|
||||
let (good, flat) = (question("cal.good", &[]), question("cal.flat", &[]));
|
||||
let file = PathBuf::from("/nowhere/cal.mp4");
|
||||
for i in 0..36 {
|
||||
let bad = i % 2 == 0;
|
||||
let clip = record::keep_media(format!("{}{i}", if bad { "bad" } else { "ok" }).as_bytes(), "mp4");
|
||||
let project = format!("p{}", i % 3);
|
||||
let call = record::call(&file.display().to_string(), Some(&project), 0.0, Some(3.0), "a test", &[clip], "a test", 0.0, false);
|
||||
let (p, word) = if bad { (0.6 + i as f64 / 1000.0, "yes") } else { (0.3 + i as f64 / 1000.0, "no") };
|
||||
for (q, p) in [(&good, p), (&flat, 0.5)] {
|
||||
let id = record::answer(&call, &file.display().to_string(), q, &reading(p), false);
|
||||
labels::verdict(&id, word, None).unwrap();
|
||||
}
|
||||
}
|
||||
let (all, _) = calibrate::calibrate(None).unwrap();
|
||||
let of = |id: &str| all.iter().find(|s| s.id == id).unwrap_or_else(|| panic!("{id}: {all:?}"));
|
||||
let g = of("cal.good");
|
||||
assert_eq!((g.state.as_str(), g.problems, g.clean, g.projects, g.auc), ("calibrated", 18, 18, 3, Some(1.0)), "{g:?}");
|
||||
let f = of("cal.flat");
|
||||
assert_eq!(f.state, "doesn't separate", "{f:?}");
|
||||
assert!(!f.misses.is_empty() && f.auc == Some(0.5));
|
||||
// the person's calibration goes out with the question from now on
|
||||
let piece = Arc::new(Piece { file: file.clone(), ..Default::default() });
|
||||
let (groups, _) = runner::plan(&[Entry { piece, window: None, questions: vec![good.clone()], dropped: vec![], with: vec![] }]);
|
||||
let sent = &groups[0].questions[0];
|
||||
assert!(sent.calibrated() && sent.calibration.as_ref().is_some_and(|c| c.by == "you"), "{sent:?}");
|
||||
// new words for the flat question, asked of its labelled clips
|
||||
let (sum, both) = calibrate::try_words("cal.flat", "Does anything look broken?", &Opts { jobs: 4, dry: false, ask: sees_bad }, &mut |_| {}).unwrap();
|
||||
let (old, new) = both.unwrap();
|
||||
assert_eq!(sum.calls, 36);
|
||||
assert_eq!((old.auc, new.auc, new.problems + new.clean), (Some(0.5), Some(1.0), 36), "{new:?}");
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//! `raea ask` (docs/ask.feature AK2-AK3): questions about a piece's picture and sound. `prepare` reads what raea knows
|
||||
//! of the piece and keeps the questions that apply; `runner` plans the calls, cuts each clip once and asks in parallel;
|
||||
//! `record` keeps every call and answer; `labels` reads the person's verdicts, notes and approvals into labels, and
|
||||
//! `calibrate` holds each question to them (AK6-AK7); `verbs` is the command. `raea check`, the app's critique and the
|
||||
//! fingerprint's double-check go through the same runner.
|
||||
|
||||
pub mod calibrate;
|
||||
pub mod labels;
|
||||
pub mod prepare;
|
||||
pub mod record;
|
||||
pub mod runner;
|
||||
pub mod verbs;
|
||||
|
||||
pub use verbs::{USAGE, cli};
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
#[cfg(test)]
|
||||
mod labels_tests;
|
||||
@@ -0,0 +1,164 @@
|
||||
//! Ask understands a question before it spends (docs/ask.feature AK2): what the file holds (ffprobe), what the project's
|
||||
//! brief says it's for, whether anyone speaks in it, and from those which questions can be asked, which are swapped for
|
||||
//! their variant (sound for sound-silent) and which are dropped, each with why. The state paragraph tells clef what the
|
||||
//! piece is, as the app's critique writes it. When it isn't known whether anyone speaks, both variants are kept, the
|
||||
//! voice question goes in the same call (runner.rs), free, and the variant that doesn't apply is set aside.
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use raea_core_ask::{Facts, Question, library};
|
||||
use raea_io_clef::media::{self, Probe};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
/// The question asked beside the rest when no one knows yet whether anyone speaks in the piece.
|
||||
pub const VOICE: &str = "voice-heard";
|
||||
|
||||
/// What raea knows of the piece.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Piece {
|
||||
pub file: PathBuf,
|
||||
pub probe: Probe,
|
||||
/// the brief's fields, as `raea spec brief.ts --as brief` reads them ({} without a brief)
|
||||
pub brief: Value,
|
||||
/// the project's folder (the one holding the brief), when there is one
|
||||
pub project: Option<PathBuf>,
|
||||
/// the words heard, when a words file was given
|
||||
pub words: Option<String>,
|
||||
/// someone speaks: from --voice, or from the words file (none heard is no)
|
||||
pub voice: Option<bool>,
|
||||
/// what the caller adds to the state (what raea measured, the platform)
|
||||
pub extra: Option<String>,
|
||||
}
|
||||
|
||||
/// The brief nearest the file: brief.ts in its folder or any folder above it.
|
||||
pub fn brief_near(file: &Path) -> Option<PathBuf> {
|
||||
let abs = dunce::canonicalize(file).ok()?;
|
||||
abs.ancestors().skip(1).map(|d| d.join("brief.ts")).find(|b| b.is_file())
|
||||
}
|
||||
|
||||
/// A brief's fields, through `raea spec FILE --as brief` (this raea), or {} when it can't be read.
|
||||
fn brief_of(path: &Path) -> Value {
|
||||
let Ok(exe) = std::env::current_exe() else { return json!({}) };
|
||||
let Ok(out) = std::process::Command::new(exe).args(["spec"]).arg(path).args(["--as", "brief"]).output() else { return json!({}) };
|
||||
let text = String::from_utf8_lossy(&out.stdout);
|
||||
let v: Value = text.find('{').and_then(|i| serde_json::from_str(&text[i..]).ok()).unwrap_or_else(|| json!({}));
|
||||
v.get("brief").cloned().unwrap_or(v)
|
||||
}
|
||||
|
||||
/// The words heard, from a words file (a JSON list of words, each a string or {word} or {text}): their text, and
|
||||
/// whether anyone speaks (an empty list is no one).
|
||||
pub fn words_of(path: &Path) -> Result<(String, bool), String> {
|
||||
let v: Value = serde_json::from_str(&std::fs::read_to_string(path).map_err(|e| format!("{}: {e}", path.display()))?).map_err(|e| format!("{}: {e}", path.display()))?;
|
||||
let list = v.as_array().or(v["words"].as_array()).ok_or_else(|| format!("{}: a list of words", path.display()))?;
|
||||
let words: Vec<&str> = list.iter().filter_map(|w| w.as_str().or(w["word"].as_str()).or(w["text"].as_str())).collect();
|
||||
Ok((words.join(" "), !words.is_empty()))
|
||||
}
|
||||
|
||||
impl Piece {
|
||||
/// The piece as raea finds it: the file probed, its brief (given or the nearest), its words.
|
||||
pub fn read(file: &Path, brief: Option<&Path>, words: Option<&Path>, voice: Option<bool>, extra: Option<String>) -> Result<Piece, String> {
|
||||
let probe = media::probe(file)?;
|
||||
// "none": no brief, even with one near (a caller that writes the whole state itself, as the app's critique does)
|
||||
let brief_file = match brief {
|
||||
Some(p) if p.as_os_str() == "none" => None,
|
||||
Some(p) => Some(p.to_path_buf()),
|
||||
None => brief_near(file),
|
||||
};
|
||||
let (words, heard) = match words {
|
||||
Some(w) => words_of(w).map(|(t, h)| (Some(t).filter(|t| !t.is_empty()), Some(h)))?,
|
||||
None => (None, None),
|
||||
};
|
||||
Ok(Piece {
|
||||
file: file.to_path_buf(),
|
||||
probe,
|
||||
brief: brief_file.as_deref().map(brief_of).unwrap_or_else(|| json!({})),
|
||||
project: brief_file.and_then(|b| b.parent().map(Path::to_path_buf)),
|
||||
words,
|
||||
voice: voice.or(heard).or((!probe.sound).then_some(false)),
|
||||
extra,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn modes(&self) -> Vec<String> {
|
||||
let m = &self.brief["mode"];
|
||||
let list: Vec<&str> = m.as_array().map(|a| a.iter().filter_map(Value::as_str).collect()).unwrap_or_else(|| m.as_str().into_iter().collect());
|
||||
list.iter().flat_map(|s| s.split(',')).map(|s| s.replace("(assumed)", "").trim().to_string()).filter(|s| !s.is_empty()).collect()
|
||||
}
|
||||
|
||||
pub fn facts(&self) -> Facts {
|
||||
let modes = self.modes();
|
||||
Facts { game: modes.iter().any(|m| m == "play"), modes, voice: self.voice, sound: self.probe.sound, video: self.probe.video }
|
||||
}
|
||||
|
||||
/// What clef reads before the media: what the piece is and what's known of it.
|
||||
pub fn state(&self) -> String {
|
||||
let b = &self.brief;
|
||||
let modes = self.modes();
|
||||
let what = if modes.is_empty() { "video".to_string() } else { modes.join(" and ") };
|
||||
// with no brief and the caller's own state, the caller says what the piece is
|
||||
let briefless = b.as_object().is_none_or(|o| o.is_empty());
|
||||
let mut s = match (b["title"].as_str(), briefless && self.extra.is_some()) {
|
||||
(_, true) => vec![],
|
||||
(Some(t), _) => vec![format!("A {what} piece: \"{t}\".")],
|
||||
(None, _) => vec![format!("A {what} piece.")],
|
||||
};
|
||||
for (k, say) in [("audience", "It's for"), ("believe", "It should leave them believing"), ("logline", "Its storyboard"), ("voice", "Its voice")] {
|
||||
if let Some(v) = b[k].as_str().filter(|v| !v.trim().is_empty()) {
|
||||
s.push(format!("{say}: {}.", v.trim().trim_end_matches('.')));
|
||||
}
|
||||
}
|
||||
if self.voice == Some(false) {
|
||||
s.push("No one speaks in it: its sound is the music and the effects, with no voice.".into());
|
||||
}
|
||||
if let Some(w) = &self.words {
|
||||
let cut: String = w.chars().take(1200).collect();
|
||||
s.push(format!("The words heard: \"{cut}{}\"", if cut.len() < w.len() { "..." } else { "" }));
|
||||
}
|
||||
if self.probe.seconds > 0.0 {
|
||||
s.push(format!("It runs {:.0} s.", self.probe.seconds));
|
||||
}
|
||||
if let Some(x) = &self.extra {
|
||||
s.push(x.trim().to_string());
|
||||
}
|
||||
s.join(" ")
|
||||
}
|
||||
}
|
||||
|
||||
/// Is anyone heard speaking: asked beside the questions that depend on it, at no cost (clef costs by media, not by
|
||||
/// questions), when no one knows yet.
|
||||
pub fn voice_question() -> Question {
|
||||
let mut v = Question::plain(VOICE, "Is anyone heard speaking in it (a voice saying words, not singing)?");
|
||||
v.sees = raea_core_ask::Sees::Nothing;
|
||||
v
|
||||
}
|
||||
|
||||
/// The questions kept for this piece, and those dropped with why. A question that doesn't apply is swapped for its
|
||||
/// variant when that one does; not knowing whether anyone speaks, both are kept.
|
||||
pub fn keep(questions: Vec<Question>, f: &Facts, rubric_md: Option<&str>) -> (Vec<Question>, Vec<(String, String)>) {
|
||||
let mut asked: Vec<Question> = Vec::new();
|
||||
let mut dropped = Vec::new();
|
||||
let add = |q: Question, asked: &mut Vec<Question>| {
|
||||
if !asked.iter().any(|a| a.id == q.id) {
|
||||
asked.push(q);
|
||||
}
|
||||
};
|
||||
for q in questions {
|
||||
let Some(why) = q.not_for(f) else {
|
||||
// not knowing whether anyone speaks, its variant goes in too: one call answers either way
|
||||
let twin = (f.voice.is_none() && q.when.voice.is_some()).then(|| q.swap.as_deref().and_then(|s| library::find(s, rubric_md))).flatten();
|
||||
add(q, &mut asked);
|
||||
if let Some(t) = twin {
|
||||
add(t, &mut asked);
|
||||
}
|
||||
continue;
|
||||
};
|
||||
match q.swap.as_deref().and_then(|s| library::find(s, rubric_md)).filter(|s| s.not_for(f).is_none()) {
|
||||
Some(s) => {
|
||||
dropped.push((q.id.clone(), format!("{why}: asked {} instead", s.id)));
|
||||
add(s, &mut asked);
|
||||
}
|
||||
None => dropped.push((q.id.clone(), why)),
|
||||
}
|
||||
}
|
||||
(asked, dropped)
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
//! Every answer kept (docs/ask.feature AK3), so a question can be labelled, calibrated and reworded later (AK6, AK7):
|
||||
//! each call in calls.jsonl (the file, the window, the state, the clips it sent by hash, the route and the cost) and each
|
||||
//! answer in answers.jsonl (the call, the question and its version, the reading). The clips themselves are kept by hash
|
||||
//! in media/, at most 2 GB, the oldest out first, so new words can be asked of the same media. A call keeps what its
|
||||
//! file was (`ident`), so a note on the render's copy in the feed labels it (labels.rs), and an answer keeps its whole
|
||||
//! question, so a verdict reads in its terms and `raea ask try` can reword it.
|
||||
|
||||
use std::io::Write as _;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use raea_core_ask::{Question, Reading};
|
||||
use serde_json::{Value, json};
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
/// How much cut media is kept.
|
||||
pub const MEDIA_CAP: u64 = 2 << 30;
|
||||
|
||||
pub fn dir() -> PathBuf {
|
||||
raea_io_clef::cache::dir()
|
||||
}
|
||||
|
||||
/// A new id: a prefix and twelve hex digits, from the time, the process and a counter.
|
||||
pub fn new_id(prefix: &str) -> String {
|
||||
static N: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
|
||||
let t = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_nanos()).unwrap_or(0);
|
||||
let seed = format!("{t}-{}-{}", std::process::id(), N.fetch_add(1, std::sync::atomic::Ordering::Relaxed));
|
||||
let h = seed.bytes().fold(0xcbf2_9ce4_8422_2325u64, |h, b| (h ^ b as u64).wrapping_mul(0x0100_0000_01b3));
|
||||
format!("{prefix}-{:012x}", h & 0xffff_ffff_ffff)
|
||||
}
|
||||
|
||||
pub fn now() -> String {
|
||||
let s = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_secs()).unwrap_or(0);
|
||||
s.to_string()
|
||||
}
|
||||
|
||||
fn append(file: &str, row: &Value) {
|
||||
let d = dir();
|
||||
if std::fs::create_dir_all(&d).is_err() {
|
||||
return;
|
||||
}
|
||||
// one write a row: several runs (a script's, two at once) append to the same file, and a row written in pieces
|
||||
// could be split by another's
|
||||
if let Ok(mut f) = std::fs::OpenOptions::new().create(true).append(true).open(d.join(file)) {
|
||||
let _ = f.write_all(format!("{row}\n").as_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
fn hex(digest: &[u8]) -> String {
|
||||
digest.iter().take(16).map(|b| format!("{b:02x}")).collect()
|
||||
}
|
||||
|
||||
/// What a file is, cheaply, and the size an ident names (raea-core-ask, so `raea make status` reads the same).
|
||||
pub use raea_core_ask::ident::{ident, ident_len};
|
||||
|
||||
/// One of the record's files written whole, through a temporary file, so a reader never sees half of it.
|
||||
pub fn write_whole(file: &str, text: &str) -> Result<(), String> {
|
||||
let d = dir();
|
||||
let tmp = d.join(format!("{file}.{}.tmp", std::process::id()));
|
||||
let put = || -> std::io::Result<()> {
|
||||
std::fs::create_dir_all(&d)?;
|
||||
std::fs::write(&tmp, text)?;
|
||||
std::fs::rename(&tmp, d.join(file))
|
||||
};
|
||||
put().map_err(|e| format!("{}: {e}", d.display()))
|
||||
}
|
||||
|
||||
/// A clip kept by its hash, as `HASH.EXT` (already kept is left alone).
|
||||
pub fn keep_media(bytes: &[u8], ext: &str) -> String {
|
||||
let name = format!("{}.{ext}", hex(&Sha256::digest(bytes)));
|
||||
let d = dir().join("media");
|
||||
let p = d.join(&name);
|
||||
if !p.is_file() && std::fs::create_dir_all(&d).is_ok() {
|
||||
let _ = std::fs::write(&p, bytes);
|
||||
prune(MEDIA_CAP);
|
||||
}
|
||||
name
|
||||
}
|
||||
|
||||
/// A kept clip's bytes, by its name.
|
||||
pub fn media(name: &str) -> Option<Vec<u8>> {
|
||||
std::fs::read(dir().join("media").join(name)).ok()
|
||||
}
|
||||
|
||||
/// The kept media held to `cap` bytes, the least recently written going first.
|
||||
pub fn prune(cap: u64) {
|
||||
let Ok(rd) = std::fs::read_dir(dir().join("media")) else { return };
|
||||
let mut files: Vec<(std::time::SystemTime, u64, PathBuf)> = rd
|
||||
.flatten()
|
||||
.filter_map(|e| e.metadata().ok().and_then(|m| Some((m.modified().ok()?, m.len(), e.path()))))
|
||||
.collect();
|
||||
let mut total: u64 = files.iter().map(|f| f.1).sum();
|
||||
files.sort();
|
||||
for (_, len, p) in files {
|
||||
if total <= cap {
|
||||
break;
|
||||
}
|
||||
if std::fs::remove_file(&p).is_ok() {
|
||||
total -= len;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// One call kept; its id.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn call(file: &str, project: Option<&str>, from: f64, to: Option<f64>, state: &str, media: &[String], route: &str, cost: f64, cached: bool) -> String {
|
||||
let id = new_id("c");
|
||||
let row = json!({
|
||||
"id": id, "at": now(), "file": file, "ident": ident(Path::new(file)), "project": project, "from": from, "to": to, "state": state,
|
||||
"media": media, "route": route, "cost": cost, "cached": cached,
|
||||
});
|
||||
append("calls.jsonl", &row);
|
||||
id
|
||||
}
|
||||
|
||||
/// One answer kept; its id.
|
||||
pub fn answer(call: &str, file: &str, q: &Question, r: &Reading, flagged: bool) -> String {
|
||||
let id = new_id("a");
|
||||
let whole = serde_json::to_value(Question { calibration: None, ..q.clone() }).unwrap_or_default();
|
||||
let row = json!({
|
||||
"id": id, "at": now(), "call": call, "file": file, "question": q.id, "version": q.version(), "ask": q.ask,
|
||||
"value": r.value, "problem": r.problem, "choice": r.choice, "says": r.says, "flagged": flagged, "calibrated": q.calibrated(),
|
||||
"q": whole,
|
||||
});
|
||||
append("answers.jsonl", &row);
|
||||
id
|
||||
}
|
||||
|
||||
/// Every row of one of the record's files.
|
||||
pub fn rows(file: &str) -> Vec<Value> {
|
||||
std::fs::read_to_string(dir().join(file)).unwrap_or_default().lines().filter_map(|l| serde_json::from_str(l).ok()).collect()
|
||||
}
|
||||
@@ -0,0 +1,365 @@
|
||||
//! One runner for every caller (docs/ask.feature AK3): a batch planned into calls (grouped by file, window, the files
|
||||
//! beside it and what of the picture its questions look at, at most 64 questions a call, the voice question added to a
|
||||
//! call whose questions depend on whether anyone speaks when that isn't known), each clip cut once, the calls
|
||||
//! made in parallel, the answers streamed back as they come and kept. A pool that's spent partway keeps what came and
|
||||
//! reports the rest as waiting for it. `dry` cuts the media and says what would be sent, and spends nothing. A group can
|
||||
//! carry clips kept from an earlier call instead of a file to cut (`raea ask try`), and every question goes out with the
|
||||
//! person's own calibration when it has earned one (calibrate.rs).
|
||||
|
||||
use std::collections::{BTreeSet, HashMap};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
use std::sync::{Arc, Mutex, mpsc};
|
||||
|
||||
use raea_core_ask::{Kind, Picks, Question, Sees, Window, limits};
|
||||
use raea_io_clef::{Answered, Call, Fail, Media, media};
|
||||
use serde::Serialize;
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use crate::prepare::{self, Piece, VOICE};
|
||||
use crate::{calibrate, record};
|
||||
|
||||
/// What to ask of one file: its questions (prepared), those dropped with why, a window over all of them (else each
|
||||
/// question's own), and files set beside it (to pick between, or before and after).
|
||||
pub struct Entry {
|
||||
pub piece: Arc<Piece>,
|
||||
pub window: Option<Window>,
|
||||
pub questions: Vec<Question>,
|
||||
pub dropped: Vec<(String, String)>,
|
||||
pub with: Vec<PathBuf>,
|
||||
}
|
||||
|
||||
/// One call's worth.
|
||||
pub struct Group {
|
||||
pub piece: Arc<Piece>,
|
||||
pub from: f64,
|
||||
pub to: Option<f64>,
|
||||
pub sees: Sees,
|
||||
pub hears: bool,
|
||||
pub with: Vec<PathBuf>,
|
||||
pub questions: Vec<Question>,
|
||||
/// clips kept from an earlier call, sent again in place of cutting the file
|
||||
pub kept: Option<Arc<Kept>>,
|
||||
}
|
||||
|
||||
/// An earlier call's clips and state, and their seconds of video and sound (for the estimate).
|
||||
pub struct Kept {
|
||||
pub media: Media,
|
||||
pub state: String,
|
||||
pub video_seconds: f64,
|
||||
pub sound_seconds: f64,
|
||||
}
|
||||
|
||||
/// One answer, or why a question wasn't asked or still waits: the line `raea ask --json` prints for each.
|
||||
#[derive(Debug, Clone, Default, Serialize)]
|
||||
pub struct Answer {
|
||||
/// its id in the record (`raea ask verdict` takes it)
|
||||
pub answer: Option<String>,
|
||||
pub file: String,
|
||||
pub id: String,
|
||||
pub version: String,
|
||||
pub from: f64,
|
||||
pub to: Option<f64>,
|
||||
pub says: Option<String>,
|
||||
pub value: Option<f64>,
|
||||
pub problem: Option<f64>,
|
||||
pub choice: Option<String>,
|
||||
pub flagged: bool,
|
||||
pub calibrated: bool,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub not_asked: Option<String>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub waits: Option<String>,
|
||||
pub route: Option<String>,
|
||||
pub cached: bool,
|
||||
}
|
||||
|
||||
/// What the run came to.
|
||||
#[derive(Debug, Clone, Default, Serialize)]
|
||||
pub struct Summary {
|
||||
pub asked: usize,
|
||||
pub answered: usize,
|
||||
pub calls: usize,
|
||||
pub cost: f64,
|
||||
pub estimate: f64,
|
||||
pub pool_left: Option<f64>,
|
||||
pub waiting: usize,
|
||||
pub flagged: usize,
|
||||
pub flagged_calibrated: usize,
|
||||
pub routes: BTreeSet<String>,
|
||||
/// the clips cut (each once, however many calls used it)
|
||||
pub clips: usize,
|
||||
}
|
||||
|
||||
/// What the runner tells its caller as it goes: an answer, or (dry) a call it would make.
|
||||
pub enum Event<'a> {
|
||||
Answer(&'a Answer),
|
||||
Would(&'a Value),
|
||||
}
|
||||
|
||||
pub struct Opts {
|
||||
pub jobs: usize,
|
||||
pub dry: bool,
|
||||
/// how a call is made: `raea_io_clef::ask` (a test gives its own)
|
||||
pub ask: fn(&Call) -> Result<Answered, Fail>,
|
||||
}
|
||||
|
||||
impl Opts {
|
||||
pub fn new(jobs: usize, dry: bool) -> Opts {
|
||||
Opts { jobs, dry, ask: raea_io_clef::ask }
|
||||
}
|
||||
}
|
||||
|
||||
const NAMES: [&str; 4] = ["first", "second", "third", "fourth"];
|
||||
|
||||
/// A pick's options: the files given, in order (all, or all but the first, the reference).
|
||||
fn picks(p: Picks, files: usize) -> Vec<String> {
|
||||
let n = files.min(NAMES.len());
|
||||
let skip = usize::from(p == Picks::AfterFirst);
|
||||
NAMES[skip.min(n)..n].iter().map(|s| s.to_string()).collect()
|
||||
}
|
||||
|
||||
/// The batch as calls.
|
||||
pub fn plan(entries: &[Entry]) -> (Vec<Group>, Vec<Answer>) {
|
||||
let mut groups: Vec<Group> = Vec::new();
|
||||
let mut unasked = Vec::new();
|
||||
let mine = calibrate::local();
|
||||
for e in entries {
|
||||
let file = e.piece.file.display().to_string();
|
||||
for (id, why) in &e.dropped {
|
||||
unasked.push(Answer { file: file.clone(), id: id.clone(), not_asked: Some(why.clone()), ..Default::default() });
|
||||
}
|
||||
for q in &e.questions {
|
||||
let w = e.window.or(q.window).unwrap_or_default();
|
||||
let (from, to) = (w.from.unwrap_or(0.0).max(0.0), w.to);
|
||||
let mut q = q.clone();
|
||||
calibrate::apply(&mut q, &mine);
|
||||
if let Some(p) = q.picks {
|
||||
q.kind = Kind::Choose;
|
||||
q.options = picks(p, 1 + e.with.len());
|
||||
}
|
||||
let compares = q.picks.is_some_and(|_| q.options.len() < 2) || (q.uses.iter().any(|u| u == "with") && e.with.is_empty());
|
||||
if compares {
|
||||
unasked.push(Answer { file: file.clone(), version: q.version(), not_asked: Some("it compares files: set one or more beside it (--with)".into()), id: q.id, ..Default::default() });
|
||||
continue;
|
||||
}
|
||||
// one place in each call is kept for the voice question
|
||||
let same = |g: &&mut Group| Arc::ptr_eq(&g.piece, &e.piece) && g.from == from && g.to == to && g.sees == q.sees && g.with == e.with && g.questions.len() < limits::QUESTIONS - 1;
|
||||
match groups.iter_mut().find(same) {
|
||||
Some(g) => {
|
||||
g.hears |= q.hears;
|
||||
g.questions.push(q);
|
||||
}
|
||||
None => groups.push(Group { piece: e.piece.clone(), from, to, sees: q.sees, hears: q.hears, with: e.with.clone(), questions: vec![q], kept: None }),
|
||||
}
|
||||
}
|
||||
}
|
||||
for g in &mut groups {
|
||||
g.hears &= g.piece.probe.sound || g.with.iter().any(|f| media::probe(f).is_ok_and(|p| p.sound));
|
||||
if g.hears && g.piece.voice.is_none() && g.questions.iter().any(|q| q.when.voice.is_some()) {
|
||||
g.questions.push(prepare::voice_question());
|
||||
}
|
||||
}
|
||||
(groups, unasked)
|
||||
}
|
||||
|
||||
/// Clips cut once a run, by what they are.
|
||||
type Cuts = Mutex<HashMap<String, Result<Arc<Vec<u8>>, String>>>;
|
||||
|
||||
fn cut(cuts: &Cuts, key: String, make: impl FnOnce() -> Result<Vec<u8>, String>) -> Result<Arc<Vec<u8>>, String> {
|
||||
if let Some(r) = cuts.lock().unwrap().get(&key) {
|
||||
return r.clone();
|
||||
}
|
||||
let r = make().map(Arc::new);
|
||||
cuts.lock().unwrap().insert(key, r.clone());
|
||||
r
|
||||
}
|
||||
|
||||
/// A group's media, and its seconds of video and of sound (for the estimate).
|
||||
fn media_of(g: &Group, cuts: &Cuts) -> Result<(Media, f64, f64), String> {
|
||||
if let Some(k) = &g.kept {
|
||||
return Ok((k.media.clone(), k.video_seconds, k.sound_seconds));
|
||||
}
|
||||
let files: Vec<&Path> = std::iter::once(g.piece.file.as_path()).chain(g.with.iter().map(PathBuf::as_path)).collect();
|
||||
let (from, to) = (g.from, g.to);
|
||||
let span = |p: &media::Probe| (to.unwrap_or(p.seconds) - from).clamp(0.0, p.seconds.max(0.1));
|
||||
let mut m = Media::default();
|
||||
let (mut vs, mut ss) = (0.0, 0.0);
|
||||
for f in &files {
|
||||
let p = if *f == g.piece.file.as_path() { g.piece.probe } else { media::probe(f)? };
|
||||
let k = |what: &str| format!("{what}:{}:{from}:{to:?}", f.display());
|
||||
match g.sees {
|
||||
Sees::Video if p.video => {
|
||||
m.videos.push(cut(cuts, k("video"), || media::video(f, from, to))?.to_vec());
|
||||
vs += span(&p).min(limits::VIDEO_SECONDS);
|
||||
}
|
||||
Sees::Video | Sees::Stills if !p.video => m.stills.push(cut(cuts, k("still"), || media::still(f, None))?.to_vec()),
|
||||
Sees::Stills if files.len() == 1 => {
|
||||
let len = span(&p);
|
||||
for i in 0..limits::STILLS {
|
||||
let at = from + len * (i as f64 + 0.5) / limits::STILLS as f64;
|
||||
m.stills.push(cut(cuts, k(&format!("frame{i}")), || media::still(f, Some(at)))?.to_vec());
|
||||
}
|
||||
}
|
||||
Sees::Stills => m.stills.push(cut(cuts, k("frame"), || media::still(f, Some(from + span(&p) / 2.0)))?.to_vec()),
|
||||
_ => {}
|
||||
}
|
||||
if g.hears && p.sound {
|
||||
m.sounds.push(cut(cuts, k("sound"), || media::sound(f, from, to))?.to_vec());
|
||||
ss += span(&p).min(limits::SOUND_SECONDS);
|
||||
}
|
||||
}
|
||||
if m.videos.len() > limits::VIDEOS || m.stills.len() > limits::STILLS || m.sounds.len() > limits::SOUNDS {
|
||||
return Err(format!("too many files for one call: at most {} videos, {} stills and {} sounds", limits::VIDEOS, limits::STILLS, limits::SOUNDS));
|
||||
}
|
||||
Ok((m, vs, ss))
|
||||
}
|
||||
|
||||
enum Done {
|
||||
Asked(Answered, Vec<String>, String),
|
||||
Would(Value),
|
||||
Failed(String),
|
||||
Waits(String),
|
||||
}
|
||||
|
||||
/// Every entry asked, at most `jobs` calls at once, each event told to `out` as it comes (in the caller's thread).
|
||||
pub fn run(entries: Vec<Entry>, o: &Opts, out: &mut dyn FnMut(Event)) -> Summary {
|
||||
let (groups, unasked) = plan(&entries);
|
||||
run_groups(groups, unasked, o, out)
|
||||
}
|
||||
|
||||
/// Planned groups asked, the questions not asked told first.
|
||||
pub fn run_groups(groups: Vec<Group>, unasked: Vec<Answer>, o: &Opts, out: &mut dyn FnMut(Event)) -> Summary {
|
||||
let mut sum = Summary::default();
|
||||
for a in &unasked {
|
||||
out(Event::Answer(a));
|
||||
}
|
||||
let cuts: Cuts = Mutex::default();
|
||||
let (next, spent) = (AtomicUsize::new(0), AtomicBool::new(false));
|
||||
let spent_why = Mutex::new(String::new());
|
||||
let (tx, rx) = mpsc::channel::<(usize, Done)>();
|
||||
std::thread::scope(|s| {
|
||||
for _ in 0..o.jobs.clamp(1, 16).min(groups.len().max(1)) {
|
||||
let (tx, groups, cuts, next, spent, spent_why) = (tx.clone(), &groups, &cuts, &next, &spent, &spent_why);
|
||||
s.spawn(move || {
|
||||
loop {
|
||||
let i = next.fetch_add(1, Ordering::Relaxed);
|
||||
let Some(g) = groups.get(i) else { break };
|
||||
let done = if spent.load(Ordering::Relaxed) {
|
||||
Done::Waits(spent_why.lock().unwrap().clone())
|
||||
} else {
|
||||
match media_of(g, cuts) {
|
||||
Err(e) => Done::Failed(e),
|
||||
Ok((m, vs, ss)) => {
|
||||
let state = g.kept.as_ref().map_or_else(|| g.piece.state(), |k| k.state.clone());
|
||||
let call = Call { state, questions: g.questions.clone(), media: m };
|
||||
let estimate = limits::estimate(vs, ss, call.media.stills.len(), call.state.len(), call.questions.len());
|
||||
if o.dry {
|
||||
Done::Would(would(g, &call, estimate))
|
||||
} else {
|
||||
match (o.ask)(&call) {
|
||||
Ok(a) => Done::Asked(a, kept(&call.media), call.state),
|
||||
Err(Fail::Spent(why)) => {
|
||||
spent.store(true, Ordering::Relaxed);
|
||||
*spent_why.lock().unwrap() = why.clone();
|
||||
Done::Waits(why)
|
||||
}
|
||||
Err(f) => Done::Failed(f.to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if tx.send((i, done)).is_err() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
drop(tx);
|
||||
for (i, done) in rx {
|
||||
told(&groups[i], done, &mut sum, out);
|
||||
}
|
||||
});
|
||||
sum.clips = cuts.lock().unwrap().values().filter(|c| c.is_ok()).count();
|
||||
sum
|
||||
}
|
||||
|
||||
/// The clips a call sent, kept by hash for `raea ask try`.
|
||||
fn kept(m: &Media) -> Vec<String> {
|
||||
let each = |v: &[Vec<u8>], ext: &str| v.iter().map(|b| record::keep_media(b, ext)).collect::<Vec<_>>();
|
||||
[each(&m.videos, "mp4"), each(&m.stills, "jpg"), each(&m.sounds, "mp3")].concat()
|
||||
}
|
||||
|
||||
fn would(g: &Group, call: &Call, estimate: f64) -> Value {
|
||||
let sizes = |v: &[Vec<u8>]| v.iter().map(Vec::len).collect::<Vec<_>>();
|
||||
json!({
|
||||
"file": g.piece.file.display().to_string(), "from": g.from, "to": g.to,
|
||||
"questions": call.questions.iter().map(|q| json!({"id": q.id, "ask": q.ask, "type": q.kind})).collect::<Vec<_>>(),
|
||||
"state": call.state,
|
||||
"media": {"videos": sizes(&call.media.videos), "stills": sizes(&call.media.stills), "sounds": sizes(&call.media.sounds)},
|
||||
"estimate_usd": estimate,
|
||||
})
|
||||
}
|
||||
|
||||
/// A finished call's answers told, kept and counted. When the voice question went along, the variant that doesn't
|
||||
/// apply (sound where no one speaks, sound-silent where someone does) is set aside.
|
||||
fn told(g: &Group, done: Done, sum: &mut Summary, out: &mut dyn FnMut(Event)) {
|
||||
let file = g.piece.file.display().to_string();
|
||||
// the voice question only decides between variants: it isn't told
|
||||
let asked: Vec<&Question> = g.questions.iter().filter(|q| q.id != VOICE).collect();
|
||||
let base = |q: &Question| Answer { file: file.clone(), id: q.id.clone(), version: q.version(), from: g.from, to: g.to, calibrated: q.calibrated(), ..Default::default() };
|
||||
match done {
|
||||
Done::Would(v) => {
|
||||
sum.calls += 1;
|
||||
sum.estimate += v["estimate_usd"].as_f64().unwrap_or(0.0);
|
||||
out(Event::Would(&v));
|
||||
}
|
||||
Done::Failed(why) | Done::Waits(why) if g.questions.is_empty() => drop(why),
|
||||
Done::Failed(why) => asked.iter().for_each(|q| out(Event::Answer(&Answer { not_asked: Some(why.clone()), ..base(q) }))),
|
||||
Done::Waits(why) => {
|
||||
sum.waiting += asked.len();
|
||||
asked.iter().for_each(|q| out(Event::Answer(&Answer { waits: Some(format!("waits for the pool: {why}")), ..base(q) })));
|
||||
}
|
||||
Done::Asked(a, clips, state) => {
|
||||
sum.calls += 1;
|
||||
sum.asked += asked.len();
|
||||
sum.cost += a.cost;
|
||||
sum.pool_left = a.pool_left.or(sum.pool_left);
|
||||
sum.routes.insert(a.route.clone());
|
||||
let project = g.piece.project.as_ref().map(|p| p.display().to_string());
|
||||
let call = record::call(&file, project.as_deref(), g.from, g.to, &state, &clips, &a.route, a.cost, a.cached);
|
||||
let heard = a.answers.get(VOICE).and_then(|v| v["noul"].as_f64());
|
||||
for q in g.questions.iter().filter(|q| q.id != VOICE) {
|
||||
let Some(ans) = a.answers.get(&q.id) else {
|
||||
out(Event::Answer(&Answer { not_asked: Some("no answer came back for it".into()), ..base(q) }));
|
||||
continue;
|
||||
};
|
||||
if let (Some(p), Some(v)) = (heard, q.when.voice) {
|
||||
if v != (p >= 0.5) {
|
||||
let who = if p >= 0.5 { "someone speaks" } else { "no one speaks" };
|
||||
out(Event::Answer(&Answer { not_asked: Some(format!("set aside: {who} ({p:.2})")), ..base(q) }));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
let r = q.read(ans);
|
||||
let flagged = q.flagged(&r);
|
||||
sum.answered += 1;
|
||||
sum.flagged += usize::from(flagged);
|
||||
sum.flagged_calibrated += usize::from(flagged && q.calibrated());
|
||||
let id = record::answer(&call, &file, q, &r, flagged);
|
||||
out(Event::Answer(&Answer {
|
||||
answer: Some(id),
|
||||
says: Some(r.says),
|
||||
value: Some(r.value),
|
||||
problem: r.problem,
|
||||
choice: r.choice,
|
||||
flagged,
|
||||
route: Some(a.route.clone()),
|
||||
cached: a.cached,
|
||||
..base(q)
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
use raea_core_ask::{Facts, Kind, Picks, Question, Sees, Window, library};
|
||||
use raea_io_clef::media::Probe;
|
||||
use raea_io_clef::{Answered, Call, Fail};
|
||||
use serde_json::{Map, Value, json};
|
||||
|
||||
use crate::prepare::{self, Piece, VOICE};
|
||||
use crate::runner::{self, Answer, Entry, Event, Opts};
|
||||
|
||||
fn rubric() -> String {
|
||||
std::fs::read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/../../sdk/guides/craft/rubric.md")).expect("the craft rubric")
|
||||
}
|
||||
|
||||
pub(crate) fn setup() {
|
||||
static ONCE: std::sync::Once = std::sync::Once::new();
|
||||
// SAFETY: set once, before any test reads it, to the same value for every test
|
||||
ONCE.call_once(|| unsafe { std::env::set_var("RAEA_ASK_DIR", std::env::temp_dir().join(format!("raea-ask-test-{}", std::process::id()))) });
|
||||
}
|
||||
|
||||
fn ids(qs: &[Question]) -> Vec<&str> {
|
||||
qs.iter().map(|q| q.id.as_str()).collect()
|
||||
}
|
||||
|
||||
fn piece(file: &str, voice: Option<bool>) -> Arc<Piece> {
|
||||
let probe = Probe { seconds: 10.0, video: true, still: false, sound: true };
|
||||
Arc::new(Piece { file: PathBuf::from(file), probe, voice, ..Default::default() })
|
||||
}
|
||||
|
||||
fn entry(p: &Arc<Piece>, window: Option<Window>, questions: Vec<Question>) -> Entry {
|
||||
Entry { piece: p.clone(), window, questions, dropped: vec![], with: vec![] }
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn no_one_speaking_asks_sound_silent_and_a_file_without_sound_isnt_listened_to() {
|
||||
let r = rubric();
|
||||
let sound = library::find("sound", Some(&r)).unwrap();
|
||||
let silent = Facts { voice: Some(false), sound: true, video: true, ..Default::default() };
|
||||
let (asked, dropped) = prepare::keep(vec![sound.clone()], &silent, Some(&r));
|
||||
assert_eq!(ids(&asked), ["sound-silent"]);
|
||||
assert!(dropped[0].1.contains("no one speaks") && dropped[0].1.contains("sound-silent instead"), "{dropped:?}");
|
||||
let mut listen = Question::plain("loud", "Is it loud?");
|
||||
listen.sees = Sees::Nothing;
|
||||
let (asked, dropped) = prepare::keep(vec![listen], &Facts { video: true, ..Default::default() }, None);
|
||||
assert!(asked.is_empty() && dropped[0].1.contains("no sound"), "{dropped:?}");
|
||||
// not knowing whether anyone speaks, both are kept, and the plan adds the voice question to their call
|
||||
let unknown = Facts { sound: true, video: true, ..Default::default() };
|
||||
let (asked, _) = prepare::keep(vec![sound], &unknown, Some(&r));
|
||||
assert_eq!(ids(&asked), ["sound", "sound-silent"]);
|
||||
let (groups, _) = runner::plan(&[entry(&piece("a.mp4", None), None, asked)]);
|
||||
assert_eq!(groups.len(), 1);
|
||||
assert_eq!(ids(&groups[0].questions), ["sound", "sound-silent", VOICE]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_state_says_what_the_piece_is() {
|
||||
let mut p = (*piece("a.mp4", Some(false))).clone();
|
||||
p.brief = json!({"title": "Spring launch", "mode": ["pitch"], "audience": "busy founders", "believe": "it saves them an hour."});
|
||||
p.extra = Some("raea measured -14 LUFS.".into());
|
||||
let s = p.state();
|
||||
for want in ["A pitch piece: \"Spring launch\".", "It's for: busy founders.", "believing: it saves them an hour.", "No one speaks", "runs 10 s", "-14 LUFS"] {
|
||||
assert!(s.contains(want), "{want}: {s}");
|
||||
}
|
||||
assert_eq!(p.facts().modes, ["pitch"]);
|
||||
// no brief and the caller's own state: the caller says what the piece is
|
||||
let own = Piece { extra: Some("A game: \"Rover\".".into()), ..(*piece("a.mp4", None)).clone() };
|
||||
assert_eq!(own.state(), "It runs 10 s. A game: \"Rover\".");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn calls_hold_64_questions_and_split_by_window_and_what_they_look_at() {
|
||||
let p = piece("a.mp4", Some(true));
|
||||
let many: Vec<Question> = (0..65).map(|i| Question::plain(&format!("q{i}"), "Is it loud?")).collect();
|
||||
let (groups, _) = runner::plan(&[entry(&p, None, many)]);
|
||||
assert_eq!(groups.iter().map(|g| g.questions.len()).collect::<Vec<_>>(), [63, 2], "one place a call is kept for the voice question");
|
||||
let hook = Window { from: Some(0.0), to: Some(3.0) };
|
||||
let mut still = Question::plain("s", "Is the text readable?");
|
||||
still.sees = Sees::Stills;
|
||||
let (groups, _) = runner::plan(&[entry(&p, None, vec![Question::plain("a", "Is it loud?"), still]), entry(&p, Some(hook), vec![Question::plain("b", "Is it loud?")])]);
|
||||
assert_eq!(groups.len(), 3);
|
||||
let mut pick = Question::plain("best", "Which suits the brief best?");
|
||||
pick.picks = Some(Picks::All);
|
||||
let (groups, unasked) = runner::plan(&[entry(&p, None, vec![pick])]);
|
||||
assert!(groups.is_empty() && unasked[0].not_asked.as_deref().is_some_and(|n| n.contains("--with")), "{unasked:?}");
|
||||
let (groups, unasked) = runner::plan(&[entry(&p, None, vec![library::find("decide.changed", None).unwrap()])]);
|
||||
assert!(groups.is_empty() && !unasked[0].version.is_empty(), "{unasked:?}");
|
||||
}
|
||||
|
||||
/// clef's answers as a fake gives them: yes 0.8 to every yes question (0.9 to the voice question), the lowest level of
|
||||
/// a grade.
|
||||
fn answers(call: &Call) -> Map<String, Value> {
|
||||
call.questions
|
||||
.iter()
|
||||
.map(|q| {
|
||||
let a = match q.kind {
|
||||
Kind::Yes => json!({"noul": if q.id == VOICE { 0.9 } else { 0.8 }}),
|
||||
_ => json!({"choice": q.levels()[0], "probabilities": {q.levels()[0].clone(): 1.0}}),
|
||||
};
|
||||
(q.id.clone(), a)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
fn answered(call: &Call) -> Answered {
|
||||
Answered { answers: answers(call), cost: 0.001, cached: false, route: "a test".into(), pool_left: Some(1.5) }
|
||||
}
|
||||
|
||||
/// A 2 s clip with a picture and a tone, made with FFmpeg.
|
||||
fn clip(name: &str) -> PathBuf {
|
||||
let out = std::env::temp_dir().join(format!("raea-ask-{}-{name}.mp4", std::process::id()));
|
||||
let ff = raea_io_assets::ffmpeg_tool("ffmpeg", false).expect("FFmpeg");
|
||||
let ok = std::process::Command::new(ff)
|
||||
.args(["-y", "-v", "error", "-f", "lavfi", "-i", "testsrc=size=320x240:rate=10:duration=2", "-f", "lavfi", "-i", "sine=frequency=440:duration=2"])
|
||||
.args(["-c:v", "mpeg4", "-c:a", "aac", "-shortest"])
|
||||
.arg(&out)
|
||||
.status()
|
||||
.expect("FFmpeg ran");
|
||||
assert!(ok.success());
|
||||
out
|
||||
}
|
||||
|
||||
fn run(entries: Vec<Entry>, jobs: usize, ask: fn(&Call) -> Result<Answered, Fail>) -> (runner::Summary, Vec<Answer>) {
|
||||
setup();
|
||||
let mut got = Vec::new();
|
||||
let sum = runner::run(entries, &Opts { jobs, dry: false, ask }, &mut |e| {
|
||||
if let Event::Answer(a) = e {
|
||||
got.push(a.clone());
|
||||
}
|
||||
});
|
||||
(sum, got)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn each_clip_is_cut_once_and_the_voice_answer_sets_a_variant_aside() {
|
||||
let file = clip("once");
|
||||
let p = Arc::new(Piece::read(&file, None, None, None, None).unwrap());
|
||||
assert!(p.probe.video && p.probe.sound && p.voice.is_none());
|
||||
let r = rubric();
|
||||
let (asked, _) = prepare::keep(vec![library::find("sound", Some(&r)).unwrap()], &p.facts(), Some(&r));
|
||||
let mut listen = Question::plain("loud", "Is it too loud?");
|
||||
listen.sees = Sees::Nothing;
|
||||
let (sum, got) = run(vec![entry(&p, None, [asked, vec![listen]].concat())], 4, |c| Ok(answered(c)));
|
||||
assert_eq!((sum.calls, sum.clips), (2, 2), "the picture's call and the sound's call share one cut of the sound");
|
||||
let by = |id: &str| got.iter().find(|a| a.id == id).unwrap_or_else(|| panic!("{id}: {got:?}"));
|
||||
assert!(by("sound").says.is_some() && by("loud").flagged);
|
||||
assert!(by("sound-silent").not_asked.as_deref().is_some_and(|n| n.contains("someone speaks (0.90)")), "{:?}", by("sound-silent"));
|
||||
assert!(!got.iter().any(|a| a.id == VOICE), "the voice question isn't told");
|
||||
assert_eq!((sum.answered, sum.cost, sum.pool_left), (2, 0.002, Some(1.5)));
|
||||
}
|
||||
|
||||
static CALLS: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
#[test]
|
||||
fn a_pool_spent_partway_keeps_what_came_and_the_rest_waits() {
|
||||
let file = clip("spent");
|
||||
let p = Arc::new(Piece::read(&file, None, None, Some(true), None).unwrap());
|
||||
let at = |s: f64| Some(Window { from: Some(s), to: Some(s + 0.5) });
|
||||
let entries = (0..4).map(|i| entry(&p, at(i as f64 * 0.4), vec![Question::plain(&format!("w{i}"), "Is it loud?")])).collect();
|
||||
let (sum, got) = run(entries, 1, |c| match CALLS.fetch_add(1, Ordering::SeqCst) {
|
||||
2 => Err(Fail::Spent("this month's pool is used up".into())),
|
||||
_ => Ok(answered(c)),
|
||||
});
|
||||
assert_eq!((sum.calls, sum.answered, sum.waiting), (2, 2, 2));
|
||||
assert_eq!(got.iter().filter(|a| a.waits.as_deref().is_some_and(|w| w.contains("used up"))).count(), 2);
|
||||
assert_eq!(CALLS.load(Ordering::SeqCst), 3, "nothing is sent after the pool is spent");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn own_words_keep_their_id() {
|
||||
assert_eq!(crate::verbs::own_id("Does the music fight the voice?"), "own-does-the-music-fight-the-voice");
|
||||
assert_eq!(crate::verbs::own_id("Does the music fight the voice?"), crate::verbs::own_id("does the MUSIC fight the voice"));
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
//! `raea ask` (docs/ask.feature AK3): questions about a piece's picture and sound, from the command line or a batch,
|
||||
//! prepared (prepare.rs), asked in parallel (runner.rs) and kept (record.rs). It prints as answers come: words and a
|
||||
//! probability a line, or with `--json` one JSON object a line (an answer, a call `--dry` would make, then the summary).
|
||||
//! `--gate` exits 1 when a calibrated question flags (`--gate any`: when any does), for a pipeline. `verdict`,
|
||||
//! `calibrate` and `try` label the answers, calibrate the questions on them and measure new words (labels.rs,
|
||||
//! calibrate.rs; AK6-AK7).
|
||||
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::io::Read as _;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
|
||||
use raea_core_ask::{Kind, Question, Window, library};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use crate::labels::{self, span};
|
||||
use crate::prepare::{self, Piece};
|
||||
use crate::runner::{self, Entry, Event, Opts};
|
||||
use crate::{calibrate, record};
|
||||
|
||||
pub const USAGE: &str = "raea ask FILE [QUESTION...] [--choose A,B,C] [--grade] [--rate N] [--flag ANSWERS] [--set NAME] [--std ID] [--from S] [--to S] [--at S] [--with FILE2] [--brief brief.ts|none] [--words words.json] [--voice yes|no] [--state TEXT] [--dry] [--json] [--gate [any]] [--jobs N] | ask --batch FILE [--dry] [--json] [--gate [any]] [--jobs N] | ask list [SET] [--json] | ask verdict ANSWER WORD [--eye NAME] | ask calibrate [ID] [--json] | ask try WORDS --like ID [--dry] [--json] [--jobs N] (questions about a piece's picture and sound, answered by clef-omni and paid from your raea plan's pool when the app is signed in, else RAEA_AGENT_KEY's, else your own Cloudflare keys: your own words, or the standard sets (rubric, av, defects, platform, decide, make); every question about one clip goes in one call, --batch (a JSON list or JSON lines, - for stdin) asks many clips in parallel; --dry says what would be sent and spends nothing; answers are advice until a question is calibrated: verdict labels an answer, calibrate holds each question to your verdicts, notes and approvals, try asks new words of its labelled clips)";
|
||||
|
||||
const VALUED: [&str; 17] = ["--choose", "--rate", "--flag", "--set", "--std", "--from", "--to", "--at", "--with", "--brief", "--words", "--voice", "--state", "--jobs", "--batch", "--eye", "--like"];
|
||||
const BARE: [&str; 4] = ["--grade", "--dry", "--json", "--gate"];
|
||||
|
||||
/// The arguments: the words that aren't flags, each flag's values, and whether `--gate` is `--gate any`.
|
||||
#[derive(Default)]
|
||||
struct Args {
|
||||
words: Vec<String>,
|
||||
flags: BTreeMap<String, Vec<String>>,
|
||||
gate_any: bool,
|
||||
}
|
||||
|
||||
impl Args {
|
||||
fn parse(args: &[String]) -> Result<Args, String> {
|
||||
let mut a = Args::default();
|
||||
let mut i = 0;
|
||||
while i < args.len() {
|
||||
let s = args[i].as_str();
|
||||
if VALUED.contains(&s) {
|
||||
let v = args.get(i + 1).ok_or_else(|| format!("ask: {s} takes a value\nusage: {USAGE}"))?;
|
||||
a.flags.entry(s.into()).or_default().push(v.clone());
|
||||
i += 1;
|
||||
} else if BARE.contains(&s) {
|
||||
a.flags.entry(s.into()).or_default();
|
||||
if s == "--gate" && args.get(i + 1).is_some_and(|v| v == "any") {
|
||||
a.gate_any = true;
|
||||
i += 1;
|
||||
}
|
||||
} else if s.starts_with("--") {
|
||||
return Err(format!("ask doesn't take {s}\nusage: {USAGE}"));
|
||||
} else {
|
||||
a.words.push(s.into());
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
Ok(a)
|
||||
}
|
||||
fn has(&self, f: &str) -> bool {
|
||||
self.flags.contains_key(f)
|
||||
}
|
||||
fn one(&self, f: &str) -> Option<&str> {
|
||||
self.flags.get(f).and_then(|v| v.last()).map(String::as_str)
|
||||
}
|
||||
fn num(&self, f: &str) -> Result<Option<f64>, String> {
|
||||
self.one(f).map(|v| v.parse::<f64>().map_err(|_| format!("ask: {f} takes seconds, got {v:?}"))).transpose()
|
||||
}
|
||||
fn list(&self, f: &str) -> Vec<String> {
|
||||
self.flags.get(f).into_iter().flatten().flat_map(|v| v.split(',')).map(|s| s.trim().to_string()).filter(|s| !s.is_empty()).collect()
|
||||
}
|
||||
}
|
||||
|
||||
/// The craft rubric's text, where the guides are installed, for the `rubric` set.
|
||||
pub fn rubric_md() -> Option<String> {
|
||||
std::fs::read_to_string(raea_io_home::home().join("sdk/guides/craft/rubric.md")).ok()
|
||||
}
|
||||
|
||||
/// A question's id from its words: `own-` and its first words, so the same words keep their id.
|
||||
pub fn own_id(words: &str) -> String {
|
||||
let slug: Vec<String> = words.split(|c: char| !c.is_ascii_alphanumeric()).filter(|w| !w.is_empty()).take(6).map(str::to_lowercase).collect();
|
||||
let mut id = format!("own-{}", slug.join("-"));
|
||||
id.truncate(raea_core_ask::limits::ID_LEN);
|
||||
id
|
||||
}
|
||||
|
||||
/// The questions an entry names: its own words (shaped by the kind flags), its sets and its standard ids.
|
||||
fn named(own: &[Question], sets: &[String], std: &[String], rubric: Option<&str>) -> Result<Vec<Question>, String> {
|
||||
let mut qs = own.to_vec();
|
||||
for s in sets {
|
||||
qs.extend(library::set(s, rubric)?);
|
||||
}
|
||||
for id in std {
|
||||
qs.push(library::find(id, rubric).ok_or_else(|| format!("ask: no standard question {id} (raea ask list)"))?);
|
||||
}
|
||||
Ok(qs)
|
||||
}
|
||||
|
||||
fn shaped(words: &str, a: &Args) -> Result<Question, String> {
|
||||
let mut q = Question::plain(&own_id(words), words);
|
||||
if let Some(c) = a.one("--choose") {
|
||||
q.kind = Kind::Choose;
|
||||
q.options = c.split(',').map(|s| s.trim().to_string()).filter(|s| !s.is_empty()).collect();
|
||||
} else if let Some(n) = a.one("--rate") {
|
||||
let n: usize = n.parse().map_err(|_| format!("ask: --rate takes how many levels, got {n:?}"))?;
|
||||
q.kind = Kind::Rate;
|
||||
q.options = (1..=n).map(|i| i.to_string()).collect();
|
||||
} else if a.has("--grade") {
|
||||
q.kind = Kind::Grade;
|
||||
}
|
||||
q.flags = a.list("--flag");
|
||||
if let Some(why) = raea_core_ask::limits::check(&q) {
|
||||
return Err(format!("ask: {why}"));
|
||||
}
|
||||
Ok(q)
|
||||
}
|
||||
|
||||
/// The window from --from, --to and --at (three seconds around it).
|
||||
fn window(a: &Args) -> Result<Option<Window>, String> {
|
||||
if let Some(at) = a.num("--at")? {
|
||||
return Ok(Some(Window { from: Some((at - 1.5).max(0.0)), to: Some(at + 1.5) }));
|
||||
}
|
||||
let (from, to) = (a.num("--from")?, a.num("--to")?);
|
||||
Ok((from.is_some() || to.is_some()).then_some(Window { from, to }))
|
||||
}
|
||||
|
||||
fn voice(v: Option<&str>) -> Result<Option<bool>, String> {
|
||||
match v {
|
||||
None => Ok(None),
|
||||
Some("yes" | "true") => Ok(Some(true)),
|
||||
Some("no" | "false") => Ok(Some(false)),
|
||||
Some(v) => Err(format!("ask: --voice takes yes or no, got {v:?}")),
|
||||
}
|
||||
}
|
||||
|
||||
/// Pieces read once a run, by what they were read with.
|
||||
type Pieces = HashMap<String, Arc<Piece>>;
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn piece(pieces: &mut Pieces, file: &str, brief: Option<&str>, words: Option<&str>, voice: Option<bool>, state: Option<String>) -> Result<Arc<Piece>, String> {
|
||||
let key = format!("{file}\u{1f}{brief:?}\u{1f}{words:?}\u{1f}{voice:?}\u{1f}{state:?}");
|
||||
if let Some(p) = pieces.get(&key) {
|
||||
return Ok(p.clone());
|
||||
}
|
||||
let p = Arc::new(Piece::read(Path::new(file), brief.map(Path::new), words.map(Path::new), voice, state).map_err(|e| format!("ask: {e}"))?);
|
||||
pieces.insert(key, p.clone());
|
||||
Ok(p)
|
||||
}
|
||||
|
||||
fn entry(p: Arc<Piece>, window: Option<Window>, qs: Vec<Question>, with: Vec<PathBuf>, rubric: Option<&str>) -> Entry {
|
||||
let (questions, dropped) = prepare::keep(qs, &p.facts(), rubric);
|
||||
Entry { piece: p, window, questions, dropped, with }
|
||||
}
|
||||
|
||||
/// The command line's one entry.
|
||||
fn from_args(a: &Args, rubric: Option<&str>, pieces: &mut Pieces) -> Result<Vec<Entry>, String> {
|
||||
let Some((file, words)) = a.words.split_first() else { return Err(USAGE.into()) };
|
||||
let own = words.iter().map(|w| shaped(w, a)).collect::<Result<Vec<_>, _>>()?;
|
||||
let qs = named(&own, &a.list("--set"), &a.list("--std"), rubric)?;
|
||||
if qs.is_empty() {
|
||||
return Err(format!("ask: nothing to ask: give a question in words, --set or --std (raea ask list)\nusage: {USAGE}"));
|
||||
}
|
||||
let p = piece(pieces, file, a.one("--brief"), a.one("--words"), voice(a.one("--voice"))?, a.one("--state").map(str::to_string))?;
|
||||
let with = a.flags.get("--with").into_iter().flatten().map(PathBuf::from).collect();
|
||||
Ok(vec![entry(p, window(a)?, qs, with, rubric)])
|
||||
}
|
||||
|
||||
/// A batch: a JSON list of entries or JSON lines, from a file or stdin (`-`). Each entry is {file, window?, questions?
|
||||
/// (words or questions), set?, std?, with?, brief?, words?, voice?, state?}.
|
||||
fn from_batch(path: &str, rubric: Option<&str>, pieces: &mut Pieces) -> Result<Vec<Entry>, String> {
|
||||
let text = match path {
|
||||
"-" => {
|
||||
let mut s = String::new();
|
||||
std::io::stdin().read_to_string(&mut s).map_err(|e| format!("ask: stdin: {e}"))?;
|
||||
s
|
||||
}
|
||||
p => std::fs::read_to_string(p).map_err(|e| format!("ask: {p}: {e}"))?,
|
||||
};
|
||||
let rows: Vec<Value> = match serde_json::from_str::<Value>(text.trim()) {
|
||||
Ok(Value::Array(a)) => a,
|
||||
Ok(v @ Value::Object(_)) => vec![v],
|
||||
_ => text.lines().filter(|l| !l.trim().is_empty()).enumerate().map(|(i, l)| serde_json::from_str(l).map_err(|e| format!("ask: {path} line {}: {e}", i + 1))).collect::<Result<_, _>>()?,
|
||||
};
|
||||
let strs = |v: &Value| -> Vec<String> {
|
||||
match v {
|
||||
Value::String(s) => s.split(',').map(|s| s.trim().to_string()).collect(),
|
||||
Value::Array(a) => a.iter().filter_map(Value::as_str).map(str::to_string).collect(),
|
||||
_ => vec![],
|
||||
}
|
||||
};
|
||||
let mut out = Vec::new();
|
||||
for (n, r) in rows.iter().enumerate() {
|
||||
let at = |e: String| format!("ask: {path} entry {}: {e}", n + 1);
|
||||
let file = r["file"].as_str().ok_or_else(|| at("it has no file".into()))?;
|
||||
let own = r["questions"].as_array().into_iter().flatten().map(|q| match q {
|
||||
Value::String(w) => Ok(Question::plain(&own_id(w), w)),
|
||||
q => serde_json::from_value::<Question>(q.clone()).map_err(|e| e.to_string()),
|
||||
});
|
||||
let own = own.collect::<Result<Vec<_>, _>>().map_err(at)?;
|
||||
let qs = named(&own, &strs(&r["set"]), &strs(&r["std"]), rubric).map_err(at)?;
|
||||
let window: Option<Window> = serde_json::from_value(r["window"].clone()).ok();
|
||||
let v = voice(r["voice"].as_str()).map_err(at)?.or(r["voice"].as_bool());
|
||||
let p = piece(pieces, file, r["brief"].as_str(), r["words"].as_str(), v, r["state"].as_str().map(str::to_string)).map_err(at)?;
|
||||
out.push(entry(p, window, qs, strs(&r["with"]).into_iter().map(PathBuf::from).collect(), rubric));
|
||||
}
|
||||
Ok(out)
|
||||
}
|
||||
|
||||
/// `raea ask list [SET]`: the standard questions.
|
||||
fn list(a: &Args, rubric: Option<&str>) -> Result<String, String> {
|
||||
let sets: Vec<String> = match a.words.get(1) {
|
||||
Some(s) => vec![s.clone()],
|
||||
None => library::SETS.iter().map(|s| s.to_string()).collect(),
|
||||
};
|
||||
let mut out = Vec::new();
|
||||
let mine = calibrate::local();
|
||||
for s in &sets {
|
||||
let mut qs = library::set(s, rubric)?;
|
||||
qs.iter_mut().for_each(|q| calibrate::apply(q, &mine));
|
||||
if a.has("--json") {
|
||||
out.push(json!({"set": s, "questions": qs}).to_string());
|
||||
continue;
|
||||
}
|
||||
out.push(format!("{s}:"));
|
||||
for q in qs {
|
||||
let how = if q.calibrated() { "calibrated" } else { "advice" };
|
||||
out.push(format!(" {:<28} {:<6} {:<10} {}", q.id, format!("{:?}", q.kind).to_lowercase(), how, q.ask));
|
||||
}
|
||||
}
|
||||
Ok(out.join("\n"))
|
||||
}
|
||||
|
||||
/// An event as a line of text.
|
||||
fn line(e: &Event, files: usize) -> String {
|
||||
match e {
|
||||
Event::Would(v) => {
|
||||
let qs: Vec<&str> = v["questions"].as_array().into_iter().flatten().filter_map(|q| q["id"].as_str()).collect();
|
||||
let m = &v["media"];
|
||||
let kb = |k: &str| m[k].as_array().map(|a| a.iter().filter_map(Value::as_u64).map(|b| format!("{} KB", b / 1024)).collect::<Vec<_>>().join(", ")).unwrap_or_default();
|
||||
format!(
|
||||
"would ask {} ({}) about {}:\n {}\n videos [{}], stills [{}], sounds [{}], about ${:.4}\n state: {}",
|
||||
qs.len(),
|
||||
span(v["from"].as_f64().unwrap_or(0.0), v["to"].as_f64()),
|
||||
v["file"].as_str().unwrap_or(""),
|
||||
qs.join(", "),
|
||||
kb("videos"),
|
||||
kb("stills"),
|
||||
kb("sounds"),
|
||||
v["estimate_usd"].as_f64().unwrap_or(0.0),
|
||||
v["state"].as_str().unwrap_or("")
|
||||
)
|
||||
}
|
||||
Event::Answer(a) => {
|
||||
let who = if files > 1 { format!("{}: ", a.file) } else { String::new() };
|
||||
let what = match (&a.says, &a.not_asked, &a.waits) {
|
||||
(Some(s), ..) => format!("{s} [{}]{}", span(a.from, a.to), if a.flagged && a.calibrated { " <- finding" } else if a.flagged { " <- flagged" } else { "" }),
|
||||
(_, Some(n), _) => format!("not asked: {n}"),
|
||||
(.., Some(w)) => w.clone(),
|
||||
_ => "no answer".into(),
|
||||
};
|
||||
format!("{who}{:<34} {what}", a.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// `raea ask ...` with its exit code: 0, or 1 when it couldn't ask or a gate failed.
|
||||
pub fn cli(args: &[String]) -> i32 {
|
||||
match run(args) {
|
||||
Ok(code) => code,
|
||||
Err(e) => {
|
||||
eprintln!("{e}");
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn run(args: &[String]) -> Result<i32, String> {
|
||||
let a = Args::parse(args)?;
|
||||
let rubric = rubric_md();
|
||||
let jobs = a.one("--jobs").map(|j| j.parse::<usize>().map_err(|_| format!("ask: --jobs takes a number, got {j:?}"))).transpose()?.unwrap_or(4);
|
||||
let sub = a.words.first().map(String::as_str).filter(|w| !Path::new(w).exists());
|
||||
match sub {
|
||||
Some("list") => {
|
||||
println!("{}", list(&a, rubric.as_deref())?);
|
||||
return Ok(0);
|
||||
}
|
||||
Some("verdict") => {
|
||||
let [_, answer, said] = a.words.as_slice() else { return Err(format!("ask verdict ANSWER WORD: the answer's id (from --json or {}) and your answer to its question", record::dir().join("answers.jsonl").display())) };
|
||||
println!("{}", labels::verdict(answer, said, a.one("--eye"))?);
|
||||
return Ok(0);
|
||||
}
|
||||
Some("calibrate") => return calibrated(&a),
|
||||
Some("try") => return tried(&a, jobs),
|
||||
_ => {}
|
||||
}
|
||||
let mut pieces = Pieces::new();
|
||||
let entries = match a.one("--batch") {
|
||||
Some(b) => from_batch(b, rubric.as_deref(), &mut pieces)?,
|
||||
None => from_args(&a, rubric.as_deref(), &mut pieces)?,
|
||||
};
|
||||
let (json_out, dry) = (a.has("--json"), a.has("--dry"));
|
||||
let files = pieces.len();
|
||||
let sum = runner::run(entries, &Opts::new(jobs, dry), &mut |e| {
|
||||
match (&e, json_out) {
|
||||
(Event::Answer(r), true) => println!("{}", serde_json::to_string(r).unwrap_or_default()),
|
||||
(Event::Would(v), true) => println!("{}", json!({"would": v})),
|
||||
(e, false) => println!("{}", line(e, files)),
|
||||
}
|
||||
});
|
||||
if json_out {
|
||||
println!("{}", json!({"summary": sum}));
|
||||
} else if dry {
|
||||
println!("{} call{}, about ${:.4}; nothing was sent", sum.calls, if sum.calls == 1 { "" } else { "s" }, sum.estimate);
|
||||
} else if sum.calls > 0 {
|
||||
let routes: Vec<&str> = sum.routes.iter().map(String::as_str).collect();
|
||||
let left = sum.pool_left.map(|l| format!(", ${l:.2} left this month")).unwrap_or_default();
|
||||
let waiting = if sum.waiting > 0 { format!("; {} wait for the pool", sum.waiting) } else { String::new() };
|
||||
println!(
|
||||
"asked {} question{} in {} call{} through {}: ${:.4}{left}{waiting}. Answers are advice until a question is calibrated (docs/ask.feature AK7).",
|
||||
sum.asked,
|
||||
if sum.asked == 1 { "" } else { "s" },
|
||||
sum.calls,
|
||||
if sum.calls == 1 { "" } else { "s" },
|
||||
routes.join(" and "),
|
||||
sum.cost
|
||||
);
|
||||
}
|
||||
if !dry && sum.calls == 0 {
|
||||
return Err("ask: nothing was asked (each question's line says why)".into());
|
||||
}
|
||||
// a gate fails on a flag (a calibrated one, or with `any` any), and on questions still waiting for the pool
|
||||
let flagged = if a.gate_any { sum.flagged } else { sum.flagged_calibrated };
|
||||
Ok(i32::from(a.has("--gate") && (flagged > 0 || sum.waiting > 0)))
|
||||
}
|
||||
|
||||
/// A version's standing as a line, with its misses below when it doesn't separate.
|
||||
fn standing_line(s: &calibrate::Standing) -> String {
|
||||
let auc = s.auc.map_or_else(|| "no AUC".to_string(), |a| format!("AUC {a:.2}"));
|
||||
let mut out = format!("{} ({}) \"{}\": {}, {auc} on {} labels; {}", s.id, &s.version[..8.min(s.version.len())], s.ask, s.state, s.problems + s.clean, s.why);
|
||||
if s.others > 0 {
|
||||
out += &format!(" ({} from other eyes, not counted)", s.others);
|
||||
}
|
||||
for m in &s.misses {
|
||||
let what = if m.bad { "a problem it scored" } else { "clean work it scored" };
|
||||
out += &format!("\n {what} {:.2}: {} ({}){}", m.problem, m.file, m.span, m.note.as_ref().map(|n| format!(" \"{n}\"")).unwrap_or_default());
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// `raea ask calibrate [ID]`: the feed's labels read again and each labelled question held to its labels.
|
||||
fn calibrated(a: &Args) -> Result<i32, String> {
|
||||
let (all, (yes, no)) = calibrate::calibrate(a.words.get(1).map(String::as_str))?;
|
||||
if a.has("--json") {
|
||||
println!("{}", json!({"feed": {"problems": yes, "clean": no}}));
|
||||
all.iter().for_each(|s| println!("{}", serde_json::to_string(s).unwrap_or_default()));
|
||||
return Ok(0);
|
||||
}
|
||||
println!("from the feed: {yes} note{} that saw a problem, {no} approval{} without one", if yes == 1 { "" } else { "s" }, if no == 1 { "" } else { "s" });
|
||||
if all.is_empty() {
|
||||
println!("no labelled questions yet: raea ask verdict ANSWER WORD labels one, and your notes on a posted render do too");
|
||||
}
|
||||
all.iter().for_each(|s| println!("{}", standing_line(s)));
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
/// `raea ask try WORDS --like ID`: new words asked of a question's labelled clips, both held to the same labels.
|
||||
fn tried(a: &Args, jobs: usize) -> Result<i32, String> {
|
||||
let words = a.words[1..].join(" ");
|
||||
let like = a.one("--like").ok_or("ask try WORDS --like ID: the question whose labelled clips the new words are asked of")?;
|
||||
if words.trim().is_empty() {
|
||||
return Err("ask try WORDS --like ID: the new words".into());
|
||||
}
|
||||
let json_out = a.has("--json");
|
||||
let (sum, both) = calibrate::try_words(like, &words, &Opts::new(jobs, a.has("--dry")), &mut |e| match (&e, json_out) {
|
||||
(Event::Would(v), true) => println!("{}", json!({"would": v})),
|
||||
(Event::Answer(r), true) => println!("{}", serde_json::to_string(r).unwrap_or_default()),
|
||||
(e, false) => println!("{}", line(e, 2)),
|
||||
})?;
|
||||
match (both, json_out) {
|
||||
(None, true) => println!("{}", json!({"summary": sum})),
|
||||
(None, false) => println!("{} call{}, about ${:.4}; nothing was sent", sum.calls, if sum.calls == 1 { "" } else { "s" }, sum.estimate),
|
||||
(Some((old, new)), true) => println!("{}", json!({"summary": sum, "old": old, "new": new})),
|
||||
(Some((old, new)), false) => println!("${:.4} for {} calls\nold words: {}\nnew words: {}", sum.cost, sum.calls, standing_line(&old), standing_line(&new)),
|
||||
}
|
||||
Ok(i32::from(!a.has("--dry") && sum.calls == 0))
|
||||
}
|
||||
@@ -48,7 +48,7 @@ fn export(args: &[String]) -> R<String> {
|
||||
let tsx = args.first().filter(|a| !a.starts_with('-')).ok_or(USAGE)?;
|
||||
let tsx = dunce::canonicalize(&PathBuf::from(tsx)).map_err(|e| format!("{tsx}: {e}"))?;
|
||||
let dir = tsx.parent().unwrap().to_path_buf();
|
||||
let codec = flag(args, "--alpha-codec").map_or(Ok(raea_io_alpha::Codec::default_here()), |c| raea_io_alpha::Codec::parse(&c))?;
|
||||
let codec = raea_io_alpha::Codec::chosen(flag(args, "--alpha-codec").as_deref())?;
|
||||
let (root, in_store) = match flag(args, "-o") {
|
||||
Some(o) => (PathBuf::from(o), false),
|
||||
None => {
|
||||
|
||||
@@ -7,7 +7,6 @@ publish = false
|
||||
description = "`raea check`: the floor's measurable lines on an export, ranked P0-P3"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
# taste.ts rules, as the raea CLI evaluates them (docs/projects.feature PJ0)
|
||||
raea-core-brief = { path = "../../core/brief" }
|
||||
# a transcript's words, read as `raea world` reads them (docs/direction.feature DR1)
|
||||
@@ -21,8 +20,14 @@ raea-io-ffmpeg = { path = "../../io/ffmpeg" }
|
||||
raea-sys-measure = { path = "../../systems/measure" }
|
||||
# what it reads of a video, through FFmpeg or raea's own decoders where it isn't installed
|
||||
raea-app-check-read = { path = "read" }
|
||||
# who can fix what it finds: the encode's or the picture's own, carried, a source (split out to keep this crate small)
|
||||
raea-app-check-cause = { path = "cause" }
|
||||
# the text rules on a render's manifest (split out: raea render holds its own text to them)
|
||||
raea-app-check-text = { path = "text" }
|
||||
# the flashing screen (WCAG 2.3.1), split out to keep this crate small
|
||||
raea-app-check-flash = { path = "flash" }
|
||||
# what the person sent from the raea app, handed to the agent (split out to keep this crate small)
|
||||
raea-app-check-inbox = { path = "inbox" }
|
||||
# the Stop gate for a `make` job (docs/make.feature MK2; split out to keep this crate small)
|
||||
raea-app-check-make = { path = "make" }
|
||||
serde_json = "1"
|
||||
@@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "raea-app-check-cause"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "FSL-1.1-ALv2"
|
||||
publish = false
|
||||
description = "Who can fix what raea check finds: the encode's or the picture's own, carried from an earlier export, a source rather than a delivery"
|
||||
|
||||
[dependencies]
|
||||
# a project's record of renders and checks (DR3)
|
||||
raea-core-facts = { path = "../../../core/facts" }
|
||||
image = { version = "0.25", default-features = false, features = ["png"] }
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = "1"
|
||||
@@ -0,0 +1,174 @@
|
||||
//! Who can fix what `raea check` finds, so a round is spent only on what another render can change (11-19: two
|
||||
//! Telluride projects took nine renders, five of them for findings no render could move). Three things, for any rule:
|
||||
//!
|
||||
//! - **Introduced or there already.** A rule an encode can cause is measured again on the composition's own frames,
|
||||
//! rendered without encoding (`unencoded`), and the export is set against them (`against`): what the picture already
|
||||
//! held is the footage's (a note), what the export adds is the encode's (the error, with a fix raea has).
|
||||
//! - **Carried.** A finding an earlier export of the same composition had at the same moment (`earlier`, `carried`)
|
||||
//! says since when: the change between them didn't move it, so doing that again won't.
|
||||
//! - **A source isn't a delivery.** A take or a download checked on its own (`is_source`) isn't held to a delivery's
|
||||
//! loudness target.
|
||||
//!
|
||||
//! None of it changes what a rule measures or where it draws the line.
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
|
||||
use raea_core_facts::{Finding, record};
|
||||
|
||||
pub type R<T> = Result<T, String>;
|
||||
|
||||
/// Whether a record entry is the render that wrote `out` (a path as the record names it)
|
||||
fn rendered(e: &record::Entry, out: &str) -> bool {
|
||||
e.by == "raea render" && e.out.as_deref() == Some(out)
|
||||
}
|
||||
|
||||
/// The composition a video was rendered from, and its project: the newest `raea render` writing it in the project's
|
||||
/// record (DR3). None outside a project, or for a video no render there wrote (a take, a download).
|
||||
pub fn composition_of(video: &Path) -> Option<(PathBuf, PathBuf)> {
|
||||
let project = record::up(video, ".raea/project")?;
|
||||
let want = record::rel(&project, video);
|
||||
let made = record::read(&project).into_iter().rev().find(|e| e.kind == "video" && rendered(e, &want))?;
|
||||
let of = project.join(&made.of);
|
||||
of.is_file().then_some((project, of))
|
||||
}
|
||||
|
||||
/// Whether a file is one of a project's sources (a take or a download under assets/ or media/ that no render wrote):
|
||||
/// it isn't a delivery, so a delivery's rules (its loudness target) don't hold it
|
||||
pub fn is_source(video: &Path) -> bool {
|
||||
let Some(project) = record::up(video, ".raea/project") else { return false };
|
||||
let me = record::rel(&project, video);
|
||||
(me.starts_with("assets/") || me.starts_with("media/")) && !record::read(&project).iter().any(|e| rendered(e, &me))
|
||||
}
|
||||
|
||||
/// Luma as a decoder of raea's export gives it to the check (BT.709, full range: FFmpeg's format=gray of the
|
||||
/// encoder's limited-range picture), from 8-bit RGBA `width` wide, its top-left `w` x `h`
|
||||
pub fn luma(rgba: &[u8], width: usize, w: usize, h: usize) -> Vec<u8> {
|
||||
let mut y = Vec::with_capacity(w * h);
|
||||
for r in 0..h {
|
||||
for p in rgba[r * width * 4..][..w * 4].chunks_exact(4) {
|
||||
y.push((0.2126 * p[0] as f32 + 0.7152 * p[1] as f32 + 0.0722 * p[2] as f32).round().clamp(0.0, 255.0) as u8);
|
||||
}
|
||||
}
|
||||
y
|
||||
}
|
||||
|
||||
/// `frames` as `comp` draws them, never encoded, as luma `w` x `h` (top-left): `raea render COMP --at F,... -o DIR/`
|
||||
/// (PNG) run by `raea` from the project, kept out of its record as the quick check's stills are
|
||||
pub fn unencoded(raea: &Path, project: &Path, comp: &Path, frames: &[i64], w: usize, h: usize) -> R<Vec<Vec<u8>>> {
|
||||
let mut wanted: Vec<i64> = frames.to_vec();
|
||||
wanted.sort_unstable();
|
||||
wanted.dedup();
|
||||
let tmp = std::env::temp_dir().join(format!("raea-unencoded-{}", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&tmp);
|
||||
std::fs::create_dir_all(&tmp).map_err(|e| format!("{}: {e}", tmp.display()))?;
|
||||
let at = wanted.iter().map(|f| f.to_string()).collect::<Vec<_>>().join(",");
|
||||
let read = (|| {
|
||||
let run = Command::new(raea).arg("render").arg(comp).args(["--at", &at, "-o"]).arg(format!("{}/", tmp.display())).current_dir(project).env("RAEA_RECORD", "off").output().map_err(|e| e.to_string())?;
|
||||
let mut pngs: Vec<PathBuf> = std::fs::read_dir(&tmp).map_err(|e| e.to_string())?.filter_map(|e| e.ok().map(|e| e.path())).filter(|p| p.extension().is_some_and(|x| x == "png")).collect();
|
||||
pngs.sort();
|
||||
if pngs.len() != wanted.len() {
|
||||
let said = String::from_utf8_lossy(&run.stderr).lines().chain(String::from_utf8_lossy(&run.stdout).lines()).find(|l| l.contains("REFUSED") || l.contains("rror")).unwrap_or("").to_string();
|
||||
return Err(format!("its render gave {} of {} frames {said}", pngs.len(), wanted.len()).trim_end().to_string());
|
||||
}
|
||||
let mut by_frame = std::collections::HashMap::new();
|
||||
for (f, p) in wanted.iter().zip(&pngs) {
|
||||
let img = image::open(p).map_err(|e| format!("{}: {e}", p.display()))?.to_rgba8();
|
||||
let (iw, ih) = (img.width() as usize, img.height() as usize);
|
||||
if iw < w || ih < h {
|
||||
return Err(format!("it draws {iw}x{ih}, smaller than the export's {w}x{h}"));
|
||||
}
|
||||
by_frame.insert(*f, luma(img.as_raw(), iw, w, h));
|
||||
}
|
||||
Ok(frames.iter().map(|f| by_frame[f].clone()).collect())
|
||||
})();
|
||||
let _ = std::fs::remove_dir_all(&tmp);
|
||||
read
|
||||
}
|
||||
|
||||
/// The frame a check reads for each sample taken every `every` seconds from 0: the last frame before the sample's
|
||||
/// middle, as ffmpeg's fps filter picks it (and raea-app-check-read's readers), held to the picture's `last` frame
|
||||
pub fn sampled(samples: usize, every: f64, fps: f64, last: i64) -> Vec<i64> {
|
||||
(0..samples).map(|k| (((k as f64 + 0.5) * every * fps).ceil() as i64 - 1).clamp(0, last.max(0))).collect()
|
||||
}
|
||||
|
||||
/// A sampled measure of the export against the same measure of the unencoded frames.
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Against {
|
||||
/// samples over the rule's line that the export made worse by more than its noise
|
||||
pub worse: usize,
|
||||
/// samples over the line before encoding: the picture's own
|
||||
pub before: usize,
|
||||
/// samples compared
|
||||
pub of: usize,
|
||||
/// the mean of the export's measure less the unencoded one's
|
||||
pub added: f64,
|
||||
}
|
||||
|
||||
impl Against {
|
||||
/// Whether the export added to it, beyond what a clean encode moves: at least three samples (and a tenth) worse,
|
||||
/// and more than half the noise on average
|
||||
pub fn by_encode(&self, noise: f64) -> bool {
|
||||
self.worse >= 3usize.max(self.of / 10) && self.added > noise / 2.0
|
||||
}
|
||||
|
||||
/// The first sample the export made worse
|
||||
pub fn first(out: &[Option<f64>], before: &[Option<f64>], line: f64, noise: f64) -> Option<usize> {
|
||||
out.iter().zip(before).position(|(o, b)| o.unwrap_or(0.0) > line && o.unwrap_or(0.0) - b.unwrap_or(0.0) > noise)
|
||||
}
|
||||
}
|
||||
|
||||
/// Per sample, the export's measure against the unencoded frames' (None: nothing to measure, read as 0), over a
|
||||
/// rule's `line`, where a clean encode moves it at most `noise`
|
||||
pub fn against(out: &[Option<f64>], before: &[Option<f64>], line: f64, noise: f64) -> Against {
|
||||
let n = out.len().min(before.len());
|
||||
let at = |s: &[Option<f64>], i: usize| s[i].unwrap_or(0.0);
|
||||
let worse = (0..n).filter(|&i| at(out, i) > line && at(out, i) - at(before, i) > noise).count();
|
||||
let was = (0..n).filter(|&i| at(before, i) > line).count();
|
||||
let added = (0..n).map(|i| at(out, i) - at(before, i)).sum::<f64>() / n.max(1) as f64;
|
||||
Against { worse, before: was, of: n, added }
|
||||
}
|
||||
|
||||
/// The newest check, in the project's record, of an earlier export of the composition `video` was rendered from
|
||||
pub fn earlier(video: &Path) -> Option<record::Entry> {
|
||||
let project = record::up(video, ".raea/project")?;
|
||||
let me = record::rel(&project, video);
|
||||
let entries = record::read(&project);
|
||||
let made = entries.iter().rposition(|e| rendered(e, &me))?;
|
||||
// the composition's exports rendered before this one; a versioned copy (NAME-v2.tsx) is the same piece
|
||||
let stem = |of: &str| piece(&Path::new(of).file_stem().map(|s| s.to_string_lossy().to_string()).unwrap_or_default());
|
||||
let comp = stem(&entries[made].of);
|
||||
let exports: Vec<String> = entries[..made].iter().filter(|e| e.by == "raea render" && e.kind == "video" && stem(&e.of) == comp).filter_map(|e| e.out.clone()).filter(|o| *o != me).collect();
|
||||
entries.into_iter().rev().find(|e| e.by == "raea check" && exports.contains(&e.of))
|
||||
}
|
||||
|
||||
/// A composition's name without its version: walkaround-v2 is walkaround
|
||||
pub fn piece(stem: &str) -> String {
|
||||
match stem.rfind("-v") {
|
||||
Some(i) if i + 2 < stem.len() && stem[i + 2..].bytes().all(|b| b.is_ascii_digit()) => stem[..i].to_string(),
|
||||
_ => stem.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
/// The same finding in another export: the same rule, about the same thing, at the same moment (within a second; a
|
||||
/// finding about the whole piece matches one about the whole piece). Its words may differ ("worst 13%", "worst 15%").
|
||||
pub fn alike(a: &Finding, b: &Finding, fps: f64) -> bool {
|
||||
let about = |f: &Finding| f.about.iter().map(|a| a.key.clone().unwrap_or_else(|| a.name.clone())).collect::<Vec<_>>();
|
||||
a.check == b.check && about(a) == about(b) && match (a.frames, b.frames) {
|
||||
(Some([x, _]), Some([y, _])) => ((x - y).abs() as f64) <= fps.max(1.0),
|
||||
(None, None) => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Each finding an earlier check had at the same moment says so, and that its fix hasn't moved it: rank and words
|
||||
/// otherwise as measured
|
||||
pub fn carried(now: &mut [Finding], before: &record::Entry, fps: f64) {
|
||||
for f in now.iter_mut() {
|
||||
if before.findings.iter().any(|b| alike(b, f, fps)) {
|
||||
f.says.push_str(&format!(" [also in {} ({}): what changed between them didn't move it]", before.of, before.id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -0,0 +1,107 @@
|
||||
use super::*;
|
||||
use raea_core_facts::Level;
|
||||
|
||||
// The 28 samples `raea check` takes of the 11-16 Telluride walkaround (55.8 s, 24 fps, phone footage), as its
|
||||
// blotching measures them: rendered to PNG with no encoding (BEFORE), those PNGs through x264 crf 12, and raea's own
|
||||
// exports at --quality high and master. Blotching's line is 0.009; x264 moved a sample at most 0.005.
|
||||
const BEFORE: [Option<f64>; 28] = [Some(0.0), None, Some(0.052), Some(0.062), None, Some(0.062), None, None, Some(0.076), Some(0.009), Some(0.03), Some(0.039), Some(0.068), None, None, None, None, Some(0.077), Some(0.062), None, None, Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0)];
|
||||
const X264: [Option<f64>; 28] = [Some(0.0), None, Some(0.052), Some(0.062), None, Some(0.059), None, None, Some(0.078), Some(0.008), Some(0.028), Some(0.034), Some(0.071), None, None, None, None, Some(0.078), Some(0.062), None, Some(0.039), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0)];
|
||||
const HIGH: [Option<f64>; 28] = [Some(0.0), None, Some(0.042), Some(0.024), Some(0.052), Some(0.064), Some(0.05), None, Some(0.126), Some(0.063), Some(0.061), Some(0.122), Some(0.088), Some(0.04), Some(0.029), Some(0.047), Some(0.044), Some(0.096), Some(0.09), None, Some(0.029), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0)];
|
||||
const MASTER: [Option<f64>; 28] = [Some(0.0), None, Some(0.026), Some(0.002), None, Some(0.03), None, None, Some(0.022), None, None, None, None, None, None, None, None, Some(0.071), Some(0.053), None, None, Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0), Some(0.0)];
|
||||
const LINE: f64 = 0.009;
|
||||
const NOISE: f64 = 0.005;
|
||||
|
||||
/// What the picture already held is told from what the encode added: a clean encode and raea's master add nothing,
|
||||
/// its high adds to 14 of 28 samples, and 9 samples hold the footage's own either way
|
||||
#[test]
|
||||
fn the_picture_s_own_is_told_from_the_encode_s() {
|
||||
let clean = against(&X264, &BEFORE, LINE, NOISE);
|
||||
assert!(!clean.by_encode(NOISE), "{clean:?}");
|
||||
assert!(clean.added.abs() < 0.002, "{clean:?}");
|
||||
let high = against(&HIGH, &BEFORE, LINE, NOISE);
|
||||
assert!(high.by_encode(NOISE), "{high:?}");
|
||||
assert_eq!((high.worse, high.before, high.of), (14, 9, 28));
|
||||
assert_eq!(Against::first(&HIGH, &BEFORE, LINE, NOISE), Some(4));
|
||||
let master = against(&MASTER, &BEFORE, LINE, NOISE);
|
||||
assert!(!master.by_encode(NOISE), "{master:?}");
|
||||
assert_eq!(master.worse, 0);
|
||||
// a small, even addition over a clean picture still counts (VideoToolbox over a dark render, 10-25)
|
||||
assert!(against(&[Some(0.013); 16], &[Some(0.003); 16], LINE, NOISE).by_encode(NOISE));
|
||||
}
|
||||
|
||||
/// The frame read for each sample is the last before its middle, as the fps filter picks it
|
||||
#[test]
|
||||
fn the_sampled_frames_are_the_check_s() {
|
||||
assert_eq!(sampled(3, 2.0, 24.0, 1338), vec![23, 71, 119]);
|
||||
assert_eq!(sampled(2, 2.0, 30.0, 1000), vec![29, 89]);
|
||||
assert_eq!(sampled(2, 2.0, 30000.0 / 1001.0, 1000), vec![29, 89]);
|
||||
assert_eq!(sampled(2, 2.0, 24.0, 50), vec![23, 50]);
|
||||
}
|
||||
|
||||
/// Luma as the check reads raea's export: BT.709 weights, full range, cropped to the top-left
|
||||
#[test]
|
||||
fn luma_is_bt709_cropped() {
|
||||
let px = |r: u8, g: u8, b: u8| [r, g, b, 255];
|
||||
let rgba: Vec<u8> = [px(255, 255, 255), px(0, 0, 0), px(255, 0, 0), px(0, 255, 0)].concat();
|
||||
assert_eq!(luma(&rgba, 2, 2, 2), vec![255, 0, 54, 182]);
|
||||
assert_eq!(luma(&rgba, 2, 1, 2), vec![255, 54]);
|
||||
}
|
||||
|
||||
fn finding(check: &str, frame: Option<i64>, says: &str) -> Finding {
|
||||
let f = Finding::new(check, Level::Error, says, "raea check");
|
||||
match frame {
|
||||
Some(n) => f.frames(n, n + 1),
|
||||
None => f,
|
||||
}
|
||||
}
|
||||
|
||||
/// A finding is carried when the same rule finds the same thing at the same moment, whatever its numbers say
|
||||
#[test]
|
||||
fn a_carried_finding_is_the_same_rule_at_the_same_moment() {
|
||||
let fps = 24.0;
|
||||
assert!(alike(&finding("blotching", Some(96), "worst 13%"), &finding("blotching", Some(96), "worst 15%"), fps));
|
||||
assert!(alike(&finding("clipping", Some(624), "9 runs"), &finding("clipping", Some(640), "6 runs"), fps));
|
||||
assert!(!alike(&finding("clipping", Some(624), "9 runs"), &finding("clipping", Some(1104), "11 runs"), fps));
|
||||
assert!(!alike(&finding("clipping", Some(624), "x"), &finding("dropout", Some(624), "x"), fps));
|
||||
assert!(alike(&finding("brand", None, "a"), &finding("brand", None, "b"), fps));
|
||||
assert_eq!(piece("walkaround-v2"), "walkaround");
|
||||
assert_eq!(piece("edit-video"), "edit-video");
|
||||
assert_eq!(piece("telluride-v12"), "telluride");
|
||||
}
|
||||
|
||||
/// A project whose record holds two renders of one composition and a check of the first: the second's check finds
|
||||
/// that one, its blotching carried and its clipping new; a take under assets/ is a source, an export isn't
|
||||
#[test]
|
||||
fn the_earlier_check_is_of_the_composition_s_other_export() {
|
||||
let dir = std::env::temp_dir().join(format!("raea-cause-{}", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
for d in [".raea/record", "out", "assets/footage", "compositions"] {
|
||||
std::fs::create_dir_all(dir.join(d)).unwrap();
|
||||
}
|
||||
std::fs::write(dir.join(".raea/project"), "[project]\n\tid = pj_test\n").unwrap();
|
||||
for f in ["out/a-v1.mp4", "out/a-v2.mp4", "assets/footage/take.mov", "compositions/a.tsx", "compositions/a-v2.tsx"] {
|
||||
std::fs::write(dir.join(f), b"").unwrap();
|
||||
}
|
||||
let entry = |id: &str, by: &str, of: &str, out: Option<&str>, kind: &str, findings: Vec<Finding>| record::Entry { id: id.into(), at: 0, by: by.into(), of: of.into(), out: out.map(Into::into), kind: kind.into(), commit: None, findings, despite: vec![] };
|
||||
let entries = [
|
||||
entry("20261116-170223-a", "raea render", "compositions/a.tsx", Some("out/a-v1.mp4"), "video", vec![]),
|
||||
entry("20261116-170252-a-v1", "raea check", "out/a-v1.mp4", None, "check", vec![finding("blotching", Some(96), "worst 13%")]),
|
||||
entry("20261116-171601-a-v2", "raea render", "compositions/a-v2.tsx", Some("out/a-v2.mp4"), "video", vec![]),
|
||||
];
|
||||
for e in &entries {
|
||||
std::fs::write(dir.join(format!(".raea/record/{}.json", e.id)), serde_json::to_vec(e).unwrap()).unwrap();
|
||||
}
|
||||
let v2 = dir.join("out/a-v2.mp4");
|
||||
assert_eq!(composition_of(&v2).map(|(_, c)| c.ends_with("compositions/a-v2.tsx")), Some(true));
|
||||
let before = earlier(&v2).expect("the check of a-v1");
|
||||
assert_eq!(before.of, "out/a-v1.mp4");
|
||||
let mut now = vec![finding("blotching", Some(96), "worst 15%"), finding("clipping", Some(624), "9 runs")];
|
||||
carried(&mut now, &before, 24.0);
|
||||
assert!(now[0].says.contains("also in out/a-v1.mp4 (20261116-170252-a-v1)"), "{}", now[0].says);
|
||||
assert_eq!(now[1].says, "9 runs");
|
||||
// nothing was rendered before a-v1, so its check has no earlier one, even with a-v2's check in the record
|
||||
assert!(earlier(&dir.join("out/a-v1.mp4")).is_none());
|
||||
assert!(is_source(&dir.join("assets/footage/take.mov")));
|
||||
assert!(!is_source(&v2));
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "raea-app-check-make"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "FSL-1.1-ALv2"
|
||||
publish = false
|
||||
description = "`raea hook`'s Stop gate for a `make` job (docs/make.feature MK2): an agent can't end its turn until `raea make status` says the job is done"
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1"
|
||||
# brief.ts found as raea finds a project (plain paths on Windows)
|
||||
dunce = "1"
|
||||
# the project's folder (record.rs `up`)
|
||||
raea-core-facts = { path = "../../../core/facts" }
|
||||
# the guard's counts, under the home folder
|
||||
raea-io-home = { path = "../../../io/home" }
|
||||
@@ -0,0 +1,119 @@
|
||||
//! raea-app-check-make: the Stop hook's half of `raea make` (docs/make.feature MK2): an agent working in a project whose brief.ts has a
|
||||
//! `make` job can't end its turn until `raea make status` says the job is done. Cheap when there's no job: the brief's
|
||||
//! words are read, and only a brief with `make:` is evaluated (by `raea make status`, a child process, so this crate
|
||||
//! doesn't carry the judge). A session blocked three times with the same open items goes through: it's going in
|
||||
//! circles, and the person is better told than the agent looped (PL7's keeper stops the same way).
|
||||
|
||||
use std::hash::{DefaultHasher, Hash, Hasher};
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use serde_json::Value;
|
||||
|
||||
/// How many times the same open items may block one session before the stop goes through.
|
||||
pub const SAME_BLOCKS: u32 = 3;
|
||||
|
||||
/// The brief.ts with a job, at or above `cwd` inside its raea project.
|
||||
pub fn brief_with_job(cwd: &Path) -> Option<PathBuf> {
|
||||
let project = raea_core_facts::record::up(cwd, ".raea/project");
|
||||
for d in dunce::canonicalize(cwd).ok()?.ancestors() {
|
||||
let p = d.join("brief.ts");
|
||||
if p.is_file() {
|
||||
return std::fs::read_to_string(&p).is_ok_and(|t| t.contains("make:") || t.contains("make :")).then_some(p);
|
||||
}
|
||||
if project.as_deref() == Some(d) {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
fn hash(parts: &[&str]) -> u64 {
|
||||
let mut h = DefaultHasher::new();
|
||||
parts.hash(&mut h);
|
||||
h.finish()
|
||||
}
|
||||
|
||||
/// Counts this session's blocks on the same open items in `guard` ("<items hash> <count>"); true while it may block.
|
||||
pub fn may_block(guard: &Path, items: &str) -> bool {
|
||||
let key = hash(&[items]).to_string();
|
||||
let count = std::fs::read_to_string(guard).ok().and_then(|t| {
|
||||
let (k, n) = t.trim().split_once(' ')?;
|
||||
(k == key).then(|| n.parse::<u32>().ok()).flatten()
|
||||
});
|
||||
let next = count.unwrap_or(0) + 1;
|
||||
let _ = std::fs::create_dir_all(guard.parent().unwrap_or(Path::new(".")));
|
||||
let _ = std::fs::write(guard, format!("{key} {next}"));
|
||||
next <= SAME_BLOCKS
|
||||
}
|
||||
|
||||
/// What the agent is told when its turn may not end, or None to let it end: no job here, the job is done, the job
|
||||
/// didn't load (never block on raea's own failure), or the same items have blocked it three times already.
|
||||
/// Each turn's status also brings the job's task in plan.org up to date (`--plan`, docs/make.feature MK3).
|
||||
pub fn stop(v: &Value) -> Option<String> {
|
||||
let cwd = PathBuf::from(v["cwd"].as_str()?);
|
||||
let brief = brief_with_job(&cwd)?;
|
||||
let exe = std::env::current_exe().ok()?;
|
||||
let out = std::process::Command::new(exe).args(["make", "status"]).arg(brief.parent()?).args(["--json", "--plan"]).env("RAEA_RECORD", "off").output().ok()?;
|
||||
let s: Value = serde_json::from_slice(&out.stdout).ok()?;
|
||||
let home = raea_io_home::user_home()?;
|
||||
let session = v["session_id"].as_str().unwrap_or("");
|
||||
let guard = home.join(".raea/hooks/make").join(format!("{:x}", hash(&[session, &brief.display().to_string()])));
|
||||
if s["done"] == true {
|
||||
let _ = std::fs::remove_file(&guard);
|
||||
return None;
|
||||
}
|
||||
let items = open_items(&s);
|
||||
if !may_block(&guard, &items) {
|
||||
return None;
|
||||
}
|
||||
Some(format!(
|
||||
"Not done ({} job, {}): {items}. Keep going: `raea make status` lists what's open; a defect you judge wrong is answered in NOTES.md by its name.",
|
||||
s["kind"].as_str().unwrap_or("make"),
|
||||
brief.display()
|
||||
))
|
||||
}
|
||||
|
||||
/// The open items, one line each: what's missing, then each gate that isn't clear.
|
||||
pub fn open_items(s: &Value) -> String {
|
||||
let mut items: Vec<String> = s["missing"].as_array().into_iter().flatten().filter_map(|m| m.as_str().map(String::from)).collect();
|
||||
items.extend(s["gates"].as_array().into_iter().flatten().filter(|g| g["clear"] != true).map(|g| format!("{}{}: {}", g["gate"].as_str().unwrap_or(""), g["of"].as_str().map(|o| format!(" {o}")).unwrap_or_default(), g["says"].as_str().unwrap_or(""))));
|
||||
items.join("; ")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use serde_json::json;
|
||||
|
||||
fn tmp(name: &str) -> PathBuf {
|
||||
let d = std::env::temp_dir().join(format!("raea-make-gate-{name}-{}", std::process::id()));
|
||||
let _ = std::fs::remove_dir_all(&d);
|
||||
std::fs::create_dir_all(d.join("compositions")).unwrap();
|
||||
d
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn only_a_brief_with_a_job_is_held() {
|
||||
let d = tmp("job");
|
||||
std::fs::write(d.join("brief.ts"), "export default brief({ title: \"x\" })").unwrap();
|
||||
assert_eq!(brief_with_job(&d.join("compositions")), None, "a brief without make is never held");
|
||||
std::fs::write(d.join("brief.ts"), "export default brief({ title: \"x\", make: kit({ objects: [] }) })").unwrap();
|
||||
assert_eq!(brief_with_job(&d.join("compositions")).map(|p| p.file_name().unwrap().to_owned()), Some("brief.ts".into()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_same_open_items_block_three_times_then_go_through() {
|
||||
let g = tmp("guard").join("g");
|
||||
assert!(may_block(&g, "a") && may_block(&g, "a") && may_block(&g, "a"));
|
||||
assert!(!may_block(&g, "a"), "a fourth stop on the same items goes through");
|
||||
assert!(may_block(&g, "a; b"), "new items start the count again");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn open_items_list_what_is_missing_then_the_gates_that_are_not_clear() {
|
||||
let s = json!({"missing": ["out/kit/lineup.png"], "gates": [
|
||||
{"gate": "checks", "of": "scene.tsx", "clear": false, "says": "never rendered"},
|
||||
{"gate": "critic", "clear": true, "says": "ok"}]});
|
||||
assert_eq!(open_items(&s), "out/kit/lineup.png; checks scene.tsx: never rendered");
|
||||
}
|
||||
}
|
||||
@@ -11,5 +11,11 @@ serde_json = "1"
|
||||
raea-io-home = { path = "../../../io/home" }
|
||||
raea-io-media = { path = "../../../io/media", default-features = false }
|
||||
raea-app-media = { path = "../../media" }
|
||||
# ffmpeg's flag for every decoded frame, by its version (the one read's flashing frames)
|
||||
raea-io-ffmpeg = { path = "../../../io/ffmpeg" }
|
||||
# caption contrast, as `raea world` measures it (DR2)
|
||||
raea-sys-measure = { path = "../../../systems/measure" }
|
||||
|
||||
[target.'cfg(unix)'.dependencies]
|
||||
# the one read's named pipes
|
||||
libc = "0.2"
|
||||
@@ -3,12 +3,14 @@
|
||||
//! loudness` do, with nothing to install. 0.1.7 refused any video without FFmpeg, which Windows never has (Shane 11-18:
|
||||
//! "can we make it so ffmpeg does work the way we need it?"). RAEA_CHECK_NATIVE=1 reads natively with FFmpeg there too;
|
||||
//! tests/parity.rs holds the two to the same answers. Each reader names the FFmpeg command it stands in for.
|
||||
pub mod once;
|
||||
pub use once::{log_level, showinfo_base, showinfo_frame};
|
||||
use raea_io_media::VideoDecoder;
|
||||
use serde_json::Value;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
type R<T> = Result<T, String>;
|
||||
pub type R<T> = Result<T, String>;
|
||||
|
||||
/// Whether to read natively: FFmpeg's ffmpeg or ffprobe isn't on the PATH, or RAEA_CHECK_NATIVE is on
|
||||
pub fn native() -> bool {
|
||||
@@ -41,6 +43,8 @@ pub struct Probe {
|
||||
/// past the picture, and the container's duration counts that
|
||||
pub picture: f64,
|
||||
pub audio: bool,
|
||||
/// the picture's frames a second (0 when it doesn't say)
|
||||
pub fps: f64,
|
||||
}
|
||||
|
||||
/// The picture's size, the file's duration, where the picture ends and whether there's sound: ffprobe's stream and
|
||||
@@ -50,7 +54,7 @@ pub fn probe(video: &str) -> R<Probe> {
|
||||
let p = raea_app_media::probe_of(Path::new(video))?;
|
||||
let v = p.video.as_ref().ok_or("no video stream")?;
|
||||
let picture = p.track.as_ref().map_or(v.duration, |t| t.duration);
|
||||
return Ok(Probe { w: v.width as f64, h: v.height as f64, duration: p.duration.max(picture), picture, audio: p.audio.is_some() });
|
||||
return Ok(Probe { w: v.width as f64, h: v.height as f64, duration: p.duration.max(picture), picture, audio: p.audio.is_some(), fps: v.fps });
|
||||
}
|
||||
let entries = "stream=codec_type,width,height,r_frame_rate,duration,start_time:format=duration,start_time";
|
||||
let out = Command::new("ffprobe").args(["-v", "error", "-show_entries", entries, "-of", "json", video]).output().map_err(|e| format!("ffprobe: {e}"))?;
|
||||
@@ -65,7 +69,11 @@ pub fn probe(video: &str) -> R<Probe> {
|
||||
None => last_packet_end(video).map_or(duration, |end| end - origin),
|
||||
};
|
||||
let audio = streams.iter().any(|s| s["codec_type"] == "audio");
|
||||
Ok(Probe { w: vid["width"].as_f64().unwrap_or(1920.0), h: vid["height"].as_f64().unwrap_or(1080.0), duration, picture, audio })
|
||||
let fps = vid["r_frame_rate"].as_str().and_then(|r| {
|
||||
let (n, d) = r.split_once('/').unwrap_or((r, "1"));
|
||||
Some(n.parse::<f64>().ok()? / d.parse::<f64>().ok().filter(|d| *d > 0.0)?)
|
||||
});
|
||||
Ok(Probe { w: vid["width"].as_f64().unwrap_or(1920.0), h: vid["height"].as_f64().unwrap_or(1080.0), duration, picture, audio, fps: fps.unwrap_or(0.0) })
|
||||
}
|
||||
|
||||
/// Where the picture's last packet ends, for a container that doesn't state the video stream's own length (Matroska)
|
||||
@@ -146,7 +154,30 @@ pub fn flash_frames(video: &str, w: usize, h: usize, mut each: impl FnMut(f64, &
|
||||
|
||||
/// `ffmpeg -i V -vn -ac 1 -ar RATE -f f32le -` (sound.rs sound): the sound folded to mono at `rate`
|
||||
pub fn mono(video: &str, rate: u32) -> R<Vec<f32>> {
|
||||
Ok(raea_app_media::audio_folded(Path::new(video), rate, true, None, None, false)?.channels.swap_remove(0))
|
||||
if native() {
|
||||
return Ok(raea_app_media::audio_folded(Path::new(video), rate, true, None, None, false)?.channels.swap_remove(0));
|
||||
}
|
||||
ffmpeg_f32(video, 1, rate)
|
||||
}
|
||||
|
||||
/// `ffmpeg -i V -vn -ac N -ar R -f f32le -`: the sound as N interleaved channels of floats
|
||||
fn ffmpeg_f32(video: &str, channels: u32, rate: u32) -> R<Vec<f32>> {
|
||||
let out = Command::new("ffmpeg").args(["-v", "error", "-i", video, "-vn", "-ac", &channels.to_string(), "-ar", &rate.to_string(), "-f", "f32le", "-"]).output().map_err(|e| format!("ffmpeg: {e}"))?;
|
||||
if !out.status.success() {
|
||||
return Err(format!("ffmpeg couldn't read the sound of {video}: {}", String::from_utf8_lossy(&out.stderr).trim()));
|
||||
}
|
||||
Ok(out.stdout.chunks_exact(4).map(|b| f32::from_le_bytes([b[0], b[1], b[2], b[3]])).collect())
|
||||
}
|
||||
|
||||
/// `ffmpeg -i V -vn -ac 2 -ar R -f f32le -` (defects.rs clipping): each channel at its own level. Clipping is a
|
||||
/// channel's: on the mono fold (L + R) * 0.707 a centred voice reads 3 dB hotter than either side, and a master at
|
||||
/// -1.6 dBTP read as full scale (11-19, the walkaround's flat tops).
|
||||
pub fn channels(video: &str, rate: u32) -> R<Vec<Vec<f32>>> {
|
||||
if native() {
|
||||
return Ok(raea_app_media::audio_folded(Path::new(video), rate, false, None, None, false)?.channels);
|
||||
}
|
||||
let x = ffmpeg_f32(video, 2, rate)?;
|
||||
Ok(vec![x.iter().step_by(2).copied().collect(), x.iter().skip(1).step_by(2).copied().collect()])
|
||||
}
|
||||
|
||||
/// `ffmpeg -i V -vn -af ebur128=metadata=1,ametadata=print:key=lavfi.r128.M:file=- -f null -` (sound.rs sound): the
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
//! The picture read once for four of raea check's rules (11-19: flashing, freezes, flash frames and blotching each
|
||||
//! decoded the whole file, 3.7 s apiece on a 56 s export, and decoding is the machine's whole CPU, so reading them at
|
||||
//! the same time saved nothing). One FFmpeg decodes it and splits the frames into the four filter chains the rules
|
||||
//! were tuned on, each to its own output with its own options as when it ran alone, so each rule reads the same bytes:
|
||||
//!
|
||||
//! - the flashing screen's area- and point-sampled frames (showinfo, rgb24, passthrough) to stdout, their times on stderr;
|
||||
//! - freezedetect into a null output, its findings on stderr;
|
||||
//! - each frame's 32x18 grey (the flash-frame rule) to a named pipe;
|
||||
//! - every 2 s the grey crop blotching scores, to another.
|
||||
//!
|
||||
//! Unix only (named pipes); elsewhere, and where FFmpeg isn't installed, the rules read on their own as before.
|
||||
#[cfg(unix)]
|
||||
use std::io::{BufRead, Read};
|
||||
#[cfg(unix)]
|
||||
use std::path::Path;
|
||||
#[cfg(unix)]
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
use crate::R;
|
||||
|
||||
/// What the one read gave the rules beside the frames it handed on
|
||||
pub struct Once {
|
||||
/// the flashing screen's frames read, and whether one came without its time (the read was stopped)
|
||||
pub frames: usize,
|
||||
pub lost: bool,
|
||||
/// FFmpeg ran to its end
|
||||
pub ok: bool,
|
||||
/// errors decoding the picture, and the first of them
|
||||
pub errors: usize,
|
||||
pub first: String,
|
||||
/// freezedetect's lines
|
||||
pub freezes: String,
|
||||
/// each frame's mean brightness, 0 to 1 (defects.rs lumas)
|
||||
pub lumas: Vec<f32>,
|
||||
}
|
||||
|
||||
/// A frame's number and time from showinfo's log, exact: its `pts` in ticks of the time base. `pts_time` is rounded to six
|
||||
/// significant digits, which is enough to push a legal third flash across the one-second line.
|
||||
pub fn showinfo_frame(line: &str, base: Option<(i64, i64)>) -> Option<(usize, f64)> {
|
||||
let rest = line.split(" n:").nth(1)?;
|
||||
let n = rest.split_whitespace().next()?.parse().ok()?;
|
||||
let pts: i64 = rest.split("pts:").nth(1)?.split_whitespace().next()?.parse().ok()?;
|
||||
let (num, den) = base?;
|
||||
Some((n, pts as f64 * num as f64 / den as f64))
|
||||
}
|
||||
|
||||
pub fn showinfo_base(line: &str) -> Option<(i64, i64)> {
|
||||
let (num, den) = line.split("config in time_base:").nth(1)?.split(',').next()?.trim().split_once('/')?;
|
||||
Some((num.parse().ok()?, den.parse().ok()?))
|
||||
}
|
||||
|
||||
/// A line's severity under `-loglevel level+`: the first bracket after any `[context @ address]`. Searching the whole line
|
||||
/// would take a file's own metadata for an error when its title happens to say one.
|
||||
pub fn log_level(line: &str) -> Option<&str> {
|
||||
let mut rest = line.trim_start();
|
||||
if rest.starts_with('[') && rest[..rest.find(']')?].contains(" @ ") {
|
||||
rest = rest[rest.find(']')? + 1..].trim_start();
|
||||
}
|
||||
let rest = rest.strip_prefix('[')?;
|
||||
Some(&rest[..rest.find(']')?])
|
||||
}
|
||||
|
||||
/// Each 32x18 grey frame's mean brightness, 0 to 1 (`scale=32:18:flags=area,format=gray`, defects.rs lumas)
|
||||
pub fn lumas_of(grey: &[u8]) -> Vec<f32> {
|
||||
let mut out = Vec::with_capacity(grey.len() / (32 * 18));
|
||||
for f in grey.as_chunks::<{ 32 * 18 }>().0 {
|
||||
let mut sum = 0f32;
|
||||
for &p in f {
|
||||
sum += p as f32;
|
||||
}
|
||||
out.push(sum / (32.0 * 18.0 * 255.0));
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// Whether the four rules can read in one: FFmpeg is the reader, and the system has named pipes
|
||||
pub fn can() -> bool {
|
||||
cfg!(unix) && !crate::native()
|
||||
}
|
||||
|
||||
/// The one read: the flashing screen's frames (`flash`, w x h each side) to `screen` with their times, the grey crop
|
||||
/// (`crop`, w x h; None when blotching doesn't read) every 2 s to `crops`, freezedetect at `still` seconds
|
||||
#[cfg(not(unix))]
|
||||
pub fn picture(_: &str, _: (usize, usize), _: Option<(usize, usize)>, _: f64, _: impl FnMut(f64, &[u8]) + Send, _: impl FnMut(&[u8]) + Send) -> R<Once> {
|
||||
Err("one read needs named pipes".into())
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
pub fn picture(video: &str, flash: (usize, usize), crop: Option<(usize, usize)>, still: f64, mut screen: impl FnMut(f64, &[u8]) + Send, mut crops: impl FnMut(&[u8]) + Send) -> R<Once> {
|
||||
let dir = std::env::temp_dir().join(format!("raea-once-{}-{}", std::process::id(), std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_nanos())));
|
||||
std::fs::create_dir_all(&dir).map_err(|e| format!("{}: {e}", dir.display()))?;
|
||||
let (lumas_at, crops_at) = (dir.join("lumas"), dir.join("crops"));
|
||||
let read = (|| {
|
||||
fifo(&lumas_at)?;
|
||||
if crop.is_some() {
|
||||
fifo(&crops_at)?;
|
||||
}
|
||||
let (w, h) = flash;
|
||||
let mut graph = format!(
|
||||
"[0:v:0]split={}[f][z][l]{};[f]showinfo,split=2[area][point];[area]scale={w}:{h}:flags=area[a];[point]scale={w}:{h}:flags=neighbor[p];[a][p]hstack=inputs=2,format=rgb24[fo];[z]freezedetect=n=-60dB:d={still}[zo];[l]scale=32:18:flags=area,format=gray[lo]",
|
||||
if crop.is_some() { 4 } else { 3 },
|
||||
if crop.is_some() { "[b]" } else { "" }
|
||||
);
|
||||
if let Some((cw, ch)) = crop {
|
||||
graph.push_str(&format!(";[b]fps=0.5,crop={cw}:{ch}:0:0,format=gray[bo]"));
|
||||
}
|
||||
let sync = raea_io_ffmpeg::passthrough();
|
||||
let mut args: Vec<String> = ["-hide_banner", "-nostats", "-nostdin", "-y", "-loglevel", "level+info", "-i", video, "-filter_complex", &graph].map(String::from).to_vec();
|
||||
args.extend(["-map", "[fo]", sync[0], sync[1], "-f", "rawvideo", "pipe:1", "-map", "[zo]", "-f", "null", "-", "-map", "[lo]", "-f", "rawvideo"].map(String::from));
|
||||
args.push(lumas_at.display().to_string());
|
||||
if crop.is_some() {
|
||||
args.extend(["-map", "[bo]", "-f", "rawvideo"].map(String::from));
|
||||
args.push(crops_at.display().to_string());
|
||||
}
|
||||
let mut child = Command::new("ffmpeg").args(&args).stdin(Stdio::null()).stdout(Stdio::piped()).stderr(Stdio::piped()).spawn().map_err(|e| format!("ffmpeg: {e}"))?;
|
||||
let (mut out, err) = (child.stdout.take().unwrap(), child.stderr.take().unwrap());
|
||||
let (times, clock) = std::sync::mpsc::channel();
|
||||
std::thread::scope(|s| {
|
||||
// each output read apart from the others, so that none can fill while another is being waited on
|
||||
let log = s.spawn(move || {
|
||||
let (mut err, mut line) = (std::io::BufReader::new(err), Vec::new());
|
||||
let (mut base, mut errors, mut first, mut freezes) = (None, 0usize, String::new(), String::new());
|
||||
while err.read_until(b'\n', &mut line).is_ok_and(|n| n > 0) {
|
||||
let text = String::from_utf8_lossy(&line);
|
||||
if matches!(log_level(&text), Some("error" | "fatal" | "panic")) {
|
||||
errors += 1;
|
||||
if first.is_empty() {
|
||||
first = text.trim().to_string();
|
||||
}
|
||||
} else if text.trim_start().starts_with("[Parsed_showinfo") {
|
||||
base = showinfo_base(&text).or(base);
|
||||
if let Some(frame) = showinfo_frame(&text, base) {
|
||||
let _ = times.send(frame);
|
||||
}
|
||||
} else if text.contains("freezedetect") {
|
||||
freezes.push_str(&text);
|
||||
}
|
||||
line.clear();
|
||||
}
|
||||
(errors, first, freezes)
|
||||
});
|
||||
let lumas = s.spawn(|| {
|
||||
let mut b = Vec::new();
|
||||
let _ = std::fs::File::open(&lumas_at).and_then(|mut f| f.read_to_end(&mut b));
|
||||
lumas_of(&b)
|
||||
});
|
||||
let crop_reader = crop.map(|(cw, ch)| {
|
||||
let at = &crops_at;
|
||||
let crops = &mut crops;
|
||||
s.spawn(move || {
|
||||
if let Ok(mut f) = std::fs::File::open(at) {
|
||||
let mut buf = vec![0u8; cw * ch];
|
||||
while f.read_exact(&mut buf).is_ok() {
|
||||
crops(&buf);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
let mut buf = vec![0u8; w * 2 * h * 3];
|
||||
let (mut frames, mut lost) = (0usize, false);
|
||||
while out.read_exact(&mut buf).is_ok() {
|
||||
// the frame's own line is written before its pixels, so one that doesn't come isn't going to
|
||||
match clock.recv_timeout(std::time::Duration::from_secs(60)) {
|
||||
Ok((n, t)) if n == frames => screen(t, &buf),
|
||||
_ => {
|
||||
lost = true;
|
||||
let _ = child.kill();
|
||||
break;
|
||||
}
|
||||
}
|
||||
frames += 1;
|
||||
}
|
||||
drop(out);
|
||||
let ok = child.wait().is_ok_and(|s| s.success());
|
||||
// a pipe FFmpeg never opened (it stopped first) would hold its reader in open(): opening it to write lets go
|
||||
for p in [&lumas_at, &crops_at] {
|
||||
let _ = unblock(p);
|
||||
}
|
||||
let (errors, first, freezes) = log.join().unwrap_or_default();
|
||||
let lumas = lumas.join().unwrap_or_default();
|
||||
if let Some(c) = crop_reader {
|
||||
let _ = c.join();
|
||||
}
|
||||
Ok(Once { frames, lost, ok, errors, first, freezes, lumas })
|
||||
})
|
||||
})();
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
read
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn fifo(p: &Path) -> R<()> {
|
||||
let c = std::ffi::CString::new(p.as_os_str().as_encoded_bytes()).map_err(|e| e.to_string())?;
|
||||
// SAFETY: a NUL-terminated path, and mkfifo reads nothing else
|
||||
if unsafe { libc::mkfifo(c.as_ptr(), 0o600) } != 0 {
|
||||
return Err(format!("{}: {}", p.display(), std::io::Error::last_os_error()));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn unblock(p: &Path) -> std::io::Result<()> {
|
||||
use std::os::unix::fs::OpenOptionsExt;
|
||||
std::fs::OpenOptions::new().write(true).custom_flags(libc::O_NONBLOCK).open(p).map(drop)
|
||||
}
|
||||
@@ -124,3 +124,42 @@ fn the_native_reads_match_ffmpeg_s() {
|
||||
}
|
||||
assert!(off.0.iter().all(|(_, by, most)| by < most), "a native read is further from FFmpeg's than a rule allows");
|
||||
}
|
||||
|
||||
/// The one read (once.rs) against the four reads it stands in for, each run alone as raea check ran it: each rule gets
|
||||
/// the same bytes, frames and log lines. Away from Unix the rules read alone (no named pipes), and this is skipped.
|
||||
#[test]
|
||||
fn one_read_gives_each_rule_what_its_own_read_gave() {
|
||||
if !raea_app_check_read::once::can() {
|
||||
eprintln!("skipped: the rules read alone here");
|
||||
return;
|
||||
}
|
||||
let dir = std::env::temp_dir().join(format!("raea-once-test-{}", std::process::id()));
|
||||
std::fs::create_dir_all(&dir).unwrap();
|
||||
let file = dir.join("clip.mp4").to_string_lossy().into_owned();
|
||||
ffmpeg(&["-y", "-f", "lavfi", "-i", "testsrc2=size=320x180:rate=30:duration=5,tpad=stop_mode=clone:stop_duration=4", "-c:v", "libx264", "-pix_fmt", "yuv420p", &file]);
|
||||
let (w, h, cw, ch) = (192usize, 108usize, 320usize, 176usize);
|
||||
let (mut frames, mut crops) = (Vec::new(), Vec::new());
|
||||
let once = raea_app_check_read::once::picture(&file, (w, h), Some((cw, ch)), 3.0, |t, b| frames.push((t, b.to_vec())), |b| crops.extend_from_slice(b)).unwrap();
|
||||
assert!(once.ok && !once.lost && once.errors == 0);
|
||||
// the flashing screen's frames, as flash.rs read them alone
|
||||
let sync = raea_io_ffmpeg::passthrough();
|
||||
let graph = format!("showinfo,split=2[area][point];[area]scale={w}:{h}:flags=area[a];[point]scale={w}:{h}:flags=neighbor[b];[a][b]hstack=inputs=2,format=rgb24");
|
||||
let (alone, log) = ffmpeg(&["-loglevel", "level+info", "-i", &file, "-map", "0:v:0", "-vf", &graph, sync[0], sync[1], "-f", "rawvideo", "-"]);
|
||||
assert_eq!(frames.len(), alone.len() / (w * 2 * h * 3));
|
||||
assert_eq!(frames.iter().flat_map(|f| f.1.iter().copied()).collect::<Vec<u8>>(), alone);
|
||||
let base = log.lines().find_map(raea_app_check_read::showinfo_base);
|
||||
let times: Vec<f64> = log.lines().filter(|l| l.trim_start().starts_with("[Parsed_showinfo")).filter_map(|l| raea_app_check_read::showinfo_frame(l, base)).map(|f| f.1).collect();
|
||||
assert_eq!(frames.iter().map(|f| f.0).collect::<Vec<f64>>(), times);
|
||||
// each frame's brightness, as defects.rs read it
|
||||
let (grey, _) = ffmpeg(&["-v", "error", "-i", &file, "-map", "0:v:0", "-vf", "scale=32:18:flags=area,format=gray", "-f", "rawvideo", "-"]);
|
||||
assert_eq!(once.lumas, raea_app_check_read::once::lumas_of(&grey));
|
||||
// blotching's crops, as picture.rs read them
|
||||
let (alone, _) = ffmpeg(&["-v", "error", "-i", &file, "-vf", &format!("fps=0.5,crop={cw}:{ch}:0:0,format=gray"), "-f", "rawvideo", "-"]);
|
||||
assert_eq!(crops, alone);
|
||||
// and freezedetect's freeze, as sound.rs read it
|
||||
let (_, log) = ffmpeg(&["-i", &file, "-an", "-vf", "freezedetect=n=-60dB:d=3", "-f", "null", "-"]);
|
||||
let starts = |s: &str| s.lines().filter_map(|l| l.split("freeze_start: ").nth(1).map(|x| x.trim().to_string())).collect::<Vec<_>>();
|
||||
assert_eq!(starts(&once.freezes), starts(&log));
|
||||
assert!(!starts(&log).is_empty());
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
+27
-11
@@ -11,8 +11,12 @@ pub(crate) const FULL: f32 = 0.999;
|
||||
pub(crate) const FLAT_LEVEL: f32 = 0.05;
|
||||
pub(crate) const CLIP_RUNS: usize = 3;
|
||||
|
||||
pub(crate) fn clipped(x: &[f32]) -> Vec<(f64, String)> {
|
||||
let mut per: Vec<usize> = vec![0; x.len() / SR + 1];
|
||||
pub(crate) fn clipped(channels: &[Vec<f32>]) -> Vec<(f64, String)> {
|
||||
let len = channels.iter().map(Vec::len).max().unwrap_or(0);
|
||||
let mut per: Vec<usize> = vec![0; len / SR + 1];
|
||||
// each channel's runs, a second's count the most any channel had: clipping is a channel's
|
||||
for x in channels {
|
||||
let mut own: Vec<usize> = vec![0; len / SR + 1];
|
||||
let mut i = 0;
|
||||
while i < x.len() {
|
||||
let v = x[i];
|
||||
@@ -22,18 +26,22 @@ pub(crate) fn clipped(x: &[f32]) -> Vec<(f64, String)> {
|
||||
j += 1;
|
||||
}
|
||||
if j - i >= 3 {
|
||||
per[i / SR] += 1;
|
||||
own[i / SR] += 1;
|
||||
}
|
||||
} else if v.abs() >= FLAT_LEVEL {
|
||||
while j < x.len() && x[j].to_bits() == v.to_bits() {
|
||||
j += 1;
|
||||
}
|
||||
if j - i >= 4 {
|
||||
per[i / SR] += 1;
|
||||
own[i / SR] += 1;
|
||||
}
|
||||
}
|
||||
i = j;
|
||||
}
|
||||
for (p, o) in per.iter_mut().zip(own) {
|
||||
*p = (*p).max(o);
|
||||
}
|
||||
}
|
||||
let mut out = Vec::new();
|
||||
let mut s = 0;
|
||||
while s < per.len() {
|
||||
@@ -123,20 +131,28 @@ fn lumas(video: &str) -> R<(Vec<f32>, f64)> {
|
||||
if !out.status.success() {
|
||||
return Err(format!("ffmpeg couldn't read the picture of {video}: {}", String::from_utf8_lossy(&out.stderr).trim()));
|
||||
}
|
||||
let l = out.stdout.as_chunks::<{ 32 * 18 }>().0.iter().map(|f| f.iter().map(|&p| p as f32).sum::<f32>() / (32.0 * 18.0 * 255.0)).collect();
|
||||
Ok((crate::read::once::lumas_of(&out.stdout), ffmpeg_rate(video)?))
|
||||
}
|
||||
|
||||
/// The frame rate `ffmpeg -i` says
|
||||
pub(crate) fn ffmpeg_rate(video: &str) -> R<f64> {
|
||||
let rate = ffmpeg_stderr(&["-hide_banner", "-i", video])?;
|
||||
let fps = rate.split(" fps").next().and_then(|s| s.rsplit(", ").next()).and_then(|s| s.trim().parse().ok()).unwrap_or(30.0);
|
||||
Ok((l, fps))
|
||||
Ok(rate.split(" fps").next().and_then(|s| s.rsplit(", ").next()).and_then(|s| s.trim().parse().ok()).unwrap_or(30.0))
|
||||
}
|
||||
|
||||
pub(crate) fn flash_frame_rule(video: &str, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
|
||||
let (l, fps) = lumas(video)?;
|
||||
let found = flash_frames(&l, fps);
|
||||
flash_frame_from(&l, fps, issues, passed);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The stray frames each frame's brightness shows
|
||||
pub(crate) fn flash_frame_from(l: &[f32], fps: f64, issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let found = flash_frames(l, fps);
|
||||
if found.is_empty() {
|
||||
passed.push("flash-frame: no stray black or white frame".into());
|
||||
}
|
||||
issues.extend(moments("flash-frame", 1, found));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Each moment a rule found, as an issue of that priority
|
||||
@@ -145,8 +161,8 @@ pub(crate) fn moments(rule: &'static str, p: u8, found: Vec<(f64, String)>) -> i
|
||||
}
|
||||
|
||||
/// The sound's defects on the decoded mix (sound.rs decodes it once)
|
||||
pub(crate) fn sound_defects(x: &[f32], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
for (rule, found, ok) in [("clipping", clipped(x), "clipping: no flat-topped runs"), ("dropout", dropouts(x), "dropout: the sound never drops to silence and back")] {
|
||||
pub(crate) fn sound_defects(x: &[f32], channels: &[Vec<f32>], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
for (rule, found, ok) in [("clipping", clipped(channels), "clipping: no flat-topped runs"), ("dropout", dropouts(x), "dropout: the sound never drops to silence and back")] {
|
||||
if found.is_empty() {
|
||||
passed.push(ok.into());
|
||||
}
|
||||
|
||||
+34
-23
@@ -5,35 +5,46 @@ use raea_app_check_flash::FlashScreen;
|
||||
/// the area sample and the point sample side by side
|
||||
const FLASH_W: usize = 192;
|
||||
|
||||
/// A frame's number and time from showinfo's log, exact: its `pts` in ticks of the time base. `pts_time` is rounded to six
|
||||
/// significant digits, which is enough to push a legal third flash across the one-second line.
|
||||
pub(crate) fn showinfo_frame(line: &str, base: Option<(i64, i64)>) -> Option<(usize, f64)> {
|
||||
let rest = line.split(" n:").nth(1)?;
|
||||
let n = rest.split_whitespace().next()?.parse().ok()?;
|
||||
let pts: i64 = rest.split("pts:").nth(1)?.split_whitespace().next()?.parse().ok()?;
|
||||
let (num, den) = base?;
|
||||
Some((n, pts as f64 * num as f64 / den as f64))
|
||||
pub(crate) use crate::read::{log_level, showinfo_base, showinfo_frame};
|
||||
|
||||
/// The flashing screen's frame height for the picture's shape
|
||||
fn flash_h(probe: &Probe) -> usize {
|
||||
(((FLASH_W as f64 * probe.h / probe.w.max(1.0)) / 2.0).round() as usize * 2).max(6)
|
||||
}
|
||||
|
||||
pub(crate) fn showinfo_base(line: &str) -> Option<(i64, i64)> {
|
||||
let (num, den) = line.split("config in time_base:").nth(1)?.split(',').next()?.trim().split_once('/')?;
|
||||
Some((num.parse().ok()?, den.parse().ok()?))
|
||||
}
|
||||
|
||||
/// A line's severity under `-loglevel level+`: the first bracket after any `[context @ address]`. Searching the whole line
|
||||
/// would take a file's own metadata for an error when its title happens to say one.
|
||||
pub(crate) fn log_level(line: &str) -> Option<&str> {
|
||||
let mut rest = line.trim_start();
|
||||
if rest.starts_with('[') && rest[..rest.find(']')?].contains(" @ ") {
|
||||
rest = rest[rest.find(']')? + 1..].trim_start();
|
||||
/// Freezes, flashing, flash frames and blotching, in that order, from one read of the picture (raea-app-check-read
|
||||
/// once.rs: one decode where there were four); each reads on its own where one read can't be had
|
||||
pub(crate) fn picture_rules(video: &str, probe: &Probe, taste: Option<&Taste>, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
|
||||
if !crate::read::once::can() {
|
||||
freezes(video, probe, taste, issues, passed)?;
|
||||
flashing(video, probe, issues, passed)?;
|
||||
flash_frame_rule(video, issues, passed)?;
|
||||
return blotching(video, probe, issues, passed);
|
||||
}
|
||||
let rest = rest.strip_prefix('[')?;
|
||||
Some(&rest[..rest.find(']')?])
|
||||
let (w, h) = (FLASH_W, flash_h(probe));
|
||||
let kept = x264_kept(video);
|
||||
let (cw, ch) = (probe.w as usize / 8 * 8, probe.h as usize / 8 * 8);
|
||||
let mut screen = FlashScreen::new(w, h);
|
||||
let mut scores = Vec::new();
|
||||
let once = crate::read::once::picture(video, (w, h), kept.is_none().then_some((cw, ch)), taste.map_or(3.0, |t| t.value), |t, buf| screen.push(buf, t), scorer(&mut scores, cw, ch))?;
|
||||
freezes_from(&once.freezes, probe, taste, issues, passed);
|
||||
if once.lost {
|
||||
return Err(format!("{video}: flashing can't be screened, frame {} has no timestamp of its own", once.frames));
|
||||
}
|
||||
if !once.ok || once.frames == 0 {
|
||||
return Err(format!("{video}: flashing can't be screened, FFmpeg decoded {} frames ({})", once.frames, once.first));
|
||||
}
|
||||
screened(screen, once.errors, &once.first, issues, passed);
|
||||
flash_frame_from(&once.lumas, ffmpeg_rate(video)?, issues, passed);
|
||||
match kept {
|
||||
Some(crf) => passed.push(format!("blotching: encoded by x264 at crf {crf}, which keeps the darks")),
|
||||
None => blotching_from(video, probe, &scores, issues, passed),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn flashing(video: &str, probe: &Probe, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
|
||||
let w = FLASH_W;
|
||||
let h = (((w as f64 * probe.h / probe.w.max(1.0)) / 2.0).round() as usize * 2).max(6);
|
||||
let (w, h) = (FLASH_W, flash_h(probe));
|
||||
if crate::read::native() {
|
||||
let mut screen = FlashScreen::new(w, h);
|
||||
if crate::read::flash_frames(video, w, h, |t, buf| screen.push(buf, t))? == 0 {
|
||||
|
||||
@@ -150,7 +150,9 @@ pub fn hook(args: &[String]) -> R<String> {
|
||||
// to end goes on to take it up
|
||||
let sent = if matches!(event, "PostToolUse" | "AfterTool" | "Stop") { crate::inbox::told(agent, &v) } else { None };
|
||||
if event == "Stop" {
|
||||
return Ok(sent.map(|s| json!({"decision": "block", "reason": s}).to_string()).unwrap_or_default());
|
||||
// what the person sent, and a `make` job that isn't done (docs/make.feature MK2): either keeps the turn going
|
||||
let reasons: Vec<String> = [sent, raea_app_check_make::stop(&v)].into_iter().flatten().collect();
|
||||
return Ok(if reasons.is_empty() { String::new() } else { json!({"decision": "block", "reason": reasons.join("\n\n")}).to_string() });
|
||||
}
|
||||
let after_tool = matches!(event, "PostToolUse" | "AfterTool");
|
||||
if let Some(cmd) = shell_command(&v).filter(|_| !after_tool) {
|
||||
|
||||
+20
-25
@@ -22,8 +22,10 @@ mod flash;
|
||||
use flash::*;
|
||||
mod defects;
|
||||
use defects::*;
|
||||
mod text;
|
||||
use text::*;
|
||||
/// what a render's text breaks, from its manifest (split out: a render holds its own text to it)
|
||||
use raea_app_check_text::*;
|
||||
/// who can fix what it finds: the encode's or the picture's own, carried from an earlier export, a source
|
||||
use raea_app_check_cause as cause;
|
||||
/// a video read through FFmpeg, or raea's own decoders where it isn't installed
|
||||
use raea_app_check_read::{self as read, Probe};
|
||||
pub mod quick;
|
||||
@@ -32,15 +34,6 @@ pub use raea_app_check_inbox as inbox;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
type R<T> = Result<T, String>;
|
||||
|
||||
#[derive(Clone)]
|
||||
struct Issue {
|
||||
rule: &'static str,
|
||||
p: u8,
|
||||
at: Option<f64>,
|
||||
says: String,
|
||||
}
|
||||
|
||||
/// `raea check …` with the person's taste, none or more (taste.ts and the kinds beside it, which the raea CLI evaluates: it owns the engine):
|
||||
/// its rules' checks hold the export to the person's own lines.
|
||||
@@ -83,9 +76,10 @@ struct Taste {
|
||||
line: String,
|
||||
}
|
||||
|
||||
/// The checks among a person's taste rules (taste.ts and its kinds), each with the line it stands for.
|
||||
/// The checks among a person's taste rules (taste.ts and its kinds) that a video alone shows (the six forms), each
|
||||
/// with the line it stands for.
|
||||
fn taste_rules(tastes: &[raea_core_brief::Taste]) -> Vec<Taste> {
|
||||
tastes.iter().flat_map(|t| &t.sections).flat_map(|s| &s.rules).filter_map(|r| r.check.map(|c| Taste { form: c.form(), value: c.value(), line: r.text.clone() })).collect()
|
||||
tastes.iter().flat_map(|t| t.checks()).map(|(line, c)| Taste { form: c.form(), value: c.value(), line: line.to_string() }).collect()
|
||||
}
|
||||
|
||||
fn taste_of<'a>(rules: &'a [Taste], form: &str) -> Option<&'a Taste> {
|
||||
@@ -159,14 +153,17 @@ fn measured(args: &[String], taste: Vec<Taste>) -> R<(String, Vec<Issue>, Vec<St
|
||||
loudness(&video, taste_of(&taste, "loudness"), &mut issues, &mut passed)?;
|
||||
sound(&video, words.as_deref(), &mut issues, &mut passed)?;
|
||||
}
|
||||
freezes(&video, &probe, taste_of(&taste, "still-max"), &mut issues, &mut passed)?;
|
||||
flashing(&video, &probe, &mut issues, &mut passed)?;
|
||||
flash_frame_rule(&video, &mut issues, &mut passed)?;
|
||||
blotching(&video, &probe, &mut issues, &mut passed)?;
|
||||
picture_rules(&video, &probe, taste_of(&taste, "still-max"), &mut issues, &mut passed)?;
|
||||
brand_kit(&[flag(args, "--manifest").unwrap_or(""), video.as_str()], &mut issues, &mut passed);
|
||||
if let Some(p) = flag(args, "--things") {
|
||||
things(p, &mut issues, &mut passed)?;
|
||||
}
|
||||
// a take or a download isn't a delivery: the mix sets the delivery's level, so its own is said, not held to the target
|
||||
if cause::is_source(std::path::Path::new(&video)) {
|
||||
for i in issues.iter_mut().filter(|i| i.rule == "loudness") {
|
||||
(i.p, i.says) = (3, format!("a source, not a delivery: {} (the mix sets the delivery's level)", i.says));
|
||||
}
|
||||
}
|
||||
if let Some(manifest) = &manifest {
|
||||
let runs = text_runs(manifest);
|
||||
let (w, h) = (manifest["width"].as_f64().unwrap_or(probe.w), manifest["height"].as_f64().unwrap_or(probe.h));
|
||||
@@ -204,19 +201,17 @@ fn things(p: &str, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
|
||||
/// `fps`), with `more` (a render's own), worst first then by time.
|
||||
fn findings_of(mut issues: Vec<Issue>, more: Vec<Finding>, fps: f64) -> Vec<Finding> {
|
||||
issues.sort_by(|a, b| a.p.cmp(&b.p).then(a.at.unwrap_or(0.0).total_cmp(&b.at.unwrap_or(0.0))));
|
||||
let mut found = Vec::new();
|
||||
for i in &issues {
|
||||
// an issue at a second is about the frame it falls on
|
||||
let (f, fr) = (Finding::new(i.rule, Level::of_rank(i.p), &i.says, "raea check"), (i.at.unwrap_or(0.0) * fps).round() as i64);
|
||||
found.push(if i.at.is_some() { f.frames(fr, fr + 1) } else { f });
|
||||
}
|
||||
finding::ranked(found.into_iter().chain(more).collect())
|
||||
finding::ranked(issues.iter().map(|i| i.finding("raea check", fps)).chain(more).collect())
|
||||
}
|
||||
|
||||
/// The findings (`findings_of`), written to -o as JSON when asked, and the report's text with the count last. True
|
||||
/// when an error is among them.
|
||||
fn report(video: &str, issues: Vec<Issue>, more: Vec<Finding>, passed: Vec<String>, out: Option<&str>, fps: f64) -> R<(String, bool)> {
|
||||
let found = findings_of(issues, more, fps);
|
||||
let mut found = findings_of(issues, more, fps);
|
||||
// what an earlier export of the same composition already had says so: the change between them didn't move it
|
||||
if let Some(e) = cause::earlier(std::path::Path::new(video)) {
|
||||
cause::carried(&mut found, &e, fps);
|
||||
}
|
||||
let bad = found.iter().any(|f| f.level == Level::Error);
|
||||
if let Some(out) = out {
|
||||
let j = json!({"file": video, "fps": fps, "findings": found, "passed": passed});
|
||||
|
||||
+94
-27
@@ -101,30 +101,41 @@ pub(crate) fn x264_crf(head: &[u8]) -> Option<f64> {
|
||||
/// in its darks is the picture's own (8-bit glows and faint panels), which blotch_score can't always tell apart
|
||||
pub(crate) const X264_KEEPS: f64 = 16.0;
|
||||
|
||||
pub(crate) fn blotching(video: &str, probe: &Probe, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
|
||||
/// How far a clean encode moves a sample's blotching (x264 crf 12 over the walkaround's unencoded frames, 11-19: at most 0.005)
|
||||
pub(crate) const BLOTCH_NOISE: f64 = 0.005;
|
||||
|
||||
/// Blotching's samples against the same frames of the composition drawn without encoding (raea-app-check-cause): None
|
||||
/// when the video isn't a render in a raea project's record
|
||||
fn blotching_cause(video: &str, probe: &Probe, scores: &[Option<f64>], w: usize, h: usize) -> Option<R<(cause::Against, Vec<Option<f64>>)>> {
|
||||
let (project, comp) = cause::composition_of(std::path::Path::new(video))?;
|
||||
Some((|| {
|
||||
if probe.fps <= 0.0 {
|
||||
return Err("the video doesn't say its frame rate".to_string());
|
||||
}
|
||||
let frames = cause::sampled(scores.len(), 2.0, probe.fps, (probe.picture * probe.fps).round() as i64 - 1);
|
||||
let me = std::env::current_exe().map_err(|e| e.to_string())?;
|
||||
let before: Vec<Option<f64>> = cause::unencoded(&me, &project, &comp, &frames, w, h)?.iter().map(|y| blotch_score(y, w, h)).collect();
|
||||
Ok((cause::against(scores, &before, BLOTCHY, BLOTCH_NOISE), before))
|
||||
})())
|
||||
}
|
||||
|
||||
/// The crf an x264 encode that keeps the darks was made at: blotching isn't read for it
|
||||
pub(crate) fn x264_kept(video: &str) -> Option<f64> {
|
||||
let mut head = Vec::new();
|
||||
if let Ok(f) = std::fs::File::open(video) {
|
||||
let _ = std::io::Read::read_to_end(&mut std::io::Read::take(f, 8 << 20), &mut head);
|
||||
}
|
||||
if let Some(crf) = x264_crf(&head).filter(|c| *c <= X264_KEEPS) {
|
||||
x264_crf(&head).filter(|c| *c <= X264_KEEPS)
|
||||
}
|
||||
|
||||
pub(crate) fn blotching(video: &str, probe: &Probe, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
|
||||
if let Some(crf) = x264_kept(video) {
|
||||
passed.push(format!("blotching: encoded by x264 at crf {crf}, which keeps the darks"));
|
||||
return Ok(());
|
||||
}
|
||||
let (w, h) = (probe.w as usize / 8 * 8, probe.h as usize / 8 * 8);
|
||||
let (mut bad, mut seen, mut worst, mut t) = (Vec::new(), 0, 0f64, 0.0);
|
||||
let mut frame = |buf: &[u8]| {
|
||||
if let Some(s) = blotch_score(buf, w, h) {
|
||||
seen += 1;
|
||||
worst = worst.max(s);
|
||||
if std::env::var_os("RAEA_CHECK_DEBUG").is_some() {
|
||||
eprintln!("blotch {t:6.1}s {s:.3}");
|
||||
}
|
||||
if s > BLOTCHY {
|
||||
bad.push((t, s));
|
||||
}
|
||||
}
|
||||
t += 2.0;
|
||||
};
|
||||
let mut scores: Vec<Option<f64>> = Vec::new();
|
||||
let mut frame = scorer(&mut scores, w, h);
|
||||
if crate::read::native() {
|
||||
crate::read::crops(video, w, h, &mut frame)?;
|
||||
} else {
|
||||
@@ -140,21 +151,77 @@ pub(crate) fn blotching(video: &str, probe: &Probe, issues: &mut Vec<Issue>, pas
|
||||
}
|
||||
let _ = child.wait();
|
||||
}
|
||||
drop(frame);
|
||||
blotching_from(video, probe, &scores, issues, passed);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Each grey crop's blotching, kept in `scores`
|
||||
pub(crate) fn scorer(scores: &mut Vec<Option<f64>>, w: usize, h: usize) -> impl FnMut(&[u8]) + Send + '_ {
|
||||
move |buf| scores.push(blotch_score(buf, w, h))
|
||||
}
|
||||
|
||||
/// What blotching's samples (one every 2 s) found
|
||||
pub(crate) fn blotching_from(video: &str, probe: &Probe, scores: &[Option<f64>], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let (w, h) = (probe.w as usize / 8 * 8, probe.h as usize / 8 * 8);
|
||||
let (mut bad, mut seen, mut worst) = (Vec::new(), 0, 0f64);
|
||||
for (k, s) in scores.iter().enumerate() {
|
||||
let Some(s) = *s else { continue };
|
||||
let t = k as f64 * 2.0;
|
||||
seen += 1;
|
||||
worst = worst.max(s);
|
||||
if raea_io_trace::stat("RAEA_CHECK_DEBUG") {
|
||||
eprintln!("blotch {t:6.1}s {s:.3}");
|
||||
}
|
||||
if s > BLOTCHY {
|
||||
bad.push((t, s));
|
||||
}
|
||||
}
|
||||
if !bad.is_empty() {
|
||||
let at = bad[0].0;
|
||||
let share = bad.len() as f64 / seen.max(1) as f64;
|
||||
issues.push(Issue {
|
||||
rule: "blotching",
|
||||
p: if share > 0.2 { 1 } else { 2 },
|
||||
at: Some(at),
|
||||
says: format!(
|
||||
"blocky patches in dark areas in {} of {seen} sampled frames (worst {:.0}% of dark blocks stepping); the encoder starved the near-blacks: export as PNG frames and encode with more bits for darks",
|
||||
bad.len(),
|
||||
worst * 100.0
|
||||
),
|
||||
});
|
||||
let found = format!("blocky patches in dark areas in {} of {seen} sampled frames (worst {:.0}% of dark blocks stepping)", bad.len(), worst * 100.0);
|
||||
let (p, at, says) = match blotching_cause(video, probe, scores, w, h) {
|
||||
// what the composition draws before any encoding is the picture's own (a phone's compression): no render
|
||||
// setting removes it, so it's said, not worked on
|
||||
Some(Ok(a)) if !a.0.by_encode(BLOTCH_NOISE) => (3, Some(at), format!("{found}: the picture's own, there as the composition draws them before any encoding (the footage's compression); the encode added none, so no render setting removes them")),
|
||||
Some(Ok(a)) => {
|
||||
let first = cause::Against::first(scores, &a.1, BLOTCHY, BLOTCH_NOISE).map(|i| i as f64 * 2.0);
|
||||
let own = if a.0.before > 0 { format!("; {} of the samples show the footage's own too, which stays", a.0.before) } else { String::new() };
|
||||
(if a.0.worse as f64 / a.0.of.max(1) as f64 > 0.2 { 1 } else { 2 }, first.or(Some(at)), format!("the encode added blocky patches in dark areas: {} of {} samples are blotchier than the composition draws them unencoded; render with --quality master, which gives the darks the bits they need{own}", a.0.worse, a.0.of))
|
||||
}
|
||||
Some(Err(why)) => (if share > 0.2 { 1 } else { 2 }, Some(at), format!("{found}; whether the encode made them or the picture holds them couldn't be told ({why}): render with --quality master if the encode starved the darks")),
|
||||
None => (if share > 0.2 { 1 } else { 2 }, Some(at), format!("{found}: the encode starved the near-blacks, or the footage holds them; render with --quality master, and check a render made in a raea project to tell which")),
|
||||
};
|
||||
issues.push(Issue { rule: "blotching", p, at, says });
|
||||
} else if seen > 0 {
|
||||
passed.push(format!("blotching: dark areas clean in {seen} sampled frames"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Caption contrast: at each text's middle frame, the pixels behind it where it is on that frame against its colour, at
|
||||
/// least 3:1. The pixels
|
||||
/// behind are the half of the box least like the text.
|
||||
pub(crate) fn contrast(video: &str, runs: &[Run], w: f64, h: f64, probe: &Probe, issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let (sx, sy) = (probe.w / w, probe.h / h);
|
||||
let mut low = 0;
|
||||
let mut measured = 0;
|
||||
for r in runs.iter().filter(|r| r.size >= 20.0).take(80) {
|
||||
let (t, [x, y, bw, bh]) = r.middle(probe.fps);
|
||||
let crop = [(x * sx).max(0.0) as u32, (y * sy).max(0.0) as u32, (bw * sx) as u32, (bh * sy) as u32];
|
||||
if crop[0] + crop[2] > probe.w as u32 || crop[1] + crop[3] > probe.h as u32 {
|
||||
continue;
|
||||
}
|
||||
// the same measure `raea world` joins to a text from its render (raea-sys-measure, DR2)
|
||||
let ratio = if crate::read::native() { crate::read::contrast(video, t, crop, &r.color) } else { raea_sys_measure::contrast(std::path::Path::new(video), t, crop, &r.color) };
|
||||
let Some(ratio) = ratio else { continue };
|
||||
measured += 1;
|
||||
if ratio < 3.0 {
|
||||
low += 1;
|
||||
issues.push(Issue { rule: "contrast", p: 1, at: Some(t), says: format!("{} is {ratio:.1}:1 against what's behind it; make it at least 3:1 (a band, a shadow for separation, or another colour)", quote(&r.text)) });
|
||||
}
|
||||
}
|
||||
if measured > 0 && low == 0 {
|
||||
passed.push(format!("contrast: {measured} texts at 3:1 or better against their pixels"));
|
||||
}
|
||||
}
|
||||
+10
-12
@@ -162,17 +162,9 @@ pub(crate) fn bed_up(rms: &[f64], speak: &[bool]) -> Vec<(f64, String)> {
|
||||
/// The sound's rules on an export: dead stops always; with the voice's words, a stretch with no voice over it and a bed
|
||||
/// too close under it
|
||||
pub(crate) fn sound(video: &str, words: Option<&[Word]>, issues: &mut Vec<Issue>, passed: &mut Vec<String>) -> R<()> {
|
||||
let x = if crate::read::native() {
|
||||
crate::read::mono(video, SR as u32)?
|
||||
} else {
|
||||
let out = Command::new("ffmpeg").args(["-v", "error", "-i", video, "-vn", "-ac", "1", "-ar", &SR.to_string(), "-f", "f32le", "-"]).output().map_err(|e| format!("ffmpeg: {e}"))?;
|
||||
if !out.status.success() {
|
||||
return Err(format!("ffmpeg couldn't read the sound of {video}: {}", String::from_utf8_lossy(&out.stderr).trim()));
|
||||
}
|
||||
out.stdout.chunks_exact(4).map(|b| f32::from_le_bytes([b[0], b[1], b[2], b[3]])).collect()
|
||||
};
|
||||
let x = crate::read::mono(video, SR as u32)?;
|
||||
let (rms, bands) = levels(&x);
|
||||
sound_defects(&x, issues, passed);
|
||||
sound_defects(&x, &crate::read::channels(video, SR as u32)?, issues, passed);
|
||||
let found = |list: Vec<(f64, String)>, p: u8| crate::defects::moments("sound", p, list);
|
||||
let stops = dead_stops(&rms, &bands);
|
||||
if stops.is_empty() {
|
||||
@@ -273,7 +265,14 @@ pub(crate) fn freezes(video: &str, probe: &Probe, taste: Option<&Taste>, issues:
|
||||
} else {
|
||||
ffmpeg_stderr(&["-hide_banner", "-nostats", "-i", video, "-an", "-vf", &format!("freezedetect=n=-60dB:d={most}"), "-f", "null", "-"])?
|
||||
};
|
||||
let stretches = frozen_stretches(&err, probe.picture);
|
||||
freezes_from(&err, probe, taste, issues, passed);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The freezes freezedetect's lines found (`taste`'s still-max when the person set one, else 3 s)
|
||||
pub(crate) fn freezes_from(err: &str, probe: &Probe, taste: Option<&Taste>, issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let most = taste.map_or(3.0, |t| t.value);
|
||||
let stretches = frozen_stretches(err, probe.picture);
|
||||
for &(s, d) in &stretches {
|
||||
let says = format!("nothing changes for {d:.1} s; give it a reason to hold, or cut it shorter");
|
||||
issues.push(match taste {
|
||||
@@ -284,5 +283,4 @@ pub(crate) fn freezes(video: &str, probe: &Probe, taste: Option<&Taste>, issues:
|
||||
if stretches.is_empty() {
|
||||
passed.push(format!("frozen: nothing holds still for {most} s"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
+24
-4
@@ -356,15 +356,23 @@ fn a_card_sharing_one_word_with_another_line_isnt_held_to_it() {
|
||||
fn clipping_is_found_and_a_loud_clean_tone_isnt() {
|
||||
// a clean tone near full scale, then the same tone clamped (a limiter's flat tops), then pushed past full scale
|
||||
let loud = tone(3.0, &[(0.0, 3.0, -1.0)]);
|
||||
assert!(clipped(&loud).is_empty(), "{:?}", clipped(&loud));
|
||||
let one = |x: &[f32]| clipped(&[x.to_vec()]);
|
||||
assert!(one(&loud).is_empty(), "{:?}", one(&loud));
|
||||
let clamped: Vec<f32> = loud.iter().map(|v| (v * 10.0).clamp(-0.3, 0.3)).collect();
|
||||
assert_eq!(clipped(&clamped).len(), 1);
|
||||
assert_eq!(one(&clamped).len(), 1);
|
||||
let over: Vec<f32> = loud.iter().map(|v| (v * 2.0).clamp(-1.0, 1.0)).collect();
|
||||
assert_eq!(clipped(&over).len(), 1);
|
||||
assert_eq!(one(&over).len(), 1);
|
||||
// one transient hitting full scale once isn't clipping
|
||||
let mut once = tone(3.0, &[(0.0, 3.0, -20.0)]);
|
||||
once[SR] = 1.0;
|
||||
assert!(clipped(&once).is_empty());
|
||||
assert!(one(&once).is_empty());
|
||||
// clipping is a channel's: one side clipped is found; a centred voice at -1.6 dBFS a side is clean, though the mono
|
||||
// fold (L + R) * 0.707 takes it past full scale (11-19: the walkaround's master read as clipping)
|
||||
assert_eq!(clipped(&[loud.clone(), over.clone()]).len(), 1);
|
||||
let centred: Vec<f32> = loud.iter().map(|v| v * 0.92).collect();
|
||||
assert!(clipped(&[centred.clone(), centred.clone()]).is_empty());
|
||||
let folded: Vec<f32> = centred.iter().map(|v| (v + v) * 0.7071).collect();
|
||||
assert_eq!(one(&folded).len(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -412,3 +420,15 @@ fn things_found_are_findings_and_an_unknown_rule_is_not() {
|
||||
let _ = std::fs::remove_file(&p);
|
||||
assert_eq!(passed.len(), 1, "nothing found is a pass");
|
||||
}
|
||||
|
||||
/// #236: a text that moves is read where it is on its middle frame, not where it ends.
|
||||
#[test]
|
||||
fn a_moving_text_is_read_where_it_is() {
|
||||
let ink = |f: usize| [56.7 + 4.0 * f as f64, 1000.0, 26.7, 40.0];
|
||||
let run = Run { text: "E".into(), from: 0.0, to: 8.0, box_: [996.0, 1000.0, 60.0, 40.0], boxes: (0..240).map(ink).collect(), color: String::new(), size: 40.0 };
|
||||
let (t, b) = run.middle(30.0);
|
||||
assert_eq!(t, 4.0);
|
||||
assert!((b[0] - 520.0).abs() < 1e-9 && b[1..] == [1000.0, 60.0, 40.0], "{b:?}");
|
||||
let still = Run { boxes: vec![ink(0); 240], box_: [40.0, 1000.0, 60.0, 40.0], ..run };
|
||||
assert_eq!(still.middle(30.0), (4.0, [40.0, 1000.0, 60.0, 40.0]));
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "raea-app-check-text"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = "FSL-1.1-ALv2"
|
||||
publish = false
|
||||
description = "raea check's text rules on a render's manifest: clipped, UI zones, reading time, face, cues, brand kit"
|
||||
|
||||
[dependencies]
|
||||
dunce = "1"
|
||||
serde_json = "1"
|
||||
# a transcript's words, read as `raea world` reads them (docs/direction.feature DR1)
|
||||
raea-core-facts = { path = "../../../core/facts" }
|
||||
@@ -1,25 +1,68 @@
|
||||
use super::*;
|
||||
//! What a render's text breaks, from its manifest alone: clipped, in the platform's UI zones, too brief to read, over
|
||||
//! the face, off its cue, and the brand kit it was styled from. raea check's text rules, split out of raea-app-check so
|
||||
//! `raea render --manifest` holds its own text to them as it finishes, a check's round sooner.
|
||||
use serde_json::Value;
|
||||
|
||||
pub type R<T> = Result<T, String>;
|
||||
|
||||
use raea_core_facts::{Finding, Level};
|
||||
|
||||
/// One thing a rule found: its rule, its rank (P0 breaks the piece to P3 polish), when (seconds) and what to do.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Issue {
|
||||
pub rule: &'static str,
|
||||
pub p: u8,
|
||||
pub at: Option<f64>,
|
||||
pub says: String,
|
||||
}
|
||||
|
||||
impl Issue {
|
||||
/// As a Finding `by` a command (docs/direction.feature DR3: P0 and P1 errors, P2 a warn, P3 a note), about the
|
||||
/// frame its second falls on at `fps`
|
||||
pub fn finding(&self, by: &str, fps: f64) -> Finding {
|
||||
let f = Finding::new(self.rule, Level::of_rank(self.p), &self.says, by);
|
||||
match self.at {
|
||||
Some(t) => {
|
||||
let n = (t * fps).round() as i64;
|
||||
f.frames(n, n + 1)
|
||||
}
|
||||
None => f,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A text as it stays on screen: from the frame it comes on to the frame it leaves. Typing (a text growing into the
|
||||
/// next) and counting (only its digits changing) are one run, judged by its last text.
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct Run {
|
||||
pub(crate) text: String,
|
||||
pub(crate) from: f64,
|
||||
pub(crate) to: f64,
|
||||
pub(crate) box_: [f64; 4],
|
||||
pub struct Run {
|
||||
pub text: String,
|
||||
pub from: f64,
|
||||
pub to: f64,
|
||||
pub box_: [f64; 4],
|
||||
/// where its letters are on every frame it shows its whole text (the manifest's `ink`, else its box: a centred line in
|
||||
/// a full-width box is nowhere near x = 0, #89): a text the camera carries (a sign on a panning street) moves
|
||||
/// through the frame's edges and zones, which only counts against it when no frame shows it clear
|
||||
pub(crate) boxes: Vec<[f64; 4]>,
|
||||
pub(crate) color: String,
|
||||
pub(crate) size: f64,
|
||||
pub boxes: Vec<[f64; 4]>,
|
||||
pub color: String,
|
||||
pub size: f64,
|
||||
}
|
||||
|
||||
impl Run {
|
||||
/// The frame midway through those that show its whole text, and its box on that frame: `box_` (the last frame's)
|
||||
/// moved back by how far its letters travel from there to where they end. A text that moves was read at its last
|
||||
/// place on its middle frame (#236).
|
||||
pub fn middle(&self, fps: f64) -> (f64, [f64; 4]) {
|
||||
let n = self.boxes.len();
|
||||
let (Some(last), true) = (self.boxes.last(), fps > 0.0 && n > 1) else { return ((self.from + self.to) / 2.0, self.box_) };
|
||||
let (at, [x, y, w, h]) = (self.boxes[n / 2], self.box_);
|
||||
(self.to - (n - n / 2) as f64 / fps, [x + at[0] - last[0], y + at[1] - last[1], w, h])
|
||||
}
|
||||
}
|
||||
|
||||
/// The brand kit the cut was styled from (brand/ at or above the manifest's or the video's folder, as render finds
|
||||
/// brand.css): a kit `raea brand` read from a thin fetch that nobody corrected by hand is a placeholder, P1; a brand.css
|
||||
/// with no brand.json beside it wasn't read from the brand at all, P2
|
||||
pub(crate) fn brand_kit(near: &[&str], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
pub fn brand_kit(near: &[&str], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let mut seen = std::collections::HashSet::new();
|
||||
for start in near.iter().filter(|p| !p.is_empty()) {
|
||||
let abs = dunce::canonicalize(&std::path::Path::new(start)).unwrap_or_else(|_| std::path::PathBuf::from(start));
|
||||
@@ -50,7 +93,7 @@ pub(crate) fn brand_kit(near: &[&str], issues: &mut Vec<Issue>, passed: &mut Vec
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn text_runs(manifest: &Value) -> Vec<Run> {
|
||||
pub fn text_runs(manifest: &Value) -> Vec<Run> {
|
||||
let fps = manifest["fps"].as_f64().unwrap_or(30.0);
|
||||
let frames = manifest["frames"].as_array().cloned().unwrap_or_default();
|
||||
let mut open: Vec<Run> = Vec::new();
|
||||
@@ -95,11 +138,11 @@ pub(crate) fn text_runs(manifest: &Value) -> Vec<Run> {
|
||||
}
|
||||
|
||||
/// The share of the face's area a text may cover before it's a fault (@raea/video's proofBoxes keeps the same 8%)
|
||||
pub(crate) const FACE_COVER: f64 = 0.08;
|
||||
pub const FACE_COVER: f64 = 0.08;
|
||||
|
||||
/// The face over time from a perception.json (`raea cut`: each clip's first frame, the face at its middle in the
|
||||
/// edit's px): [from, to) in seconds and the face's box, for the stretches that have one
|
||||
pub(crate) fn faces_of(perception: &Value, fps: f64) -> Vec<(f64, f64, [f64; 4])> {
|
||||
pub fn faces_of(perception: &Value, fps: f64) -> Vec<(f64, f64, [f64; 4])> {
|
||||
let mut keys: Vec<(f64, Option<[f64; 4]>)> = perception.as_object().into_iter().flatten().filter_map(|(k, v)| {
|
||||
let face = v["face"].as_object().map(|f| ["x", "y", "w", "h"].map(|n| f.get(n).and_then(Value::as_f64).unwrap_or(0.0)));
|
||||
Some((k.parse::<f64>().ok()? / fps, face))
|
||||
@@ -110,7 +153,7 @@ pub(crate) fn faces_of(perception: &Value, fps: f64) -> Vec<(f64, f64, [f64; 4])
|
||||
|
||||
/// Text over the face: a run that covers more than FACE_COVER of the face's area while that face is up, on every frame
|
||||
/// that shows it whole (a text the camera carries counts only when no frame shows it clear)
|
||||
pub(crate) fn face_cover(runs: &[Run], faces: &[(f64, f64, [f64; 4])], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
pub fn face_cover(runs: &[Run], faces: &[(f64, f64, [f64; 4])], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let share = |b: &[f64; 4], f: &[f64; 4]| {
|
||||
let ox = (b[0] + b[2]).min(f[0] + f[2]) - b[0].max(f[0]);
|
||||
let oy = (b[1] + b[3]).min(f[1] + f[3]) - b[1].max(f[1]);
|
||||
@@ -134,7 +177,7 @@ pub(crate) fn face_cover(runs: &[Run], faces: &[(f64, f64, [f64; 4])], issues: &
|
||||
}
|
||||
|
||||
/// the zones where text can't go, as [top, right, bottom, left] at 1080 wide (sdk/guides/craft/floor.md)
|
||||
pub(crate) fn zones(w: f64, h: f64, shape: Option<&str>, platform: Option<&str>) -> [f64; 4] {
|
||||
pub fn zones(w: f64, h: f64, shape: Option<&str>, platform: Option<&str>) -> [f64; 4] {
|
||||
let r = w / h;
|
||||
let shape = shape.unwrap_or(if r < 0.7 { "9:16" } else if r < 0.9 { "4:5" } else if r < 1.2 { "1:1" } else { "16:9" });
|
||||
let z = match (shape, platform) {
|
||||
@@ -153,12 +196,12 @@ pub(crate) fn zones(w: f64, h: f64, shape: Option<&str>, platform: Option<&str>)
|
||||
/// A caption the voice reads out: every word of the text is said while it's on screen (from a little before it comes
|
||||
/// on). The viewer hears it as it shows, so it needs no reading time of its own (karaoke groups are up for as long as
|
||||
/// they take to say).
|
||||
pub(crate) fn spoken(r: &Run, words: &[Word]) -> bool {
|
||||
pub fn spoken(r: &Run, words: &[Word]) -> bool {
|
||||
let tokens: Vec<String> = r.text.split_whitespace().map(norm).filter(|t| !t.is_empty()).collect();
|
||||
!tokens.is_empty() && tokens.iter().all(|t| words.iter().any(|w| norm(&w.text) == *t && w.start >= r.from - 0.3 && w.start <= r.to + 0.1))
|
||||
}
|
||||
|
||||
pub(crate) fn text_rules(runs: &[Run], heard: Option<&[Word]>, w: f64, h: f64, shape: Option<&str>, platform: Option<&str>, issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
pub fn text_rules(runs: &[Run], heard: Option<&[Word]>, w: f64, h: f64, shape: Option<&str>, platform: Option<&str>, issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let [zt, zr, zb, zl] = zones(w, h, shape, platform);
|
||||
let (mut clipped, mut unsafe_, mut brief) = (0, 0, 0);
|
||||
for r in runs {
|
||||
@@ -194,57 +237,30 @@ pub(crate) fn text_rules(runs: &[Run], heard: Option<&[Word]>, w: f64, h: f64, s
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn quote(s: &str) -> String {
|
||||
pub fn quote(s: &str) -> String {
|
||||
let s: String = s.chars().take(40).collect();
|
||||
format!("\u{201c}{s}\u{201d}")
|
||||
}
|
||||
|
||||
/// Caption contrast: at each text's middle frame, the pixels behind it against its colour, at least 3:1. The pixels
|
||||
/// behind are the half of the box least like the text.
|
||||
pub(crate) fn contrast(video: &str, runs: &[Run], w: f64, h: f64, probe: &Probe, issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let (sx, sy) = (probe.w / w, probe.h / h);
|
||||
let mut low = 0;
|
||||
let mut measured = 0;
|
||||
for r in runs.iter().filter(|r| r.size >= 20.0).take(80) {
|
||||
let [x, y, bw, bh] = r.box_;
|
||||
let crop = [(x * sx).max(0.0) as u32, (y * sy).max(0.0) as u32, (bw * sx) as u32, (bh * sy) as u32];
|
||||
if crop[0] + crop[2] > probe.w as u32 || crop[1] + crop[3] > probe.h as u32 {
|
||||
continue;
|
||||
}
|
||||
let t = (r.from + r.to) / 2.0;
|
||||
// the same measure `raea world` joins to a text from its render (raea-sys-measure, DR2)
|
||||
let ratio = if crate::read::native() { crate::read::contrast(video, t, crop, &r.color) } else { raea_sys_measure::contrast(std::path::Path::new(video), t, crop, &r.color) };
|
||||
let Some(ratio) = ratio else { continue };
|
||||
measured += 1;
|
||||
if ratio < 3.0 {
|
||||
low += 1;
|
||||
issues.push(Issue { rule: "contrast", p: 1, at: Some(t), says: format!("{} is {ratio:.1}:1 against what's behind it; make it at least 3:1 (a band, a shadow for separation, or another colour)", quote(&r.text)) });
|
||||
}
|
||||
}
|
||||
if measured > 0 && low == 0 {
|
||||
passed.push(format!("contrast: {measured} texts at 3:1 or better against their pixels"));
|
||||
}
|
||||
}
|
||||
|
||||
/// A transcript's word: its text, start and end in seconds (its end is its start when the transcript doesn't say).
|
||||
pub(crate) use raea_core_facts::Word;
|
||||
pub use raea_core_facts::Word;
|
||||
|
||||
/// A transcript's words (raea_core_facts::transcript_words: {text, start} in seconds, or t, start_ms, or {text, from}
|
||||
/// in frames at `fps`), as the app's words.json and `raea render --words` have them.
|
||||
pub(crate) fn transcript(path: &str, fps: f64) -> R<Vec<Word>> {
|
||||
pub fn transcript(path: &str, fps: f64) -> R<Vec<Word>> {
|
||||
let v: Value = serde_json::from_str(&std::fs::read_to_string(path).map_err(|e| format!("{path}: {e}"))?).map_err(|e| format!("{path}: {e}"))?;
|
||||
v.as_array().ok_or_else(|| format!("{path}: expected an array of words ({{text, start}} in seconds or {{text, from}} in frames)"))?;
|
||||
Ok(raea_core_facts::transcript_words(&v, fps))
|
||||
}
|
||||
|
||||
pub(crate) use raea_core_facts::word_key as norm;
|
||||
pub use raea_core_facts::word_key as norm;
|
||||
|
||||
pub(crate) const SMALL: [&str; 24] = ["the", "and", "you", "your", "for", "with", "that", "this", "its", "it's", "are", "was", "our", "out", "from", "into", "then", "than", "but", "not", "all", "can", "has", "have"];
|
||||
pub const SMALL: [&str; 24] = ["the", "and", "you", "your", "for", "with", "that", "this", "its", "it's", "are", "was", "our", "out", "from", "into", "then", "than", "but", "not", "all", "can", "has", "have"];
|
||||
|
||||
/// Cues land on their words: a text whose words the voice says nearby comes on with the first of them, not after it.
|
||||
/// The text is found by its first word of weight, and then measured from the first word it shows: a caption "of the
|
||||
/// spend" comes on with "of", when the voice says "of the" just before "spend".
|
||||
pub(crate) fn cues(runs: &[Run], words: &[Word], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
pub fn cues(runs: &[Run], words: &[Word], issues: &mut Vec<Issue>, passed: &mut Vec<String>) {
|
||||
let (mut checked, mut off) = (0, 0);
|
||||
for r in runs {
|
||||
let shown: Vec<String> = r.text.split_whitespace().map(norm).filter(|t| !t.is_empty()).collect();
|
||||
@@ -14,11 +14,16 @@ raea-runtime-bundle = { path = "../../runtime/bundle" }
|
||||
raea-core-facts = { path = "../../core/facts" }
|
||||
# a render's record named by when it was (UTC)
|
||||
raea-io-trace = { path = "../../io/trace" }
|
||||
# frame purity (SG9): the video's frames decoded, the stills read
|
||||
raea-io-media = { path = "../../io/media", default-features = false, features = ["apple", "soft"] }
|
||||
image = { version = "0.25", default-features = false, features = ["png"] }
|
||||
serde_json = "1"
|
||||
# `raea check PROJECT | EDIT.tsx` (DR4): taste and controllers' rules, the floor on a composition's newest render, the
|
||||
# `raea check PROJECT | EDIT.tsx` (DR4): the taste files' rules, the floor on a composition's newest render, the
|
||||
# project's compositions
|
||||
raea-core-brief = { path = "../../core/brief" }
|
||||
raea-app-check = { path = "../check" }
|
||||
# the check's text rules, held to a video render's manifest as it ends
|
||||
raea-app-check-text = { path = "../check/text" }
|
||||
raea-app-registry = { path = "../workspace/registry" }
|
||||
# the project's notes, whose asks' checks raea check runs beside its rules (DR6)
|
||||
raea-app-notes = { path = "../notes" }
|
||||
|
||||
+113
-29
@@ -1,13 +1,13 @@
|
||||
//! `raea check PROJECT|EDIT.tsx` (docs/direction.feature DR4): every check that applies, run over each
|
||||
//! composition's worlds. The rules come from raea's floor, the person's taste (and the workspace's), and the
|
||||
//! workspace's and the project's controllers; each is one of raea's named checks (systems.rs) or a project's TS check
|
||||
//! (ts.rs), and where it was written changes nothing about how it runs. A check that needs a render runs on the
|
||||
//! composition's worlds. The rules come from raea's floor and the taste files: the person's, the workspace's and the
|
||||
//! project's; each is one of raea's named checks (systems.rs) or a project's TS check (ts.rs), and where it was
|
||||
//! written changes nothing about how it runs. A check that needs a render runs on the
|
||||
//! composition's newest render; with none, it waits, and the command says what for. `raea check VIDEO.mp4` is the
|
||||
//! floor alone (apps/check).
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use raea_core_brief::{controller, taste};
|
||||
use raea_core_brief::taste;
|
||||
use raea_core_facts::{finding, record, Facts, Finding, Level, Rule, Shot};
|
||||
use raea_runtime_bundle::flag;
|
||||
use raea_runtime_world::{Ask, Render};
|
||||
@@ -18,7 +18,7 @@ use crate::ts;
|
||||
|
||||
type R<T> = Result<T, String>;
|
||||
|
||||
pub const USAGE: &str = "raea check [PROJECT|EDIT.tsx] [--composition ID] [--only ID] [--taste T] [--render OUT | --no-render] [--json] (every check that applies to each composition, over its frames: raea's floor on its newest render, the person's taste, the workspace's and the project's rules (a controller's rule fields: one of raea's checks by name, or a project's .ts check); what needs a render and has none waits, and says so)";
|
||||
pub const USAGE: &str = "raea check [PROJECT|EDIT.tsx] [--composition ID] [--only ID] [--taste T] [--render OUT | --no-render] [--json] (every check that applies to each composition, over its frames: raea's floor on its newest render, the person's, the workspace's and the project's taste.ts (each line's check: one of raea's forms or checks by name, or a project's .ts check); what needs a render and has none waits, and says so)";
|
||||
|
||||
/// The flags raea check takes with a value (its own, and the floor's on a video).
|
||||
const TAKES: [&str; 10] = ["--composition", "--only", "--taste", "--render", "--manifest", "--words", "--perception", "--shape", "--platform", "-o"];
|
||||
@@ -71,7 +71,12 @@ fn tastes(project: &Path, given: Vec<PathBuf>, host: &Host) -> Vec<PathBuf> {
|
||||
}
|
||||
}
|
||||
}
|
||||
out.extend(record::up(project, ".raea/workspace").map(|ws| ws.join("taste.ts")).filter(|f| f.is_file()));
|
||||
// the workspace's, then the project's own (the same file when the project is the workspace's folder)
|
||||
for f in record::up(project, ".raea/workspace").map(|ws| ws.join("taste.ts")).into_iter().chain([project.join("taste.ts")]) {
|
||||
if f.is_file() && !out.contains(&f) {
|
||||
out.push(f);
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
@@ -98,8 +103,8 @@ fn rules(project: &Path, given: Vec<PathBuf>, host: &Host) -> (Vec<Rule>, Vec<Fi
|
||||
(out, bad, notes)
|
||||
}
|
||||
|
||||
/// raea's floor, the person's taste and the workspace's and project's controllers' rules, and a finding for each file
|
||||
/// of them raea couldn't read.
|
||||
/// raea's floor and every taste file's rules (the person's, the workspace's, the project's), and a finding for each
|
||||
/// file of them raea couldn't read.
|
||||
fn held(project: &Path, given: Vec<PathBuf>, host: &Host) -> (Vec<Rule>, Vec<Finding>) {
|
||||
// raea's own: the floor, and the reading check (DR28: its findings keep their own levels, so no rule level)
|
||||
let read = Rule { level: None, ..Rule::named("text-read", "text can be read for as long as it needs, and OCR reads it", Default::default(), Level::Warn, "raea") };
|
||||
@@ -107,26 +112,12 @@ fn held(project: &Path, given: Vec<PathBuf>, host: &Host) -> (Vec<Rule>, Vec<Fin
|
||||
let mut bad = Vec::new();
|
||||
let name = |f: &Path| f.strip_prefix(project).unwrap_or(f).display().to_string();
|
||||
for f in tastes(project, given, host) {
|
||||
let (dir, by) = (f.parent().unwrap_or(Path::new(".")).to_path_buf(), format!("taste {}", name(&f)));
|
||||
match (host.ts.eval)(&f).and_then(|j| raea_core_brief::read::<taste::Taste>(&name(&f), &j)) {
|
||||
Ok(t) => out.extend(t.sections.iter().flat_map(|s| &s.rules).filter_map(|r| Some(Rule::of_taste(&r.text, r.check?, &name(&f))))),
|
||||
Ok(t) => out.extend(t.sections.iter().flat_map(|s| &s.rules).filter_map(|r| Rule::of_taste(r, &dir, &by))),
|
||||
Err(e) => bad.push(Finding::new("taste", Level::Error, format!("raea can't read it: {e}"), "raea check").about(name(&f), None)),
|
||||
}
|
||||
}
|
||||
let ws = record::up(project, ".raea/workspace");
|
||||
for (dir, scope) in ws.iter().map(|w| (raea_app_registry::shared_dir(w, "controllers"), "workspace")).chain([(project.join("controllers"), "project")]) {
|
||||
// a workspace's own folder is its project's too: read once
|
||||
if scope == "project" && ws.as_deref() == Some(project) {
|
||||
continue;
|
||||
}
|
||||
let mut files: Vec<PathBuf> = std::fs::read_dir(&dir).into_iter().flatten().flatten().map(|e| e.path()).filter(|p| p.extension().is_some_and(|x| x == "ts")).collect();
|
||||
files.sort();
|
||||
for f in files {
|
||||
match (host.ts.eval)(&f).and_then(|j| controller::of_json(&j)) {
|
||||
Ok(c) => out.extend(Rule::of_controller(&c, &dir, &format!("{scope} {}", name(&f)))),
|
||||
Err(e) => bad.push(Finding::new("controller", Level::Error, format!("raea can't read it: {e}"), "raea check").about(name(&f), None)),
|
||||
}
|
||||
}
|
||||
}
|
||||
(out, bad)
|
||||
}
|
||||
|
||||
@@ -134,7 +125,7 @@ fn held(project: &Path, given: Vec<PathBuf>, host: &Host) -> (Vec<Rule>, Vec<Fin
|
||||
fn compositions(target: &Path, args: &[String]) -> R<Vec<(PathBuf, Option<String>)>> {
|
||||
let one = flag(args, "--composition");
|
||||
let (dir, file) = if target.is_dir() { (target.to_path_buf(), None) } else { (target.parent().unwrap_or(Path::new(".")).to_path_buf(), Some(dunce::canonicalize(&target).map_err(|e| format!("{}: {e}", target.display()))?)) };
|
||||
let reg = raea_app_registry::scan(&dir, &[]);
|
||||
let reg = raea_app_registry::scan(&dir);
|
||||
let mut out: Vec<(PathBuf, Option<String>)> = Vec::new();
|
||||
for c in ®.compositions {
|
||||
let path = reg.dir.join(&c.file);
|
||||
@@ -249,6 +240,16 @@ fn check_one(tsx: &Path, id: Option<String>, rules: &[Rule], args: &[String], wh
|
||||
None => hows.iter().filter(|(_, h)| matches!(h, How::Named(n) if n.render && n.name != "text-read")).for_each(|(r, _)| needs(&mut waits, r)),
|
||||
}
|
||||
}
|
||||
// traced light held still (raea light steady): with the floor, a composition lit by Solari carries what its newest
|
||||
// hold of each frame found, kept in the project's record; with none yet, it waits for one
|
||||
if floor && traced(tsx) {
|
||||
let held = light_held(tsx, id.as_deref());
|
||||
if held.is_empty() {
|
||||
let c = id.as_ref().map(|i| format!(" --composition {i}")).unwrap_or_default();
|
||||
waits.push(("light-steady".into(), format!("a held frame of its traced light (raea light steady {}{c} --frame N -o DIR)", tsx.display())));
|
||||
}
|
||||
found.extend(held.into_iter().filter(|f| f.level != Level::Note));
|
||||
}
|
||||
// the project's own checks, in one run
|
||||
let mut files: Vec<PathBuf> = Vec::new();
|
||||
let mut plan = Vec::new();
|
||||
@@ -258,10 +259,7 @@ fn check_one(tsx: &Path, id: Option<String>, rules: &[Rule], args: &[String], wh
|
||||
needs(&mut waits, r);
|
||||
continue;
|
||||
}
|
||||
let k = files.iter().position(|f| *f == m.file).unwrap_or_else(|| {
|
||||
files.push(m.file.clone());
|
||||
files.len() - 1
|
||||
});
|
||||
let k = file_index(&mut files, &m.file);
|
||||
let mut on = m.frames.pick(&worlds);
|
||||
if let (true, Some(j)) = (m.render, &join_on_of(&worlds)) {
|
||||
on.retain(|f| j.contains(f));
|
||||
@@ -281,6 +279,55 @@ fn check_one(tsx: &Path, id: Option<String>, rules: &[Rule], args: &[String], wh
|
||||
Ok(Checked { file: tsx.to_path_buf(), id, found: finding::ranked(found), waits, render, shots, fps })
|
||||
}
|
||||
|
||||
/// Whether a composition is lit by traced light: its file, or a .tsx beside it or a folder down, names SolariLighting.
|
||||
fn traced(tsx: &Path) -> bool {
|
||||
let mut files = vec![tsx.to_path_buf()];
|
||||
let tsxs = |d: &Path| -> Vec<PathBuf> { std::fs::read_dir(d).into_iter().flatten().flatten().map(|e| e.path()).collect() };
|
||||
if let Some(dir) = tsx.parent() {
|
||||
files.extend(tsxs(dir).into_iter().flat_map(|p| if p.is_dir() { tsxs(&p) } else { vec![p] }).filter(|p| p.extension().is_some_and(|x| x == "tsx")));
|
||||
}
|
||||
for f in files {
|
||||
if let Ok(text) = std::fs::read_to_string(&f) {
|
||||
if text.contains("SolariLighting") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
/// The findings of the newest hold of each frame of a composition (`raea light steady`), from its project's record.
|
||||
fn light_held(tsx: &Path, id: Option<&str>) -> Vec<Finding> {
|
||||
let Some(project) = dunce::canonicalize(tsx).ok().and_then(|t| record::up(t.parent()?, ".raea/project")) else { return Vec::new() };
|
||||
let of = record::rel(&project, tsx);
|
||||
let mut newest: std::collections::BTreeMap<i64, Vec<Finding>> = std::collections::BTreeMap::new();
|
||||
for e in record::read(&project) {
|
||||
if e.by != "raea light steady" || e.of != of {
|
||||
continue;
|
||||
}
|
||||
let mut mine = Vec::new();
|
||||
for f in e.findings {
|
||||
let mut about = f.about.iter().map(|a| a.name.as_str());
|
||||
if id.is_none_or(|id| about.any(|n| n == id)) {
|
||||
mine.push(f);
|
||||
}
|
||||
}
|
||||
if let Some(frame) = mine.first().and_then(|f| f.frames) {
|
||||
newest.insert(frame[0], mine);
|
||||
}
|
||||
}
|
||||
newest.into_values().flatten().collect()
|
||||
}
|
||||
|
||||
/// Where `f` is in `files`, added at the end when it isn't yet: the one run's checks, each file once.
|
||||
fn file_index(files: &mut Vec<PathBuf>, f: &Path) -> usize {
|
||||
if let Some(at) = files.iter().position(|x| x == f) {
|
||||
return at;
|
||||
}
|
||||
files.push(f.to_path_buf());
|
||||
files.len() - 1
|
||||
}
|
||||
|
||||
/// Whether `r` runs on the composition `tsx` (`id` where its file registers several) of `project`: a rule a note's ask
|
||||
/// scopes to one (`of`) runs there alone.
|
||||
fn applies(r: &Rule, project: &Path, tsx: &Path, id: Option<&str>) -> bool {
|
||||
@@ -334,6 +381,9 @@ pub fn check(args: &[String], host: &Host) -> R<(String, bool)> {
|
||||
return Err(format!("--only {only}: no rule here has that id"));
|
||||
}
|
||||
}
|
||||
if target.is_file() && target.to_string_lossy().ends_with(".story.ts") {
|
||||
return check_story(&target, &rules, unread, args, host);
|
||||
}
|
||||
let mut all = Vec::new();
|
||||
for (tsx, id) in compositions(&target, args)? {
|
||||
let mine: Vec<Rule> = rules.iter().filter(|r| applies(r, &project, &tsx, id.as_deref())).cloned().collect();
|
||||
@@ -372,6 +422,40 @@ pub fn check(args: &[String], host: &Host) -> R<(String, bool)> {
|
||||
Ok((out.join("\n"), bad))
|
||||
}
|
||||
|
||||
/// `raea check NAME.story.ts` (docs/story.feature ST5a): a story checked before anything is drawn. Every rule whose .ts
|
||||
/// check reads stories (`over: "story"` or `"both"`) runs once with no frames, so only its `after` speaks; the check
|
||||
/// imports the story it holds (raea/story's storyCheck), and the file named says which project and that no composition
|
||||
/// is wanted.
|
||||
fn check_story(file: &Path, rules: &[Rule], unread: Vec<Finding>, args: &[String], host: &Host) -> R<(String, bool)> {
|
||||
let (mut found, mut files, mut plan) = (Vec::new(), Vec::<PathBuf>::new(), Vec::new());
|
||||
for r in rules {
|
||||
let Some(f) = r.file() else { continue };
|
||||
match ts::meta(f, &host.ts) {
|
||||
Ok(m) if m.story => {
|
||||
let k = file_index(&mut files, &m.file);
|
||||
plan.push(ts::Planned { check: k, frames: Vec::new(), values: r.values.clone(), level: r.level, by: r.by.clone() });
|
||||
}
|
||||
Ok(_) => {}
|
||||
Err(e) => found.push(Finding::new(&r.id, Level::Error, e, &r.by)),
|
||||
}
|
||||
}
|
||||
if plan.is_empty() {
|
||||
found.push(Finding::new("story", Level::Note, "no check here reads a story: a .ts check over \"story\" or \"both\" (raea/story's storyCheck is one) named in taste.ts", "raea check"));
|
||||
}
|
||||
found.extend(ts::run(&files, &plan, &[], &host.ts)?);
|
||||
let found = finding::ranked(found);
|
||||
let bad = unread.iter().chain(&found).any(|f| f.level == Level::Error);
|
||||
if args.iter().any(|a| a == "--json") {
|
||||
return Ok((serde_json::to_string_pretty(&json!({"unread": unread, "story": file, "findings": found})).unwrap_or_default(), bad));
|
||||
}
|
||||
let mut out: Vec<String> = unread.iter().map(Finding::line).collect();
|
||||
out.push(format!("raea check {} (a story: no frames)", file.display()));
|
||||
out.extend(found.iter().map(Finding::line));
|
||||
let every: Vec<Finding> = unread.into_iter().chain(found).collect();
|
||||
out.push(format!("raea check: {}", finding::count(&every)));
|
||||
Ok((out.join("\n"), bad))
|
||||
}
|
||||
|
||||
/// `raea check ...`: its exit code (1 on an error found, 2 when it couldn't check).
|
||||
pub fn cli(args: &[String], host: &Host) -> i32 {
|
||||
raea_app_check::said(check(args, host), "raea check: ")
|
||||
|
||||
@@ -7,6 +7,8 @@ pub use world::{cli, find, Find, USAGE};
|
||||
// how `raea render` ends: its findings counted last, and 1 on an error not let through (DR3)
|
||||
mod rendered;
|
||||
pub use rendered::rendered;
|
||||
// frame purity at a render's end: a sample of its frames rendered again and held to the video's (SG9)
|
||||
mod pure;
|
||||
|
||||
// `raea findings`: the project's record read back, fixed, new and carried (DR3)
|
||||
pub mod findings;
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
//! SG9 (docs/stage-guards.feature): a frame looks the same however it is reached. When a video render with 3D in it ends,
|
||||
//! a sample of its frames is rendered again by one more raea (`render --at`: each frame reached by a jump, none by the
|
||||
//! frames before it) and held to the same frame of the video. A patch that differs beyond the encoder's noise means a
|
||||
//! part kept state from an earlier frame: a shape, words, a colour or another part's row held over (SG1–SG4's faults,
|
||||
//! and any later one of their kind). That frame is rendered alone (`--frame N`, in its own process) to be sure, and the
|
||||
//! error names the frame, the patch, the parts under it (the stills' manifest, raea-sys-stage's on_screen) and where
|
||||
//! the two pictures are kept. A frame that differs only when reached by a jump is the engine's fault, not the
|
||||
//! composition's: a warning. RAEA_FRAME_PURE=0 skips the check (the stills it renders set it).
|
||||
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
|
||||
use raea_core_facts::{Finding, Level};
|
||||
use serde_json::Value;
|
||||
|
||||
/// Sampled: every this many frames, the last frame, and the frame after each remount (more than 20 parts mounting or
|
||||
/// unmounting at once, as the render's manifest lists them), for a render of more than MIN_FRAMES
|
||||
const EVERY: u64 = 300;
|
||||
const MIN_FRAMES: u64 = 60;
|
||||
/// at most this many samples, spread evenly
|
||||
const MOST: usize = 64;
|
||||
/// A pixel differs when a channel differs by more than this (of 255) through a 3x3 erosion, which drops lone pixels (a
|
||||
/// glyph's edge noise, the encoder's, its colour bleeding along an edge) and keeps a patch: tools/frame-pure-3d.sh's
|
||||
/// bar, where a cut letter was 318. The largest channel, not luma: an orange part over a grey floor differs by 68 in
|
||||
/// luma and 116 in blue, and a part that kept another frame's colour is often as bright as its own
|
||||
const LEVELS: f32 = 96.0;
|
||||
/// A frame differs when more of its pixels than this share differ (207 at 1080p), and at least LEAST
|
||||
const SHARE: f64 = 1e-4;
|
||||
const LEAST: usize = 64;
|
||||
/// The flags of the render the stills repeat (each takes a value, then the bare ones): what it draws and at what size
|
||||
const KEEP: [&str; 12] = ["--composition", "--w", "--h", "--fps", "--frames", "--words", "--perception", "--input", "--stage", "--props", "--scale", "--hold"];
|
||||
const KEEP_BARE: [&str; 2] = ["--clay", "--lite"];
|
||||
const BY: &str = "raea render (frame-pure)";
|
||||
|
||||
/// The frames to sample of a render `length` frames long, given its remounts.
|
||||
pub(crate) fn samples(length: u64, remounts: &[u64]) -> Vec<u64> {
|
||||
if length <= MIN_FRAMES {
|
||||
return Vec::new();
|
||||
}
|
||||
let mut s: Vec<u64> = (1..).map(|k| k * EVERY).take_while(|f| *f < length).collect();
|
||||
s.push(length - 1);
|
||||
s.extend(remounts.iter().map(|f| f + 1).filter(|f| *f < length));
|
||||
s.sort_unstable();
|
||||
s.dedup();
|
||||
// more than MOST: the last of each of MOST even runs, so the last frame stays
|
||||
let n = s.len();
|
||||
if n > MOST {
|
||||
s = s.into_iter().enumerate().filter(|(i, _)| (i + 1) * MOST / n > i * MOST / n).map(|(_, f)| f).collect();
|
||||
}
|
||||
s
|
||||
}
|
||||
|
||||
/// Where two RGBA frames of one size differ: the count of pixels with a channel off by more than LEVELS through a 3x3
|
||||
/// erosion (every pixel round it differs too), and their box [x0, y0, x1, y1].
|
||||
pub(crate) fn patch(a: &[u8], b: &[u8], w: usize, h: usize) -> (usize, [usize; 4]) {
|
||||
let d: Vec<f32> = (0..w * h)
|
||||
.map(|i| {
|
||||
let c = |k: usize| (f32::from(a[i * 4 + k]) - f32::from(b[i * 4 + k])).abs();
|
||||
c(0).max(c(1)).max(c(2))
|
||||
})
|
||||
.collect();
|
||||
let (mut n, mut bx) = (0, [usize::MAX, usize::MAX, 0, 0]);
|
||||
for y in 1..h.saturating_sub(1) {
|
||||
for x in 1..w.saturating_sub(1) {
|
||||
if (y - 1..=y + 1).all(|yy| (x - 1..=x + 1).all(|xx| d[yy * w + xx] > LEVELS)) {
|
||||
n += 1;
|
||||
bx = [bx[0].min(x), bx[1].min(y), bx[2].max(x + 1), bx[3].max(y + 1)];
|
||||
}
|
||||
}
|
||||
}
|
||||
(n, if n == 0 { [0; 4] } else { bx })
|
||||
}
|
||||
|
||||
fn differs(n: usize, w: usize, h: usize) -> bool {
|
||||
n > LEAST.max((SHARE * (w * h) as f64) as usize)
|
||||
}
|
||||
|
||||
/// The render's own flags the stills repeat.
|
||||
fn kept(args: &[String]) -> Vec<String> {
|
||||
let mut out = Vec::new();
|
||||
for (i, a) in args.iter().enumerate() {
|
||||
if KEEP.contains(&a.as_str()) {
|
||||
out.extend(args.get(i..i + 2).into_iter().flatten().cloned());
|
||||
} else if KEEP_BARE.contains(&a.as_str()) {
|
||||
out.push(a.clone());
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// One more raea rendering `file` at `at` into `dir` (its stills, frame-00000.png on, in `at`'s order, and its
|
||||
/// manifest); its own errors are let through, since these are pictures to compare, not the render. Stills past 3,600
|
||||
/// frames make their 3D live at each (render_bundle's LIVE_PAST): 64 of a 13,175-frame film reached by rows went past
|
||||
/// 30 GB and were killed.
|
||||
fn stills(file: &str, args: &[String], at: &[u64], dir: &Path) -> Result<Value, String> {
|
||||
let me = std::env::current_exe().map_err(|e| e.to_string())?;
|
||||
let list: Vec<String> = at.iter().map(u64::to_string).collect();
|
||||
std::fs::create_dir_all(dir).map_err(|e| format!("{}: {e}", dir.display()))?;
|
||||
let manifest = dir.join("stills.json");
|
||||
let (flag, out) = if at.len() == 1 { ("--frame", dir.join("frame-00000.png").display().to_string()) } else { ("--at", format!("{}/", dir.display())) };
|
||||
let o = Command::new(me).arg("render").arg(file).args(kept(args)).args([flag, &list.join(","), "-o", &out, "--manifest"]).arg(&manifest).env("RAEA_RECORD", "off").env("RAEA_FRAME_PURE", "0").env("RAEA_DESPITE", "all: frame-pure's own stills")
|
||||
// nothing here reads the stills' clipping or staging, only their pictures and parts on screen: the checks cost
|
||||
// the film's 44 stills 1.6 GB, beside the render that's still held (SG4a: its 8.6 GB peak)
|
||||
.env("RAEA_CLIP_CHECK", "0").env("RAEA_STAGE_CHECK", "0").output().map_err(|e| e.to_string())?;
|
||||
let m = std::fs::read(&manifest).ok().and_then(|b| serde_json::from_slice::<Value>(&b).ok());
|
||||
m.ok_or_else(|| format!("the stills didn't render: {}", String::from_utf8_lossy(&o.stderr).lines().rev().find(|l| !l.trim().is_empty()).unwrap_or("no message")))
|
||||
}
|
||||
|
||||
fn png(p: &Path) -> Option<(Vec<u8>, usize, usize)> {
|
||||
let img = image::open(p).ok()?.into_rgba8();
|
||||
let (w, h) = img.dimensions();
|
||||
Some((img.into_raw(), w as usize, h as usize))
|
||||
}
|
||||
|
||||
/// The parts on screen at `frame` whose boxes meet `bx`, most overlap first (the manifest of the frame rendered alone:
|
||||
/// its `parts` hold that one frame).
|
||||
fn under(m: &Value, frame: u64, bx: [usize; 4]) -> Vec<String> {
|
||||
let at = &m["parts"][0];
|
||||
if at["frame"] != frame {
|
||||
return Vec::new();
|
||||
}
|
||||
let b = bx.map(|v| v as f64);
|
||||
let mut hit: Vec<(f64, String)> = at["parts"]
|
||||
.as_array()
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.filter_map(|p| {
|
||||
let r: Vec<f64> = p[1].as_array()?.iter().filter_map(Value::as_f64).collect();
|
||||
let r: [f64; 4] = r.try_into().ok()?;
|
||||
let over = (b[2].min(r[2]) - b[0].max(r[0])).max(0.0) * (b[3].min(r[3]) - b[1].max(r[1])).max(0.0);
|
||||
(over > 0.0).then(|| (over, p[0].as_str().unwrap_or("a part").to_string()))
|
||||
})
|
||||
.collect();
|
||||
hit.sort_by(|a, b| b.0.total_cmp(&a.0));
|
||||
hit.into_iter().map(|h| h.1).take(3).collect()
|
||||
}
|
||||
|
||||
/// SG9 on a finished render: its findings, none when it isn't a video with 3D in it of more than MIN_FRAMES.
|
||||
pub fn check(args: &[String], out: &Path, manifest: &Value) -> Vec<Finding> {
|
||||
let (Some(file), true) = (args.get(1), manifest["has3d"].as_bool() == Some(true)) else { return Vec::new() };
|
||||
if std::env::var("RAEA_FRAME_PURE").as_deref() == Ok("0") || args.iter().any(|a| a == "--frame" || a == "--at") {
|
||||
return Vec::new();
|
||||
}
|
||||
let remounts: Vec<u64> = manifest["remounts"].as_array().into_iter().flatten().filter_map(Value::as_u64).collect();
|
||||
let at = samples(manifest["length"].as_u64().unwrap_or(0), &remounts);
|
||||
let fps = manifest["fps"].as_f64().unwrap_or(30.0);
|
||||
if at.is_empty() {
|
||||
return Vec::new();
|
||||
}
|
||||
let dir = std::env::temp_dir().join(format!("raea-frame-pure-{}", std::process::id()));
|
||||
let found = run(file, args, out, &at, fps, &dir).unwrap_or_else(|e| vec![Finding::new("frame-pure", Level::Note, format!("frame purity wasn't checked: {e}"), BY)]);
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
found
|
||||
}
|
||||
|
||||
fn run(file: &str, args: &[String], out: &Path, at: &[u64], fps: f64, dir: &Path) -> Result<Vec<Finding>, String> {
|
||||
std::fs::create_dir_all(dir).map_err(|e| e.to_string())?;
|
||||
stills(file, args, at, &dir.join("at"))?;
|
||||
let mut video = raea_io_media::preferred().into_iter().find_map(|b| b.open_video(out).ok()).ok_or_else(|| format!("{}: no decoder opens it", out.display()))?;
|
||||
let keep = out.with_extension("frame-pure");
|
||||
let mut found = Vec::new();
|
||||
for (i, &f) in at.iter().enumerate() {
|
||||
let Some((jump, w, h)) = png(&dir.join(format!("at/frame-{i:05}.png"))) else { continue };
|
||||
let v = video.frame_at((f as f64 + 0.5) / fps)?;
|
||||
if (v.width as usize, v.height as usize) != (w, h) {
|
||||
return Err(format!("the video is {}x{}, its stills {w}x{h}", v.width, v.height));
|
||||
}
|
||||
if !differs(patch(&v.rgba, &jump, w, h).0, w, h) {
|
||||
continue;
|
||||
}
|
||||
// reached by a jump it differs: rendered alone, in its own process, to be sure
|
||||
let one = dir.join(format!("alone-{f}"));
|
||||
let alone_m = stills(file, args, &[f], &one)?;
|
||||
let Some((alone, _, _)) = png(&one.join("frame-00000.png")) else { continue };
|
||||
let (n, bx) = patch(&v.rgba, &alone, w, h);
|
||||
let parts = under(&alone_m, f, bx);
|
||||
let named = if parts.is_empty() { String::new() } else { format!(" over {}", parts.join(", ")) };
|
||||
let finding = if differs(n, w, h) {
|
||||
std::fs::create_dir_all(&keep).map_err(|e| e.to_string())?;
|
||||
let (seq, own) = (keep.join(format!("frame-{f:05}-render.png")), keep.join(format!("frame-{f:05}-alone.png")));
|
||||
image::save_buffer(&seq, &v.rgba, w as u32, h as u32, image::ColorType::Rgba8).map_err(|e| e.to_string())?;
|
||||
std::fs::copy(one.join("frame-00000.png"), &own).map_err(|e| e.to_string())?;
|
||||
let mut x = Finding::new("frame-pure", Level::Error, format!("{n} pixels{named} (x {}-{}, y {}-{}) differ from the frame rendered alone: a part kept an earlier frame's shape, words, colour or row. The two are {} and {}", bx[0], bx[2], bx[1], bx[3], seq.display(), own.display()), BY).frames(f as i64, f as i64 + 1).measure("pixels", n as f64, "px", Some(LEAST.max((SHARE * (w * h) as f64) as usize) as f64));
|
||||
for p in &parts {
|
||||
x = x.about(p.clone(), None);
|
||||
}
|
||||
x.fix("find what that part takes from the frames before (a key it keeps, a prop read once), or `raea bug` with both pictures when it's raea's")
|
||||
} else {
|
||||
Finding::new("frame-pure-jump", Level::Warn, format!("frame {f}{named} differs when the render jumps to it from frame {}, not alone or in sequence: raea's, not the composition's (`raea bug` with this line)", if i > 0 { at[i - 1].to_string() } else { "0".into() }), BY).frames(f as i64, f as i64 + 1)
|
||||
};
|
||||
found.push(finding);
|
||||
}
|
||||
Ok(found)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn samples_every_300th_the_last_and_after_each_remount() {
|
||||
assert!(samples(60, &[]).is_empty());
|
||||
assert_eq!(samples(180, &[]), vec![179]);
|
||||
assert_eq!(samples(1000, &[40, 599, 999]), vec![41, 300, 600, 900, 999]);
|
||||
let many = samples(1_000_000, &[]);
|
||||
assert_eq!((many.len(), many.last()), (MOST, Some(&999_999)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_patch_counts_but_lone_pixels_and_noise_dont() {
|
||||
let (w, h) = (64, 32);
|
||||
let a = vec![40u8; w * h * 4];
|
||||
let mut b = a.clone();
|
||||
// noise: every pixel off by 20, and lone pixels off by 200
|
||||
b.iter_mut().for_each(|v| *v += 20);
|
||||
for i in (0..w * h).step_by(7) {
|
||||
b[i * 4..i * 4 + 3].copy_from_slice(&[240, 240, 240]);
|
||||
}
|
||||
assert_eq!(patch(&a, &b, w, h).0, 0);
|
||||
// a 10x6 block of words turned white at x 20, y 8: its eroded inside, 8x4
|
||||
for y in 8..14 {
|
||||
for x in 20..30 {
|
||||
b[(y * w + x) * 4..(y * w + x) * 4 + 3].copy_from_slice(&[255, 255, 255]);
|
||||
}
|
||||
}
|
||||
let (n, bx) = patch(&a, &b, w, h);
|
||||
assert_eq!(n, 32);
|
||||
assert_eq!(bx, [21, 9, 29, 13]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_stills_repeat_what_the_render_draws_and_nothing_else() {
|
||||
let a: Vec<String> = ["render", "e.tsx", "-o", "out.mp4", "--composition", "k3", "--kbps", "8000", "--clay", "--despite", "type-small", "why", "--frames", "90"].iter().map(|s| s.to_string()).collect();
|
||||
assert_eq!(kept(&a), ["--composition", "k3", "--clay", "--frames", "90"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_parts_under_a_patch_most_overlap_first() {
|
||||
let m = serde_json::json!({"parts": [{"frame": 600, "parts": [["floor", [0.0, 500.0, 1920.0, 1080.0]], ["counter", [800.0, 300.0, 1000.0, 400.0]], ["sky", [0.0, 0.0, 1920.0, 200.0]]]}]});
|
||||
assert_eq!(under(&m, 600, [850, 350, 1000, 520]), ["counter", "floor"]);
|
||||
assert!(under(&m, 300, [850, 350, 1000, 520]).is_empty());
|
||||
}
|
||||
}
|
||||
Loaded 100 of 1319 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user