Skip to content

Add support for local plotly.js/ builds to setup.py #4526

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

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

ayjayt
Copy link
Contributor

@ayjayt ayjayt commented Feb 19, 2024

Hi, this PR adds a --local= flag to setup.py updateplotlyjsdev so we don't need to use circleci to use our custom plotly.js w/ plotly.py.

This helps a little bit with community dev flow, I think.

Here is the docs:

plotly.py/contributing.md

Lines 237 to 250 in a8f5ad5

### Local Repository
If you have a local repository of `plotly.js` you'd like to try, you can run:
```bash
# In your plotly.js/ directory, prepare the package:
$ npm run build
$ npm pack
$ mv plotly.js-*.tgz plotly.js.tgz
# In your plotly.py/packages/python/plotly/ directory:
$ python setup.py updateplotlyjsdev --local /path/to/your/plotly.js/
```

Thanks!

edit: could probably be made to work with github repos too with a little fetch here and there

Code PR

This is a small addition to the build system, not a change to plotly.py as such

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
  • For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well).
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
  • For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).

@ndrezn ndrezn requested a review from archmoj March 7, 2024 19:19
Copy link
Contributor

@archmoj archmoj left a comment

Choose a reason for hiding this comment

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

💃

@archmoj archmoj merged commit 0589e43 into plotly:master Mar 22, 2024
@ayjayt ayjayt deleted the feature/pikul-local-updateplotlyjsdev branch March 22, 2024 19:15
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