diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3891848 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + groups: + gh-actions: + patterns: + - "*" diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 83a36e4..740c233 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -1,6 +1,9 @@ name: build-and-release -on: push +on: + push: + branches: [master] + pull_request: defaults: run: @@ -13,13 +16,12 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-13, macos-latest] python: ["3.9"] steps: + - uses: actions/checkout@v4 - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} @@ -34,7 +36,12 @@ jobs: run: ./scripts/setup --no-pip - name: Run checks - run: ./scripts/check + run: | + ./scripts/check + ./scripts/format + + - name: Assert no changes + run: git diff --exit-code - name: Build run: ./scripts/build @@ -65,10 +72,11 @@ jobs: run: | mv pferd-ubuntu-latest pferd-linux mv pferd-windows-latest pferd-windows.exe + mv pferd-macos-13 pferd-mac-x86_64 mv pferd-macos-latest pferd-mac - name: Create release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -76,3 +84,4 @@ jobs: pferd-linux pferd-windows.exe pferd-mac + pferd-mac-x86_64 diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 14509d6..0000000 --- a/mypy.ini +++ /dev/null @@ -1,11 +0,0 @@ -[mypy] -disallow_any_generics = True -disallow_untyped_defs = True -disallow_incomplete_defs = True -no_implicit_optional = True -warn_unused_ignores = True -warn_unreachable = True -show_error_context = True - -[mypy-rich.*,bs4,keyring] -ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 9787c3b..bc67e1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,42 @@ [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" + +[project] +name = "PFERD" +dependencies = [ + "aiohttp>=3.8.1", + "beautifulsoup4>=4.10.0", + "rich>=11.0.0", + "keyring>=23.5.0", + "certifi>=2021.10.8" +] +dynamic = ["version"] +requires-python = ">=3.9" + +[project.scripts] +pferd = "PFERD.__main__:main" + +[tool.setuptools.dynamic] +version = {attr = "PFERD.version.VERSION"} + +[tool.flake8] +max-line-length = 110 + +[tool.isort] +line_length = 110 + +[tool.autopep8] +max_line_length = 110 +in-place = true +recursive = true + +[tool.mypy] +disallow_any_generics = true +disallow_untyped_defs = true +disallow_incomplete_defs = true +no_implicit_optional = true +warn_unused_ignores = true +warn_unreachable = true +show_error_context = true +ignore_missing_imports = true diff --git a/scripts/check b/scripts/check index 2283951..aea2783 100755 --- a/scripts/check +++ b/scripts/check @@ -2,5 +2,5 @@ set -e -mypy PFERD +mypy . flake8 PFERD diff --git a/scripts/format b/scripts/format index d8917ef..981cd75 100755 --- a/scripts/format +++ b/scripts/format @@ -2,5 +2,5 @@ set -e -autopep8 --recursive --in-place PFERD -isort PFERD +autopep8 . +isort . diff --git a/scripts/setup b/scripts/setup index f6680bb..0114266 100755 --- a/scripts/setup +++ b/scripts/setup @@ -13,5 +13,5 @@ pip install --upgrade setuptools pip install --editable . # Installing tools and type hints -pip install --upgrade mypy flake8 autopep8 isort pyinstaller +pip install --upgrade mypy flake8 flake8-pyproject autopep8 isort pyinstaller pip install --upgrade types-chardet types-certifi diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2378c48..0000000 --- a/setup.cfg +++ /dev/null @@ -1,23 +0,0 @@ -[metadata] -name = PFERD -version = attr: PFERD.version.VERSION - -[options] -packages = find: -python_requires = >=3.9 -install_requires = - aiohttp>=3.8.1 - beautifulsoup4>=4.10.0 - rich>=11.0.0 - keyring>=23.5.0 - certifi>=2021.10.8 - -[options.entry_points] -console_scripts = - pferd = PFERD.__main__:main - -[flake8] -max_line_length = 110 - -[isort] -line_length = 110