Name | ecojupyter JSON |
Version |
0.1.246
JSON |
| download |
home_page | None |
Summary | A JupyterLab extension for workflow sustainability metrics. |
upload_time | 2025-07-25 11:19:44 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | BSD 3-Clause License
Copyright (c) 2025, GonΓ§alo Ferreira
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
jupyter
jupyterlab
jupyterlab-extension
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# π±πβ»οΈ EcoJupyter (a [GreenDIGIT](https://greendigit-project.eu/) project)
`EcoJupyter` is an platform-agnostic sustainability assessment tool for AI infrastructures. The current version is focused on Jupyter Notebook.
This tool was developed for the GreenDIGIT EU Project, with the main goal of providing a platform agnostic and easily-pluggable sustainability and reproducibility tool.
## Main features
- Read energy metrics through Prometheus and Scaphandre in real-time charts.
- Energy computed KPIs such as SCI, SCI/Unit and Energy/Unit.
- Metadata manager and exporter for Federated Data Management Infrastructures (FDMI).
It works best with [JupyterK8sMonitor](https://github.com/g-uva/JupyterK8sMonitor) infrastructure configuration and scripts. _For more info please contact the main contributor._

## Installation
In order to install the tool as an extension in Jupyter Notebook or Lab (not in development), simply install the tool in your Python environment where Jupyter is running.
```sh
pip install --upgrade ecojupyter
```
## Development & Extension Framework
This repository was initially scaffolded using the official [JupyterLab Extension Tutorial](https://jupyterlab.readthedocs.io/en/stable/extension/extension_tutorial.html).
As a result, the extension supports a development mode with **live reloading**, allowing for real-time updates to the UI as you modify TypeScript/React components.
To launch the development environment (as per the tutorial), run:
```bash
./scripts/start-jupyterlab-dev.sh
```
This will start JupyterLab in development mode, ideal for iterating on the UI and debugging extension logic interactively.
Python Package & Deployment
The Python package is published on PyPI and can be built locally via:
```bash
./scripts/build-rel-package.sh
```
This script automatically packages the extension and prepares it for upload, enabling a simple and consistent release workflow.
#### Future Improvements
- Version-based deployment: easily extendable via GitHub releases or semantic versioning.
- CI/CD integration: GitHub Actions workflows are already present and can be extended for linting, testing, and publishing.
- Custom builds: additional scripts like `install-conda.sh` and `uninstall-conda.sh` support environment setup and teardown, aiding reproducibility.
## Project structure
### API definitions
EcoJupyter's front-end connects with the server's back-end using the IPython kernel through the `IKernelConnection.executeRequest()` channelβused to execute Kernel request on demand, written in Python or as a shell script. In the future a full-fledge RESTful API should be implemented to properly enforce types, definitions and methods. For the POC timeline this was the most reasonable trade-off between flexibility and effectiveness.
The methods can be found in `apiScripts.ts` module file, with all the API-like methods used defined and self-described.
### Folder Structure
```txt
EcoJupyter/
βββ .copier-answers.yml
βββ .gitignore
βββ .prettierignore
βββ .yarnrc.yml
βββ CHANGELOG.md
βββ LICENSE
βββ README.md
βββ RELEASE.md
βββ Untitled.ipynb
βββ install.json
βββ package.json
βββ pyproject.toml
βββ setup.py
βββ tsconfig.json
βββ yarn.lock
βββ .github
β βββ workflows
β βββ binder-on-pr.yml
β βββ build.yml
β βββ check-release.yml
β βββ enforce-label.yml
β βββ prep-release.yml
β βββ publish-release.yml
β βββ update-integration-tests.yml
βββ assets
β βββ EcoJupyter_screenshot.png
βββ ecojupyter
β βββ __init__.py
βββ scripts
β βββ add-catalogue-entry.sh
β βββ build-rel-package.sh
β βββ install-conda.sh
β βββ start-jupyterlab-dev.sh
β βββ uninstall-conda.sh
βββ src
βββ api
β βββ ApiTemp.ts
β βββ api-temp-openapi.yml
β βββ apiScripts.ts
β βββ getCarbonIntensityData.ts
β βββ getScaphData.ts
β βββ handleNotebookContents.ts
β βββ monitorCellExecutions.ts
βββ components
β βββ FetchMetricsComponents.tsx
β βββ KPIComponent.tsx
β βββ KpiValue.tsx
β βββ MetricSelector.tsx
β βββ ...
βββ dialog
β βββ CreateChartDialog.tsx
βββ helpers
β βββ constants.ts
β βββ types.ts
β βββ utils.ts
βββ index.ts
βββ widget.tsx
```
Raw data
{
"_id": null,
"home_page": null,
"name": "ecojupyter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "jupyter, jupyterlab, jupyterlab-extension",
"author": null,
"author_email": "Gon\u00e7alo Ferreira <g.j.teixeiradepinhoferreira@uva.nl>",
"download_url": "https://files.pythonhosted.org/packages/7e/4c/827c2504c6bde4d29e387cd109415348268f576f5dac598354f8c3c92de2/ecojupyter-0.1.246.tar.gz",
"platform": null,
"description": "# \ud83c\udf31\ud83c\udf0d\u267b\ufe0f EcoJupyter (a [GreenDIGIT](https://greendigit-project.eu/) project)\n\n`EcoJupyter` is an platform-agnostic sustainability assessment tool for AI infrastructures. The current version is focused on Jupyter Notebook.\n\nThis tool was developed for the GreenDIGIT EU Project, with the main goal of providing a platform agnostic and easily-pluggable sustainability and reproducibility tool.\n\n## Main features\n- Read energy metrics through Prometheus and Scaphandre in real-time charts.\n- Energy computed KPIs such as SCI, SCI/Unit and Energy/Unit.\n- Metadata manager and exporter for Federated Data Management Infrastructures (FDMI).\n\nIt works best with [JupyterK8sMonitor](https://github.com/g-uva/JupyterK8sMonitor) infrastructure configuration and scripts. _For more info please contact the main contributor._\n\n\n\n## Installation\nIn order to install the tool as an extension in Jupyter Notebook or Lab (not in development), simply install the tool in your Python environment where Jupyter is running.\n```sh\npip install --upgrade ecojupyter\n```\n\n## Development & Extension Framework\n\nThis repository was initially scaffolded using the official [JupyterLab Extension Tutorial](https://jupyterlab.readthedocs.io/en/stable/extension/extension_tutorial.html). \nAs a result, the extension supports a development mode with **live reloading**, allowing for real-time updates to the UI as you modify TypeScript/React components.\n\nTo launch the development environment (as per the tutorial), run:\n\n```bash\n./scripts/start-jupyterlab-dev.sh\n```\n\nThis will start JupyterLab in development mode, ideal for iterating on the UI and debugging extension logic interactively.\n\nPython Package & Deployment\nThe Python package is published on PyPI and can be built locally via:\n\n```bash\n./scripts/build-rel-package.sh\n```\nThis script automatically packages the extension and prepares it for upload, enabling a simple and consistent release workflow.\n\n#### Future Improvements\n- Version-based deployment: easily extendable via GitHub releases or semantic versioning.\n- CI/CD integration: GitHub Actions workflows are already present and can be extended for linting, testing, and publishing.\n- Custom builds: additional scripts like `install-conda.sh` and `uninstall-conda.sh` support environment setup and teardown, aiding reproducibility.\n\n## Project structure\n\n### API definitions\nEcoJupyter's front-end connects with the server's back-end using the IPython kernel through the `IKernelConnection.executeRequest()` channel\u2014used to execute Kernel request on demand, written in Python or as a shell script. In the future a full-fledge RESTful API should be implemented to properly enforce types, definitions and methods. For the POC timeline this was the most reasonable trade-off between flexibility and effectiveness.\n\nThe methods can be found in `apiScripts.ts` module file, with all the API-like methods used defined and self-described.\n\n### Folder Structure\n```txt\nEcoJupyter/\n\u251c\u2500\u2500 .copier-answers.yml\n\u251c\u2500\u2500 .gitignore\n\u251c\u2500\u2500 .prettierignore\n\u251c\u2500\u2500 .yarnrc.yml\n\u251c\u2500\u2500 CHANGELOG.md\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 RELEASE.md\n\u251c\u2500\u2500 Untitled.ipynb\n\u251c\u2500\u2500 install.json\n\u251c\u2500\u2500 package.json\n\u251c\u2500\u2500 pyproject.toml\n\u251c\u2500\u2500 setup.py\n\u251c\u2500\u2500 tsconfig.json\n\u251c\u2500\u2500 yarn.lock\n\u251c\u2500\u2500 .github\n\u2502 \u2514\u2500\u2500 workflows\n\u2502 \u251c\u2500\u2500 binder-on-pr.yml\n\u2502 \u251c\u2500\u2500 build.yml\n\u2502 \u251c\u2500\u2500 check-release.yml\n\u2502 \u251c\u2500\u2500 enforce-label.yml\n\u2502 \u251c\u2500\u2500 prep-release.yml\n\u2502 \u251c\u2500\u2500 publish-release.yml\n\u2502 \u2514\u2500\u2500 update-integration-tests.yml\n\u251c\u2500\u2500 assets\n\u2502 \u2514\u2500\u2500 EcoJupyter_screenshot.png\n\u251c\u2500\u2500 ecojupyter\n\u2502 \u2514\u2500\u2500 __init__.py\n\u2514\u2500\u2500 scripts\n\u2502 \u251c\u2500\u2500 add-catalogue-entry.sh\n\u2502 \u251c\u2500\u2500 build-rel-package.sh\n\u2502 \u251c\u2500\u2500 install-conda.sh\n\u2502 \u251c\u2500\u2500 start-jupyterlab-dev.sh\n\u2502 \u2514\u2500\u2500 uninstall-conda.sh\n\u2514\u2500\u2500 src\n \u251c\u2500\u2500 api\n \u2502 \u251c\u2500\u2500 ApiTemp.ts\n \u2502 \u251c\u2500\u2500 api-temp-openapi.yml\n \u2502 \u251c\u2500\u2500 apiScripts.ts\n \u2502 \u251c\u2500\u2500 getCarbonIntensityData.ts\n \u2502 \u251c\u2500\u2500 getScaphData.ts\n \u2502 \u251c\u2500\u2500 handleNotebookContents.ts\n \u2502 \u2514\u2500\u2500 monitorCellExecutions.ts\n \u251c\u2500\u2500 components\n \u2502 \u251c\u2500\u2500 FetchMetricsComponents.tsx\n \u2502 \u251c\u2500\u2500 KPIComponent.tsx\n \u2502 \u251c\u2500\u2500 KpiValue.tsx\n \u2502 \u251c\u2500\u2500 MetricSelector.tsx\n \u2502 \u2514\u2500\u2500 ...\n \u251c\u2500\u2500 dialog\n \u2502 \u2514\u2500\u2500 CreateChartDialog.tsx\n \u251c\u2500\u2500 helpers\n \u2502 \u251c\u2500\u2500 constants.ts\n \u2502 \u251c\u2500\u2500 types.ts\n \u2502 \u2514\u2500\u2500 utils.ts\n \u251c\u2500\u2500 index.ts\n \u2514\u2500\u2500 widget.tsx\n```\n\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License\n \n Copyright (c) 2025, Gon\u00e7alo Ferreira\n All rights reserved.\n \n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n \n 1. Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n \n 2. Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n \n 3. Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n \n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"summary": "A JupyterLab extension for workflow sustainability metrics.",
"version": "0.1.246",
"project_urls": {
"Bug Tracker": "https://github.com/g-uva/EcoJupyter/issues",
"Homepage": "https://github.com/g-uva/EcoJupyter",
"Repository": "https://github.com/g-uva/EcoJupyter.git"
},
"split_keywords": [
"jupyter",
" jupyterlab",
" jupyterlab-extension"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7e4c827c2504c6bde4d29e387cd109415348268f576f5dac598354f8c3c92de2",
"md5": "b3e1f96a0205de5b7c6c07f2de23de14",
"sha256": "2918ad5b5da49a6849461016ec98436d280d19657adfadc8cd364ba9cf9d579f"
},
"downloads": -1,
"filename": "ecojupyter-0.1.246.tar.gz",
"has_sig": false,
"md5_digest": "b3e1f96a0205de5b7c6c07f2de23de14",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1609704,
"upload_time": "2025-07-25T11:19:44",
"upload_time_iso_8601": "2025-07-25T11:19:44.685147Z",
"url": "https://files.pythonhosted.org/packages/7e/4c/827c2504c6bde4d29e387cd109415348268f576f5dac598354f8c3c92de2/ecojupyter-0.1.246.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 11:19:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "g-uva",
"github_project": "EcoJupyter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ecojupyter"
}