Skip to content

Commit 87003a2

Browse files
committed
Fix requirements: Move visual dependencies to extras_require, update setup.py
1 parent 1d8b01f commit 87003a2

5 files changed

Lines changed: 47 additions & 39 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CI
33
on:
44
push:
55
branches: [ main, master, develop ]
6+
tags:
7+
- 'v*' # Also run CI on version tags
68
pull_request:
79
branches: [ main, master, develop ]
810

‎.github/workflows/release.yml‎

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,27 @@
11
name: Release
22

33
on:
4-
push:
5-
tags:
6-
- 'v*' # Triggers on version tags like v1.0.0
4+
workflow_run:
5+
workflows: ["CI"]
6+
types:
7+
- completed
8+
branches:
9+
- main
10+
- master
711

812
jobs:
9-
test:
13+
release:
1014
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
python-version: ["3.8", "3.9", "3.10", "3.11"]
14-
15+
if: |
16+
github.event.workflow_run.conclusion == 'success' &&
17+
startsWith(github.event.workflow_run.head_branch, 'v') == false &&
18+
contains(github.event.workflow_run.head_commit.message, '[skip release]') == false
19+
1520
steps:
1621
- uses: actions/checkout@v4
17-
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
23-
- name: Cache pip packages
24-
uses: actions/cache@v4
2522
with:
26-
path: ~/.cache/pip
27-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
28-
restore-keys: |
29-
${{ runner.os }}-pip-${{ matrix.python-version }}-
30-
31-
- name: Install dependencies
32-
run: |
33-
python -m pip install --upgrade pip
34-
pip install -r requirements.txt
35-
pip install -r requirements-dev.txt
36-
37-
- name: Run tests
38-
run: |
39-
pytest tests/ -v
40-
41-
release:
42-
needs: test
43-
runs-on: ubuntu-latest
44-
if: github.ref_type == 'tag'
23+
ref: ${{ github.event.workflow_run.head_branch }}
24+
fetch-depth: 0
4525

4626
steps:
4727
- uses: actions/checkout@v4

‎LICENSE‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,30 @@ GNU General Public License for more details.
1515

1616
You should have received a copy of the GNU General Public License
1717
along with this program. If not, see <https://www.gnu.org/licenses/>.
18+
19+
ADDITIONAL COMMERCIAL USE RESTRICTION
20+
21+
This program is licensed under the GNU General Public License v3.0 (GPL-3.0)
22+
with the following additional restriction:
23+
24+
COMMERCIAL USE PROHIBITED
25+
26+
Notwithstanding the terms of the GPL-3.0, commercial use of this software
27+
is strictly prohibited. For the purposes of this restriction, "commercial use"
28+
includes, but is not limited to:
29+
30+
- Use of this software for any commercial purpose, whether for profit or not
31+
- Use in any commercial entity or organization
32+
- Use as part of any commercial service or product
33+
- Use by any entity that receives payment, directly or indirectly, for services
34+
that use this software
35+
- Use in any production environment of a commercial entity
36+
37+
This restriction applies to all uses, whether direct or indirect, and whether
38+
the software is used as-is or as part of a derivative work.
39+
40+
If you wish to use this software for commercial purposes, please contact the
41+
copyright holder to obtain a commercial license.
42+
43+
For personal, educational, or non-commercial use, this software remains free
44+
and open source under the terms of the GPL-3.0.

‎requirements.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
requests>=2.31.0
22
beautifulsoup4>=4.12.0
33
lxml>=4.9.0
4-
selenium>=4.15.0
5-
Pillow>=10.0.0
6-
webdriver-manager>=4.0.0
7-
numpy>=1.24.0

‎setup.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@
3030
python_requires=">=3.8",
3131
install_requires=[
3232
"requests>=2.31.0",
33+
"beautifulsoup4>=4.12.0",
34+
"lxml>=4.9.0",
3335
],
3436
extras_require={
3537
"visual": [
3638
"selenium>=4.15.0",
3739
"Pillow>=10.0.0",
3840
"webdriver-manager>=4.0.0",
41+
"numpy>=1.24.0",
3942
],
4043
},
4144
entry_points={

0 commit comments

Comments
 (0)