Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - Merge reference.json and extension_map.json, plus documentation generator fixes #6268

Merged
merged 13 commits into from
Apr 4, 2024

Conversation

montezdesousa
Copy link
Contributor

@montezdesousa montezdesousa commented Mar 28, 2024

  1. Why?

    • python website/generate_platform_v4_markdown.py only checks if the extensions are installed, but to generate the full documentation we need them to be installed and built into reference.json
    • This caused the documentation to be deployed with the default provider extensions only
    • The information about python files built with openbb.build() is split between reference.json and extension_map.json
    • There is no information about which openbb-core version was used to generate the static assets
    • obb.coverage.reference can equivalent to openapi.json so it makes more sense to access it from the root
  2. What?

    • Merge extension_map.json into referece.json and follow a OpenAPI like format, see screenshot below
    • Adjust the generate_platform_v4_markdown.py script to this change
    • With this information inside the reference we now check if all openbb dependencies are installed and built. It also performs version check
    • Expose reference with obb.reference
    • Expose core version in SystemSettings
  3. Impact

    • Website documentation will fail if some extension is not installed or built into reference.json (it also fails if version is unexpected)
    • @hjoaquim how does this look? Can you adjust CLI to obb.reference and get the commands from reference.json paths property?
  4. Testing Done:

    • Tested building with and without the optional extensions
    • Tested auto build with installed extensions and importing the package
    • Tested tampering reference.json extension versions to be incompatible with toml spec
    • Tested running python website/generate_platform_v4_markdown.py in several scenarios with and without built extensions
    • Ran integration tests for core and equity

image

image

@github-actions github-actions bot added enhancement Enhancement platform OpenBB Platform v4 PRs for v4 labels Mar 28, 2024
@montezdesousa montezdesousa added the do not merge Label to prevent pull request merge label Mar 28, 2024
@montezdesousa montezdesousa marked this pull request as ready for review March 28, 2024 20:41
@montezdesousa montezdesousa changed the title [Feature] - Merge reference.json and extension_map.json [Feature] - Merge reference.json and extension_map.json, plus documentation generator fixes Mar 28, 2024
@montezdesousa montezdesousa removed the do not merge Label to prevent pull request merge label Apr 4, 2024
@montezdesousa montezdesousa added this pull request to the merge queue Apr 4, 2024
Merged via the queue into develop with commit daa4520 Apr 4, 2024
10 of 11 checks passed
@IgorWounds IgorWounds deleted the feature/merge_ref_ext_map branch April 9, 2024 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants