Skip to content

Fix mypy in CircleCI#1519

Merged
tconkling merged 22 commits intostreamlit:developfrom
tconkling:tim/mypy_fixes
Jun 3, 2020
Merged

Fix mypy in CircleCI#1519
tconkling merged 22 commits intostreamlit:developfrom
tconkling:tim/mypy_fixes

Conversation

@tconkling
Copy link
Copy Markdown
Contributor

@tconkling tconkling commented Jun 1, 2020

Our mypy task has been failing in CircleCI.

The issue is that pipenv is failing to deterministically resolve dependency versions, and is frequently resolving our tornado=>=5.0, <6.0 dependency to Tornado 6 (because of other transitive dependencies on Tornado).

The solution is to use the --sequential flag in our pipenv install build step. From the pipenv docs:

Installation is intended to be as deterministic as possible — use the --sequential flag to increase this, if experiencing issues.

So: pipenv installation is intended to be as deterministic as possible, but it's also possible to "increase its determinism" with a flag! (I think this is...madness.)

This PR also cleans up and documents a few things that I found confusing while tracking this down (with @jrhone's help!):

  • The mypy cache is now stored in the project directory (and gitignored), rather than in /tmp
  • We expire our CircleCI virtualenv cache key every day; I documented why we do this.
  • Added docs to the "Create virtualenv" CircleCI build step.
  • Removed the protobuf-caching step from the CircleCI jobs, because it's not actually doing anything.
  • Updated the mypy ini to target Python 3.8, and fixed a new mypy warning.

@tconkling tconkling requested a review from a team as a code owner June 1, 2020 20:08
Copy link
Copy Markdown
Collaborator

@kantuni kantuni left a comment

Choose a reason for hiding this comment

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

Thanks!

tconkling added 3 commits June 2, 2020 13:03
* develop:
  Up resource class used for Python 3.8 tests in CircleCI (streamlit#1520)
  Update terminal welcome + telemetry messages (streamlit#1510)
@tconkling tconkling merged commit 33afc1f into streamlit:develop Jun 3, 2020
@tconkling tconkling deleted the tim/mypy_fixes branch June 3, 2020 01:06
tconkling added a commit that referenced this pull request Jun 3, 2020
* develop:
  Fix mypy in CircleCI (#1519)
tconkling added a commit to tconkling/streamlit that referenced this pull request Jun 3, 2020
* develop:
  Fix mypy in CircleCI (streamlit#1519)
  Up resource class used for Python 3.8 tests in CircleCI (streamlit#1520)
  Update terminal welcome + telemetry messages (streamlit#1510)
tvst pushed a commit to tvst/streamlit that referenced this pull request Jun 3, 2020
Our `mypy` task has been failing in CircleCI.

The issue is that `pipenv` is failing to deterministically resolve dependency versions, and is frequently resolving our `tornado=>=5.0, <6.0` dependency to Tornado 6 (because of other transitive dependencies on Tornado).

The solution is to use the `--sequential` flag in our `pipenv install` build step. From the pipenv docs:

> Installation is intended to be as deterministic as possible — use the --sequential flag to increase this, if experiencing issues.

So: pipenv installation is intended to be as deterministic as possible, but it's also possible to "increase its determinism" with a flag! (I think this is...madness.)

This PR *also* cleans up and documents a few things that I found confusing while tracking this down (with @jrhone's help!):

- The `mypy` cache is now stored in the project directory (and gitignored), rather than in `/tmp`
- We expire our CircleCI virtualenv cache key every day; I documented why we do this.
- Added docs to the "Create virtualenv" CircleCI build step.
- Removed the protobuf-caching step from the CircleCI jobs, because it's not actually doing anything.
- Updated the mypy ini to target Python 3.8, and fixed a new mypy warning.
tvst added a commit that referenced this pull request Jun 4, 2020
* Enable WebSocket compression (#1506)

Fixes #463

From a lines-of-code perspective, this is a trivial change; Tornado supports WebSocket compression out of the box, and this PR just flips the switch to enable it.

(This obviously adds a bit of memory and CPU overhead to each WebSocket connection.)

* Fix DeckGL View State (#1481)

* Merge server and client view state changes

* Version 0.61.0

* Update terminal welcome + telemetry messages (#1510)

* Up resource class used for Python 3.8 tests in CircleCI (#1520)

* Up resource class used for Python 3.8 tests in CircleCI

* Ooops resource classs change should have be to the "cypress" flow

* Update notices.

* Fix mypy in CircleCI (#1519)

Our `mypy` task has been failing in CircleCI.

The issue is that `pipenv` is failing to deterministically resolve dependency versions, and is frequently resolving our `tornado=>=5.0, <6.0` dependency to Tornado 6 (because of other transitive dependencies on Tornado).

The solution is to use the `--sequential` flag in our `pipenv install` build step. From the pipenv docs:

> Installation is intended to be as deterministic as possible — use the --sequential flag to increase this, if experiencing issues.

So: pipenv installation is intended to be as deterministic as possible, but it's also possible to "increase its determinism" with a flag! (I think this is...madness.)

This PR *also* cleans up and documents a few things that I found confusing while tracking this down (with @jrhone's help!):

- The `mypy` cache is now stored in the project directory (and gitignored), rather than in `/tmp`
- We expire our CircleCI virtualenv cache key every day; I documented why we do this.
- Added docs to the "Create virtualenv" CircleCI build step.
- Removed the protobuf-caching step from the CircleCI jobs, because it's not actually doing anything.
- Updated the mypy ini to target Python 3.8, and fixed a new mypy warning.

* Make credentials prompt align to 80-char max, and do some tiny cleanups.

* Lint

* Changelog

* Remove "mapbox token" breaking change notice from changelog, since I dropped that PR for this launch

Co-authored-by: Tim Conkling <[email protected]>
Co-authored-by: Jonathan Rhone <[email protected]>
Co-authored-by: karrie <[email protected]>
tvst added a commit that referenced this pull request Jun 23, 2020
* Enable WebSocket compression (#1506)

Fixes #463

From a lines-of-code perspective, this is a trivial change; Tornado supports WebSocket compression out of the box, and this PR just flips the switch to enable it.

(This obviously adds a bit of memory and CPU overhead to each WebSocket connection.)

* Fix DeckGL View State (#1481)

* Merge server and client view state changes

* Version 0.61.0

* Update terminal welcome + telemetry messages (#1510)

* Up resource class used for Python 3.8 tests in CircleCI (#1520)

* Up resource class used for Python 3.8 tests in CircleCI

* Ooops resource classs change should have be to the "cypress" flow

* Update notices.

* Fix mypy in CircleCI (#1519)

Our `mypy` task has been failing in CircleCI.

The issue is that `pipenv` is failing to deterministically resolve dependency versions, and is frequently resolving our `tornado=>=5.0, <6.0` dependency to Tornado 6 (because of other transitive dependencies on Tornado).

The solution is to use the `--sequential` flag in our `pipenv install` build step. From the pipenv docs:

> Installation is intended to be as deterministic as possible — use the --sequential flag to increase this, if experiencing issues.

So: pipenv installation is intended to be as deterministic as possible, but it's also possible to "increase its determinism" with a flag! (I think this is...madness.)

This PR *also* cleans up and documents a few things that I found confusing while tracking this down (with @jrhone's help!):

- The `mypy` cache is now stored in the project directory (and gitignored), rather than in `/tmp`
- We expire our CircleCI virtualenv cache key every day; I documented why we do this.
- Added docs to the "Create virtualenv" CircleCI build step.
- Removed the protobuf-caching step from the CircleCI jobs, because it's not actually doing anything.
- Updated the mypy ini to target Python 3.8, and fixed a new mypy warning.

* Make credentials prompt align to 80-char max, and do some tiny cleanups.

* Lint

* Changelog

* Remove "mapbox token" breaking change notice from changelog, since I dropped that PR for this launch

* Lint

* Fix server.cookieSecret config option.

1. It shouldn't read environment variables. This happens automatically.
2. It should have a type.
3. Environment variables and the config system are already tested, so no
   need to make sure it also works in the case of STREAMLIT_SERVER_COOKIE_SECRET.

* Undo Mapbox token change. Always fetch token, so we don't break users (yet!)

* Version 0.62.0

* Lint

* Tweak `streamlit hello` terminal text.

* Update changelog

* Add option to turn on/off XSRF protection.

* Change date in changelog

* Update notices

* Update troubleshoting doc.

* Fix snapshots (including a ton of snapshots that should have been fixed a while ago)

* Fix merge.

* Fix MyPy

Co-authored-by: Tim Conkling <[email protected]>
Co-authored-by: Jonathan Rhone <[email protected]>
Co-authored-by: karrie <[email protected]>
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.

3 participants