Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Marethyu1 committed Dec 24, 2018
2 parents e10b109 + 4e6e7cb commit 6216b3b
Show file tree
Hide file tree
Showing 12 changed files with 115 additions and 13 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Contributors
------------

* Liz Richardson
* Stefan Hall
* Adrien Aucher

Want to contribute? See: CONTRIBUTING.rst
Expand Down
4 changes: 3 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ History
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| First half of 2017 | Adrien Aucher joins UC as an intern and works with Ashley Williams on the first version of this tool. It is only used internally at this point. |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| November 2018 | Liz Richardson joins the project to work on the first release. Version 1.0.0 released. |
| November 2018 | Liz Richardson and Stefan Hall join the project to work on the first release. |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| December 2018 | Version 1.0.0 released. |
+--------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Features
--------
With COAST_SEARCH you can:

* Generate and run queries based on the multi-dimensional search logic outlined by Rainer and Williams in IST'18_
* Generate and run queries based on the multi-dimensional search logic outlined by Rainer and Williams in `IST'18`_
* Define your own queries to run

.. _IST'18: https://www.sciencedirect.com/science/article/abs/pii/S0950584918302192
Expand Down
4 changes: 3 additions & 1 deletion coast_search/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from __future__ import print_function
from ._version import get_versions


from coast_search import query_generator
from coast_search import search
from coast_search import utils

__author__ = 'Ashley Williams'
__email__ = '[email protected]'
Expand Down
4 changes: 2 additions & 2 deletions coast_search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def extract_search_results_from_JSON(json_data):

return search_results


def deduplicate_urls(json_data):
"""
function to create and return a list of deduplicated URLS
Expand Down Expand Up @@ -328,6 +329,7 @@ def deduplicate_urls(json_data):
"deduplicated_urls": list(set(all_urls))
}


def run_all_queries(query_dict_list, number_of_runs, number_of_results, day, search_backup_dir):
"""
Given a list of queries and configuration parameters, calls the method run_query for each query object in the given list.
Expand Down Expand Up @@ -358,5 +360,3 @@ def run_all_queries(query_dict_list, number_of_runs, number_of_results, day, sea
return {
"results": results
}


4 changes: 1 addition & 3 deletions coast_search/utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
Title: file_utils.py
Title: utils.py
Author: Ashley Williams
Description: A collection of generic utility functions that are used
throughout coast by various modules relating to reading and writing to
files.
Expand Down
4 changes: 3 additions & 1 deletion docs/source/modules/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ Modules
.. toctree::
:maxdepth: 4


query_generator
search
utils
34 changes: 34 additions & 0 deletions docs/source/modules/query_generator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Query Generator
===========

.. _query_generator:

Introduction
------------
The query generator module contains functions that can be used to generate a set of queries that follow the heuristics proposed by Rainer and Williams in `IST'18`_

.. _IST'18: https://www.sciencedirect.com/science/article/abs/pii/S0950584918302192

Usage
-----

To use the query_generator module:

.. code-block:: console
>>> import coast_search
>>> coast_search.query_generator.function(to_use)
or:
.. code-block:: console
>>> from coast_search import query_generator
>>> query_generator.function(to_use)
Functions
---------

.. automodule:: coast_search.query_generator
:members:
:undoc-members:
:show-inheritance:
32 changes: 32 additions & 0 deletions docs/source/modules/search.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Search
===========

.. _search:

Introduction
------------
The search module contains functions for conducting searches against the Google Custom Search API, and then for parsing the results.

Usage
-----

To use the utils module:

.. code-block:: console
>>> import coast_search
>>> coast_search.search.function(to_use)
or:
.. code-block:: console
>>> from coast_search import search
>>> search.function(to_use)
Functions
---------

.. automodule:: coast_search.search
:members:
:undoc-members:
:show-inheritance:
32 changes: 32 additions & 0 deletions docs/source/modules/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Utils
===========

.. _utils:

Introduction
------------
The utils module contains some helper functions that are used by other modules. However, they are open to be utilised as you wish.

Usage
-----

To use the utils module:

.. code-block:: console
>>> import coast_search
>>> coast_search.utils.function(to_use)
or:
.. code-block:: console
>>> from coast_search import utils
>>> utils.function(to_use)
Functions
---------

.. automodule:: coast_search.utils
:members:
:undoc-members:
:show-inheritance:
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.1
current_version = 1.0.0
commit = True
tag = True

Expand All @@ -13,4 +13,3 @@ replace = __version__ = '{new_version}'

[wheel]
universal = 1

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
author="Ashley Williams",
author_email='[email protected]',
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
Expand All @@ -50,7 +50,7 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/zedrem/coast_search',
version='0.0.1',
version='1.0.0',
zip_safe=False,
dependency_links=dependency_links
)

0 comments on commit 6216b3b

Please sign in to comment.