Create new experiment from existing file

URL of experiment: https://run.pavlovia.org/ClareSutherland/conformityexperiments/html

Description of the problem: I updated an experiment by saving a new copy (from the Builder) as I’d made substantial changes. I’d like to assign this new experiment to a different project - but I can’t see how to do this either through the Builder or through Pavlovia. It just keeps syncing to the old project file, which now has two experiments in it.

Essentially, how do you upload an existing Builder file as a new experiment?

1 Like

Alternatively, if I create a new project on github, how do I upload the new builder file so it syncs to this new project?

In principle I think this should be done by forking or cloning the online project but I’d like a step by step guide…for example so I can ask a student to make a copy of my experiment so that they can make their own edits without affecting the original while still showing the history of where it came from.

Pretty please @jon ?

The main issue you’ve got @ClareSutherland is that the project is the entire folder not just an experiment file - that’s how it takes all its associated stimulus and analysis files etc with it.

3 options I can think of below, in order of difficulty. The first is easiest but loses the history of the project (deleting the git history deliberately to

  1. create a new copy locally and upload (losing history of the project):

    • copy the entire folder to a new one
    • go to that folder and delete the .git folder inside it (you might need to turn on viewing of hidden files to see it there). That contains the history of the project but it’s also how PsychoPy detects the Pavlovia project to sync with
    • now when you sync in PsychoPy it will ask to upload to a new project
  2. Use git commands to remove the pointer to Pavlovia (if you want to keep the history)

    • as above, create a new copy of the entire folder
    • in the terminal (or command line on windows) you can execute this (but you might need to find the location of git.exe in the PsychoPy3 folder if it isn’t on the path): git remote rm origin
    • that should have killed the pointer to Pavlovia and now when you do sync again inside PsychoPy it will hopefully ask to create a project again
  3. create a new fork on Pavlovia. This would normally be fine between different users but Pavlovia expects forks between users not for the same user so we have some hoops

    • create a group in gitlab.pavlovia.org (essentially like a new user)
    • go to your project in gitlab.pavlovia.org and press the fork button (top right) to fork your project to your new group
    • go to your newly forked project and into the Settings>Advanced>TransferProject and transfer it back to yourself as a user!
5 Likes

Thanks Jon! I used option number 1, and also deleted the folders on the Pavlovia side of things, then reuploaded the whole thing and it works fine now.

It would be great if there was an easier way to do this though. I quite often end up with iterations of the same experiment (e.g. different parameters being changed, etc) and also like to save major changes as different files in case I break something.

Yes, agreed. There are several things we should simplify in the PsychoPy interface for interacting with Pavlovia. One is move-to-a-new-project, another is delete-history-but-keep-files. We’ll be having big feature-development drive in the new year and hopefully this will get done then

I am trying to follow jon’s third suggestion for forking the experiment. I was unable to transfer the project back to myself because the name was the same (I was unable to rename it). I ended up downloading the zip file of the experiment from my group. It’s now in my downloads folder however it has the same name and previous data of the original experiment. If I rename it or delete this data, will it mess up the original copy? Is there a better way to copy the experiment without losing the data of the original version? Ideally, I would like to have four versions running at once

Can you rename the project in Gitlab before forking back to your main account?

If you delete the local git folder and data before syncing you will end up with a new repository online without changing the old one.