Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-cty committed Apr 28, 2024
1 parent 77c5164 commit 7598e87
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
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
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_powermetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7598e87

Please sign in to comment.