Skip to content

Commit ba1a452

Browse files
authored
Merge pull request #335 from BSd3v/fix-GHA-tests
adjusting `setup.py` for GHA
2 parents 4e03f0c + 3cfde84 commit ba1a452

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

.github/workflows/python-test.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ on:
1111
jobs:
1212
test-react:
1313
runs-on: ubuntu-latest
14-
strategy:
15-
matrix:
16-
react-version: ["18.2.0"]
1714
steps:
1815
- uses: actions/checkout@v3
1916
- uses: actions/setup-python@v3
@@ -40,9 +37,7 @@ jobs:
4037
uv pip install --upgrade pip
4138
uv pip install wheel
4239
uv pip install ".[dev]"
43-
echo "Using React version ${{ matrix.react-version }}"
4440
npm ci
45-
npm install react@${{ matrix.react-version }} react-dom@${{ matrix.react-version }}
4641
npm i
4742
npm run build
4843
timeout-minutes: 20

requires-install.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dash>=2

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
package_name = package["name"].replace(" ", "_").replace("-", "_")
1010

11+
def read_req_file(req_type):
12+
with open(f"requires-{req_type}.txt", encoding="utf-8") as fp:
13+
requires = (line.strip() for line in fp)
14+
return [req for req in requires if req and not req.startswith("#")]
15+
1116
setup(
1217
name=package_name,
1318
url=package["homepage"],
@@ -18,7 +23,10 @@
1823
include_package_data=True,
1924
license=package["license"],
2025
description=package.get("description", package_name),
21-
install_requires=[],
26+
install_requires=read_req_file("install"),
27+
extras_require={
28+
"dev": read_req_file("dev"),
29+
},
2230
classifiers=[
2331
"Framework :: Dash",
2432
"Framework :: Flask",

0 commit comments

Comments
 (0)