Skip to content

Commit

Permalink
Now works without requiring a port
Browse files Browse the repository at this point in the history
  • Loading branch information
apmoore1 committed Mar 27, 2021
1 parent 75ef42c commit 73f284e
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 72 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pp.pprint(output_dict)

{ 'abstractText': 'The abstract which is normally short.',
'authors': [{'affiliations': [], 'name': 'Andrew Moore'}],
'id': 'SP:045daa3afe8335ca973de6dbed366626376434da',
'id': 'SP:1499421a494e54e17ee903b5161ccb31091fb77a',
'references': [ { 'authors': [ 'Tomas Mikolov',
'Greg Corrado',
'Kai Chen',
Expand Down
2 changes: 1 addition & 1 deletion docs/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


<div class="output_markdown rendered_html output_subarea ">
<h4 id="parse_pdf" class="doc_header"><code>parse_pdf</code><a href="https://github.com/UCREL/science_parse_py_api/tree/master/science_parse_api/api.py#L14" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>parse_pdf</code>(<strong><code>server_address</code></strong>:<code>str</code>, <strong><code>file_path</code></strong>:<code>Path</code>, <strong><code>port</code></strong>:<code>Optional</code>[<code>str</code>], <strong><code>timeout</code></strong>:<code>int</code>=<em><code>60</code></em>)</p>
<h4 id="parse_pdf" class="doc_header"><code>parse_pdf</code><a href="https://github.com/UCREL/science_parse_py_api/tree/master/science_parse_api/api.py#L14" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>parse_pdf</code>(<strong><code>server_address</code></strong>:<code>str</code>, <strong><code>file_path</code></strong>:<code>Path</code>, <strong><code>port</code></strong>:<code>str</code>=<em><code>''</code></em>, <strong><code>timeout</code></strong>:<code>int</code>=<em><code>60</code></em>)</p>
</blockquote>
<p>This function if successful returns the JSON output of the
science parse server as a dictionary. Else if a Timeout Exception
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h2 id="Example">Example<a class="anchor-link" href="#Example"> </a></h2><p>The
<div class="output_subarea output_stream output_stdout output_text">
<pre>{ &#39;abstractText&#39;: &#39;The abstract which is normally short.&#39;,
&#39;authors&#39;: [{&#39;affiliations&#39;: [], &#39;name&#39;: &#39;Andrew Moore&#39;}],
&#39;id&#39;: &#39;SP:045daa3afe8335ca973de6dbed366626376434da&#39;,
&#39;id&#39;: &#39;SP:1499421a494e54e17ee903b5161ccb31091fb77a&#39;,
&#39;references&#39;: [ { &#39;authors&#39;: [ &#39;Tomas Mikolov&#39;,
&#39;Greg Corrado&#39;,
&#39;Kai Chen&#39;,
Expand Down
40 changes: 11 additions & 29 deletions module_notebooks/00_api.ipynb

Large diffs are not rendered by default.

42 changes: 4 additions & 38 deletions module_notebooks/index.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion science_parse_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

logger = logging.getLogger(__name__)

def parse_pdf(server_address: str, file_path: Path, port: Optional[str], timeout: int = 60
def parse_pdf(server_address: str, file_path: Path, port: str = '', timeout: int = 60
) -> Optional[Dict[str, Any]]:
'''
This function if successful returns the JSON output of the
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ author = Andrew Moore
author_email = [email protected]
copyright = UCREL
branch = master
version = 1.0.0
version = 1.0.1
min_python = 3.6
audience = Developers
language = English
Expand Down

0 comments on commit 73f284e

Please sign in to comment.