Code Monkey home page Code Monkey logo

Comments (5)

jjfantini avatar jjfantini commented on May 18, 2024

I changed the provider name^^ in the provider module to reference the name of the provider, like provider modules have done in the openbb_platform module.

i.e
For Nasdaq:

nasdaq_provider = Provider()

You should think about clarifying that you don't need to change the provider object and it can just be:

provider = Provider()

from openbb-cookiecutter.

IgorWounds avatar IgorWounds commented on May 18, 2024

Hi,

Thanks for raising this. I'd suggest following the cookiecutter template and examples as is. The cookiecutter, although it leverages the openbb-core, isn't an 1:1 mapping to the OpenBB Platform. In the case of the cookiecutter we want to keep it lean and to avoid issues the provider gained its own module.

To answer your question, keep it in the provider module.

As for the second part, you can name your variables in any way you prefer. The most important thing is that the entry point is correctly declared in the toml.

from openbb-cookiecutter.

jjfantini avatar jjfantini commented on May 18, 2024

Thanks for the quick response :). I will keep it in the cookie-cutter template form.

To get back to the initial issue at hand:

I have fixed the error by leaving the object's variable name as provider. Even if I correctly reference the entry point in the pyproject.toml file, I still get the error. I think the __init__.py file that builds the extension app is not correctly looking for provider, it seems to only look for provider variable name.

Wouldn't

[tool.poetry.plugins."openbb_provider_extension"]
openbb_orats = "openbb_orats.provider:orats_provider"

be the correct entry point to the provider module and the object variable

orats_provider = Provider()

,as stated above?

from openbb-cookiecutter.

IgorWounds avatar IgorWounds commented on May 18, 2024

That should be the case and should work. Make sure to pip install again so it picks up the changes in the pyproject.toml. You are likely facing an environment issue.

from openbb-cookiecutter.

IgorWounds avatar IgorWounds commented on May 18, 2024

@jjfantini heads up that I pushed a uvicorn fix that slightly changes the import statement. Now it is from my_ext.openbb import obb

from openbb-cookiecutter.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.