Skip to content

Commit 427a849

Browse files
committed
fixed init file, pytest, and README so that importing the main IndustryDocsSearch class is more straightforward.
1 parent 75422e6 commit 427a849

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

README.MD

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ The the package has one class `IndustryDocsSearch` with two main methods of are:
1616
Basic usage looks like:
1717

1818
```
19-
import industry_documents_wrapper as idw
19+
from industryDocumentsWrapper import IndustryDocsSearch
2020
21-
wrapper = idw.ucsf_api.IndustryDocsSearch()
21+
wrapper = IndustryDocsSearch()
2222
wrapper.query(q="industry:tobacco AND case:'State of North Carolina' AND collection:'JUUL labs Collection', n=100")
2323
wrapper.save('query_results.json', format='json')
2424
```
2525

2626
Alternatively, to avoid constructing the whole query, you can pass parts of the query as arguments:
2727

2828
```
29-
import industry_documents_wrapper as idw
29+
from industryDocumentsWrapper import IndustryDocsSearch
3030
31-
wrapper = idw.ucsf_api.IndustryDocsSearch()
31+
wrapper = IndustryDocsSearch()
3232
wrapper.query(industry='tobacco', case='State of North Carolina', collection='JUUl labs collection', n=100)
3333
wrapper.save('query_results.json', format='json')
3434
```

industryDocumentsWrapper/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .ucsf_api import IndustryDocsSearch
2+
3+
__all__ = ['IndustryDocsSearch']

tests/test_ucsf_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22
from unittest import mock
3-
from industryDocumentsWrapper.ucsf_api import IndustryDocsSearch
3+
from industryDocumentsWrapper import IndustryDocsSearch
44

55
# Mock the requests.get() response
66
@pytest.fixture

0 commit comments

Comments
 (0)