-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from Jylpah/dev-1.0
CI update
- Loading branch information
Showing
19 changed files
with
232 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python package MacOS & Windows | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '23 2 5 * *' | ||
|
||
# push: | ||
# branches: [ "main", "main-1.0" ] | ||
# pull_request: | ||
# branches: [ "main", "main-1.0" ] | ||
|
||
jobs: | ||
build: | ||
# runs-on: [ ubuntu-latest ] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.11", "3.12"] | ||
os: [ windows-latest, macos-latest ] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install . | ||
python -m pip install ".[dev]" | ||
- name: Lint with ruff | ||
run: | | ||
ruff check src tests | ||
- name: Test with mypy | ||
run: | | ||
mypy src | ||
- name: Test with pytest | ||
run: | | ||
pytest --cov . | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} # ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
informational: true | ||
threshold: 1% | ||
patch: | ||
default: | ||
informational: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[project] | ||
name = "pyutils" | ||
version = "1.0.0" | ||
version = "1.0.1" | ||
authors = [{ name = "Jylpah", email = "[email protected]" }] | ||
description = "Misc Python utils and classes" | ||
readme = "README.md" | ||
|
@@ -16,29 +16,30 @@ classifiers = [ | |
"Topic :: Games/Entertainment", | ||
] | ||
dependencies = [ | ||
"aiofiles~=23.1", | ||
"aiohttp~=3.9.1", | ||
"aiodns~=3.0", | ||
"aioconsole~=0.6", | ||
"alive-progress~=3.1", | ||
"Brotli~=1.1", | ||
"Deprecated~=1.2", | ||
"click~=8.1", | ||
"typer~=0.9", | ||
"aiofiles>=23.1", | ||
"aiohttp>=3.9.1", | ||
"aiodns>=3.0", | ||
"aioconsole>=0.6", | ||
"alive-progress>=3.1", | ||
"Brotli>=1.1", | ||
"Deprecated>=1.2", | ||
"click>=8.1", | ||
"typer>=0.9", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"build~=0.10", | ||
"mypy~=1.7", | ||
"pip-chill~=1.0", | ||
"pytest~=7.4", | ||
"pytest-asyncio~=0.23", | ||
"pytest-datafiles~=3.0", | ||
"pytest-cov~=4.1", | ||
"pytest-timeout~=2.2", | ||
"types-aiofiles~=23.1.0.1", | ||
"types-Deprecated~=1.2.9.3", | ||
"build>=0.10", | ||
"mypy>=1.7", | ||
"pip-chill>=1.0", | ||
"pytest>=7.4", | ||
"pytest-asyncio>=0.23", | ||
"pytest-datafiles>=3.0", | ||
"pytest-cov>=4.1", | ||
"pytest-timeout>=2.2", | ||
"ruff>=0.1.9", | ||
"types-aiofiles>=23.1.0.1", | ||
"types-Deprecated>=1.2.9.3", | ||
] | ||
|
||
|
||
|
@@ -60,9 +61,11 @@ packages = ["src/pyutils"] | |
exclude = ['tmp'] | ||
mypy_path = ['src'] | ||
|
||
[tool.black] | ||
# line-length = 100 | ||
include = '\.pyi?$' | ||
[tool.ruff] | ||
include = ["pyproject.toml", "src/**/*.py", "tests/**/*.py"] | ||
indent-width = 4 | ||
extend-include = ["*.ipynb"] | ||
fixable = ["ALL"] | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "7.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import logging, sys | ||
import logging | ||
import sys | ||
from typing import Literal, Optional | ||
from pathlib import Path | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.