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

Update react/react-dom to 16.13.0 and docgen to 5.3.0 [ref dash#1531] #117

Merged
merged 4 commits into from
Feb 11, 2021

Conversation

AnnMarieW
Copy link
Contributor

This pull request is for updating the docstring comments so they will be compatible with the new style docstrings in dash #1531

This project started with plotly/dash#1205

You can see results for other libraries in dash-doc #https://github.com/plotly/dash-docs/pull/1063

This repo will need to be rebuilt with a more recent version of docgen than the one currently specified (2.21.0). I rebuilt the library with docgen 5.3.0, react 16.13.1 and react-dom 16.13.1. I see that #81 is still open, so I don't know if these version changes will cause any problems. The rebuilt library passed all tests.

Here are some before and after screenshots for dash-cytoscape in dash-docs and in the python console.

Before:


cyto1



After

cyto3



In the console: Before:

cyto_console1

In the console: After:


cyto_console2

@AnnMarieW AnnMarieW changed the title update docstrings to be compantible with dash#1531 update docstrings to be compatible with dash#1531 Jan 18, 2021
@xhluca
Copy link

xhluca commented Jan 18, 2021

@AnnMarieW Thank you for opening the PR, the updated docstring looks much better! And thank you for the thorough and well-written PR description.

@alexcjohnson @Marc-Andre-Rivet I noticed that the dash version in requirements.txt is fairly outdated; do you think this could affect the build process wrt the react and react-dom version?

@AnnMarieW
Copy link
Contributor Author

@xhlulu I'm glad you like it! I forgot to mention that I also used the latest version of dash to rebuild and run the tests. The main issue I ran into was that docgen 2.21.0 didn't recognized PropTypes.exact so it needed to be upgraded. I just bumped it to a version being used in dash-table

@alexcjohnson
Copy link
Collaborator

hah yes, 0.39 is stretching the definition of "fairly" outdated at this point. But what is requirements.txt even used for? setup.py only lists dash (and with no version). There's also tests/requirements.txt listing an extremely old dash (but with >= so it should be getting the latest) as well as pytest-dash - would be great at some point to transition this to dash[testing] but that will require rewriting some of the tests themselves.

@xhluca xhluca mentioned this pull request Jan 20, 2021
@xhluca
Copy link

xhluca commented Jan 20, 2021

@alexcjohnson Thanks for mentioning this. requirements.txt would ideally be the requirements needed to run the demos locally and developing the libraries. Perhaps it's time to delete test/requirements.txt and move everything to requirements.txt, so we won't have to track/manage two requirements files?

I've also created a project to track everything relating to tests, as well as opened an issue to track the refactoring of tests.

Copy link

@xhluca xhluca left a comment

Choose a reason for hiding this comment

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

I've added the build here in this test branch: https://github.com/plotly/dash-cytoscape/tree/update-docgen

I don't really have anything to say if the tests pass. @alexcjohnson is there anything else before 💃 ?

@alexcjohnson
Copy link
Collaborator

This looks great to me. @AnnMarieW let's get https://github.com/plotly/dash-docs/pull/1063 merged (WITHOUT any updates to the component packages) before we merge any of the updates to the component packages themselves.

@AnnMarieW
Copy link
Contributor Author

Sounds good. And plotly/dash#1531 will also need to be merged before updating the component packages?

@xhluca xhluca mentioned this pull request Feb 11, 2021
6 tasks
@xhluca xhluca changed the title update docstrings to be compatible with dash#1531 Update react/react-dom to 16.13.0 and docgen to 5.3.0 [ref dash#1531] Feb 11, 2021
Copy link

@xhluca xhluca left a comment

Choose a reason for hiding this comment

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

@AnnMarieW Sorry for getting back to you so late, I didn't realize dash#1531 was merged! I suggested a few changes and I'll merge it once I figure out what's wrong with the percy tests!

src/lib/components/Cytoscape.react.js Outdated Show resolved Hide resolved
src/lib/components/Cytoscape.react.js Outdated Show resolved Hide resolved
src/lib/components/Cytoscape.react.js Outdated Show resolved Hide resolved
@@ -40,9 +40,9 @@
"cytoscape-svg": "0.2.0",
"lodash": "^4.17.11",
"ramda": "^0.25.0",
"react": "15.4.2",
"react": "^16.13.1",
Copy link

Choose a reason for hiding this comment

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

I wonder if it's better to fix it to 16.13.0 since that's what's done on plotly/dash-core-components. Not sure if it might break dash if react/react-dom are upgraded beyond that.

Suggested change
"react": "^16.13.1",
"react": "16.13.0",

"react-cytoscapejs": "1.2.1",
"react-dom": "15.4.2"
"react-dom": "^16.13.1"
Copy link

Choose a reason for hiding this comment

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

Same as above

Suggested change
"react-dom": "^16.13.1"
"react-dom": "16.13.0"

@@ -57,7 +57,7 @@
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.9.1",
"npm": "^6.14.4",
"react-docgen": "^2.21.0",
"react-docgen": "^5.3.0",
Copy link

Choose a reason for hiding this comment

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

Wonder if a ~ would be better than ^ here (I just learned the differences here)

AnnMarieW and others added 3 commits February 11, 2021 11:09
Co-authored-by: Xing Han Lu <xhlu+github@pm.me>
Co-authored-by: Xing Han Lu <xhlu+github@pm.me>
Co-authored-by: Xing Han Lu <xhlu+github@pm.me>
@AnnMarieW
Copy link
Contributor Author

@xhlulu Thanks for the suggested changes. I approved the changes from exact to shape and will leave the rest open for you or the other reviewers.

@xhluca
Copy link

xhluca commented Feb 11, 2021

@AnnMarieW Thank you!

@alexcjohnson I'm happy to merge it as is and I can figure out the right package.json dependencies and building in another PR

Copy link

@xhluca xhluca left a comment

Choose a reason for hiding this comment

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

💃

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃

@xhluca xhluca merged commit cde1e4b into plotly:master Feb 11, 2021
@AnnMarieW AnnMarieW deleted the update-docstrings branch February 12, 2021 00:19
xhluca pushed a commit that referenced this pull request Feb 12, 2021
@xhluca xhluca mentioned this pull request Feb 12, 2021
xhluca pushed a commit that referenced this pull request Apr 30, 2021
Many warnings are caused by incorrect
proptypes introduced in #117
xhluca pushed a commit that referenced this pull request May 6, 2021
* npm run build with dash 1.20

* Bump ssri from 6.0.1 to 6.0.2 (#131)

Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](npm/ssri@v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ini from 1.3.5 to 1.3.8 (#115)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](npm/ini@v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dot-prop from 4.2.0 to 4.2.1 (#124)

Bumps [dot-prop](https://github.com/sindresorhus/dot-prop) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/sindresorhus/dot-prop/releases)
- [Commits](sindresorhus/dot-prop@v4.2.0...v4.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* npm audit fix

* Update changelog

* Fix prop types to stop warnings

Many warnings are caused by incorrect
proptypes introduced in #117

* npm run build

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

4 participants