bullishpy 0.46.0__py3-none-any.whl → 0.47.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bullish/jobs/tasks.py CHANGED
@@ -1,8 +1,8 @@
1
1
  import functools
2
2
  import logging
3
- import random
4
3
  from typing import Optional, Any, Callable, List
5
4
 
5
+ import pandas as pd
6
6
  from bearish.main import Bearish # type: ignore
7
7
  from tickermood.main import get_news # type: ignore
8
8
  from tickermood.types import DatabaseConfig # type: ignore
@@ -15,7 +15,7 @@ from .models import JobTrackerStatus, JobTracker, JobType
15
15
  from ..analysis.analysis import run_analysis, run_signal_series_analysis
16
16
  from ..analysis.backtest import run_many_tests, BackTestConfig
17
17
  from ..analysis.industry_views import compute_industry_view
18
- from ..analysis.predefined_filters import predefined_filters
18
+ from ..analysis.predefined_filters import predefined_filters, load_custom_filters
19
19
  from ..database.crud import BullishDb
20
20
  from bullish.analysis.filter import FilterUpdate
21
21
  from ..utils.checks import DataBaseSingleTon
@@ -157,11 +157,11 @@ def news(
157
157
  def cron_news(
158
158
  task: Optional[Task] = None,
159
159
  ) -> None:
160
- filter = random.choice(predefined_filters()) # noqa: S311
160
+ filters = load_custom_filters()
161
161
  database = DataBaseSingleTon()
162
- if database.valid():
162
+ if database.valid() and filters:
163
163
  bullish_db = BullishDb(database_path=database.path)
164
- data = bullish_db.read_filter_query(filter)
164
+ data = pd.concat([bullish_db.read_filter_query(f) for f in filters])
165
165
  if not data.empty and "symbol" in data.columns:
166
166
  job_tracker(base_news)(
167
167
  database_path=database.path,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bullishpy
3
- Version: 0.46.0
3
+ Version: 0.47.0
4
4
  Summary:
5
5
  Author: aan
6
6
  Author-email: andoludovic.andriamamonjy@gmail.com
@@ -51,10 +51,10 @@ bullish/interface/interface.py,sha256=R2qVEMyBl9mBlPUO40zXp4vhfLKH7pgl_u2BmAVlD4
51
51
  bullish/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  bullish/jobs/app.py,sha256=5MJ5KXUo7JSNAvOPgkpIMasD11VTrjQvGzM7vmCY65E,77
53
53
  bullish/jobs/models.py,sha256=S2yvBf69lmt4U-5OU5CjXCMSw0s9Ubh9xkrB3k2qOZo,764
54
- bullish/jobs/tasks.py,sha256=XO8Pa6MoYeJQ4uvD3OYStEOh7l5zTK7hUFKvZksvpOM,5346
54
+ bullish/jobs/tasks.py,sha256=HN3AD-WW84XSa8MHyYO3yD_YkWjbRb62Y78EArhSVIU,5383
55
55
  bullish/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  bullish/utils/checks.py,sha256=jolHOnxkc5GvVuvVzlwHhM6EO-Y-eC0q3rXlHE-UG9Y,2633
57
- bullishpy-0.46.0.dist-info/METADATA,sha256=Q_g58-6l-nKyulwuC8HfMF-fS6VN5_kZY1MM8me7nSU,830
58
- bullishpy-0.46.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
59
- bullishpy-0.46.0.dist-info/entry_points.txt,sha256=eaPpmL6vmSBFo0FBtwibCXGqAW4LFJ83whJzT1VjD-0,43
60
- bullishpy-0.46.0.dist-info/RECORD,,
57
+ bullishpy-0.47.0.dist-info/METADATA,sha256=waetdHaboJqQAU4qbs2xp3RGhdMU24StqT4tKIwGt1g,830
58
+ bullishpy-0.47.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
59
+ bullishpy-0.47.0.dist-info/entry_points.txt,sha256=eaPpmL6vmSBFo0FBtwibCXGqAW4LFJ83whJzT1VjD-0,43
60
+ bullishpy-0.47.0.dist-info/RECORD,,