about summary refs log tree commit diff stats
path: root/tests
Commit message (Expand)AuthorAgeFilesLines
* test_py2_compat: Test f-string detectiontoonn2022-02-051-0/+25
* Trying to ban f-stringstoonn2022-02-051-0/+8
* Revert "manpage_completion_test: Drop disappeared Pylint options"toonn2022-02-051-0/+1
* test_py2_compat: Message was renamed to MessageTesttoonn2022-02-051-7/+7
* manpage_completion_test: Drop disappeared Pylint optionstoonn2022-02-051-1/+0
* tests: Ignore encoding in manpage testtoonn2021-08-271-3/+2
* tests: Pylint complains about open and literalstoonn2021-08-271-2/+4
* test_py2_compat: Test the new with-statement checktoonn2021-08-081-0/+26
* py2_compat: Fix formatting for PEP8toonn2021-08-081-3/+3
* py2_compat: Added check for with Popentoonn2021-08-081-1/+19
* tests.manpage_completion: Use withtoonn2021-07-201-1/+2
* Fix test_py2_compat formattingtoonn2020-11-111-0/+1
* Shortcut py2 incompatible pytest teststoonn2020-11-111-0/+11
* Apply some PEP8 love to the pylint module and teststoonn2020-07-052-20/+17
* Implement python 2 compatibility checkstoonn2020-07-053-0/+287
* Refactor the bookmark validation codeWojciech Siewierski2019-01-271-2/+7
* Make it easier to test bookmarks by optionally disabling validationWojciech Siewierski2019-01-271-2/+2
* updated original filenameJon Erling Hustadnes2018-12-181-1/+1
* corrected for python 2.7Jon Erling Hustadnes2018-12-171-3/+3
* Added check if bookmark file is a symlink.Jon Erling Hustadnes2018-12-171-0/+17
* Implemented unit test for recent fixtau32018-02-152-0/+18
* attempt to fix CIhut2018-01-281-0/+2
* fix testshut2018-01-281-4/+5
* added test script that checks for man page completenesshut2018-01-261-0/+54
* container.fsobject: Fix natural sortnfnty2017-01-241-4/+23
* Python 3 division: Import `division` from `__future__`nfnty2017-01-213-3/+3
* linting: Python 2 compat: Import from `__future__`nfnty2017-01-173-0/+6
* linting: pylint and flake8nfnty2017-01-173-54/+54
* Fix misspellingsstepshal2016-06-262-2/+2
* Remove whitespace in blank linesstepshal2016-06-191-2/+2
* Merge branch 'E301' of https://github.com/stepshal/rangerhut2016-06-181-0/+2
|\
| * Add one blank line where is expectedstepshal2016-06-161-0/+2
* | Add two blank lines where is expectedstepshal2016-06-162-0/+2
|/
* Make exactly one space after commastepshal2016-06-061-1/+1
* test_fsobject: fix syntax errorhut2016-03-251-2/+2
* Remove accidental prints for debugginglverweijen2016-03-221-4/+0
* Make natural_sort's behaviour better definedlverweijen2016-03-081-0/+38
* container.history: fixed rebase() unit testhut2016-02-281-3/+4
* bookmarks: add testLaurent Charignon2016-01-311-0/+52
* history: fix logic error and add test for all the methodsLaurent Charignon2016-01-311-2/+96
* tests: add a dummy pytest test and add it to the make test stepLaurent Charignon2016-01-314-0/+5
href='#n76'>76 77 78 79 80 81 82 83 84 85
86
87
88
89
90
91
92
93
94
95











                                                                          
                                                    






                                                                  
                      

                                                                       
                                                            

 













                                               















                                                            
                                    
                           
                               
 

                                                                      

                                                                              
                                                                      

                            






                                                                 
                                                                       









                                                                      






                 
                             
                                                 
                                     
Guidelines on Code Modification
===============================

Coding Style
------------

* Use syntax compatible to both python 2.6 and 3.1.
* Use docstrings with pydoc in mind
* Follow the style guide for python code:
    http://www.python.org/dev/peps/pep-0008/
* Although this guide suggests otherwise, tabs are used for indentation
    of code and docstrings.  In other documents (readme, etc), use spaces.
* Test the code with unit tests where it makes sense


Patches
-------

Send patches, created with "git format-patch", to the email adress

    romanz@lavabit.com

If you plan to do major changes, or many changes over time, I encourage
you to create a fork on GitHub, Gitorious or any other site.


Starting Points
---------------

Good places to read about ranger internals are:
ranger/core/actions.py
ranger/core/environment.py
ranger/fsobject/fsobject.py

About the UI:
ranger/gui/widgets/browsercolumn.py
ranger/gui/widgets/browserview.py
ranger/gui/defaultui.py


Common Changes
--------------

* Change which files are previewed in the auto preview:
In ranger/gui/widget/browsercolumn.py
the constant PREVIEW_BLACKLIST

* Adding options:
In ranger/defaults/options.py
add the default value, like: my_option = True
In ranger/shared/settings.py
add the name of your option to the constant ALLOWED_SETTINGS

The setting is now accessible at self.settings.my_option,
assuming <self> is a "SettingsAware" object.

* Changing commands, adding aliases:
ranger/defaults/commands.py
or ~/.config/ranger/commands.py

* Adding colorschemes:
Copy ranger/colorschemes/default.py to ranger/colorschemes/myscheme.py
and modify it according to your needs.  Alternatively, mimic the jungle
colorscheme.  It subclasses the default scheme and just modifies a few things.
In ranger/defaults/options.py (or ~/.config/ranger/options.py), change
    colorscheme = 'default'
to: colorscheme = 'myscheme'

* Change which files are considered to be "hidden":
In ranger/defaults/options.py
change the hidden_filter regular expression.

* Change the key map:
Modify ranger/defaults/keys.py.  This should be self-explanatory.
Check out ranger/core/actions.py for the most common actions, of course
you can also use your own functions.

* Change the file type => application associations:
In ranger/defaults/apps.py
modify the method app_default.
The variable "f" is a filesystem-object with attributes like mimetype,
extension, etc.  For a full list, check ranger/fsobject/fsobject.py

* Change the file extension => mime type associations:
Modify ranger/data/mime.types


Version Numbering
-----------------

X.Y.Z, where:

* X: Major version, milestone
* Y: Minor version, even number => stable version
* Z: Revision, may be omitted if zero