Skip to content

Commit 5187e0a

Browse files
committed
update requirements to flask 2 and python version up to 3.10
update reqs requirements.txt format err requirements.txt format err fix upgrade setup tools before setup.py xxx install deps from requirements.txt using pip directly install app through setup.py fix tests run
1 parent 45a43cf commit 5187e0a

File tree

3 files changed

+16
-22
lines changed

3 files changed

+16
-22
lines changed

.github/workflows/run_tests.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# don't cancel tests if any of the pipelines fails
1919
fail-fast: false
2020
matrix:
21-
python-version: [3.6, 3.7, 3.8, 3.9]
21+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
2222

2323
steps:
2424
- uses: actions/checkout@v2
@@ -27,7 +27,10 @@ jobs:
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
- name: Install the package and dependencies
30-
run: python setup.py install
30+
run: |
31+
pip install -U setuptools
32+
pip install -r requirements.txt
33+
python setup.py install
3134
- name: Lint with flake8
3235
run: |
3336
pip install flake8
@@ -36,9 +39,10 @@ jobs:
3639
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3740
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3841
- name: Install testing dependencies
39-
run: pip install pytest --upgrade
42+
run: |
43+
pip install pytest --upgrade
4044
- name: Test with pytest and run coverage
41-
run: pytest -s -vv --color=yes
45+
run: pytest -s -vv --color=yes tests
4246

4347
coverage:
4448

@@ -62,8 +66,6 @@ jobs:
6266
- name: Install testing and coverage dependencies
6367
run: |
6468
pip install coveralls coverage
65-
pip install -U setuptools
66-
pip install pytest --upgrade
6769
- name: Test with pytest with coverage
6870
run: coverage run --source combojsonapi -m pytest
6971
- name: Trigger Coveralls

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
sqlalchemy<1.4
2-
marshmallow==3.2.1
3-
marshmallow_jsonapi==0.24.0
4-
Flask>=1.0.1,<2
1+
Flask>=2.0,<2.1
2+
marshmallow>=3.14,<3.15
3+
marshmallow_jsonapi>=0.24,<0.25
4+
sqlalchemy>=1.4,<2
55
apispec[yaml]>=4.3.0,<5
6-
flask-combo-jsonapi
6+
-e git+https://github.com/AdCombo/flask-combo-jsonapi.git@d088f48a598057e7d369066891644ee56abe3b8c#egg=flask-combo-jsonapi

setup.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
import os
2-
31
from setuptools import setup, find_packages
42

5-
__version__ = "1.1.2"
6-
7-
8-
requirements_filepath = os.path.join(os.path.dirname(__name__), "requirements.txt")
9-
with open(requirements_filepath) as fp:
10-
install_requires = fp.read()
11-
3+
__version__ = "2.0"
124

135
def get_description():
146
"""
@@ -17,7 +9,6 @@ def get_description():
179
with open('README.rst', 'r', encoding='utf-8') as f:
1810
return f.read()
1911

20-
2112
setup(
2213
name="ComboJSONAPI",
2314
version=__version__,
@@ -36,6 +27,7 @@ def get_description():
3627
"Programming Language :: Python :: 3.7",
3728
"Programming Language :: Python :: 3.8",
3829
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
3931
"License :: OSI Approved :: MIT License",
4032
"Topic :: Internet",
4133
],
@@ -45,7 +37,7 @@ def get_description():
4537
include_package_data=True,
4638
zip_safe=False,
4739
platforms="any",
48-
install_requires=install_requires,
40+
install_requires=[],
4941
setup_requires=["pytest-runner"],
5042
tests_require=["pytest"],
5143
extras_require={"tests": "pytest", "docs": "sphinx"},

0 commit comments

Comments
 (0)