Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize installation, CI config and linting tools #78

Merged
merged 4 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 47 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,60 @@ on:
- setup.py

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'lint_requirements.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install project
run: |
pip install -e .
- name: Install dependencies
run: |
pip install -U -r lint_requirements.txt
- name: Formatting
if: always()
run: |
ruff format pyclibrary tests --check
- name: Linting
if: always()
run: |
ruff check pyclibrary tests
# - name: Typing
# if: always()
# run: |
# mypy pyclibrary
tests:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -39,7 +82,7 @@ jobs:
pip install pytest-cov
python -m pytest tests --cov pyclibrary --cov-report xml -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ jobs:
name: Docs building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install project
run: |
python setup.py develop
pip install .
- name: Install graphviz
uses: kamiazya/setup-graphviz@v1
- name: Install doc building tools
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.12'
- name: Build sdist
run: |
pip install --upgrade pip
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ __pycache__
*.egg-info

.mypy_cache
*.pyclibcache
*.pyclibcache

version.py
5 changes: 4 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
PyCLibrary Changelog
====================

0.2.3 - unreleased
0.3.0 - unreleased
------------------

- officially support Python 3.10+ (up to 3.13) PR #78
- drop support for Python < 3.9 PR #78
- move installation to pyproject base installation procedure PR #78
- allow selection of encoding when loading files (issue #51)

0.2.2 - 22/01/2024
Expand Down
Loading
Loading