Skip to content

Commit 08a7642

Browse files
Copilot4n4nd
andcommitted
Keep pandas as a core dependency
- Moved pandas>=1.4.0 from extras_require back to core requirements - Updated README.md to reflect that pandas is a core dependency - Removed 'dataframe' extra (no longer needed) - NumPy remains optional with lazy loading - All tests pass (46/46 relevant tests, same 9 pre-existing failures) Co-authored-by: 4n4nd <22333506+4n4nd@users.noreply.github.com>
1 parent b7f4b1e commit 08a7642

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ To install the latest release:
1111

1212
`pip install prometheus-api-client`
1313

14-
To install with all optional dependencies (pandas, numpy, matplotlib):
14+
To install with all optional dependencies (numpy, matplotlib):
1515

1616
`pip install prometheus-api-client[all]`
1717

18-
**Note:** Starting from version 0.7.0, pandas, numpy, and matplotlib are optional dependencies.
19-
If you only need `PrometheusConnect` without DataFrame support or plotting capabilities, you can install the minimal version which significantly reduces memory footprint and installation time, especially on Alpine-based Docker images.
18+
**Note:** Starting from version 0.7.0, numpy and matplotlib are optional dependencies. Pandas is included as a core dependency.
19+
The lazy import mechanism ensures that `PrometheusConnect` can be imported without loading numpy until `get_metric_aggregation()` is called, which reduces initial memory footprint.
2020

2121
To install only specific extras:
22-
- For DataFrame support: `pip install prometheus-api-client[dataframe]`
2322
- For numpy support: `pip install prometheus-api-client[numpy]`
2423
- For plotting support: `pip install prometheus-api-client[plot]`
2524

requirements-core.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
requests
22
dateparser
3+
pandas>=1.4.0

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ def get_version():
3737
url="https://github.com/4n4nd/prometheus-api-client-python",
3838
install_requires=get_install_requires(),
3939
extras_require={
40-
"dataframe": ["pandas>=1.4.0"],
4140
"numpy": ["numpy"],
4241
"plot": ["matplotlib"],
43-
"all": ["pandas>=1.4.0", "numpy", "matplotlib"],
42+
"all": ["numpy", "matplotlib"],
4443
},
4544
packages=setuptools.find_packages(),
4645
package_data={"prometheus-api-client": ["py.typed"]},

0 commit comments

Comments
 (0)