Skip to content

Redesign report & Allow to use profileID and service feeds#64

Merged
Herklos merged 6 commits intomasterfrom
feature/add-ai-services
Feb 27, 2026
Merged

Redesign report & Allow to use profileID and service feeds#64
Herklos merged 6 commits intomasterfrom
feature/add-ai-services

Conversation

@Herklos
Copy link
Member

@Herklos Herklos commented Feb 22, 2026

image

Signed-off-by: Herklos <herklos@drakkar.software>
@Herklos Herklos self-assigned this Feb 22, 2026
@Herklos Herklos force-pushed the feature/add-ai-services branch 6 times, most recently from 61029fe to f13d02a Compare February 25, 2026 21:44
Signed-off-by: Herklos <herklos@drakkar.software>
@Herklos Herklos force-pushed the feature/add-ai-services branch from f13d02a to 660b0a3 Compare February 25, 2026 21:47
- Fix obs.run() calls to use strategy_config positional and strategy_func keyword
- Fix mocks to use create=True for non-existent attributes
@Herklos Herklos requested a review from GuillaumeDSM February 25, 2026 22:35
@Herklos Herklos marked this pull request as ready for review February 25, 2026 22:35
@Herklos
Copy link
Member Author

Herklos commented Feb 26, 2026

PR is ready

- Add mock for social_historical_data_collector_factory
- Skip report check if dist folder not built
@Herklos Herklos force-pushed the feature/add-ai-services branch from d325443 to edfc47c Compare February 26, 2026 08:13
Copy link
Member

@GuillaumeDSM GuillaumeDSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we keep this log?

)


async def test_get_data_with_profile_id(mocked_config):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Herklos
Copy link
Member Author

Herklos commented Feb 27, 2026

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

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.
But for users that wants to clone and use the python code, there is no instruction for now.

Signed-off-by: Herklos <herklos@drakkar.software>
@Herklos
Copy link
Member Author

Herklos commented Feb 27, 2026

It's up

Copy link
Member

@GuillaumeDSM GuillaumeDSM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


```bash
npm install
npm run build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


# Call the execution of the script inside "asyncio.run" as
# OctoBot-Script runs using the python asyncio framework.
asyncio.run(start_profile())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Signed-off-by: Herklos <herklos@drakkar.software>
@Herklos Herklos force-pushed the feature/add-ai-services branch from cc0b0d9 to 556d9b3 Compare February 27, 2026 09:03
@Herklos Herklos enabled auto-merge (rebase) February 27, 2026 09:03
@Herklos Herklos disabled auto-merge February 27, 2026 09:04
@Herklos Herklos merged commit 6a25b12 into master Feb 27, 2026
9 checks passed
@Herklos Herklos deleted the feature/add-ai-services branch February 27, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants