Skip to content

Commit 862bedd

Browse files
committed
change update function to allofplos.update
deprecates allofplos.plos_corpus, updates README with new command
1 parent 97381ca commit 862bedd

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ How to run the program
4848

4949
Execute the following command.
5050

51-
``(allofplos)$ python -m allofplos.plos_corpus``
51+
``(allofplos)$ python -m allofplos.update``
5252

5353
The first time it runs it will download a >4.4 Gb zip file
5454
(**allofplos_xml.zip**) with all the XML files inside.
@@ -59,7 +59,7 @@ allofplos\_xml directory inside your installation of `allofplos`.
5959

6060
If you want to see the directory on your file system where this is installed run
6161

62-
``python -c "from allofplos.plos_regex import corpusdir; print(corpusdir)"``
62+
``python -c "from allofplos import get_corpus_dir; print(get_corpus_dir())"``
6363

6464
If you ever downloaded the corpus before, it will make an incremental
6565
update to the existing corpus, the script checks for and then downloads
@@ -80,8 +80,8 @@ Here’s what the print statements might look like on a typical run:
8080

8181
147 new articles to download.
8282
147 new articles downloaded.
83-
3 corrected articles found.
84-
0 corrected articles downloaded with new xml.
83+
3 amended articles found.
84+
0 amended articles downloaded with new xml.
8585
Creating new text list of uncorrected proofs from scratch.
8686
No new VOR articles indexed in Solr.
8787
17 VOR articles directly downloaded.
@@ -106,9 +106,9 @@ Should return something like this:
106106

107107
::
108108

109-
......
109+
........
110110
----------------------------------------------------------------------
111-
Ran 6 tests in 3.327s
111+
Ran 8 tests in 0.257s
112112

113113
OK
114114

allofplos/plos_corpus.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1+
import warnings
2+
13
from .corpus.plos_corpus import main
24

35
if __name__ == "__main__":
6+
warnings.simplefilter('always', DeprecationWarning)
7+
warnings.warn("This update method is deprecated. use 'python -m allofplos.update'",
8+
DeprecationWarning,
9+
stacklevel=2)
410
main()

allofplos/update.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from .corpus.plos_corpus import main
2+
3+
if __name__ == "__main__":
4+
main()

0 commit comments

Comments
 (0)