diff --git a/.gitattributes b/.gitattributes index 638991a41..666caaabf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ demos/ParticleEffectDemo_Mac.zip filter=lfs diff=lfs merge=lfs -text +demos/ParticleEffectDemo_Win.zip filter=lfs diff=lfs merge=lfs -text demos/ThrowOptimizerDemo_Win.zip filter=lfs diff=lfs merge=lfs -text +demos/YannyLaurelDemo_Win.zip filter=lfs diff=lfs merge=lfs -text diff --git a/demos/ParticleEffectDemo_Win.zip b/demos/ParticleEffectDemo_Win.zip new file mode 100644 index 000000000..c8b7a8938 --- /dev/null +++ b/demos/ParticleEffectDemo_Win.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6256ecff402c38e26311d14374deebe81f49d09ef471857a807abc05d71a939f +size 24895930 diff --git a/demos/Readme.md b/demos/Readme.md index 9a6808a35..1a220e41d 100644 --- a/demos/Readme.md +++ b/demos/Readme.md @@ -2,7 +2,7 @@ This directory contains the source files for AEPsych's Docusaurus website demos. See the website's [README](../website/README.md) for additional information on how to build and start the website locally. -### Adding New Demos +# Adding New Demos To add a new demo to your project, follow these steps: @@ -31,7 +31,9 @@ Replace VIDEO_URL_HERE with the URL of the video asset. You can host the video o 2) Wait for the video to finish loading. 3) Once the video is fully loaded, it will provide an asset URL. You don't need to hit the "submit" button. -### Adding .zip file assets +**Note**: Video must be less than 100MB. + +## Adding .zip file assets 1) Add the necessary zip files for both Mac and Windows versions of the demo. Place the zip files in the `demos/` directory to ensure they are accessible for the demo parsing function. Follow the naming convention `_Win.zip` and `_Mac.zip`. Your file structure should look like this: @@ -42,6 +44,56 @@ demos-| |- ParticleEffectDemo_Mac.zip |- ParticleEffectDemo_Win.zip ``` +**Note**: If the size of the demo file is larger than 25MB, it is recommended to push the file to Git Large File Storage (LFS). + +By following this structured approach, you create an organized repository that facilitates efficient access to the demo files. + +Employing Git LFS to track large files is essential for maintaining a lightweight repository and preventing large binary files from inflating the version control history. + +**Docs**: [Git LFS Documentation](https://git-lfs.com/) + +### Git LFS Workflow: + +To seamlessly integrate the zip files while utilizing Git LFS, adhere to the following workflow: + +1. **Open Terminal and Navigate to Repository**: +Open your terminal and navigate to the root directory of your AEPsych repository. + +2. **Initialize Git LFS**: +Use the following command to initialize Git LFS in your repository: +```sh +git lfs install +``` +### Configure `.gitattributes`: + +Add the file name to the `.gitattributes` file located in the root directory. Utilize the following syntax to specify that the file should be tracked using Git LFS: + +```sh +demos/ParticleEffectDemo.md filter=lfs diff=lfs merge=lfs -text +``` + +### Check Staging Status: +View the status of items staged for commit using: +```sh +git lfs status +``` +### Track the File: +Employ the following command to begin tracking the demo file using Git LFS: +```sh +git lfs track demos/ParticleEffectDemo.md +``` +### List Tracked Files: +To observe all files being tracked by Git LFS, run: +```sh +git lfs ls-files +``` +### Stage and Commit Changes to git: +```sh +git add . +git commit -m "Add large files using Git LFS" +``` +## Update the website Navigation + 2) Update the `demo.json` file located in `website/demo.json`. This file contains the configuration for all demos in the `demos/` directory. The title here is used to render the title of the demo on the demoSidebar component. Add a new demo object to represent the newly added demo: @@ -54,7 +106,8 @@ Add a new demo object to represent the newly added demo: Ensure that the "id" matches the name of the Markdown file (without the file extension) and corresponds to the names of the zip files. -#### Modifying Demo Text + +### Modifying Demo Text To add or modify the text associated with a specific demo, follow these steps: Locate the Markdown file corresponding to the demo you wish to modify, e.g., `demos/markdown/ParticleEffectDemo.md`. diff --git a/demos/YannyLaurelDemo_Win.zip b/demos/YannyLaurelDemo_Win.zip new file mode 100644 index 000000000..b68753f06 --- /dev/null +++ b/demos/YannyLaurelDemo_Win.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce97ff4a1e83860e86db465d86f9616944a8c3a01116005e8c1a9df9783eee28 +size 24835025 diff --git a/demos/markdown/ParticleEffectDemo.md b/demos/markdown/ParticleEffectDemo.md index 14b5f6996..01935bef0 100644 --- a/demos/markdown/ParticleEffectDemo.md +++ b/demos/markdown/ParticleEffectDemo.md @@ -30,7 +30,3 @@ Start your local AEPsych server Open the extracted archive directory, double click the ‘aepsych_unity.exe’ application **Download** - -[ParticleEffectDemo_Win.zip](https://github.com/facebookresearch/aepsych/files/12034005/ParticleEffectDemo_Win.zip) - -[ParticleEffectDemo_Mac.zip](https://github.com/facebookresearch/aepsych/blob/main/demos/ParticleEffectDemo_Mac.zip) diff --git a/demos/markdown/ThrowOptimizerDemo.md b/demos/markdown/ThrowOptimizerDemo.md index 6ef281686..848db3031 100644 --- a/demos/markdown/ThrowOptimizerDemo.md +++ b/demos/markdown/ThrowOptimizerDemo.md @@ -28,5 +28,3 @@ Windows OS, Oculus Quest/Quest 2 connected via link cable, and a local AEPsych s 6. Don your headset and follow the on-screen instructions **Download** - -[ThrowOptimizerDemo_Win.zip](https://github.com/facebookresearch/aepsych/raw/main/demos/ThrowOptimizerDemo_Win.zip) diff --git a/demos/markdown/YannyLaurelDemo.md b/demos/markdown/YannyLaurelDemo.md index 544fb7251..8a250b214 100644 --- a/demos/markdown/YannyLaurelDemo.md +++ b/demos/markdown/YannyLaurelDemo.md @@ -21,5 +21,3 @@ Windows and a local installation of the AEPsych server. **Download** - -[YannyLaurelDemo_Win.zip](https://github.com/facebookresearch/aepsych/files/12033979/YannyLaurelDemo_Win.zip) diff --git a/website/_demos/ParticleEffectDemo.html b/website/_demos/ParticleEffectDemo.html index 83c48d14c..3e2b943fe 100644 --- a/website/_demos/ParticleEffectDemo.html +++ b/website/_demos/ParticleEffectDemo.html @@ -22,7 +22,18 @@

