diff --git a/README.md b/README.md index dcc7389e88f7002e72e3c7eca833d7a7ad85c0c9..6f486a2775a471b64ec29345f9d07705d9cf4008 100644 --- a/README.md +++ b/README.md @@ -70,13 +70,13 @@ The Autosubmit API have some configuration options that can be modified by setti ### Install pytest ```bash -pip install -U pytest pytest-cov +pip install -e .[test] ``` ### Run tests: ```bash -pytest tests/* +pytest ``` ### Run tests with coverage HTML report: diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000000000000000000000000000000000..da75339225a307b2aa8beeb87be4a0a9755100fe --- /dev/null +++ b/pytest.ini @@ -0,0 +1,10 @@ +[pytest] +addopts = + --cov=autosubmit_api --cov-config=.coveragerc --cov-report=html +testpaths = + tests/ +doctest_optionflags = + NORMALIZE_WHITESPACE + IGNORE_EXCEPTION_DETAIL + ELLIPSIS + diff --git a/setup.py b/setup.py index 8a648a87eeff97d984603f621376f2e2e12c824e..c2821775f9a0bd77999d264be818f09b1f677f4e 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,40 @@ def get_authors(): return autosubmit_api.__author__ +install_requires = [ + "Flask~=2.2.5", + "pyjwt~=2.8.0", + "requests~=2.28.1", + "flask_cors~=3.0.10", + "bscearth.utils~=0.5.2", + "pysqlite-binary", + "pydotplus~=2.0.2", + "portalocker~=2.6.0", + "networkx~=2.6.3", + "scipy~=1.7.3", + "paramiko~=2.12.0", + "python-dotenv", + "autosubmitconfigparser~=1.0.48", + "autosubmit>=3.13", + "Flask-APScheduler", + "gunicorn", + "pydantic~=2.5.2", + "SQLAlchemy~=2.0.23", + "python-cas>=1.6.0", + "Authlib>=1.3.0" +] + +# Test dependencies +test_requires = [ + "pytest", + "pytest-cov" +] + +extras_require = { + 'test': test_requires, + 'all': install_requires + test_requires +} + setup( name="autosubmit_api", version=get_version(), @@ -32,28 +66,8 @@ setup( packages=find_packages(), keywords=["autosubmit", "API"], python_requires=">=3.8", - install_requires=[ - "Flask~=2.2.5", - "pyjwt~=2.8.0", - "requests~=2.28.1", - "flask_cors~=3.0.10", - "bscearth.utils~=0.5.2", - "pysqlite-binary", - "pydotplus~=2.0.2", - "portalocker~=2.6.0", - "networkx~=2.6.3", - "scipy~=1.7.3", - "paramiko~=2.12.0", - "python-dotenv", - "autosubmitconfigparser~=1.0.48", - "autosubmit>=3.13", - "Flask-APScheduler", - "gunicorn", - "pydantic~=2.5.2", - "SQLAlchemy~=2.0.23", - "python-cas>=1.6.0", - "Authlib>=1.3.0" - ], + install_requires=install_requires, + extras_require=extras_require, include_package_data=True, package_data={"autosubmit-api": ["README", "VERSION", "LICENSE"]}, classifiers=[