Skip to content

Commit

Permalink
Merge pull request #662 from mlco2/fix/print
Browse files Browse the repository at this point in the history
Fix unwanted print in 2.7.0
  • Loading branch information
benoit-cty authored Sep 11, 2024
2 parents 6a165ed + 467cbce commit e6d1ca5
Show file tree
Hide file tree
Showing 31 changed files with 300 additions and 363 deletions.
99 changes: 52 additions & 47 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,34 @@

<!-- TOC start (generated with https://github.com/derlin/bitdowntoc) -->

- [</a> Have a Question?](#have-a-question)
- [</a> Found a Bug?](#found-a-bug)
- [</a> Have a Feature Request?](#have-a-feature-request)
- [</a> Ready to Contribute!](#ready-to-contribute)
* [</a> Create an issue](#create-an-issue)
* [Installation](#installation)
* [Some Hatch commands](#some-hatch-commands)
* [Tests](#tests)
* [Stress your computer](#stress-your-computer)
* [Update all dependancies](#update-all-dependancies)
* [Branching and Pull Requests](#branching-and-pull-requests)
* [Debug in VS Code](#debug-in-vs-code)
* [<a name="local_deployement"></a> Local deployment](#local-deployment)
- [CSV Dashboard](#csv-dashboard)
- [API Dashboard](#api-dashboard)
* [API](#api)
* [Test the API](#test-the-api)
* [Coding style && Linting](#coding-style-linting)
* [Dependencies management](#dependencies-management)
* [Alternative ways of contributing](#alternative-ways-of-contributing)
* [<a name="documentation"></a>Build Documentation 🖨️](#build-documentation-)
* [Release process](#release-process)
+ [Restore database from a production Backup](#restore-database-from-a-production-backup)
+ [Deployment](#deployment)
- [API](#api-1)
- [Dashboard](#dashboard)
* [License](#license)
- [Contributing to Code Carbon](#contributing-to-code-carbon)
- [ Have a Question?](#-have-a-question)
- [ Found a Bug?](#-found-a-bug)
- [ Have a Feature Request?](#-have-a-feature-request)
- [ Ready to Contribute!](#-ready-to-contribute)
- [ Create an issue](#-create-an-issue)
- [Installation](#installation)
- [Some Hatch commands](#some-hatch-commands)
- [Tests](#tests)
- [Stress your computer](#stress-your-computer)
- [Update all dependancies](#update-all-dependancies)
- [Branching and Pull Requests](#branching-and-pull-requests)
- [Debug in VS Code](#debug-in-vs-code)
- [ Local deployment](#-local-deployment)
- [CSV Dashboard](#csv-dashboard)
- [API Dashboard](#api-dashboard)
- [API](#api)
- [Test the API](#test-the-api)
- [Coding style \&\& Linting](#coding-style--linting)
- [Dependencies management](#dependencies-management)
- [Alternative ways of contributing](#alternative-ways-of-contributing)
- [Build Documentation 🖨️](#build-documentation-️)
- [Release process](#release-process)
- [Restore database from a production Backup](#restore-database-from-a-production-backup)
- [Deployment](#deployment)
- [API](#api-1)
- [Dashboard](#dashboard)
- [License](#license)

<!-- TOC end -->

Expand Down Expand Up @@ -106,27 +107,29 @@ View the options of CodeCarbon environments:
│ │ │ │ sphinx-rtd-theme │ │
├─────────────┼─────────────┼──────────┼───────────────────────────┼───────────────────┤
│ dev │ pip-compile │ │ black │ format │
│ │ │ │ mypy │ lint │
│ │ │ │ pre-commit │ mypy-check │
│ │ │ │ ruff │ precommit │
│ │ │ │ │ precommit-install │
│ │ │ │ bumpver │ lint │
│ │ │ │ mypy │ mypy-check │
│ │ │ │ pre-commit │ precommit │
│ │ │ │ ruff │ precommit-install │
│ │ │ │ │ precommit-update │
├─────────────┼─────────────┼──────────┼───────────────────────────┼───────────────────┤
│ dashboard │ pip-compile │ │ dash-bootstrap-components │ run │
│ │ │ │ dash>=2.2.0 │ │
│ │ │ │ plotly>=5.6.0 │ │
├─────────────┼─────────────┼──────────┼───────────────────────────┼───────────────────┤
│ api │ pip-compile │ │ alembic<2.0.0 │ docker │
│ │ │ │ bcrypt<5.0.0 │ local
│ │ │ │ dependency-injector<5.0.0 │ server-ci │
│ │ │ │ fastapi-pagination<1.0.0 │ setup-db │
│ │ │ │ fastapi<1.0.0 │ test-integ │
│ │ │ │ bcrypt<5.0.0 │ downgrade-db │
│ │ │ │ dependency-injector<5.0.0 │ local
│ │ │ │ fastapi-pagination<1.0.0 │ server-ci │
│ │ │ │ fastapi<1.0.0 │ setup-db │
│ │ │ │ fief-client[fastapi] │ test-integ │
│ │ │ │ httpx │ test-unit │
│ │ │ │ mock │ │
│ │ │ │ numpy │ │
│ │ │ │ psutil │ │
│ │ │ │ psycopg2-binary<3.0.0 │ │
│ │ │ │ pydantic[email]<2.0.0 │ │
│ │ │ │ pyjwt │ │
│ │ │ │ pytest │ │
│ │ │ │ python-dateutil<3.0.0 │ │
│ │ │ │ rapidfuzz │ │
Expand All @@ -136,18 +139,20 @@ View the options of CodeCarbon environments:
│ │ │ │ sqlalchemy<2.0.0 │ │
│ │ │ │ uvicorn[standard]<1.0.0 │ │
└─────────────┴─────────────┴──────────┴───────────────────────────┴───────────────────┘
Matrices
┏━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Name ┃ Type ┃ Envs ┃ Features ┃ Dependencies ┃ Scripts ┃
┡━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
test │ pip-compile │ test.py3.8 │ viz │ mock │ package │
│ │ │ test.py3.9 │ │ numpy │ package-integ │
│ │ │ test.py3.10 │ │ psutil │ │
│ │ │ test.py3.11 │ │ pytest │ │
│ │ │ test.py3.12 │ │ rapidfuzz │ │
│ │ │ │ │ requests-mock │ │
│ │ │ │ │ responses │ │
└──────┴─────────────┴─────────────┴──────────┴───────────────┴───────────────┘
Matrices
┏━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Name ┃ Type ┃ Envs ┃ Features ┃ Dependencies ┃ Scripts ┃
┡━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
test │ pip-compile │ test.py3.8 │ viz │ importlib-resources; python_version < '3.9' │ package │
│ │ │ test.py3.9 │ │ mock │ package-integ │
│ │ │ test.py3.10 │ │ numpy; python_version >= '3.9' │ │
│ │ │ test.py3.11 │ │ numpy<2.0.0; python_version < '3.9' │ │
│ │ │ test.py3.12 │ │ psutil │ │
│ │ │ │ │ pytest │ │
│ │ │ │ │ rapidfuzz │ │
│ │ │ │ │ requests-mock │ │
│ │ │ │ │ responses │ │
└──────┴─────────────┴─────────────┴──────────┴─────────────────────────────────────────────┴───────────────┘
```

To know the path of a env :
Expand Down
2 changes: 1 addition & 1 deletion codecarbon/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.7.0"
__version__ = "2.7.1"
2 changes: 1 addition & 1 deletion codecarbon/emissions_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def _init_output_methods(self, api_key):
self._output_handlers.append(LogfireOutput())

def service_shutdown(self, signum, frame):
print("Caught signal %d" % signum)
logger.warning("service_shutdown - Caught signal %d" % signum)
self.stop()

@suppress(Exception)
Expand Down
1 change: 0 additions & 1 deletion codecarbon/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def get_ressource_path(package: str, filepath: str):
file_manager = ExitStack()
atexit.register(file_manager.close)
ref = importlib_resources_files(package).joinpath(filepath)
print("ref:", ref)
path = file_manager.enter_context(importlib_resources_as_file(ref))
return path

Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 55a78136b12ee4b880cbead1cbeeb85c
config: 55fdda7a695bdf5582bdb6db957b2ebf
tags: 645f666f9bcd5a90fca523b33c5a78b7
6 changes: 1 addition & 5 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -237,10 +237,6 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/doctools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down
5 changes: 3 additions & 2 deletions docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '2.7.0',
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '2.7.1',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/language_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];


/* Non-minified version is copied as a separate JS file, if available */
/* Non-minified version is copied as a separate JS file, is available */

/**
* Porter Stemmer
Expand Down
Loading

0 comments on commit e6d1ca5

Please sign in to comment.