Skip to content

Commit

Permalink
pin numpy and spacy versions, fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishokamp committed Jul 9, 2024
1 parent ebb9323 commit 2dc3d67
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.3
0.7.0
19 changes: 16 additions & 3 deletions news_signals/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,27 @@ def test_add_wikimedia_pageviews_timeseries(self):
assert dtype == np.int64

def test_add_wikipedia_current_events(self):
ts_endpoint_mock = MockEndpoint()
aylien_ts = [
{"published_at": "2023-01-01T00:00:00Z", "count": 1},
{"published_at": "2023-01-02T00:00:00Z", "count": 2},
{"published_at": "2023-01-03T00:00:00Z", "count": 4},
{"published_at": "2023-01-04T00:00:00Z", "count": 1},
{"published_at": "2023-01-05T00:00:00Z", "count": 6},
]
# WORKING here - fix this test so that it doesn't call the internet
timeseries_df = aylien_ts_to_df(aylien_ts, normalize=True, freq='D')
start = '2023-01-01'
end = '2023-01-05'
html_path = resources / 'wiki-current-events-portal/example_monthly_page_jan_2023.html'
example_html = html_path.read_text()
signal = signals.AylienSignal(
name='test',
params={'entity_ids': ['Q81068910']}
params={
'timeseries_df': timeseries_df,
'entity_ids': ['Q81068910']},
ts_endpoint=ts_endpoint_mock
)
start = '2023-01-01'
end = '2023-01-30'
ts_signal = signal(start=start, end=end)
ts_signal.add_wikipedia_current_events(
wikidata_client=MockWikidataClient('https://en.wikipedia.org/wiki/COVID-19_pandemic'),
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ mkdocs>=1.4.2
mkdocstrings[python]>=0.8.3
mkdocs-material>=9.0.14
networkx<=2.7
numpy==1.26.4
pandas>=1.4.1
pyarrow>=11.0.0
ratelimit>=2.2.1
requests>=2.28.1
scikit-learn>=1.1.0
scipy>=1.8
spacy>=3.4.1,<4.0.0
spacy==3.5.4
sqlitedict>=1.7.0
tqdm>=4.62.3
Wikidata>=0.7.0
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
"google-cloud-storage>=2.10.0",
"matplotlib>=3.5.3",
"networkx<=2.7",
"numpy==1.26.4",
"pandas>=1.4.1",
"pyarrow>=11.0.0",
"ratelimit>=2.2.1",
"requests>=2.28.1",
"scikit-learn>=1.1.0",
"scipy>=1.8",
"spacy>=3.4.1,<4.0.0",
"spacy==3.5.4",
"sqlitedict>=1.7.0",
"tqdm>=4.62.3",
"Wikidata>=0.7.0"
Expand Down

0 comments on commit 2dc3d67

Please sign in to comment.