Redesign report & Allow to use profileID and service feeds#64
Redesign report & Allow to use profileID and service feeds#64
Conversation
Signed-off-by: Herklos <herklos@drakkar.software>
61029fe to
f13d02a
Compare
Signed-off-by: Herklos <herklos@drakkar.software>
f13d02a to
660b0a3
Compare
- Fix obs.run() calls to use strategy_config positional and strategy_func keyword - Fix mocks to use create=True for non-existent attributes
|
PR is ready |
- Add mock for social_historical_data_collector_factory - Skip report check if dist folder not built
d325443 to
edfc47c
Compare
GuillaumeDSM
left a comment
There was a problem hiding this comment.
great work !
should we also add an example script with a profile id to show how to use it?
And is there something to install (npm something) when installing the repo with git clone ? In this case it would be great to add it to the readme
example.py
Outdated
| import tulipy # Can be any TA library. | ||
| import tulipy # Can be any TA library. | ||
| import octobot_script as obs | ||
| from octobot_script.api.ploting import generate_and_show_report |
There was a problem hiding this comment.
I think generate_and_show_report should be exported to be used from obs.generate_and_show_report instead of requiring a dedicated import
| try: | ||
| with socketserver.TCPServer(("", self.server_port), handler) as httpd: | ||
| url = f"http://{self.server_host}:{self.server_port}/{self.report_name}" | ||
| print(f"Serving report on: {url}") |
There was a problem hiding this comment.
I think we want to log this kind of info in a logger to disable it by default
| report_name = os.path.basename(self.report_file) | ||
| runs_root_dir = os.path.dirname(report_dir) | ||
| user_data_dir = octobot_mocks.get_module_appdir_path() | ||
| print(f"Report: {self.report_file}") |
| ) | ||
|
|
||
|
|
||
| async def test_get_data_with_profile_id(mocked_config): |
Good idea! You mean when using from python sources? As the JS will be automatically built and embedded in the wheel so most users wont have to do any npm commands. |
Signed-off-by: Herklos <herklos@drakkar.software>
|
It's up |
|
|
||
| ```bash | ||
| npm install | ||
| npm run build |
|
|
||
| # Call the execution of the script inside "asyncio.run" as | ||
| # OctoBot-Script runs using the python asyncio framework. | ||
| asyncio.run(start_profile()) |
Signed-off-by: Herklos <herklos@drakkar.software>
cc0b0d9 to
556d9b3
Compare
Uh oh!
There was an error while loading. Please reload this page.