Skip to content

improvement of residual-chart hover info #579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 198 commits into
base: mainmast
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
80fcdab
on-raw-key
jpolitz Mar 11, 2018
2649417
try reducing this to one variable
jpolitz Mar 11, 2018
c5c5ebb
trying minimal configurations first
jpolitz Mar 11, 2018
30ecb8c
might need a better way to configure these, since we don't know the P…
jpolitz Mar 11, 2018
9cabcb7
try inheriting this from base project
jpolitz Mar 11, 2018
20f7d67
Learned some things about deployment
jpolitz Mar 11, 2018
31806e1
inherit client id so share URLs work
jpolitz Mar 11, 2018
66a5a95
checking if we can use here
jpolitz Mar 12, 2018
00d3769
more testing, this time with explicit branch
jpolitz Mar 12, 2018
3dbcca7
Updates to match event design in https://github.com/brownplt/pyret-la…
jpolitz May 24, 2018
1f4b4a9
remove stray console log
jpolitz May 24, 2018
f9814c6
Fixes #492 and cleans up unused code.
asolove Nov 7, 2023
a5b9a60
Disable checking file name and erroring for shared gdrive files.
asolove Mar 14, 2024
25fe752
Add a new #initialState parameter
jpolitz Jun 18, 2024
e7dd78d
trying to fix travis failures from e.g.https://app.travis-ci.com/gith…
jpolitz Jun 18, 2024
8539623
Merge branch 'horizon' into vmt-initialState
jpolitz Jun 19, 2024
d4a6f52
support an explicit 'I am ready' event and an initial state receiving…
jpolitz Jul 2, 2024
877e5d9
track message numbers to do state resets in the replayer
jpolitz Jul 2, 2024
b67d696
initialState and new events
jpolitz Jul 5, 2024
3b8d69c
Some guards and logs around initialization and edits
jpolitz Jul 5, 2024
766551f
Some initialization cleanup
jpolitz Jul 9, 2024
5b61d6f
Pass repl updates around
jpolitz Jul 10, 2024
36cebd3
log the correct values in this check
jpolitz Jul 10, 2024
64cbb41
Committing this built file as part of test deploy to https://pyret-vm…
jpolitz Jul 10, 2024
e181750
Make initial state have newlines again
jpolitz Jul 10, 2024
dab488b
Add logic to allow initialStates that are #share url
jpolitz Jul 15, 2024
f1b08e6
update with clean build
jpolitz Jul 16, 2024
5d67052
Better event descriptions
jpolitz Jul 16, 2024
c3602b7
rebuild for deploy
jpolitz Jul 16, 2024
4f25a85
some blur() and refresh() to fix little visual bugs
jpolitz Jul 16, 2024
383ddc5
[blocks] remove user-specified function definition and application
asolove Jul 17, 2024
837b5f9
Add config option to proxy shared reqs through another server
jpolitz Jul 17, 2024
ce6c68f
If there's no initial state, *do* click the run button for the user
jpolitz Jul 17, 2024
1dd8a1a
Use the shared fetch server, but fall back if it fails
jpolitz Jul 17, 2024
e2f214b
unconditionally allow CPO urls
jpolitz Jul 17, 2024
f2d5782
Changes for manual control
jpolitz Jul 30, 2024
f9329db
Don't start without control
jpolitz Jul 31, 2024
30c4215
Allow resetFromShareLink to happen while the page is running
jpolitz Jul 31, 2024
5312464
Actuall return from promise
jpolitz Jul 31, 2024
37f8337
Merge branch 'horizon' into vmt-initialState
jpolitz Aug 2, 2024
88cee15
fix some initialization issues
jpolitz Aug 2, 2024
97d17f6
RPCs (for getting file contents in VScode)
jpolitz Aug 2, 2024
d504e15
Basic file locators
jpolitz Aug 4, 2024
af6f425
Stop, and wait for results from, the last run
jpolitz Aug 6, 2024
d749850
Queue all effects from messages in a single queue, reset on run
jpolitz Aug 12, 2024
fe434a1
reset from the current state; don't expect arbitrary messages to have…
jpolitz Aug 12, 2024
339c1c8
bare minimum testing for embedding API (does it send a pyret init
jpolitz Aug 13, 2024
43c01a7
add test for reset event
jpolitz Aug 13, 2024
cf60241
hide/remove useless elements when in headless mode
jpolitz Aug 13, 2024
01b65f3
Revert "Basic file locators"
jpolitz Aug 13, 2024
b45de13
remove stray logs (that actually log a lot of annoying junk on downlo…
jpolitz Aug 13, 2024
cc5185f
Revert "Revert "Basic file locators""
jpolitz Aug 13, 2024
0ef6624
Don't try to use MESSAGES.sendRpc unless it exists
jpolitz Aug 13, 2024
ee2d35a
Test with two frames, showing edits propagating across
jpolitz Aug 13, 2024
0d7bde6
Properly parameterize tests with the BASE_URL from env
jpolitz Aug 13, 2024
88aadc4
reduce timer length to make failed runs quicker
jpolitz Aug 13, 2024
b214b90
allow CI to postmessage
jpolitz Aug 13, 2024
fa1dde7
try longer timeouts first; surprised these are failing when other emb…
jpolitz Aug 13, 2024
4cbd795
update cpo-main
jpolitz Aug 14, 2024
3aaf59c
stop before reset
jpolitz Aug 14, 2024
a3ed502
stop before resetting
jpolitz Aug 14, 2024
b2aad95
exit early if no gapi defined, and avoid shadowing fileLocator error
jpolitz Sep 17, 2024
3b157af
logging, build updates
jpolitz Sep 17, 2024
757937d
Make cookies be samesite: strict
jpolitz Jan 8, 2025
7134edf
make it so if #initialState is provided, the page is put into control…
jpolitz Jan 8, 2025
5c509fd
regenerate package-lock; travis is complaining about npm ci
jpolitz Jan 8, 2025
4729343
set the title attribute of the filename element to be the FULL filename
Jan 9, 2025
1553e48
tweak CSS for even-numbered rows to make them more apparent (#185)
Jan 9, 2025
fb6114f
does this work with just plain install?
jpolitz Jan 9, 2025
b0ca7e7
respond to several review comments
jpolitz Jan 9, 2025
e222687
built files (we won't always need to include these, just for intermed…
jpolitz Jan 9, 2025
7cfcadb
does this succeed if we just update pyret-lang and don't update all p…
jpolitz Jan 10, 2025
70a432d
npm update
jpolitz Jan 10, 2025
7696c4a
bundle events in an abstraction
jpolitz Jan 10, 2025
dfbd511
only update pyret-lang
jpolitz Jan 10, 2025
4f87ed2
back to lax for testing
jpolitz Jan 10, 2025
9e5e492
npm update
jpolitz Jan 10, 2025
51ac343
npm i after update
jpolitz Jan 10, 2025
bd1b6a9
now strict again for more live testing
jpolitz Jan 10, 2025
7e3b738
back to lax for testing
jpolitz Jan 10, 2025
26a5ff6
Merge branch 'horizon' into vmt-initialState
jpolitz Jan 10, 2025
0b00380
remove this to test deploy
jpolitz Jan 10, 2025
1c99f1b
do git updates first before building to fetch snap
jpolitz Jan 10, 2025
501ed10
remove submodule attempt
jpolitz Jan 10, 2025
296e2d5
Revert "remove this to test deploy"
jpolitz Jan 10, 2025
ebf84e9
Merge pull request #569 from brownplt/vmt-initialState
jpolitz Jan 10, 2025
0fe28a4
only update pyret-lang
jpolitz Jan 10, 2025
2091f93
only update pyret-lang
jpolitz Jan 10, 2025
b59fe22
Merge pull request #572 from brownplt/table-contrast
jpolitz Jan 11, 2025
060a3d4
do the same for beforePyret.js
Jan 11, 2025
f964042
Merge pull request #571 from brownplt/file-title
jpolitz Jan 11, 2025
d63211a
remove built file because horizon can deploy itself
jpolitz Jan 14, 2025
83a22d1
Track controlled-ness and use it to manage focus
jpolitz Jan 14, 2025
5017748
if definitionsAtLastRun is false on reset, run the empty program, whi…
jpolitz Jan 14, 2025
959efef
Some conservative embedders (like github.dev) require this
jpolitz Jan 20, 2025
e8a479a
More diagnosing issues from embedding in github.dev
jpolitz Jan 20, 2025
c6f333f
Start of CSV parsing with fast-csv (https://www.npmjs.com/package/fas…
jpolitz Jan 21, 2025
3ef97c5
csv-parser branch for this branch
jpolitz Jan 21, 2025
27d7b74
Starting to fill in the fs library with rpcs
jpolitz Jan 22, 2025
28cdf59
`reportAnswer` on runInteraction and more inControl
jpolitz Jan 23, 2025
1b55a21
Sketching out file-image
jpolitz Jan 22, 2025
bc3a0ee
Basic image-file(<path>) support
jpolitz Jan 23, 2025
6ca5304
Update to match node's readFile spec
jpolitz Jan 24, 2025
e09d908
undo stray edit
jpolitz Jan 24, 2025
43198bf
better error messageg
jpolitz Jan 24, 2025
3bd63e9
Merge pull request #576 from brownplt/csv-parser
jpolitz Jan 24, 2025
0f0578b
Merge pull request #577 from brownplt/image-file
jpolitz Jan 24, 2025
ef460e3
Improved hover info on dots on residual charts
ds26gte Feb 6, 2025
a8e5ace
interval chart: Significant digits on delta shd match y, ŷ
ds26gte Feb 7, 2025
72ed3e3
interval chart: Restrict signif digits to 4
ds26gte Feb 7, 2025
666445f
Merge pull request #578 from ds26gte/residual-hover-info
ds26gte Feb 10, 2025
bfd159e
pyret version, match pyret version
jpolitz Feb 12, 2025
1cf186e
package-lock
jpolitz Feb 12, 2025
db64741
actually pass arguments to trigger handlers
jpolitz Feb 12, 2025
a38cef1
.
jpolitz Feb 12, 2025
3e0fef4
Move snap to a npm package
jpolitz Feb 17, 2025
07d1c86
Merge pull request #547 from asolove/blocks-mvp
jpolitz Feb 18, 2025
3638775
Merge pull request #494 from asolove/asolove/publish-dialog
jpolitz Feb 18, 2025
19e7c7a
update tests for pyret-lang wording changes around predicate tests
jpolitz Feb 18, 2025
828d4b7
update tests for pyret-lang wording changes around predicate tests
jpolitz Feb 18, 2025
f72a9d8
Merge pull request #581 from brownplt/snap-npm
jpolitz Feb 18, 2025
53cfdba
kick to deploy
jpolitz Feb 26, 2025
ccf357f
since this is in an npx-ish context, the webpack executable *should* …
jpolitz Feb 26, 2025
51c4fc4
Progress on an all-local setup for built CPO
jpolitz Feb 26, 2025
456d720
More protections around google charts not loading
jpolitz Feb 26, 2025
74bfd35
lost some config in recent updates
jpolitz Feb 27, 2025
14372e2
better templating for the question mark glyph
jpolitz Feb 27, 2025
eed17c6
this somehow did _not_ get updated with the readFileSync->readFile up…
jpolitz Feb 27, 2025
9d9246b
this somehow did _not_ get updated with the readFileSync->readFile up…
jpolitz Feb 27, 2025
7e81780
attempting to run everything just depending on pyret-lang's image def…
jpolitz Mar 3, 2025
0580f58
update images tests
jpolitz Mar 3, 2025
a33ee15
Make canvas.Image be just the native Image in browser
jpolitz Mar 4, 2025
611361f
Merge branch 'local-deps' into offline-image
jpolitz Mar 4, 2025
7f66bd2
writefile
jpolitz Mar 4, 2025
8bba2f4
Allow templating in hash params
jpolitz Mar 11, 2025
3f446ca
Add hideInteractions as well as hideDefinitions
jpolitz Mar 11, 2025
1acac53
Utility script for getting images in other scripts
jpolitz Mar 12, 2025
63d689d
Merge pull request #518 from asolove/asolove/name-mismatch
jpolitz Mar 13, 2025
e58d380
test for loading a starter file
jpolitz Mar 17, 2025
f52d87f
more chromedriver updates
jpolitz Mar 17, 2025
c22ba36
stray log
jpolitz Mar 17, 2025
d51b14b
Increasing embed test timeouts: sometimes takes a while to load
jpolitz Mar 17, 2025
8207b63
Increase timeout and allow looking up files on CPO
jpolitz Mar 17, 2025
94d6936
Add publicOnly as a flag when initializing Drive storage
jpolitz Mar 17, 2025
b97bb05
Merge branch 'horizon' into local-deps
jpolitz Mar 18, 2025
4a54f38
Merge pull request #585 from brownplt/local-deps
jpolitz Mar 18, 2025
3e34649
offline-image -> horizon for package.json, package-lock update
jpolitz Mar 19, 2025
b67e678
url(...) dependency locators for CPO
jpolitz Mar 19, 2025
df019fc
basic url-file that always concatenates and does a remote fetch
jpolitz Mar 19, 2025
9256afb
refer to url-import branch of pyret-lang
jpolitz Mar 19, 2025
6de5be0
Basic url-file implementation for CPO
jpolitz Mar 19, 2025
5245cd7
URI calculation function used in errors/editors, and be sure this is …
jpolitz Mar 19, 2025
3627a6b
stray debugger
jpolitz Mar 20, 2025
c3da13c
Add #shareurl= to initial params
jpolitz Mar 20, 2025
f4131c1
test url imports
jpolitz Mar 21, 2025
a961888
point to correct branch
jpolitz Mar 21, 2025
664a6ec
Add source of url and url-file imports to documents directly from mod…
jpolitz Mar 21, 2025
f74e51f
Update pyret-lang to horizon now that url-import merged
jpolitz Mar 21, 2025
f72b580
Merge pull request #587 from brownplt/url-import
jpolitz Mar 21, 2025
3b3b176
crossorigin=anonymous on PYRET loads
jpolitz Mar 21, 2025
38fc151
missed lookup (params are in the 'get' subdict)
jpolitz Mar 24, 2025
dbb9fe4
Also copy to cpo-main.jarr.js because browsers like the extension to …
jpolitz Mar 24, 2025
7cc140d
clean up this logic
jpolitz Mar 24, 2025
bdba89e
kick to deploy
jpolitz Mar 24, 2025
3541cb7
trying edge: true to update to the new dpl2 in Travis. Getting deploy…
jpolitz Mar 24, 2025
34da608
New template option: IMAGE_PROXY_BYPASS
jpolitz Mar 24, 2025
8b10093
Missing image files from moving dependencies offline
jpolitz Mar 25, 2025
a493018
With checker updates, need to ensure that checks: "main" is used so g…
jpolitz Mar 25, 2025
91f80ca
try dpl2 for both?
jpolitz Mar 25, 2025
afd8b5c
logge(r)
jpolitz Mar 25, 2025
ccb8ba9
clearInteractions event
jpolitz Mar 25, 2025
ce5c2aa
enhance reportAnswer results with both text and HTML versions
jpolitz Mar 25, 2025
0d946ce
kick to deploy
jpolitz Apr 8, 2025
687499c
stylize tildes in roughnums to be more readable. requires the #empha…
Sep 7, 2021
15431c5
Merge pull request #589 from brownplt/emphasize-tildes
jpolitz Apr 10, 2025
df30b7d
forgot a file, to improve rendering in the REPL
Apr 10, 2025
d3b35be
Fixed relative paths and css/image library build
jpolitz Apr 14, 2025
c25fa5f
move image files into lib/css/images/
jpolitz Apr 14, 2025
80acc1c
css/images directory wasn't being created
jpolitz Apr 17, 2025
020d952
during build, make editor.embed.html, which is templated with relativ…
jpolitz Apr 23, 2025
73ed764
Rendering for truncated tables (a new valueskeleton constructor)
jpolitz Apr 25, 2025
365f7b6
these need to go at the end after making build/
jpolitz Apr 25, 2025
b0f3779
kick to deploy
jpolitz Apr 30, 2025
5902106
don't check for current version when embedded
jpolitz May 1, 2025
da8f74b
kick to deploy
jpolitz May 2, 2025
bd95531
kick to deploy
jpolitz May 3, 2025
1abdd5c
Refactoring Makefile to work when installed as a nested node module
jpolitz May 6, 2025
b144c0f
More node_modules path refactoring
jpolitz May 6, 2025
c29e3d7
udpate pyret-cm-mode
jpolitz May 6, 2025
c13be66
npx instead of npm exec
jpolitz May 6, 2025
9b53637
install uglify as a dependency explicitly (it wasn't before?)
jpolitz May 6, 2025
afa4b1a
Merge branch 'horizon' into on-raw-key
jpolitz May 7, 2025
ea5685b
make sure we don't overwrite travis with old per-branch build experim…
jpolitz May 7, 2025
ce92a99
update pyret-lang
jpolitz May 8, 2025
300b0c3
stack safety for uriFromDependency
jpolitz May 9, 2025
6fa3cef
refactor RPC callbacks into a shared helper
jpolitz May 13, 2025
6a61faa
correctly forward exceptions on from rpc responses
jpolitz May 13, 2025
f6bdcdc
Quality of life improvement for JS errors that leak
jpolitz May 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .env.embed
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
GOOGLE_API_KEY=""
GOOGLE_SERVER_API_KEY=""
GOOGLE_APP_ID=""
BASE_URL="."
CURRENT_PYRET_RELEASE=""
PYRET="./js/cpo-main.jarr.js"
POSTMESSAGE_ORIGIN="*"
SHARED_FETCH_SERVER="https://code.pyret.org"
URL_FILE_MODE="all-remote"
IMAGE_PROXY_BYPASS="true"
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ PYRET="http://localhost:4999/js/cpo-main.jarr"
PORT=4999
NODE_ENV=development
POSTMESSAGE_ORIGIN="http://localhost:3000"

SHARED_FETCH_SERVER="https://code.pyret.org"
URL_FILE_MODE="all-remote"
IMAGE_PROXY_BYPASS="set to true to avoid image proxying through BASE_URL/downloadImg (the default)"
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "src/web/js/snap"]
path = src/web/js/snap
url = https://github.com/jmoenig/Snap.git
shallow = true
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
language: ruby
dist: jammy
sudo: required
env:
Expand All @@ -16,6 +15,8 @@ env:
- PORT=5000
- SAUCE_TEST_TARGET="http://localhost:5000"
- SAUCE_USERNAME="pyret-lang"
- POSTMESSAGE_ORIGIN="*"
- SHARED_FETCH_SERVER="https://code.pyret.org"
- secure: e0vpQGmW0d69Ql72Mw6gsGsMxAKgt61ZNqsfQEtNlAGtx7CbTKe3xg8kF1ygwFVEB7GDmTaojTcSGbRwqqZ5GAa8dsTAkefhOtfCDV5KUjvXXbpo9J/8YLiZiIy7ksHyh1yhByvvWmZZpjmdxWwcH8gUqtpae3bGtz7rQX3jLf2v3OR5uVFt8vKRMSR9imCWmq6tpnu+GVoaCFOHjq3U7LS1h78R2LJz+MnTuCbDtYFlxp/sAyS7vSXssFScl6wqOsgH5PHlj+kaHhFWLhzsAzG1RoHftqqIeinXzDcYo8EC/c6O3hMf2KtHm/Hsh1dPR8GnE6WClxPw0xNbh10jVf7b1CXuzKGF8a1JlmtsVztiujsMswZGGLpTkqBvBAiuDsMOwKFNk7UrR5FA/0bVMMsluKxW/0UBzVPN9QyMKAs19ca1t/qT3abxYFyvXrDibKMLuS1uCCsZbwTkjkPwfWBzin8ohK2gLi+y24eQFSd27XWcmk+fJHfgJ458OgvczubK0CsyPAaJtCvRBYKvLQaEtkc4RkoM0yx6NhYYLCZqH1DRneam40rVSrVO41yT/PUnA5U64q16ptbn90Vgw/yKlp9OLtWKheBDTinwbst1kegbCSj4qZtORFLIQIUsZQN6SUm9tCACqFosDpRXAzURc2IOdsSUmtJEqvkijsc=
- secure: "E19TyEFE1iQSRrZI4w6ahWgFGEFZBiUgxn/Pqq5sQwHlMNpai+bVydDRVlcQ0NsrdPmyXY/4+29wMjsAHbSaiBuqgG5PbtpChJK7a+8583G6CrbkWdZgwkMDpqPQ2IBEWVYeybvl36wuXJ4HNCqImPODWvX1Wxzk5RCK/gM4PNu3OdmQm3+6O8y1N6r0Y/lnqeAxhaZ5wv01/6EE3I3rAbnFxnu0wIJ7AfNV64VRk+tqwYuM5fLXrl6yhelSwp9q5CLEwvvYknBkklHAXbvxc2qo8XfZb6Zb701NyGvFW86Acgo1dytqV+BNmxNj4FfnXj+rxi/SDpiKEifzj5UYLIAgAx/qbxWSHD8SHiOL1WMa7N3vN2Dh+O+9vCLDwtpzbC0kJqxVMei8buAR4pLReZO0OsmHGXDPApoqOdxvQ0Z2VtEWojIWaJSIl0gTaWKAPAE6GMT0zRQcmm6GPXmLpWGc/9MZKJ5lTXQloucRaStRhPYV4x2HNF4vVZmJ0RWQexAX4qsUiaVFs0jdnJTDvgyPWj+f7qJaaqNFfXz9TyP2N8LSjPdGBYfkWIbkv8dXjJCufXX29BbOD5Yq1NcRQxgTnQO1cvXs1/MJOrK8tCAQ/rZUqQakBMg71fhznOm2lejiiingfnq846C1v27KxZzFLnGIOfDUbMAgS1sbGUU="
- secure: "W74n+StLe0w+Lm6KNQN3lLzj4BFCy7vVSRCOQ3t5e3uSXDyLubqgRTXTXPoeypzcztbnMsd8Y57FyjJEaUydb2LPATEoJ9VbBy0ohXV/c3bucJSa4ZJxvb/8L62cepsZkRmoMl1HpW2kLWle50UdCLRqE0aGNHwM9FXfBAd279vmjmvPhFtGEiKkDek/ckroebG0n0xAox56ZmnuJM4boG3o0oUNjSE4U4W/RKMoApLJlUcEcdmWzJvOILeNvydFrHzQcSeHx6uH5LJg/N6RCHb++MI+BiUrAeGa0jm0YXFH0mdDmjCACAcRUzlyAGuadb2dAPcgKPV7xGyDJIn6+OD9dhwEGTGzyKr622fUcCa5+t4PERBFq7nYj7BU1CoqWUsYN6jArkH0ye7lA9usNZsHNXoykZkhpJYEoygYQg6mGnO0v0sRiUbv0BFQ4tN+l/ejvLfCiczjhuBgHlm7m0TUsH94dzeHFqGPlNGy75Rq9PM+0kxvN/TLY3udymKzpTJlbcaDvwQ37unBU2h7DpAYzscxyMcPbHo/F2lnmK/vlpSAsSjkdnpVp4Av+urn8G2eVJw+XnLWCQb4GIRsFzLfXOAPdhcQIZHfhiQTUXgFl+ahC2hEdC1sjho0yWWOHIhRoQ/5sLenB4hFTozxhbIKZTlyWI7FwuPnpWnhvAY="
Expand Down Expand Up @@ -46,6 +47,8 @@ before_install:
- . $HOME/.nvm/nvm.sh
- nvm install 18
- nvm use 18
- gem install nokogiri
- gem install logger
- export CHROME_VERSION=`curl https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE `
- curl https://storage.googleapis.com/chrome-for-testing-public/$CHROME_VERSION/linux64/chrome-linux64.zip -o chrome-linux64.zip
- curl https://storage.googleapis.com/chrome-for-testing-public/$CHROME_VERSION/linux64/chromedriver-linux64.zip -o chromedriver-linux64.zip
Expand All @@ -62,12 +65,13 @@ before_deploy:
install:
- git submodule init
- git submodule update
- npm update # to update Pyret to the newest version
- npm update pyret-lang # to update Pyret to the newest version
- npm ci --ignore-scripts
- make web
- make deploy-cpo-main
deploy:
- provider: s3
edge: true
access_key_id: AKIAIFY44WM3LGA4OQSQ
secret_access_key:
secure: X50U/xTxW1OOBL5rQ6k764xAitKS77+NZfzAGgOKbk/0REUJEg3BHCYCqhr6/AtThh42HKBNNuG029Xu/0wQYOJq9JNWms61g25/1ig6HbeeaJbbpRLdRDWp59UAeB8tUQmPgI34DxREe2zcJJpNErepbkQ0XXx2tULF3HWBLD7PPOv4Ylb78bfhteIGKNX8+Ipag0gCGmJiTr9OPp6FCQh7kWzG1DBfT8t6gZJM9rhvE1y0Myv1OmcT2zs5ZCvd/uJWz7iiGjs4VvOJVTTFYs733B1NX3Inv3vlbgNny46JT7vT5M0RMgulb8ypkkzLham43yuQyn3eIGKVLd3AcTUtdNTB1TP4be50wT/FAoj195Ec1JAsO9LCKz79JPbUvoxdh9C+k+H0B0SHbL+VXqIhZGWLYq0GE/LZfBESYKAeNq/WfoNtfFXIv1VO0rgbX2FU/jxoM7uROagDhfeLBdmYhQVj3O4rXpcUDHcebBEycXlmC5zOaqmANZ37Pc3QIoR1is2+hkNzeP1/NV4huYOmJFlrD7dADKXIsh6vSyp6uZ49tabMfqSe9oKbl41Yc+uHEBm2vPXUF9vmm0SLOZScjFNyvd04EOXxTCBCww+qlFeIeHTyw9NgEIsOgUWUX44ZNZJATLnxCE9EZ+Sp5MHGDH7Wz5ceR5tZh68P7kw=
Expand All @@ -81,6 +85,7 @@ deploy:
repo: brownplt/code.pyret.org
branch: horizon
- provider: heroku
edge: true
app: pyret-horizon
api_key:
secure: "S40lZzhfFnaBbSYTP1+1w/MkyPmsbUX2n/t1DSDBBi938PvE5ZjWHr+Ov7dgavpIDq+uxFazUH5tGSBkZHDAok1KwhUck1U6REQVpV7UCx1wJ0wNqrfEKIqFj2PqarBzTe+YMftHodQeQParhhqVwf0+qBJBZOeMXIUm6jUoTgV/uY7QPRLKHr3MR771kIffdGnzZSSFS+k2GYuQkdK8nIEFstBH8+r8nlcxc71Spw4ey62h3ybOxc2ilhLqw2E++cx89u7WF0XFisLv0iQzpuXAOkwpxe4YGX9pk3gnd3G4BzSU1baOgF35YD0QlyZ2xqB6bTu1GRPIL+dIgl1pauzJXS/DUywzrpINnN/TmW6j051V1as35F3EnjYxOxoFx7GfEleM/0sJLNkB0UKSm03hA9Y7zF194t2CBI+ebCpxgEO4e4hEUDaTfQkrLHBDWd/W4st8cblpizt+ozdnvi4d40x9y1+MB0o3lLw6U0qO/z98RS05bIBYxwLl1/dtUg4GjRe2gtbhOz9A1O+MDCDYono1eP8I4aIXFsYB2VqU6XCoxDLHKhnnec8930pxlyrWQmUTvOetnluZzGdxio/q0pOB2gnwjU7jFtMGT/yb85XDfXxCQZyD4dBArDdRmQhf3yjrRcyeLuCP+y7kiOfkVI38bOZf6lg1Z3K2YLM="
Expand Down
85 changes: 63 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,26 @@ else
RM = rm -f $1
endif

CM=node_modules/codemirror
PYRET_MODE=node_modules/pyret-codemirror-mode
NODE_MODULE = $(shell node -e "console.log(require('node:path').dirname(require.resolve('$1')))")


# These paths get special treatment: their import paths have
# trailing lib/ or mode/ or build/something at the end, but we need files from
# other paths in them
CM=$(call NODE_MODULE,codemirror)/..
PYRET_MODE=$(call NODE_MODULE,pyret-codemirror-mode)/..
PYRET=$(call NODE_MODULE,pyret-lang)/../..

CPOMAIN=build/web/js/cpo-main.jarr
CPOGZ=build/web/js/cpo-main.jarr.gz.js
PHASEA=pyret/build/phaseA/pyret.jarr

.PHONY : test_node_module
test_node_module:
@echo $(call NODE_MODULE,codemirror)
@echo $(CM)


BUNDLED_DEPS=build/web/js/bundled-npm-deps.js

.PHONY : post-install
Expand All @@ -36,6 +50,11 @@ selenium-test-local:
selenium-test-sauce:
TEST_LOC="sauce" node test/test.js test/browser/pyret

build/web/editor.embed.html: src/web/editor.html .env.embed
node make-template.js $< .env.embed > $@
build/web/editor.html: src/web/editor.html
cp $< $@

OUT_HTML := $(patsubst src/web/%.template.html,build/web/views/%.html,$(wildcard src/web/*.template.html))

build/web/views/%.html: src/web/%.template.html
Expand All @@ -52,10 +71,21 @@ build/web/css/%.css: src/web/css/%.template.css
node make-template.js $< > $@

COPY_CSS := $(patsubst src/web/%.css,build/web/%.css,$(wildcard src/web/css/*.css))

build/web/css/%.css: src/web/css/%.css
cp $< $@

COPY_LIB_CSS := $(patsubst lib/css/%.css,build/web/css/%.css,$(wildcard lib/css/*.css))
build/web/css/%.css: lib/css/%.css
cp $< $@

COPY_LIB_CSS := $(patsubst lib/css/%.css,build/web/css/%.css,$(wildcard lib/css/*.css))
build/web/css/%.css: lib/css/%.css
cp $< $@

COPY_LIB_IMAGES := $(patsubst lib/css/images/%.png,build/web/css/images/%.png,$(wildcard lib/css/images/*.png))
build/web/css/images/%.png: lib/css/images/%.png
cp $< $@

COPY_THEMES := $(patsubst src/web/%.css,build/web/%.css,$(wildcard src/web/css/themes/*.css))

build/web/css/themes/%.css: src/web/css/themes/%.css
Expand Down Expand Up @@ -103,6 +133,11 @@ COPY_JS := $(patsubst src/web/js/%.js,build/web/js/%.js,$(wildcard src/web/js/*.
build/web/js/%.js: src/web/js/%.js
cp $< $@

COPY_LIB_JS := $(patsubst lib/js/%.js,build/web/js/%.js,$(wildcard lib/js/*.js))

build/web/js/%.js: lib/js/%.js
cp $< $@

COPY_GOOGLE_JS := $(patsubst src/web/js/google-apis/%.js,build/web/js/google-apis/%.js,$(wildcard src/web/js/google-apis/*.js))

build/web/js/google-apis/%.js: src/web/js/google-apis/%.js
Expand All @@ -111,7 +146,7 @@ build/web/js/google-apis/%.js: src/web/js/google-apis/%.js
build/web/js/events.js: src/web/js/events.js
cp $< $@

build/web/js/snap: src/web/js/snap
build/web/js/snap: $(call NODE_MODULE,snap)
mkdir -p build/web/js/snap
cp -r $</src build/web/js/snap
cp -r $</pyret build/web/js/snap
Expand All @@ -126,28 +161,29 @@ build/web/js/beforePyret.js: src/web/js/beforePyret.js
build/web/js/beforeBlocks.js: src/web/js/beforeBlocks.js
npx webpack

build/web/js/q.js: node_modules/q/q.js

build/web/js/q.js: $(call NODE_MODULE,q)/q.js
cp $< $@

build/web/js/s-expression-lib.js: node_modules/s-expression/index.js
build/web/js/s-expression-lib.js: $(call NODE_MODULE,s-expression)/index.js
cp $< $@

build/web/js/colorspaces.js: node_modules/colorspaces/colorspaces.js
build/web/js/colorspaces.js: $(call NODE_MODULE,colorspaces)/colorspaces.js
cp $< $@

build/web/js/es6-shim.js: node_modules/es6-shim/es6-shim.min.js
build/web/js/es6-shim.js: $(call NODE_MODULE,es6-shim)/es6-shim.min.js
cp $< $@

build/web/js/seedrandom.js: node_modules/seedrandom/seedrandom.js
build/web/js/seedrandom.js: $(call NODE_MODULE,seedrandom)/seedrandom.js
cp $< $@

build/web/js/source-map.js: node_modules/source-map/dist/source-map.js
build/web/js/source-map.js: $(call NODE_MODULE,source-map)/dist/source-map.js
cp $< $@

build/web/js/url.js: node_modules/url.js/url.js
build/web/js/url.js: $(call NODE_MODULE,url.js)/url.js
cp $< $@

build/web/js/require.js: node_modules/requirejs/require.js
build/web/js/require.js: $(call NODE_MODULE,requirejs)/r.js
cp $< $@

build/web/js/codemirror.js: $(CM)/lib/codemirror.js
Expand Down Expand Up @@ -201,10 +237,10 @@ build/web/js/jump-to-line.js: $(CM)/addon/search/jump-to-line.js
build/web/js/pyret-mode.js: $(PYRET_MODE)/mode/pyret.js
cp $< $@

build/web/js/mousetrap.min.js: node_modules/mousetrap/mousetrap.min.js
build/web/js/mousetrap.min.js: $(call NODE_MODULE,mousetrap)/mousetrap.min.js
cp $< $@

build/web/js/mousetrap-global-bind.min.js: node_modules/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js
build/web/js/mousetrap-global-bind.min.js: $(call NODE_MODULE,mousetrap)/plugins/global-bind/mousetrap-global-bind.min.js
cp $< $@

MISC_JS = build/web/js/q.js \
Expand Down Expand Up @@ -265,11 +301,11 @@ EDITOR_MISC_JS = build/web/js/q.js \
build/web/js/authenticate-storage.js

build/web/js/editor-misc.min.js: $(EDITOR_MISC_JS)
npm exec -- uglifyjs --compress -o $@ -- $^
npx uglifyjs --compress -o $@ -- $^

MISC_IMG = build/web/img/pyret-icon.png build/web/img/pyret-logo.png build/web/img/pyret-spin.gif build/web/img/up-arrow.png build/web/img/down-arrow.png

build/web/img/%: node_modules/pyret-lang/img/%
build/web/img/%: $(PYRET)/img/%
cp $< $@

COPY_ARR := $(patsubst ./pyret/src/arr/trove/%.arr,build/web/arr/%.arr,$(wildcard ./pyret/src/arr/trove/*.arr))
Expand All @@ -285,6 +321,7 @@ WEBJS = build/web/js
WEBJSGOOG = build/web/js/google-apis
WEBCSS = build/web/css
WEBTHEMES = build/web/css/themes
WEBIMAGES = build/web/css/images
WEBFONTS = $(WEBCSS)/fonts
WEBIMG = build/web/img
WEBARR = build/web/arr
Expand All @@ -304,6 +341,9 @@ $(WEBJSGOOG):
$(WEBCSS):
@$(call MKDIR,$(WEBCSS))

$(WEBIMAGES):
@$(call MKDIR,$(WEBIMAGES))

$(WEBTHEMES):
@$(call MKDIR,$(WEBTHEMES))

Expand All @@ -316,13 +356,13 @@ $(WEBIMG):
$(WEBARR):
@$(call MKDIR,$(WEBARR))

web-local: $(WEB) $(WEBV) $(WEBJS) $(WEBJSGOOG) $(WEBCSS) $(WEBTHEMES) $(WEBFONTS) $(WEBIMG) $(WEBARR) $(OUT_HTML) $(COPY_HTML) $(OUT_CSS) $(COPY_CSS) $(COPY_THEMES) $(COPY_FONTS) $(COPY_JS) $(COPY_ARR) $(COPY_GIF) $(COPY_SVG) $(COPY_PNG) $(MISC_JS) $(MISC_CSS) $(MISC_IMG) $(COPY_NEW_CSS) $(COPY_NEW_JS) $(COPY_GOOGLE_JS) $(CPOMAIN) $(CPOGZ) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml
web-local: $(WEB) $(WEBV) $(WEBJS) $(WEBJSGOOG) $(WEBCSS) $(WEBTHEMES) $(WEBFONTS) $(WEBIMG) $(WEBIMAGES) $(WEBARR) $(OUT_HTML) $(COPY_HTML) $(OUT_CSS) $(COPY_CSS) $(COPY_LIB_CSS) $(COPY_THEMES) $(COPY_FONTS) $(COPY_JS) $(COPY_LIB_JS) $(COPY_LIB_IMAGES) $(COPY_ARR) $(COPY_GIF) $(COPY_SVG) $(COPY_PNG) $(MISC_JS) $(MISC_CSS) $(MISC_IMG) $(COPY_NEW_CSS) $(COPY_NEW_JS) $(COPY_GOOGLE_JS) $(CPOMAIN) $(CPOGZ) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml build/web/editor.html build/web/editor.embed.html

web: $(WEB) $(WEBV) $(WEBJS) $(WEBJSGOOG) $(WEBCSS) $(WEBTHEMES) $(WEBFONTS) $(WEBIMG) $(WEBARR) $(OUT_HTML) $(COPY_HTML) $(OUT_CSS) $(COPY_CSS) $(COPY_THEMES) $(COPY_FONTS) $(COPY_JS) $(COPY_ARR) $(COPY_GIF) $(COPY_SVG) $(COPY_PNG) $(MISC_JS) $(MISC_CSS) $(MISC_IMG) $(COPY_NEW_CSS) $(COPY_NEW_JS) $(COPY_GOOGLE_JS) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml
web: $(WEB) $(WEBV) $(WEBJS) $(WEBJSGOOG) $(WEBCSS) $(WEBTHEMES) $(WEBFONTS) $(WEBIMG) $(WEBIMAGES) $(WEBARR) $(OUT_HTML) $(COPY_HTML) $(OUT_CSS) $(COPY_CSS) $(COPY_LIB_CSS) $(COPY_THEMES) $(COPY_FONTS) $(COPY_JS) $(COPY_LIB_JS) $(COPY_LIB_IMAGES) $(COPY_ARR) $(COPY_GIF) $(COPY_SVG) $(COPY_PNG) $(MISC_JS) $(MISC_CSS) $(MISC_IMG) $(COPY_NEW_CSS) $(COPY_NEW_JS) $(COPY_GOOGLE_JS) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml build/web/editor.html build/web/editor.embed.html

link-pyret:
ln -s node_modules/pyret-lang pyret
(cd node_modules/pyret-lang && $(MAKE) phaseA-deps)
ln -s $(PYRET) pyret
(cd $(PYRET) && $(MAKE) phaseA-deps)

deploy-cpo-main: link-pyret $(CPOMAIN) $(CPOGZ)

Expand All @@ -337,7 +377,7 @@ libpyret:

$(BUNDLED_DEPS): src/scripts/npm-dependencies.js
# Explicitly exclude crypto, buffer, and stylus, nested npm dependencies that aren't needed
node_modules/.bin/browserify src/scripts/npm-dependencies.js -x crypto -x buffer -x stylus -o $(BUNDLED_DEPS)
npx browserify src/scripts/npm-dependencies.js -x crypto -x stylus -o $(BUNDLED_DEPS)

$(CPOMAIN): $(BUNDLED_DEPS) $(TROVE_JS) $(TROVE_ARR) $(WEBJS) src/web/js/*.js src/web/arr/*.arr cpo-standalone.js cpo-config.json src/web/arr/cpo-main.arr $(PHASEA)
mkdir -p compiled/;
Expand All @@ -358,7 +398,8 @@ $(CPOMAIN): $(BUNDLED_DEPS) $(TROVE_JS) $(TROVE_ARR) $(WEBJS) src/web/js/*.js sr
# NOTE(joe): Need to do .gz.js because Firefox doesn't like gzipped JS having a
# non-.js extension.
$(CPOGZ): $(CPOMAIN)
npm exec -- uglifyjs --compress -o $(CPOMAIN).min -- $(CPOMAIN)
cp $(CPOMAIN) $(CPOMAIN).js
npx uglifyjs --compress -o $(CPOMAIN).min -- $(CPOMAIN)
gzip -c -f $(CPOMAIN).min > $(CPOGZ)

clean:
Expand Down
85 changes: 7 additions & 78 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,84 +4,13 @@
"scripts": {
},
"env": {
"BASE_URL": {
"required": true
},
"BUILDPACK_URL": {
"required": true
},
"CLIENT_ID": {
"required": true
},
"CLIENT_SECRET": {
"required": true
},
"CSRF_TOKEN": {
"required": true
},
"CURRENT_PYRET_DOCS": {
"required": true
},
"CURRENT_PYRET_RELEASE": {
"required": true
},
"GIT_BRANCH": {
"required": true
},
"GIT_REV": {
"required": true
},
"google_api_key": {
"required": true
},
"GOOGLE_API_KEY": {
"required": true
},
"google_client_id": {
"required": true
},
"GOOGLE_CLIENT_ID": {
"required": true
},
"GOOGLE_CLIENT_SECRET": {
"required": true
},
"GOOGLE_SERVER_KEY": {
"required": true
},
"LOG_URL": {
"required": true
},
"NODE_ENV": {
"required": true
},
"OK_GOOGLE_IDS": {
"required": true
},
"PORT": {
"required": true
},
"PYRET": {
"required": true
},
"PYRET_BACKUP": {
"required": true
},
"PYRET_RELEASE_BASE": {
"required": true
},
"REDISCLOUD_CRIMSON_URL": {
"required": true
},
"REDISCLOUD_URL": {
"required": true
},
"SESSION_SECRET": {
"required": true
},
"USE_STANDALONE_PYRET": {
"required": true
}
"PYRET": "https://s3.amazonaws.com/pyret-horizon/on-raw-key/cpo-main.jarr.gz.js",
"REDISCLOUD_URL": "",
"GIT_BRANCH": "on-raw-key",
"GIT_REV": "on-raw-key-HEAD",
"PORT": "80",
"SESSION_SECRET": { "required": true },
"GOOGLE_CLIENT_ID": { "required": true }
},
"formation": {
"web": {
Expand Down
1 change: 1 addition & 0 deletions cpo-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"pyret-base/js/post-load-hooks": "pyret/build/phaseA/js/post-load-hooks.js",

"cpo/gdrive-locators": "src/web/js/gdrive-locators.js",
"cpo/file-locator": "src/web/js/file-locator.js",
"cpo/http-imports": "src/web/js/http-imports.js",
"cpo/guess-gas": "src/web/js/guess-gas.js",
"cpo/cpo-builtin-modules": "src/web/js/cpo-builtin-modules.js",
Expand Down
Loading