Skip to content

Commit 2bd868a

Browse files
fix(test & coverage): reviewed dependency management, coverage reporting and configs
1 parent 4a1ec74 commit 2bd868a

File tree

7 files changed

+32
-38
lines changed

7 files changed

+32
-38
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[run]
2+
omit =
3+
hexonet/__init__.py
4+
hexonet/apiconnector/__init__.py

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
run: |
1919
pip install --upgrade pip
2020
pip -V
21-
pip install --upgrade -r requirements.txt
2221
pip install --upgrade -e .
2322
- name: Validate & Coverage Report
2423
run: |
@@ -41,9 +40,8 @@ jobs:
4140
python-version: "3.x"
4241
- name: Install dependencies
4342
run: |
44-
pip install --upgrade pip
43+
pip install --upgrade pip testresources setuptools wheel
4544
pip -V
46-
pip install --upgrade -r requirements.txt
4745
pip install --upgrade -e .
4846
- name: Setup NodeJS LTS
4947
uses: actions/setup-node@v2

docs/developmentguide.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ Please read our :ref:`Contributing guide lines <contributing>` first.
1010
Requirements
1111
------------
1212

13-
You can find any required library for this project in the *requirements.txt*:
13+
You can find any required library for this project listed in the *setup.cfg*:
1414

15-
.. literalinclude:: ../requirements.txt
15+
.. literalinclude:: ../setup.cfg
1616

17-
You can install them by
17+
You can install all you need by
1818

1919
.. code-block:: bash
2020
21-
pip install -r requirements.txt --user
22-
pip install . --user
21+
pip install --user --upgrade -e .
2322
2423
NOTE: Make sure to have also all the extensions listed in the `docs/conf.py`
2524
that are required for the SDK Documentation.
@@ -39,7 +38,7 @@ Run Tests and Code Validation
3938
-----------------------------
4039

4140
If you open a Pull Request (PR), we will trigger automated tests and pep8 style
42-
check in Travis CI. So nothing you have to worry about in your development.
41+
check in CI process. So nothing you have to worry about in your development.
4342
You can open your PR and prefix its title with WIP "Work In Progress" to access
4443
these checks in advance.
4544

@@ -66,7 +65,7 @@ Pull Request (PR) Procedure
6665
* apply your desired changes / extensions
6766
* commit and push it to remote. Please follow these [commit guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). We suggest to use [commitizen](https://github.com/commitizen/cz-cli/blob/master/README.md).
6867
* open a pull request (PR).
69-
* check if the Travis CI build check fails. If so, review your code (feel free to ask for help).
68+
* check if the CI process fails. If so, review your code (feel free to ask for help).
7069
* squash your commits as far as it makes sense
7170
* rebase your branch
7271

requirements.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

scripts/coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
rm -rf .pytest_cache htmlcov tests/__pycache___
3-
py.test --strict --cov-report html --cache-clear -v
3+
python setup.py test
44
# NOTE: this does not use the current repository
55
# it uses the last released version's source code
66
# maybe this can be reviewed - but not sure if this is possible

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ ignore = F401,E402,F403
1313
exclude = venv
1414

1515
[tool:pytest]
16+
addopts = --strict --cov-config=.coveragerc --cov=hexonet --cov-report html --cache-clear -v
1617
testpaths = tests/
1718

18-
[coverage:run]
19-
omit = hexonet/apiconnector/__init__.py
19+
[aliases]
20+
test=pytest

setup.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,26 @@ def find_version(*file_paths):
4040
maintainer='Kai Schwarz',
4141
maintainer_email='kschwarz@hexonet.net',
4242
url='https://github.com/hexonet/python-sdk/',
43-
install_require=[
44-
'autopep8',
45-
'guzzle_sphinx_theme',
46-
'pycodestyle',
47-
'sphinx',
48-
'sphinxcontrib-log-cabinet',
49-
'twine'
43+
install_requires=[
44+
'autopep8==1.*',
45+
'docutils==0.*',
46+
'guzzle-sphinx-theme==0.*',
47+
'm2r2==0.*',
48+
'pep8==1.*',
49+
'pycodestyle==2.*',
50+
'pytest-cov==2.*',
51+
'sphinx==3.*',
52+
'sphinxcontrib-log-cabinet==1.*',
53+
'sphinxcontrib-websupport==1.*',
54+
'twine==3.*'
5055
],
5156
setup_requires=[
52-
'autopep8',
53-
'guzzle_sphinx_theme',
54-
'pycodestyle',
55-
'sphinx',
56-
'sphinxcontrib-log-cabinet',
57-
'twine'
57+
'pytest-runner'
58+
],
59+
tests_require=[
60+
'pytest',
61+
'pytest-cov'
5862
],
59-
tests_require=['six'],
6063
license="MIT",
6164
scripts=[],
6265
zip_safe=True,

0 commit comments

Comments
 (0)