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: Updated REAME.md with R integration docs Created Aug. 29, 2018, 11:46 a.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:
Left: Side by side diff | Download
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
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 162
163 ## Using the library with R 163 ## Using the library with R
164
164 Clone the repo to you local machine. Then create a virtualenv and install 165 Clone the repo to you local machine. Then create a virtualenv and install
Vasily Kuznetsov 2018/08/30 12:23:19 For consistency it would be nice to leave an empty
Tudor Avram 2018/08/31 10:17:53 Done.
165 python abp there 166 python abp there:
Vasily Kuznetsov 2018/08/30 12:23:19 Also consistency-related: we usually put a colon a
Tudor Avram 2018/08/31 10:17:53 Done.
166 167
167 $ cd python-abp 168 $ cd python-abp
168 $ virtualenv env 169 $ virtualenv env
169 $ pip install --upgrade . 170 $ pip install --upgrade .
170 171
171 Then import it with `reticulate` in R 172 Then import it with `reticulate` in R:
172 173
173 > library(reticulate) 174 > library(reticulate)
174 > use_virtualenv("~/python-abp/env", required=TRUE) 175 > use_virtualenv("~/python-abp/env", required=TRUE)
175 > abp <- import("abp.filters.rpy") 176 > abp <- import("abp.filters.rpy")
176 177
177 Now you can use the functions with `abp$functionname`, e.g. 178 Now you can use the functions with `abp$functionname`, e.g.
178 `abp.line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")` 179 `abp.line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")`
179 180
180 181
181 [1]: https://adblockplus.org/filters#special-comments 182 [1]: https://adblockplus.org/filters#special-comments
182 [2]: https://adblockplus.org/filters#options 183 [2]: https://adblockplus.org/filters#options
183 [3]: http://pytest.org/ 184 [3]: http://pytest.org/
184 [4]: https://tox.readthedocs.org/ 185 [4]: https://tox.readthedocs.org/
185 [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