wfork-streamlit-profiler 1.3.0__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: wfork-streamlit-profiler
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: (fork of) Runtime profiler for Streamlit, powered by pyinstrument
5
5
  License: MIT
6
6
  Author: Wyatt S Carpenter
@@ -13,9 +13,13 @@ Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
- Requires-Dist: pyinstrument (==5.0.1)
17
- Requires-Dist: streamlit (>=1.0.0,<2.0.0)
18
- Project-URL: Homepage, https://github.com/wyattscarpenter/streamlit-profiler
16
+ Provides-Extra: dev
17
+ Requires-Dist: black (>=21.12b0,<22.0) ; extra == "dev"
18
+ Requires-Dist: pyinstrument (>=5.0.2,<5.1.0)
19
+ Requires-Dist: streamlit (>=1.0,<2.0)
20
+ Requires-Dist: types-openpyxl ; extra == "dev"
21
+ Requires-Dist: types-python-dateutil ; extra == "dev"
22
+ Requires-Dist: typing-extensions (>=4.5)
19
23
  Description-Content-Type: text/markdown
20
24
 
21
25
  # wfork-streamlit-profiler &nbsp;🏄🏼
@@ -0,0 +1,25 @@
1
+ [project]
2
+ name = "wfork-streamlit-profiler"
3
+ version = "1.4.0"
4
+ description = "(fork of) Runtime profiler for Streamlit, powered by pyinstrument"
5
+ authors = [
6
+ {name = "Wyatt S Carpenter"},
7
+ {name = "Johannes Rieke", email= "johannes.rieke@gmail.com"}
8
+ ]
9
+ license = "MIT"
10
+ readme = "README.md"
11
+ homepage = "https://github.com/wyattscarpenter/streamlit-profiler"
12
+ requires-python = ">=3.8"
13
+
14
+ dependencies = [
15
+ "streamlit ~= 1.0",
16
+ "pyinstrument ~=5.0.2",
17
+ "typing-extensions >= 4.5",
18
+ ]
19
+
20
+ [project.optional-dependencies]
21
+ dev = ["black ~= 21.12b0", "types-openpyxl", "types-python-dateutil"]
22
+
23
+ [build-system]
24
+ requires = ["poetry-core>=2.0.0"]
25
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ </profile>
6
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="Python 3.7" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/wfork_streamlit_profiler.iml" filepath="$PROJECT_DIR$/.idea/wfork_streamlit_profiler.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="jdk" jdkName="Python 3.7" jdkType="Python SDK" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
@@ -2,7 +2,9 @@ import streamlit.components.v1 as components
2
2
  from pyinstrument import Profiler as OriginalProfiler
3
3
  from pyinstrument.profiler import AsyncMode
4
4
  from pyinstrument.session import Session
5
+ from typing_extensions import override
5
6
 
7
+ # pyright: strict
6
8
 
7
9
  class Profiler(OriginalProfiler):
8
10
  _auto_output_on_stop: bool
@@ -12,11 +14,12 @@ class Profiler(OriginalProfiler):
12
14
  interval: float = 0.001,
13
15
  async_mode: AsyncMode = "enabled",
14
16
  auto_output_on_stop: bool = True,
15
- ):
17
+ ) -> None:
16
18
  super().__init__(interval, async_mode)
17
19
  self._auto_output_on_stop = auto_output_on_stop
18
20
 
19
- def stop(self) -> Session:
21
+ @override
22
+ def stop(self) -> Session: #type: ignore[override-error, unused-ignore] #workaround for: https://github.com/google/pytype/issues/1917
20
23
  session = super().stop()
21
24
 
22
25
  if self._auto_output_on_stop:
@@ -56,7 +59,7 @@ class Profiler(OriginalProfiler):
56
59
  # Expander text + triangle
57
60
  html = html.replace("hsla(0,0%,100%,.58)", caption_color)
58
61
  html = html.replace('fill:"#FFF"', f'fill:"{caption_color}"')
59
- html = html.replace('"fill-opacity":".582"', f'"fill-opacity":"1"')
62
+ html = html.replace('"fill-opacity":".582"', '"fill-opacity":"1"')
60
63
  # Vertical guiding lines
61
64
  html = html.replace("opacity:.08", "opacity:.4")
62
65
  # File name and line (right side)
@@ -1,20 +0,0 @@
1
- [tool.poetry]
2
- name = "wfork-streamlit-profiler"
3
- version = "1.3.0"
4
- description = "(fork of) Runtime profiler for Streamlit, powered by pyinstrument"
5
- authors = ["Wyatt S Carpenter", "Johannes Rieke <johannes.rieke@gmail.com>"]
6
- license = "MIT"
7
- readme = "README.md"
8
- homepage = "https://github.com/wyattscarpenter/streamlit-profiler"
9
-
10
- [tool.poetry.dependencies]
11
- python = ">=3.8"
12
- streamlit = "^1.0.0"
13
- pyinstrument = "==5.0.1"
14
-
15
- [tool.poetry.group.dev.dependencies]
16
- black = "^21.12b0"
17
-
18
- [build-system]
19
- requires = ["poetry-core>=1.0.0"]
20
- build-backend = "poetry.core.masonry.api"