brown-ccv / behavioral-task-trials

all-in-one library for behavioral task trials
https://brown-ccv.github.io/behavioral-task-trials/index.html
0 stars 1 forks source link

Jspsych 7 upgrade #39

Closed benjamin-heasly closed 2 years ago

benjamin-heasly commented 2 years ago

Greetings @mirestrepo, @eldu, @hollandjg! Could I ask for another review on the way to upgrading honeycomb with jspsych 7?

This PR is intended to have no functional changes, but makes a few upgrades that came out of my local testing with honeycomb and jspsych 7. I found that the jspsych 7 upgrades went beyond the honeycomb repo itself, and into this repo as well. Once I made these changes locally, I was able to run through the honeycomb demo task using jspsych 7.

As a summary:

Changing from require() to import seemed invasive and I'm not sure what you think!

My reasoning was:

benjamin-heasly commented 2 years ago

Thanks @paulstey for kicking off the build, and @eldu for your feedback. I looked into the error it was putting up and I'll try to summarize what I saw / did.

The build was trying to run node app.js and failing on new import statements within app.js and other files. I tried adding babel to the build and running node app.js on the version compiled by babel, and this fixed the import error.

But even so, the same step later failed when jspsych 7 tried to access the window. I think this makes sense, if this app and jspsych are intended for browser use rather than via node directly. With this in mind I removed the node app.js step from the build. This allows the build to proceed to the Jest tests, which do run and pass.

I'm thinking the Jest tests are covering more than node app.js, and so maybe this is sufficient?

But I could be missing something and we really do want to run node app.js as part of the build. If so I could look into that further, and I might ask your advice on how to work around the window.

Thanks!

benjamin-heasly commented 2 years ago

Woo hoo! Thanks again. I'll go ahead and merge this and I'm excited to put all these pieces together...

benjamin-heasly commented 2 years ago

Hi @eldu and @mirestrepo -- it looks like the build on main is failing after this merge -- https://github.com/brown-ccv/behavioral-task-trials/actions/runs/2630492638

I took a look, I'm not sure but if I'm reading things correctly, this part of the build uses a GH_TOKEN secret, which maybe has elevated permissions compared to the default GITHUB_TOKEN (?) in order to push to main (?) and possibly this token has expired (?) since the last deploy 16 months ago.

Does that sound possible or familiar, and would you be able to check on this as an admin?

Thank you!

broarr commented 2 years ago

:tada: This PR is included in version 2.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

eldu commented 2 years ago

@benjamin-heasly

@broarr and @paulstey helped to update the GH_TOKEN and the deploy keys for the repo! Should be good to go now!