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

Side by Side Diff: README.md

Issue 29849585: Issue 6835 - Add R support to python-abp (Closed)
Patch Set: Updated REAME.md with R integration docs Created Aug. 29, 2018, 11:46 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | abp/filters/rpy.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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
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 $ cd python-abp
168 $ virtualenv env
169 $ pip install --upgrade .
170
171 Then import it with `reticulate` in R
172
173 > library(reticulate)
174 > use_virtualenv("~/python-abp/env", required=TRUE)
175 > abp <- import("abp.filters.rpy")
176
177 Now you can use the functions with `abp$functionname`, e.g.
178 `abp.line2dict("@@||g.doubleclick.net/pagead/$subdocument,domain=hon30.org")`
179
180
162 [1]: https://adblockplus.org/filters#special-comments 181 [1]: https://adblockplus.org/filters#special-comments
163 [2]: https://adblockplus.org/filters#options 182 [2]: https://adblockplus.org/filters#options
164 [3]: http://pytest.org/ 183 [3]: http://pytest.org/
165 [4]: https://tox.readthedocs.org/ 184 [4]: https://tox.readthedocs.org/
166 [5]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt 185 [5]: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
OLDNEW
« no previous file with comments | « no previous file | abp/filters/rpy.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld