rascal icon indicating copy to clipboard operation
rascal copied to clipboard

Merges tutor code back into the rascal project

Open jurgenvinju opened this issue 1 year ago • 2 comments

  • used git-filter-repo to remove all unnecessary scaffolding from rascal-tutor, and rename its source folder to src/org/rascalmpl/tutor.
# cloned rascal-tutor from scratch
git clone [email protected]:usethesource/rascal-tutor.git
# this removed everthing from the project's history except this path:
git-filter-repo --path src/lang/rascal/tutor  
# this put the code back into the original folder in the rascal project (src/org/rascalmpl/tutor)
git-filter-repo --path src/lang/rascal/tutor --path-rename src/lang/rascal/tutor:/src/org/rascalmpl/tutor/lang/rascal/tutor 
# remove all the tags locally
git tag --delete $(git tag --list)
# remove all the branches locally (except the main branch and possibly a current branch marked with *)
git branch remove $(git branch --list | grep -v "^\*" | grep -v "main")
# then switch to the rascal project
cd ../rascal
git checkout -b adopt-tutor
# add the clean project as a remote
git remote add -f tutor-baby ../rascal-tutor
# merge the code into this branch
git merge tutor-baby/main --no-ff --allow-unrelated-histories

The goal is to:

  • [x] move the selenium dependent code to rascal-maven-plugin as a service
  • [x] load this service via dependency injection into the tutor repl executor
  • [x] make sure the tutor's tests are executed by the rascal project as well
  • [x] make sure the rascal-maven-plugin can work without a dependency on the old rascal-tutor project
  • [x] remove the rascal-tutor from the website
  • [x] make sure the rascal-tutor documentation is added to the Rascal documentation

jurgenvinju avatar Jul 16 '24 16:07 jurgenvinju

See https://github.com/usethesource/rascal-maven-plugin/pull/22 for the use of these changes in the rascal-maven-plugin project, which now depends on selenium to make the screenshots.

jurgenvinju avatar Jul 16 '24 19:07 jurgenvinju

See https://github.com/usethesource/rascal-website/pull/58 for the addition of the tutor's documentation to the website.

jurgenvinju avatar Jul 16 '24 19:07 jurgenvinju

Codecov Report

Attention: Patch coverage is 0% with 165 lines in your changes missing coverage. Please review.

Project coverage is 50%. Comparing base (27c2891) to head (39a03ee). Report is 150 commits behind head on main.

Files with missing lines Patch % Lines
...r/lang/rascal/tutor/repl/TutorCommandExecutor.java 0% 113 Missing :warning:
...rascal/tutor/repl/TutorCommandExecutorCreator.java 0% 26 Missing :warning:
...tutor/lang/rascal/tutor/repl/TutorIDEServices.java 0% 13 Missing :warning:
...pl/tutor/lang/rascal/tutor/questions/Feedback.java 0% 10 Missing :warning:
...g/rascalmpl/repl/rascal/RascalInterpreterREPL.java 0% 3 Missing :warning:
Additional details and impacted files
@@           Coverage Diff            @@
##              main   #2001    +/-   ##
========================================
  Coverage       49%     50%            
+ Complexity    6251    6248     -3     
========================================
  Files          675     677     +2     
  Lines        59270   58995   -275     
  Branches      8642    8617    -25     
========================================
- Hits         29579   29575     -4     
+ Misses       27458   27185   -273     
- Partials      2233    2235     +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 29 '25 14:01 codecov[bot]