diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml new file mode 100644 index 000000000..74e4b5457 --- /dev/null +++ b/.github/workflows/test-package.yml @@ -0,0 +1,28 @@ +name: test-package + +on: + pull_request: + paths: + - "codecarbon/**" + - "pyproject.toml" + - "requirements.txt" + +jobs: + python-test: + runs-on: ubuntu-24.04 + strategy: + matrix: + python-version: ["3.9", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install hatch==1.13.0 hatchling==1.25.0 + - name: Test package + run: | + hatch run +py=${{ matrix.python-version }} test:package diff --git a/codecarbon/emissions_tracker.py b/codecarbon/emissions_tracker.py index 1407db3e5..24ee26c4f 100644 --- a/codecarbon/emissions_tracker.py +++ b/codecarbon/emissions_tracker.py @@ -1,6 +1,6 @@ """ Contains implementations of the Public facing API: EmissionsTracker, -OfflineEmissionsTracker and @track_emissions +OfflineEmissionsTracker, context manager and decorator @track_emissions """ import dataclasses @@ -1126,7 +1126,6 @@ def wrapped_fn(*args, **kwargs): log_level=log_level, on_csv_write=on_csv_write, logger_preamble=logger_preamble, - pue=pue, country_iso_code=country_iso_code, region=region, cloud_provider=cloud_provider,