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

Add server_url to plotly.io.orca to allow for external orca server #1850

Merged
merged 6 commits into from
Nov 11, 2019

Conversation

miriad
Copy link
Contributor

@miriad miriad commented Oct 28, 2019

Add server_url to plotly.io.orca.config to allow an external orca server.

Implementation of #1570

@jonmmease jonmmease added this to the v4.3.0 milestone Oct 31, 2019
@jonmmease
Copy link
Contributor

Thanks @miriad! We'll try to take close look soon, and we should be able to get this in for version 4.3.0 (probably a week or two out).

@emmanuelle
Copy link
Contributor

@miriad @jonmmease any idea of how to add tests for this? Open a local orca server and communicate with it?

@miriad
Copy link
Contributor Author

miriad commented Nov 1, 2019

@emmanuelle

That's something I struggled with, because of the need to run an external service.

Seemingly, running a local orca server and communicating with it via localhost would be sufficient.

@jonmmease
Copy link
Contributor

Looks great @miriad. I added a test, made a couple small cleanup changes, and merged master. I'm very glad to have this option available now. Thanks!

@ferran-candela
Copy link

Hello,

I have tried to configure the external server by means of setting up the new available property 'server_url' but after doing it like this:

    import plotly.io as pio
    pio.orca.config.server_url = "localhost"
    pio.orca.config.port = 9091

The property 'executable' does not change to 'None' so the executable continues being required.

After debugging I have seen that the setter does not change the property since self._props is empty.

    @executable.setter
    def executable(self, val):

        if val is None:
            self._props.pop("executable", None)

Maybe I am not configuring it correctly.
Thanks.

@dev-dsp
Copy link
Contributor

dev-dsp commented Nov 20, 2019

I can confirm that it just doesn't work.
If I set executable to None by editing few lines in io/_orca.py, validate_executable() fails with exception, so it's not possible to run pio.to_image()

@miriad
Copy link
Contributor Author

miriad commented Nov 20, 2019

Please try including the port directly in server_url, such as "localhost:9091"

The port field is intended for use with a locally managed server, and setting will override the server_url field

@dev-dsp
Copy link
Contributor

dev-dsp commented Nov 21, 2019

Please find my comment in above mentioned issue.

@dev-dsp
Copy link
Contributor

dev-dsp commented Nov 21, 2019

Opened PR for fixing that: #1915

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.

None yet

5 participants