Skip to content

Commit 9c00c2f

Browse files
committed
## [v8.1.0]() (2018-06-10)
**Added** - added `blog` data type. Various methods in `EventRegistry` class accept it, such as `suggestNewsSources()`, `suggestSourcesAtPlace()` and `getNewsSourceUri()`. **Updated** - `QueryArticlesIter.initWithComplexQuery()` now accepts also the `dataType` parameter (by default `news`). **Removed** - Removed the parameter `articleBatchSize` from `QueryArticlesIter.execQuery` since it was not useful. We are always returning the maximum number of results that can be obtained with a single query.
1 parent 3fa373f commit 9c00c2f

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
## [v8.1.0]() (2018-06-10)
4+
5+
**Added**
6+
- added `blog` data type. Various methods in `EventRegistry` class accept it, such as `suggestNewsSources()`, `suggestSourcesAtPlace()` and `getNewsSourceUri()`.
7+
8+
**Updated**
9+
- `QueryArticlesIter.initWithComplexQuery()` now accepts also the `dataType` parameter (by default `news`).
10+
11+
**Removed**
12+
- Removed the parameter `articleBatchSize` from `QueryArticlesIter.execQuery` since it was not useful. We are always returning the maximum number of results that can be obtained with a single query.
13+
14+
315
## [v8.0]() (2018-04-10)
416

517
**Added**

eventregistry/QueryArticles.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ def execQuery(self, eventRegistry,
226226
sortBy = "rel",
227227
sortByAsc = False,
228228
returnInfo = ReturnInfo(),
229-
articleBatchSize = 100,
230229
maxItems = -1,
231230
**kwargs):
232231
"""

eventregistry/QueryEvents.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,15 +504,19 @@ def __init__(self,
504504

505505
class RequestEventsConceptTrends(RequestEvents):
506506
def __init__(self,
507+
conceptUris = None,
507508
conceptCount = 10,
508509
returnInfo = ReturnInfo()):
509510
"""
510511
return a list of top trending concepts and their daily trending info over time
511-
@param conceptCount: number of top concepts to return (at most 50)
512+
@param conceptUris: list of concept URIs for which to return trending information. If None, then top concepts will be automatically computed
513+
@param count: if the concepts are not provided, what should be the number of automatically determined concepts to return (at most 50)
512514
@param returnInfo: what details about the concepts should be included in the returned information
513515
"""
514516
assert conceptCount <= 50
515517
self.resultType = "conceptTrends"
518+
if conceptUris != None:
519+
self.conceptTrendsConceptUri = conceptUris
516520
self.conceptTrendsConceptCount = conceptCount
517521
self.__dict__.update(returnInfo.getParams("conceptTrends"))
518522

eventregistry/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "8.0.0"
1+
__version__ = "8.1.0"

eventregistry/tests/TestQueryArticles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def testArticleUriWgtList(self):
3030
expectedCount = iter.count(self.er)
3131

3232
countPerPage = 20000
33-
pages = math.ceil(expectedCount / countPerPage)
33+
pages = int(math.ceil(expectedCount / countPerPage))
3434
q = QueryArticles(conceptUri=self.er.getConceptUri("germany"))
3535
items = []
3636
for page in range(1, pages+1):

eventregistry/tests/TestQueryEvents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def testConceptTrends(self):
191191
self.assertIsNotNone(res.get("conceptTrends"), "Expected to get 'conceptTrends'")
192192
self.assertIsNotNone(res.get("conceptTrends").get("trends"), "Expected to get 'trends' property in conceptTrends")
193193
self.assertIsNotNone(res.get("conceptTrends").get("conceptInfo"), "Expected to get 'conceptInfo' property in conceptTrends")
194-
self.assertTrue(len(res["conceptTrends"]["conceptInfo"]) == 5, "Expected to get 5 concepts in concept trends")
194+
self.assertTrue(len(res["conceptTrends"]["conceptInfo"]) <= 5, "Expected to get 5 concepts in concept trends")
195195
trends = res["conceptTrends"]["trends"]
196196
self.assertTrue(len(trends) > 0, "Expected to get trends for some days")
197197
for trend in trends:

0 commit comments

Comments
 (0)