Skip to content

Commit

Permalink
Modernize 202409 (#101)
Browse files Browse the repository at this point in the history
* Update deps and modernize #94

* fix license classifier

* use ruff upgrade and isort

* add dependabot

* prep v2.3.0

---------

Co-authored-by: 20C <[email protected]>
  • Loading branch information
grizz and 20c-ed authored Oct 18, 2024
1 parent 590404e commit 716237d
Show file tree
Hide file tree
Showing 29 changed files with 1,799 additions and 2,322 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
32 changes: 16 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install virtualenv from poetry
uses: 20c/workflows/poetry@v1
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: install project
run: uv sync --all-extras --dev
- name: Run linters
run: |
poetry run isort src/
poetry run black --check src/
uv run pre-commit run --all-files
test:
needs: linting
Expand All @@ -25,18 +26,17 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Install virtualenv from poetry
uses: 20c/workflows/poetry@v1
with:
python-version: ${{ matrix.python-version }}
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Install python
run: uv python install ${{ matrix.python-version }}
- name: install tox
run: uv sync --all-extras --dev
- name: Run tests
run: |
poetry run pytest -vv --cov-report=term-missing --cov=peeringdb --cov-report=xml tests/
poetry run coverage report
run: uv run tox
- name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: true
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ dist/
site/
venv/
.DS_Store
.venv

35 changes: 6 additions & 29 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,13 @@ exclude: |
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: trailing-whitespace
- repo: local
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
hooks:
- id: system
name: isort
entry: poetry run isort .
language: system
pass_filenames: false
- repo: local
hooks:
- id: pyupgrade
name: pyupgrade
entry: poetry run pyupgrade --py36-plus
language: python
types: [python]
pass_filenames: true
- repo: local
hooks:
- id: system
name: Black
entry: poetry run black .
language: system
pass_filenames: false
- repo: local
hooks:
- id: system
name: flake8
entry: poetry run flake8 .
language: system
pass_filenames: false
- id: ruff
args: [--fix]
- id: ruff-format
13 changes: 0 additions & 13 deletions .style.yapf

This file was deleted.

26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@


## Unreleased


## 2.3.0
### Added
- python 3.12 support
### Fixed
- handle api data errors more gracefully, allowing to skip broken objects and retry them later (#95)
### Changed
- modernize (#94)
- poetry to uv packaging


## 2.2.0
### Fixed
- Client should handle rate limiting errors gracefully
- Client should handle rate limiting errors gracefully (#76)


## 2.1.1
Expand Down
15 changes: 11 additions & 4 deletions CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
Unreleased:
added: []
fixed:
- handle api data errors more gracefully, allowing to skip broken objects and retry them
later (#95)
fixed: []
changed: []
deprecated: []
removed: []
security: []
2.3.0:
added:
- python 3.12 support
fixed:
- handle api data errors more gracefully, allowing to skip broken objects and retry
them later (#95)
changed:
- modernize (#94)
- poetry to uv packaging
2.2.0:
fixed:
- Client should handle rate limiting errors gracefully
- Client should handle rate limiting errors gracefully (#76)
2.1.1:
fixed:
- fix pyproject.toml version
Expand Down
2 changes: 1 addition & 1 deletion Ctl/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.0
2.3.0
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ site_description: PeeringDB facilitates the exchange of information related to P
repo_url: https://github.com/peeringdb/peeringdb-py

theme: readthedocs
pages:
nav:
- Home: 'index.md'
- CLI: 'cli.md'
- API: 'api.md'
Expand Down
Loading

0 comments on commit 716237d

Please sign in to comment.