diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a898d75f3..60f4b2056 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.11"] + python-version: ["3.11"] steps: - uses: actions/checkout@v2 @@ -18,12 +18,8 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions - - name: Test package with tox - run: tox -vv + - name: Test package + run: hatch run test:package build_server: runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c7c8f628..b8d80c47f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ We have dropped support of Python 3.6 since version 2.0.0 of CodeCarbon. It is not mandatory for small contribution, while not recommanded, you could just install the package with `pip install -e .`. -Please install [Hatch](https://hatch.pypa.io/) following [installation instruction](https://hatch.pypa.io/latest/install/), or with `pip install hatch`. +Please install [Hatch](https://hatch.pypa.io/) following [installation instruction](https://hatch.pypa.io/latest/install/), or with `pipx install hatch`. Then, clone the repository and create the environment with: diff --git a/setup.py b/old-setup.py similarity index 100% rename from setup.py rename to old-setup.py diff --git a/pyproject.toml b/pyproject.toml index aedf6891b..65cf6fcbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,6 +89,7 @@ lint = ["black --check --diff {args:.}", "ruff check {args:.}", "mypy {args:.}"] format = ["black {args:.}", "ruff --fix --exit-non-zero-on-fix {args:.}"] [tool.hatch.envs.test] +features = ["viz"] dependencies = [ "mock", "pytest", diff --git a/tests/test_powermetrics.py b/tests/test_powermetrics.py index 83549e7d1..2bd1356ae 100644 --- a/tests/test_powermetrics.py +++ b/tests/test_powermetrics.py @@ -17,7 +17,7 @@ def test_apple_powermetrics(self): details = power_gadget.get_details() assert len(details) > 0 - @pytest.mark.integ_test + # @pytest.mark.integ_test @mock.patch("codecarbon.core.powermetrics.ApplePowermetrics._log_values") @mock.patch("codecarbon.core.powermetrics.ApplePowermetrics._setup_cli") def test_get_details(self, mock_setup, mock_log_values):