Skip to content

CropME contributing workflow

cyrillemidingoyi edited this page Dec 1, 2018 · 46 revisions

Contributors are invited to follow the process below to interact with the project and allows an effective collaboration work. The following steps are common to the contribution to any CropME repository.

For more information on github project contribution, please see Rob Allen’s article

You have to fork any CropME repository to obtain its copy in your github account. After accessing to CropME Github project , select one repository and just click on “Fork” button in Github. You click on “clone and download” button on your github account and copy the SSH clone URL, and you clone it by this command:

git clone SSH_Clone_URL

You change SSH_Clone_URL by the copied link.

You need to synchronize the local copy with the original project to allow the update of local copy:

git remote add upstream SSH_Clone_URL

with SSH_Clone_URL the SSH Clone URL of the main repository

It is recommended to create a new branch to put each part of your work. Before creating it, be sure that you have all the upstream changes (main github project) from the origin master:

git checkout master (to branch on master)

git pull upstream master (to synchronize with the main project)

To create a new branch and access to it:

git checkout -b new_branch

You select the repository in which you want to contribute. For example, if you want to update CropML DTD, you choose CropML repository and add its update:

git add modelunit.dtd

Write a commit message:

git commit -m “commit message”

To update your branch in your fork repository:

git push origin name_branch

Sometimes this step can generate an error message. This is when there is a difference between the remote and the local repository. To address this, pull the latest changes before updating:

git pull origin name_branch

After pushing your changes on your Github fork, you send a pull request by clicking “New Pull Request” button in your account. This allows AMEI team to review your change and discuss together on the potential changes before pushing them on the main repository. You select the reviewers in the right of he page and write some comments to explain your changes or contribution

This part is very important. The faster the team reacts the faster the branches will be merged with the master branch and the work will evolve. After a member requests some feedbacks, you click on the request in the main project and add some comments about it.

If the changes are not reviewed and merged on the main repository, it won’t be possible to pull from the main repository. But we need to check out a new branch and test the changes (model unit added for eg) to review or make some process from your local repository:

git checkout -b username-newbranch master

git pull https://github.com/username/xml_representation.git newbranch

Make issues by clicking on “New Issue” in the main project to share any problems, tasks or future work that we are required to think about. This can be for:

  • Bug
  • Enhancement
  • Help
  • Question
  • Future work

The project benefits from the possibilities offered by the github platform for the collaborative writing of online documentation, the automatic generation of parts of the document and its regular update allowing a good integration in the process of development of the project. To contribute on CropML documentation, you are invited to update the files contained in "doc" directory.

  • index.rst file contains the table of contents of Crop2ML documentation. It can be modified by deleting or inserting other titles and referencing it by the relative path of the file that describes the content of the title ( eg: “<user/name_of_the_file.rst>. The “doc” document contains all these files.
  • overview file: describes the definition of Crop2ML and the motivation of the project
  • description file: describe the features of CropML structure and is intended to be the technical document of Crop2ML;
  • usecase file: is used to provide the description of model contained in the project repository.
  • publication file: to share all publications related to the project.

These files are written in reStructured Text (rst) markup language. For information about this language, please visit this site http://gdrcorelec.ups-tlse.fr/files/Sphinx/build/html/rst.html