Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: README.md

Issue 29849585: Issue 6835 - Add R support to python-abp (Closed)
Left Patch Set: Refactored tests Created Aug. 9, 2018, 12:53 p.m.
Right Patch Set: Fixed consistency issues in README.md Created Aug. 31, 2018, 10:17 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | abp/filters/rpy.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 # python-abp 1 # python-abp
2 2
3 This repository contains a library for working with Adblock Plus filter lists 3 This repository contains a library for working with Adblock Plus filter lists
4 and the script that is used for building Adblock Plus filter lists from the 4 and the script that is used for building Adblock Plus filter lists from the
5 form in which they are authored into the format suitable for consumption by the 5 form in which they are authored into the format suitable for consumption by the
6 adblocking software. 6 adblocking software.
7 7
8 ## Installation 8 ## Installation
9 9
10 Prerequisites: 10 Prerequisites:
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 ## Development 152 ## Development
153 153
154 When adding new functionality, add tests for it (preferably first). Code 154 When adding new functionality, add tests for it (preferably first). Code
155 coverage (as measured by `tox -e qa`) should not decrease and the tests 155 coverage (as measured by `tox -e qa`) should not decrease and the tests
156 should pass in all Tox environments. 156 should pass in all Tox environments.
157 157
158 All public functions, classes and methods should have docstrings compliant with 158 All public functions, classes and methods should have docstrings compliant with
159 [NumPy/SciPy documentation guide][5]. One exception is the constructors of 159 [NumPy/SciPy documentation guide][5]. One exception is the constructors of
160 classes that the user is not expected to instantiate (such as exceptions). 160 classes that the user is not expected to instantiate (such as exceptions).
161 161
162
163 ## Using the library with R
164
165 Clone the repo to you local machine. Then create a virtualenv and install
166 python abp there:
167
168 $ cd python-abp
169 $ virtualenv env
170 $ pip install --upgrade .
171
172 Then import it with `reticulate` in R:
173
174 > library(reticulate)
175 > use_virtualenv("~/python-abp/env", required=TRUE)
176 > abp <- import("abp.filters.rpy")
177
178 Now you can use the functions with `abp$functionname`, e.g.
179 `abp.line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")`
180
181
162 [1]: https://adblockplus.org/filters#special-comments 182 [1]: https://adblockplus.org/filters#special-comments
163 [2]: https://adblockplus.org/filters#options 183 [2]: https://adblockplus.org/filters#options
164 [3]: http://pytest.org/ 184 [3]: http://pytest.org/
165 [4]: https://tox.readthedocs.org/ 185 [4]: https://tox.readthedocs.org/
166 [5]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt 186 [5]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
LEFTRIGHT
« no previous file | abp/filters/rpy.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld