Skip to content

Commit

Permalink
fix python version
Browse files Browse the repository at this point in the history
  • Loading branch information
narumiruna committed Jun 27, 2024
1 parent 1885f8b commit 237b9dc
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 32 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ jobs:
python-version: ["3.11"]
poetry-version: ["1.8.3"]
steps:
-
uses: actions/checkout@v4
-
name: Install Poetry
run: pipx install poetry==${{ matrix.poetry-version }}
-
uses: actions/setup-python@v5
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
-
name: Publish
- uses: narumiruna/setup-poetry@v1
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,22 @@ jobs:
python-version: ["3.9", "3.10", "3.11"]
poetry-version: ["1.8.3"]
steps:
-
uses: actions/checkout@v4
-
name: Install Poetry
run: pipx install poetry==${{ matrix.poetry-version }}
-
uses: actions/setup-python@v5
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry
-
name: Install dependencies
- uses: narumiruna/setup-poetry@v1
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install
-
name: Lint
- name: Lint
run: poetry run ruff check .
-
name: Type check
run: poetry run mypy --install-types --non-interactive mlconfig
-
name: Test
- name: Type check
run: poetry run mypy --install-types --non-interactive .
- name: Test
run: poetry run pytest -v -s --cov=mlconfig --cov-report=xml tests
-
name: Upload coverage reports to Codecov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
63 changes: 61 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ ruff = "^0.5.0"
toml = "^0.10.2"
mypy = "^1.10.1"


[tool.poetry.group.mypy.dependencies]
types-pyyaml = "^6.0.12.20240311"
types-pygments = "^2.18.0.20240506"
types-colorama = "^0.4.15.20240311"
types-setuptools = "^70.1.0.20240627"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Expand Down Expand Up @@ -44,3 +51,6 @@ force-single-line = true

[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning"]

[tool.mypy]
ignore_missing_imports = true

0 comments on commit 237b9dc

Please sign in to comment.