# Changes between Version 18 and Version 19 of DRM4G/Development

Ignore:
Timestamp:
Dec 12, 2016 8:15:16 PM (5 years ago)
Comment:

--

### Legend:

Unmodified
 v18 [[br]] == Testing the DRM4G [[br]] == Testing the DRM4G == Once 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. '''''For other ways to install the DRM4G, you can check [[wiki:DRM4G/Installation|here]].''''' [[br]] === How to debug code === You have at your disposal a number of ways to check what could have gone wrong when something breaks. ---- '''''Via the DRM4G CLI''''' * All of the ''drm4g commands'' can be executed in debug mode by adding the option "'''--dbg'''". ---- '''''Via the logger''''' * If there has been any error, chances are that you can find the cause by looking at DRM4G's log files, found in "__$DRM4G_DIR/.drm4g/var__" * The DRM4G is divided into different parts, and each one of them has its own logger. * By default, the logger level is set to ''INFO'' for all of them. To see all of the log messages that the DRM4G can record, you'll have to modify the file "'''__$DRM4G_DIR/.drm4g/etc/logger.conf__'''" and change the level of the logger to "'''DEBUG'''" for each part that you wish to check. ---- '''''Via the job's logs''''' * In addition, all of the individual jobs submitted have their own log files. They can help you see in which phase did the program stop working. * They are grouped in folders by their job ID, every hundred jobs. They can be located in "__$DRM4G_DIR/.drm4g/var__". * The folders will look like this: "'''__000-099__'''", "'''__100-199__'''", ... * Another way to view them is to use the command drm4g job log  [[br]] == Testing the DRM4G == Once 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. Just in case you would like to try out different versions, we recommend you use a __virtual environment__ to test it. * [[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. Before you can install and try out your own version, you'll have to build your own package: * Open a terminal in the folder where your repository is located. * Run the command python setup.py sdist This will create a a distribution package under a folder called '''dist'''. === Installing your version in a virtual environment === Go to wherever you have your virtual environment, open a terminal and execute the following commands: {{{#!sh source bin/activate export DRM4G_DIR =$PWD/conf pip install path/to/drm4g/package }}} ^DRM4G_DIR is where the configuration files will be installed. More information [[wiki:DRM4G/Installation#OptionalEnvironmentVariables|here]].^ And that's it. Now you can use and test your own version of DRM4G.[[BR]] '''''For other ways to install the DRM4G, you can check [[wiki:DRM4G/Installation|here]].''''' === How to debug code === You have at your disposal a number of ways to check what could have gone wrong when something breaks. ---- '''''Via the DRM4G CLI''''' * All of the ''drm4g commands'' can be executed in debug mode by adding the option "'''--dbg'''". ---- '''''Via the logger''''' * If there has been any error, chances are that you can find the cause by looking at DRM4G's log files, found in "__$DRM4G_DIR/.drm4g/var__" * The DRM4G is divided into different parts, and each one of them has its own logger. * By default, the logger level is set to ''INFO'' for all of them. To see all of the log messages that the DRM4G can record, you'll have to modify the file "'''__$DRM4G_DIR/.drm4g/etc/logger.conf__'''" and change the level of the logger to "'''DEBUG'''" for each part that you wish to check. ---- '''''Via the job's logs''''' * In addition, all of the individual jobs submitted have their own log files. They can help you see in which phase did the program stop working. * They are grouped in folders by their job ID, every hundred jobs. They can be located in "__\$DRM4G_DIR/.drm4g/var__". * The folders will look like this: "'''__000-099__'''", "'''__100-199__'''", ... * Another way to view them is to use the command drm4g job log  [[br]] In this section you'll find the guidelines of how we tackle the development process. * A section has already been written specifying [#TestingtheDRM4G how to test the DRM4G]. As mentioned above, to us, our ''central'' repository will be a private one hosted by '''''!GitBucket''''', but in addition we have a second public one hosted in '''''!GitHub''''' to make the DRM4G accessible to anyone that might want to contribute to the project. git push -u origin }}} Something to remember then, is that when you've finished your work on the branch, you musn't forget to eliminate it from the remote repository. Something to remember then, is that when you've finished your work on the branch, you mustn't forget to eliminate it from the remote repository. {{{#!sh git branch -d #deletes the branch from your local repository