Skip to content

Commit

Permalink
Lower the requirements of the package, now Python >=3.6 is supported (#…
Browse files Browse the repository at this point in the history
…16)

Closes #14
  • Loading branch information
Giglium authored Oct 12, 2023
1 parent 5b618a8 commit 3b42936
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Release
on:
push:
tags:
- '*'
- '*.*.*'

jobs:
release:
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ on:
pull_request:

jobs:
test:
test_python_version:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'

steps:
- name: Checkout code
Expand All @@ -33,7 +36,38 @@ jobs:
python-version: ${{ matrix.python }}

- name: Install dependencies
run: make py.update
run: python3 -m pip install -r requirements.txt

- name: Run tests
run: make test

test_old_python_version:
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
python:
- '3.6'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

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

- name: Install dependencies
run: python -m pip install -r requirements.txt

# Data Classes (https://peps.python.org/pep-0557/) was introduced in python 3.7
# To work around it, I need to install it with pip
- name: Install dataclasses
run: python -m pip install dataclasses

- name: Run tests
run: make test
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ You can install Vinted Scraper using pip:
pip install vinted_scraper
```

> If you are on Python 3.6 you also have to install `dataclasses`: `pip install dataclasses`
## Functions

The package offers the following functions:
<details>
<summary><code>search</code><code>(gets all the items present on the listing page)</code></summary>
<summary><code>search</code> - <code>(gets all the items present on the listing page)</code></summary>

**Parameters**

Expand All @@ -28,7 +30,7 @@ The package offers the following functions:
</details>
<details>
<summary><code>item</code><code>(gets the information about an item, and its seller present on the item detail page)</code></summary>
<summary><code>item</code> - <code>(gets the information about an item, and its seller present on the item detail page)</code></summary>

**Parameters**

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "vinted_scraper"
version = "2.0.0"
description = "A very simple Python package that scrapes the Vinted website to retrieve information about its items."
readme = "README.md"
requires-python = ">= 3.9"
requires-python = ">= 3.6"
license = {file = "LICENSE"}
authors = [
{name = "Giglium"}
Expand All @@ -20,7 +20,7 @@ classifiers = [
"Intended Audience :: Education",
]
dependencies = [
"requests>=2.31.0"
"requests"
]

[tool.isort]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
requests>=2.31.0
requests

0 comments on commit 3b42936

Please sign in to comment.