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

No events #444

Merged
merged 12 commits into from Jan 24, 2019

Conversation

Projects
None yet
3 participants
@alexcjohnson
Copy link
Contributor

commented Jan 23, 2019

Closes #433 - last in the series for plotly/dash#531

In addition, as in the other no-events PRs, I tried to unify the local and CI test runners, and make it so on CI all tests run, even if an earlier one fails, so you get a complete failure report - see 3f0b9df, @T4rk1n @Marc-Andre-Rivet are you comfortable with this?

@alexcjohnson

This comment has been minimized.

Copy link
Contributor Author

commented Jan 24, 2019

@T4rk1n the dcc css test:

def test_user_supplied_css(self):
app = dash.Dash(assets_folder='test/assets')
app.layout = html.Div(className="test-input-css", children=[dcc.Input()])
self.startServer(app)
self.wait_for_element_by_css_selector('.test-input-css')
self.snapshot('styled input - width: 100%, border-color: hotpink')

is failing, seems to be due to plotly/dash#547 - can you take a look at it, see if it's just the test that needs updating or if there's a real issue with the new assets_folder logic? The same issue that percy caught in this PR, that the extra css is not showing up, I see it locally running this test both on master and on this branch.

@alexcjohnson

This comment has been minimized.

Copy link
Contributor Author

commented Jan 24, 2019

the dcc css test is failing, seems to be due to plotly/dash#547

OK yeah, that was an easy fix, and after looking at it in a little more detail, that test was definitely locking down buggy behavior!

@Marc-Andre-Rivet Marc-Andre-Rivet self-requested a review Jan 24, 2019

@@ -62,6 +65,7 @@
"exec-sh": "^0.3.0",
"jest": "^23.6.0",
"lodash": "^4.17.11",
"npm-run-all": "^4.1.5",

This comment has been minimized.

Copy link
@Marc-Andre-Rivet

Marc-Andre-Rivet Jan 24, 2019

Contributor

I do so love this package 🥇

@Marc-Andre-Rivet

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

  • Interval tests still contain fireEvent logic
  • Technically out of scope, but while updating the test scripts, could you change npm's lint command to do eslint src test instead of just src -- and fix the associated lint errors
@Marc-Andre-Rivet

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

Can you confirm what version of dash is used in your environment during the components py file generation? I have 0.35.3 locally and I'm getting a significant amount of diffs vs. what's in the PR. By default, this is running on Python 3.7 in my environment -- don't know if it should makes a difference.

@Marc-Andre-Rivet

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2019

Test run in dash-docs seems to be behaving fine. Once the ☝️ are fixed I'm fine with this PR.

@alexcjohnson

This comment has been minimized.

Copy link
Contributor Author

commented Jan 24, 2019

Can you confirm what version of dash is used in your environment during the components py file generation?

Right, this needs to be built off the no-events branch of dash plotly/dash#550. Also I believe it needs to be built with py3 (which you're doing anyway) since that branch doesn't yet have @rpkyle's byteify fix from plotly/dash#545

"lint:py": "flake8 --ignore=E501,F401,F841,F811 test",
"test": "run-s -c test-unit test:py test:pyimport lint format:test lint:py",
"test:py": "python -m unittest test.test_integration",
"test:pyimport": "python -m unittest test.test_dash_import",

This comment has been minimized.

Copy link
@T4rk1n

T4rk1n Jan 24, 2019

Contributor

Can combine them with python -m unittest discover

This comment has been minimized.

Copy link
@alexcjohnson

alexcjohnson Jan 24, 2019

Author Contributor

Ah good to know! But test_dash_import is funny, since it rewrites files (specifically, making a dash.py in the test folder) you can't run it in conjunction with any of the other tests. So if we wanted to use discover we'd have to make test_dash_import undiscoverable one way or another, and still run it separately.

This comment has been minimized.

Copy link
@T4rk1n

T4rk1n Jan 24, 2019

Contributor

Hmm, that test is strange, not sure we really need to test that.

This comment has been minimized.

Copy link
@alexcjohnson

alexcjohnson Jan 24, 2019

Author Contributor

I guess someone put that error message in the code, so they wanted to see it in a test. But yeah, not the most useful test to be lugging around.

@alexcjohnson

This comment has been minimized.

Copy link
Contributor Author

commented Jan 24, 2019

Interval tests still contain fireEvent logic

Ah good call, that came in with a community PR after my initial sweep through the code... fixed in 7d82256

Technically out of scope, but while updating the test scripts, could you change npm's lint command to do eslint src test instead of just src -- and fix the associated lint errors

Sure, easy enough -> 948c7dc

n_blur: 0,
n_blur_timestamp: -1,
n_clicks: 0,
n_clicks_timestamp: -1,

This comment has been minimized.

Copy link
@T4rk1n

T4rk1n Jan 24, 2019

Contributor

😺 This addition of props should be noted somewhere, had to read the code to see it.

This comment has been minimized.

Copy link
@alexcjohnson

alexcjohnson Jan 24, 2019

Author Contributor

Thanks @T4rk1n -> added to CHANGELOG in 8b4936b

Kind of amazing that these two are the only events we had that weren't covered by an existing regular prop already.

alexcjohnson added some commits Jan 24, 2019

@Marc-Andre-Rivet
Copy link
Contributor

left a comment

Looks good to me. Maybe @T4rk1n will have additional insight.

@T4rk1n

T4rk1n approved these changes Jan 24, 2019

Copy link
Contributor

left a comment

💃

@alexcjohnson alexcjohnson merged commit 67cd5d7 into master Jan 24, 2019

4 checks passed

ci/circleci: python-2.7 Your tests passed on CircleCI!
Details
ci/circleci: python-3.6 Your tests passed on CircleCI!
Details
ci/circleci: python-3.7 Your tests passed on CircleCI!
Details
percy/dash-core-components No visual changes since last approval
Details

@alexcjohnson alexcjohnson deleted the no-events branch Jan 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.