Particle Effect Demo + + + Download Win Demo + + + + Download Mac Demo + + + - \ No newline at end of file diff --git a/website/_demos/ThrowOptimizerDemo.html b/website/_demos/ThrowOptimizerDemo.html index b561abcf8..5e915c94c 100644 --- a/website/_demos/ThrowOptimizerDemo.html +++ b/website/_demos/ThrowOptimizerDemo.html @@ -25,7 +25,14 @@

VR Throw Optimizer DemoOpen the extracted archive directory, double click the ‘Throw Optimizer.exe’ application
  • Don your headset and follow the on-screen instructions
  • +

    Download

    +
    + - \ No newline at end of file diff --git a/website/_demos/YannyLaurelDemo.html b/website/_demos/YannyLaurelDemo.html index 3c24e0e3b..7f9676db1 100644 --- a/website/_demos/YannyLaurelDemo.html +++ b/website/_demos/YannyLaurelDemo.html @@ -20,7 +20,14 @@
  • Start your local AEPsych server
  • Open the extracted archive directory, double click the ‘aepsych_unity.exe’ application
  • +

    Download

    + + - \ No newline at end of file diff --git a/website/package.json b/website/package.json index e5b55d651..60a0b485d 100644 --- a/website/package.json +++ b/website/package.json @@ -1,4 +1,7 @@ { + "name": "aepsych", + "version": "1.0.0", + "license": "CC BY-NC 4.0", "scripts": { "examples": "docusaurus-examples", "start": "docusaurus-start",