diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..b783175 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,13 @@ +--- +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..2f647cc --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,26 @@ +name: Lint Python Code + +on: + pull_request: + branches: [ master ] + push: + branches: [ master ] + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.13' + cache: 'pip' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install ruff + + - name: Run Ruff + run: ruff check --output-format=github diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..512e334 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,42 @@ +name: Publish to PyPI +on: + push: + tags: + - '*.*.*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install .[build] + + - name: Build package + run: python -m build + + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + + - name: Test publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.TESTPYPI_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ + + - name: Create GitHub Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create ${{ github.ref_name }} ./dist/* --generate-notes diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..2f6ec97 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,33 @@ +name: Run Tests + +on: + push: + branches: [master] + pull_request: + branches: [master] + workflow_call: + workflow_dispatch: + +jobs: + testing: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + 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 .[dev] + + - name: Run Pytest + run: | + pytest diff --git a/pyproject.toml b/pyproject.toml index bb37264..b2be1ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "realpython-reader" -version = "1.1.2" +version = "1.1.4" description = "Read the latest Real Python tutorials" readme = "README.md" authors = [{ name = "Real Python", email = "info@realpython.com" }] @@ -16,7 +16,7 @@ classifiers = [ ] keywords = ["feed", "reader", "tutorial"] dependencies = ["feedparser", "html2text", 'tomli; python_version < "3.11"'] -requires-python = ">=3.7" +requires-python = ">=3.9" [project.optional-dependencies] build = ["build", "twine"] @@ -31,7 +31,7 @@ requires-python = ">=3.7" [tool.bumpver] -current_version = "1.1.2" +current_version = "1.1.4" version_pattern = "MAJOR.MINOR.PATCH" commit_message = "bump version {old_version} -> {new_version}" commit = true @@ -57,4 +57,4 @@ strict = true [[tool.mypy.overrides]] module = "feedparser" - ignore_missing_imports = true + ignore_missing_imports = true \ No newline at end of file diff --git a/src/reader/__init__.py b/src/reader/__init__.py index 9c5c2be..383f287 100644 --- a/src/reader/__init__.py +++ b/src/reader/__init__.py @@ -19,7 +19,7 @@ # Version of realpython-reader package -__version__ = "1.1.2" +__version__ = "1.1.4" # Read URL of the Real Python feed from config file _cfg = tomllib.loads(resources.read_text("reader", "config.toml")) diff --git a/src/reader/__main__.py b/src/reader/__main__.py index 57d5284..56e5fa7 100644 --- a/src/reader/__main__.py +++ b/src/reader/__main__.py @@ -40,7 +40,7 @@ Version: -------- -- realpython-reader v1.1.2 +- realpython-reader v1.1.4 """ # Standard library imports import sys