streamlit icon indicating copy to clipboard operation
streamlit copied to clipboard

Fix circle ci to install streamlit and update Pipfile.lock through pipenv install

Open willhuang1997 opened this issue 3 years ago • 4 comments

📚 Context

Looks like CircleCI broke again. This PR seems to fix things. However, I'm not sure exactly why but it seems to update the lock file. Please describe the project or issue background here

  • What kind of change does this PR introduce?

    • [ ] Bugfix
    • [ ] Feature
    • [ ] Refactoring
    • [x] Other, please describe:

🧠 Description of Changes

Remove skip lock in order to install streamlit and update Pipfile.lock it seems like

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

willhuang1997 avatar Sep 21 '22 07:09 willhuang1997

My PR-#5189 is failing do you think it might be fixed by your fix? The error goes like this:

ImportError while loading conftest '/home/circleci/repo/lib/tests/conftest.py'.
tests/conftest.py:36: in <module>
    with patch(
/usr/local/lib/python3.10/unittest/mock.py:1421: in __enter__
    self.target = self.getter()
/usr/local/lib/python3.10/unittest/mock.py:1608: in <lambda>
    getter = lambda: _importer(target)
/usr/local/lib/python3.10/unittest/mock.py:1247: in _importer
    thing = __import__(import_path)
streamlit/__init__.py:56: in <module>
    __version__: str = _version("streamlit")
../venv/lib/python3.10/site-packages/importlib_metadata/__init__.py:1015: in version
    return distribution(distribution_name).version
../venv/lib/python3.10/site-packages/importlib_metadata/__init__.py:988: in distribution
    return Distribution.from_name(distribution_name)
../venv/lib/python3.10/site-packages/importlib_metadata/__init__.py:566: in from_name
    raise PackageNotFoundError(name)
E   importlib_metadata.PackageNotFoundError: No package metadata was found for streamlit
make: *** [Makefile:109: pycoverage] Error 4

Exited with code exit status 2

sfc-gh-tszerszen avatar Sep 21 '22 14:09 sfc-gh-tszerszen

This is probably just a temporary fix, since all it probably does is using older dependencies from the lock file.

EDIT: Actually, we do not even push the lock file. So, this shouldn't be a problem.

lukasmasuch avatar Sep 21 '22 15:09 lukasmasuch

The issue is related to a regression in pipenv with skip-lock: https://github.com/pypa/pipenv/issues/5367 The fix was released an hour ago, so maybe it is already working again.

lukasmasuch avatar Sep 21 '22 15:09 lukasmasuch

Opened a new PR that will invalidate our CI cache: https://github.com/streamlit/streamlit/pull/5393

lukasmasuch avatar Sep 21 '22 16:09 lukasmasuch