Changes between Version 1 and Version 2 of drm4gDevelopment


Ignore:
Timestamp:
Nov 17, 2016 7:26:54 PM (6 years ago)
Author:
minondoa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • drm4gDevelopment

    v1 v2  
    22The aim of this section will be to explain how to contribute to the development of the DRM4G.
    33
     4
     5To make it easier and more accessible for anyone to play around with the DRM4G, we have decided to host our source code on **!GitHub**.
     6{{{#!comment
     7it has been uploaded to !GitHub.
     8}}}
     9 You can find the project [[https://github.com/SantanderMetGroup/DRM4G|here]].
     10
     11
     12== Necessary Steps ==
     13For those of you who wish to help but don't know how, the  first thing you need is a [[https://github.com/join?source=header-home|GitHub account]].
     14
     15Go to our projects page.[[BR]]
     16Hit the fork button at the top right side --image of fork button--[[BR]]
     17
     18There are a lot of tutorials showing how to use git, including [[wiki:versionControl/git|our own]], but here is a more specific one, a simple step by step explanation on how to start using it to help us improve DRM4G.
     19
     20In Linux:
     21* Open a terminal on the folder in which you wish your local copy of the repository to be stored (it's recommended to use an empty folder)
     22* git init
     23* git remote add origin <your_repository_url>
     24 * you can get the url by clicking on the "Clone or download" button
     25  * it will look something like this: .....
     26* git remote add origin <your_repository_url>
     27* git pull origin master
     28
     29With this, you will now have DRM4G's source code at your disposal.
     30
     31
     32From here you could create branches for every new feature you'd like to include to the DRM4G, for a more in depth tutorial on how to do that, click [[https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging|here]].
     33
     34
     35
     36== Testing the DRM4G
     37Once you've made the changes you wanted to, you'll want to install your version to be sure that your new feature is working properly.
     38
     39Just in case you would like to try out different versions, we recommend you use a __virtual environment__ to test it.
     40
     41 * [[http://pythoncentral.io/how-to-install-virtualenv-python/|Here]] you can find a tutorial on how to install a virtual environment, or you can look for one on your own.
     42
     43Before you can install and try out your own version, you'll have to build your own package:
     44* Open a terminal in the folder where your repository is located.
     45* Run the command `python setup.py sdist`
     46
     47This will create a a distribution package under a folder called '''dist'''.
     48
     49
     50=== Installing your version in a virtual environment ===
     51
     52Go to wherever you have your virtual environment, open a terminal and execute the following commands:
     53
     54{{{#!sh
     55source bin/activate
     56export DRM4G_DIR = $PWD/conf
     57pip install path/to/drm4g/package
     58}}}
     59 ^DRM4G_DIR is where the configuration files will be installed. More information [[wiki:DRM4G/Installation#OptionalEnvironmentVariables|here]].^
     60
     61And that's it. Now you can use and test your own version of DRM4G.[[BR]]
     62
     63'''''For other ways to install the DRM4G, you can check [[wiki:DRM4G/Installation|here]].'''''
     64
     65
     66
     67== Commiting changes
     68
     69After you've tested that everything is in working order it's time to update your !GitHub fork.
     70
     71{{{#!sh
     72git add .
     73git commit -m "Description of the changes you've made"
     74git push -u origin master #just the first time, the following times just run "git push origin master"
     75}}}
     76
     77From here you'll have to create a '''Pull request'''.
     78
     79
     80== Creating a Pull Request ==
     81
     82###########First you should update and check that there are no conflicts############
     83
     84Go to your repository page on github
     85
     86{{{#!comment
     87From your project repository
     88For more information on how to use git
     89}}}