Jump to content

Taxonomy Maintenance: Difference between revisions

No edit summary
Line 14: Line 14:
If you are a UX designer or developper, you can contribute to build it: http://openfoodfacts.github.io/taxonomy-editor/, or report bug and feature requests as a simple user.
If you are a UX designer or developper, you can contribute to build it: http://openfoodfacts.github.io/taxonomy-editor/, or report bug and feature requests as a simple user.


== GitHub ==
== Edit the taxonomy directly on GitHub ==
The most complicated way goes through Github. This option is only for those that are familiar with computers, downloading applications and editing large files.
The most complicated way goes through GitHub. This option is only for those that are familiar with computers, downloading applications and editing large files.


=== Installing GitHub Desktop ===
=== Installing GitHub Desktop ===
Line 23: Line 23:


=== Forking and branching ===
=== Forking and branching ===
For those that are new to Github and collaborative editing, I'll start with some basics. First you need to make a copy of the OFF repository (all the code, taxonomies and documentation). This is called forking. You will be working on your own copy. To do this forking look for the command '''Clone Repository''' in the client. When you want make a set of changes you first need to make a copy of your local repository (called main branch). You will edit this copy. The client will ask you to name this branch. Please add your handle (Github/Slack) to that name, so we can identify you easily. And add a description to that name, such as greekTranslations, newLabels. Thus the branch name will be something like '''myhandle-someTranslations'''. Now you are setup to start editing.
* For those that are new to Github and collaborative editing, I'll start with some basics.  
* First you need to make a copy of the Open Food Facts repository (all the code, taxonomies and documentation). This is called forking.  
* You will be working on your own copy, no mistakes with consequence are possible. To do this forking look for the command '''Clone Repository''' in the client.  
* When you want make a set of changes you first need to make a copy of your local repository (called main branch). You will edit this copy.  
* The client will ask you to name this branch. Please add your username/handle (Github/Slack) to that name, so we can identify you easily. And add a description to that name, such as greekTranslations_by_teolemon, newLabels_by_aleene. Thus the branch name will be something like '''myhandle-someTranslations'''. Now you are setup to start editing.


=== Editing ===
=== Editing ===
=== Pull request ===
=== Pull request ===
After making your changes and pushing them to your fork on Github, it is time to ask them to move them to the OFF-system. However before you do this, pull the latest official version into your branch and check for conflicts (see further).
* After making your changes and pushing them to your fork on Github, it is time to ask them to move them to the Open Food Facts system. However before you do this, pull the latest official version into your branch and check for conflicts (see further).
 
* For this you have to create a [https://github.com/openfoodfacts/openfoodfacts-server/pulls Pull Request]. The command for this is in your Github-client.
For this you have to create a [https://github.com/openfoodfacts/openfoodfacts-server/pulls Pull Request]. The command for this is in your Github-client.
* In creating a pull request you have to define a title (prefix with '''chore:''')and a description with why and what you changed.  
 
* After submitting your request the system will check the changes you made in order to make sure that they do not break things. If the suggested change does break some things, the team help you to get things resolved. Sometimes a suggested change might imply a change on the (break) testing.
In creating a pull request you have to define a title (prefix with '''chore:''')and a description with why and what you changed.  
* Somebody from the team will have a look at your changes to make sure they are fit for purpose. A team member can make some suggestions or accept the change right away. If a suggestion implies that you have to change something: do the edit in your client, push the changes to your fork and the testing process will restart.
 
* You might encounter the warning that there are conflicts. This happens when someone has changed the file you were working on while you were working on it. The system is then confused as it no longer knows which changes it should use. To prevent this you can pull the latest official version to your Github-client. Then you can resolve it on your side. If you are lost here (very easy), let someone from the team help you.
After submitting your request the system will check the changes you made in order to make sure that they do not break things. If the suggested change does break some things, the team help you to get things resolved. Sometimes a suggested change might imply a change on the (break) testing.
* After you changes have been accepted and the pull request is closed by OFF, throw away the branch on your side. Try to start each new edit-session with a new branch.
 
Somebody from the team will have a look at your changes to make sure they are fit for purpose. A team member can make some suggestions or accept the change right away. If a suggestion implies that you have to change something: do the edit in your client, push the changes to your fork and the testing process will restart.
 
You might encounter the warning that there are conflicts. This happens when someone has changed the file you were working on while you were working on it. The system is then confused as it no longer knows which changes it should use. To prevent this you can pull the latest official version to your Github-client. Then you can resolve it on your side. If you are lost here (very easy), let someone from the team help you.
 
After you changes have been accepted and the pull request is closed by OFF, throw away the branch on your side. Try to start each new edit-session with a new branch.


== Testing ==
== Testing ==