Skip to content

Commit

Permalink
More updates to V2
Browse files Browse the repository at this point in the history
Bump python to 3.8+
Add cron checks to imporve compatibility
Use ruff, update github CI and pre-commit
Remove dependabot
Improve Tag class, add unit tests for it
Remove old code from parser class
Add more samples to rss
  • Loading branch information
dhvcc committed May 28, 2023
1 parent 1a1d20e commit c99b985
Show file tree
Hide file tree
Showing 16 changed files with 892 additions and 187 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

8 changes: 0 additions & 8 deletions .github/dependabot.yml

This file was deleted.

21 changes: 11 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: Lint and test

on:
schedule:
- cron: "1 1 0 * *"
push:
paths-ignore:
- '.github/**'
- '!.github/workflows/ci.yml'
- '.gitignore'
- 'README.md'
- ".github/**"
- "!.github/workflows/ci.yml"
- ".gitignore"
- "README.md"
pull_request:

jobs:
build:
strategy:
max-parallel: 6
matrix:
# TODO: Add cli to parse to json
# TODO: Possibly bundle as deb/rpm/exe
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
python-version: [ 3.7, 3.8, 3.9, '3.10' ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]

runs-on: ${{ matrix.os }}

Expand All @@ -34,17 +38,14 @@ jobs:
cache: poetry

- name: Install dependencies
if: steps.setup-python.outputs.cache-hit != 'true'
if: steps.setup-python.outputs.cache-hit != "true"
run: poetry install

- name: Lint code with flake8
run: poetry run flake8

- name: Lint code with black
run: poetry run black --check .

- name: Lint code with isort
run: poetry run isort --check-only .
run: poetry run ruff check .

- name: Test code with pytest
run: poetry run pytest
3 changes: 2 additions & 1 deletion .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Publish Package to PyPI with poetry
on:
push:
tags:
- 'v*'
- "v*"
# TODO: on CI success

jobs:
build-and-test-publish:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ venv.bak/
.mypy_cache/

.rss-parser
poetry.lock
.ruff_cache
22 changes: 6 additions & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,16 @@ repos:
language: system
types: [ python ]
stages: [ commit ]
# Black should use the config from the pyproject.toml file

- id: isort
name: isort
- id: ruff
name: ruff
entry: poetry
args:
- run
- isort
language: system
types: [ python ]
stages: [ commit ]
# isort's config is also stored in pyproject.toml

- id: flake8
name: flake8
entry: poetry
args:
- run
- flake8
- ruff
- check
- .
language: system
always_run: true
pass_filenames: false
stages: [ push ]
stages: [ commit, push ]
Loading

0 comments on commit c99b985

Please sign in to comment.