diff --git a/CONTRIBUTING_CENTRAL_DATA_MODEL.md b/CONTRIBUTING_CENTRAL_DATA_MODEL.md index 9dfbbab4..8f4e3020 100644 --- a/CONTRIBUTING_CENTRAL_DATA_MODEL.md +++ b/CONTRIBUTING_CENTRAL_DATA_MODEL.md @@ -8,7 +8,7 @@ to integrate your data model with the Central Data Model. ## Starting with the basics - Install all requirements and download the Libs project. [Here](WINDOWS_INSTALL.md) how to do it for windows. In order to maintain a good quality code, we will work in branches. New codes will need to pass quality standards before being accepted in the main branch. -- Check and follow our [coding style](PYGUIDE.md) +- Check and follow our [coding style](PYGUIDE.md). - Don’t forget to create unit tests and ensure that the old ones pass normally after your changes. - Imperative! Document your work using comments in the code and, if needed, adding text files with extended explanations. @@ -79,6 +79,81 @@ It is important to highlight that all setters and getters (@property) must have Once you finish doing your changes, you should commit and push them to your branch. The name of the new files will change from green to white. +## Requesting a merge to the main branch +### Add a plugin +First, it is required to install a plugin for such purpose. We recommend [GitLab Merge Requests](https://plugins.jetbrains.com/plugin/18689-gitlab-merge-requests), +but you are free to choose the one you prefer. In order to install the plug, be sure that you have the latest pycharm version. +Go to Help -> Check for Updates... It will ask you to Update the new version, click on Update and Restart and follow the instructions. + +![update pycharm](./docs/img_contributing/img_9.png) + +Don't forget to look in the bottom-right corner, there you always find the instructions, warnings, errors, announcements... + +![pycharm announcement](./docs/img_contributing/img_10.png) + +Once you updated pycharm, go to File -> Settings... -> Plugins and search for _GitLab Merge Request_ and press Install. + +![pycharm plugins](./docs/img_contributing/img_11.png) + +### Select the project +This step needs to be done only the first time. + +Once the plugin is installed, it will appear a new tab at the bottom list called Gitlab Merge Requests as in the image: + +![new tab](./docs/img_contributing/img_12.png) + +Click on _Clik to discover servers_ and select the gitlab.concordia.ca. + +![new server](./docs/img_contributing/img_13.png) + +Observe that in the top-right corner of the tab, the message has changed from _No Repository_ to _Repo: /Guille/libs_. + +![new repo](./docs/img_contributing/img_14.png) + +If you now click on Refresh Merge Request (see previous image), you will get a message asking for a token. As you don't have one yet, click on Create token. + +![create token](./docs/img_contributing/img_15.png) + +You will be sent to the gitlab repository to create a new token. Give a name to it and check all options. +You are creating a token that has the same permits as your gitlab account has. + +![create token in gitlab](./docs/img_contributing/img_16.png) + +A new personal access token will be created. Copy and paste it in the Access Token box. +A token is a personal and no-transferable key. Don't show it to anyone! + +![copy token](./docs/img_contributing/img_17.png) + +![paste token](./docs/img_contributing/img_18.png) + +### Create merge request +Every time you want to send some changes to the main branch (merge your branch to the main one) +you will need to follow these steps. + +Right clic on the blanc area and select + Create Merge Request. + +![new merge request](./docs/img_contributing/img_19.png) + +A window will appear with the information of the request: + +![request info](./docs/img_contributing/img_20.png) + +Clic on Assignees + and look for the project owner, in this case, Guillermo Gutierrez Morote. +Select him as assignee and clic OK. + +This action will send a request for the merge. Now wait until this is accepted or rejected. You will receive an email to +the email account you use for gitlab with the answer. + +Once the changes are accepted, go back to the main branch by selecting the Git tab (bottom-left). Right clic on Master and select Checkout. + +![checkout master](./docs/img_contributing/img_24.png) + +Now pull (blue arrow), and delete the branch. + +![erase branch](./docs/img_contributing/img_26.png) + +Now you have again the same version as in gitlab. For new changes, create a new branch and repeat the process. + ## Documentation and authoring There can be two types of authors, that one who created the model and that one who coded it. If they are not the same person, in the headers of the classes must be just the name of the coder, who is the reference person to ask anything about the code, diff --git a/docs/img_contributing/img_10.png b/docs/img_contributing/img_10.png new file mode 100644 index 00000000..178e3c0c Binary files /dev/null and b/docs/img_contributing/img_10.png differ diff --git a/docs/img_contributing/img_11.png b/docs/img_contributing/img_11.png new file mode 100644 index 00000000..8c3e23a6 Binary files /dev/null and b/docs/img_contributing/img_11.png differ diff --git a/docs/img_contributing/img_12.png b/docs/img_contributing/img_12.png new file mode 100644 index 00000000..e5942e8a Binary files /dev/null and b/docs/img_contributing/img_12.png differ diff --git a/docs/img_contributing/img_13.png b/docs/img_contributing/img_13.png new file mode 100644 index 00000000..93806566 Binary files /dev/null and b/docs/img_contributing/img_13.png differ diff --git a/docs/img_contributing/img_14.png b/docs/img_contributing/img_14.png new file mode 100644 index 00000000..a71f8949 Binary files /dev/null and b/docs/img_contributing/img_14.png differ diff --git a/docs/img_contributing/img_15.png b/docs/img_contributing/img_15.png new file mode 100644 index 00000000..b3c54f82 Binary files /dev/null and b/docs/img_contributing/img_15.png differ diff --git a/docs/img_contributing/img_16.png b/docs/img_contributing/img_16.png new file mode 100644 index 00000000..6ef018fa Binary files /dev/null and b/docs/img_contributing/img_16.png differ diff --git a/docs/img_contributing/img_17.png b/docs/img_contributing/img_17.png new file mode 100644 index 00000000..99730885 Binary files /dev/null and b/docs/img_contributing/img_17.png differ diff --git a/docs/img_contributing/img_18.png b/docs/img_contributing/img_18.png new file mode 100644 index 00000000..754344c4 Binary files /dev/null and b/docs/img_contributing/img_18.png differ diff --git a/docs/img_contributing/img_19.png b/docs/img_contributing/img_19.png new file mode 100644 index 00000000..7f890b96 Binary files /dev/null and b/docs/img_contributing/img_19.png differ diff --git a/docs/img_contributing/img_20.png b/docs/img_contributing/img_20.png new file mode 100644 index 00000000..ad0f6387 Binary files /dev/null and b/docs/img_contributing/img_20.png differ diff --git a/docs/img_contributing/img_21.png b/docs/img_contributing/img_21.png new file mode 100644 index 00000000..eb7a00b3 Binary files /dev/null and b/docs/img_contributing/img_21.png differ diff --git a/docs/img_contributing/img_22.png b/docs/img_contributing/img_22.png new file mode 100644 index 00000000..f69a6284 Binary files /dev/null and b/docs/img_contributing/img_22.png differ diff --git a/docs/img_contributing/img_23.png b/docs/img_contributing/img_23.png new file mode 100644 index 00000000..09c4b4d5 Binary files /dev/null and b/docs/img_contributing/img_23.png differ diff --git a/docs/img_contributing/img_24.png b/docs/img_contributing/img_24.png new file mode 100644 index 00000000..61967466 Binary files /dev/null and b/docs/img_contributing/img_24.png differ diff --git a/docs/img_contributing/img_25.png b/docs/img_contributing/img_25.png new file mode 100644 index 00000000..1f36df7d Binary files /dev/null and b/docs/img_contributing/img_25.png differ diff --git a/docs/img_contributing/img_26.png b/docs/img_contributing/img_26.png new file mode 100644 index 00000000..5b9ede84 Binary files /dev/null and b/docs/img_contributing/img_26.png differ diff --git a/docs/img_contributing/img_8.png b/docs/img_contributing/img_8.png new file mode 100644 index 00000000..63757b91 Binary files /dev/null and b/docs/img_contributing/img_8.png differ diff --git a/docs/img_contributing/img_9.png b/docs/img_contributing/img_9.png new file mode 100644 index 00000000..f0826f0e Binary files /dev/null and b/docs/img_contributing/img_9.png differ