The initial functionality produced by UQAM in advance of this sprint can be found in the following VIVO and Vitro branches:
- VIVO : https://github.com/vivo-project/VIVO/tree/sprint-i18n-whitespace
- Vitro : https://github.com/vivo-project/Vitro/tree/sprint-i18n-whitespace
In addition to the functional changes in these branches, there are also extraneous whitespace updates. Unfortunately, for the sanity of VIVO developers now and in the future, we have a policy of disallowing pull-requests that include whitespace/reformatting changes mixed in with functional changes.
Actually, this may be an opportunity in disguise!
In advance of the sprint, it would be helpful if all team members were familiar with the Git processes that will be used during the sprint (forking, cloning, creating branches, pushing commits to GitHub, making pull-requests, etc). We also need to remove the extraneous whitespace updates in advance of the sprint. There are 21 updated files in the VIVO and Vitro branches above that need whitespace remediation. If we all take ~2 files, not only will the code be ready for the sprint, but everyone will have gone through the Git/GitHub processes that will be required during the sprint... win! win!
GitHub file cleaning process
- Fork the VIVO and Vitro projects into your personal GitHub accounts (this is done in GitHub)
- Clone the VIVO and Vitro projects from your personal forks
git clone https://github.com/<your-github-id>/VIVO.git git clone https://github.com/<your-github-id>/Vitro.git
- For whichever project contains the files you will be working (let's use 'VIVO' as the example), check out your own branch that is based on the sprint branch: 'sprint-i18n-whitespace'. It is recommended that you work on a branch that is based on the shared ('sprint-i18n-whitespace') branch so that you can continue to track updates from the team in 'sprint-i18n-whitespace' without having conflict with your current work.
cd VIVO git checkout -b my-whitespace origin/sprint-i18n-whitespace
- Remove the extraneous whitespace updates in the 'my-whitespace' branch for the files that you have generously agreed to fix
- Note: Do whatever makes sense to you. My process is to:
- Use the GitHub pre-pull-requests linked below to identify which lines have updates that need to be reverted
- Use the `master` branch of VIVO (or Vitro) to see the file that you are working on. Sometimes whitespace was added; other times removed; sometimes spaces were replaced by tabs or vice versa. You will want to view the `master` branch version of the file to know what your whitespace goal is.
git checkout master cp <your-file> <some-location-outside-of-your-git-project>
- Use your `my-whitespace` version of your file to actually work on
git checkout my-whitespace vi <your-file>
- As you are making updates, you can check to see your progress by viewing the "diff" between the file in your `my-whitespace` branch and the file in the `master` branch
# Let's say the file you are working on is "AddAttendeeRoleToPersonGenerator.java" git diff my-whitespace master -- api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAttendeeRoleToPersonGenerator.java
- Note: Do whatever makes sense to you. My process is to:
- Once you have removed all of the extraneous whitespace changes, commit your updates, and push to your personal GitHub fork
# See which files have been changed (hopefully only the ones you were working on) git status # Add the files to the upcoming commit git add . # Commit the changes locally git commit -m "Removed extraneous whitespace" # Push the commit to your personal GitHub fork git push origin my-whitespace:my-whitespace
- Now that you have an updated branch in your personal GitHub, you should submit a GitHub pull-request to the `sprint-i18n-whitespace` branch in the core VIVO or Vitro projects
- Celebrate! Success!
Scripts
If a pattern in the code is recognized, the following may be scripts may be useful, or provide inspiration:
sed -i 's/^[[:space:]]/ /' <file> sed -i 's/^\t/ /' <file>
File assignments
Each person has been allocated one "easy" file and one "hard" file ... except, Michel, who gets four "easies".
- Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java
- Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/fields/SelectListGeneratorVTwo.java
- Thanks Nicolas Dickner !
Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/BaseEditElementVTwo.java - all updates in this file can be reverted (vitro-pr143, & added RootUserPolicy.java)
VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddServiceProviderRoleToPersonGenerator.java (vivo-pr-154, & removed RootUserPolicy.java)
VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/visualization/utilities/CachingRDFServiceExecutor.java (vivo-pr-154)
VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/visualization/utilities/VisualizationCaches.java (vivo-pr-154)
Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/freemarker/TemplateProcessingHelper.java (vitro-pr-146)
Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/rdfservice/impl/jena/model/RDFServiceModel.java (vitro-pr-147)
- Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/dao/jena/JenaBaseDao.java
- Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/utils/dataGetter/SparqlQueryDataGetter.java
- VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddMemberRoleToPersonGenerator.java
- VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddClinicalRoleToPersonGenerator.java
VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOrganizerRoleToPersonGenerator.java (vivo-pr-151)
VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddPublicationToPersonGenerator.java (vivo-pr-153)
Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/rdfservice/impl/RDFServiceFactorySingle.java (vitro-pr-141)
Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/controller/freemarker/HomePageController.java (vitro-pr-144)
Vitro: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/services/shortview/FakeApplicationOntologyService.java (vitro-pr-145)
VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddAttendeeRoleToPersonGenerator.java (vivo-pr-155)
Maxence Gévaudan
- VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddOutreachProviderRoleToPersonGenerator.java
- VIVO: ./api/src/main/java/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddReviewerRoleToPersonGenerator.java