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

Update tool versions, add description #227

Merged
merged 2 commits into from
Jun 3, 2024
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
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
include:
- python-version: "3.8"
- python-version: "3.12" # Keep in sync with .readthedocs.yml
env:
TOXENV: docs
- python-version: "3.12"
Expand All @@ -27,12 +27,15 @@ jobs:
- python-version: "3.12"
env:
TOXENV: typing
- python-version: "3.12"
env:
TOXENV: twinecheck

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand All @@ -27,9 +27,8 @@ jobs:
- name: Publish to PyPI
if: steps.check-release-tag.outputs.release_tag == 'true'
run: |
pip install --upgrade pip
pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
pip install --upgrade build twine
python -m build
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }}
twine upload dist/*
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
rev: 1.7.8
hooks:
- id: bandit
args: [-r, -c, .bandit.yml]
Expand All @@ -9,7 +9,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/psf/black.git
rev: 24.1.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/isort
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
from setuptools import find_packages, setup

with open("README.rst", encoding="utf-8") as f:
long_description = f.read()

setup(
name="w3lib",
version="2.1.2",
license="BSD",
description="Library of web-related functions",
long_description=long_description,
long_description_content_type="text/x-rst",
author="Scrapy project",
author_email="info@scrapy.org",
url="https://github.com/scrapy/w3lib",
Expand Down
15 changes: 12 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py38, py39, py310, py311, py312, pypy3, docs, pylint, typing, pre-commit
envlist = py38, py39, py310, py311, py312, pypy3, docs, pylint, typing, pre-commit, twinecheck

[testenv]
deps =
Expand All @@ -21,14 +21,14 @@ basepython = python3
deps =
# mypy would error if pytest (or its sub) not found
pytest
mypy==1.0.0
mypy==1.10.0
commands =
mypy --strict {posargs: w3lib tests}

[testenv:pylint]
deps =
{[testenv]deps}
pylint==3.0.0
pylint==3.2.2
commands =
pylint conftest.py docs setup.py tests w3lib

Expand All @@ -42,3 +42,12 @@ commands =
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
skip_install = true

[testenv:twinecheck]
basepython = python3
deps =
twine==5.1.0
build==1.2.1
commands =
python -m build --sdist
twine check dist/*