Skip to content

Commit

Permalink
fix(test & coverage): reviewed dependency management, coverage report…
Browse files Browse the repository at this point in the history
…ing and configs
  • Loading branch information
KaiSchwarz-cnic committed Jan 22, 2021
1 parent 4a1ec74 commit 2bd868a
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 38 deletions.
4 changes: 4 additions & 0 deletions .coveragerc
@@ -0,0 +1,4 @@
[run]
omit =
hexonet/__init__.py
hexonet/apiconnector/__init__.py
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Expand Up @@ -18,7 +18,6 @@ jobs:
run: |
pip install --upgrade pip
pip -V
pip install --upgrade -r requirements.txt
pip install --upgrade -e .
- name: Validate & Coverage Report
run: |
Expand All @@ -41,9 +40,8 @@ jobs:
python-version: "3.x"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade pip testresources setuptools wheel
pip -V
pip install --upgrade -r requirements.txt
pip install --upgrade -e .
- name: Setup NodeJS LTS
uses: actions/setup-node@v2
Expand Down
13 changes: 6 additions & 7 deletions docs/developmentguide.rst
Expand Up @@ -10,16 +10,15 @@ Please read our :ref:`Contributing guide lines <contributing>` first.
Requirements
------------

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

.. literalinclude:: ../requirements.txt
.. literalinclude:: ../setup.cfg

You can install them by
You can install all you need by

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

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

Expand All @@ -66,7 +65,7 @@ Pull Request (PR) Procedure
* apply your desired changes / extensions
* 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).
* open a pull request (PR).
* check if the Travis CI build check fails. If so, review your code (feel free to ask for help).
* check if the CI process fails. If so, review your code (feel free to ask for help).
* squash your commits as far as it makes sense
* rebase your branch

Expand Down
11 changes: 0 additions & 11 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/coverage.sh
@@ -1,6 +1,6 @@
#!/bin/bash
rm -rf .pytest_cache htmlcov tests/__pycache___
py.test --strict --cov-report html --cache-clear -v
python setup.py test
# NOTE: this does not use the current repository
# it uses the last released version's source code
# maybe this can be reviewed - but not sure if this is possible
5 changes: 3 additions & 2 deletions setup.cfg
Expand Up @@ -13,7 +13,8 @@ ignore = F401,E402,F403
exclude = venv

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

[coverage:run]
omit = hexonet/apiconnector/__init__.py
[aliases]
test=pytest
31 changes: 17 additions & 14 deletions setup.py
Expand Up @@ -40,23 +40,26 @@ def find_version(*file_paths):
maintainer='Kai Schwarz',
maintainer_email='kschwarz@hexonet.net',
url='https://github.com/hexonet/python-sdk/',
install_require=[
'autopep8',
'guzzle_sphinx_theme',
'pycodestyle',
'sphinx',
'sphinxcontrib-log-cabinet',
'twine'
install_requires=[
'autopep8==1.*',
'docutils==0.*',
'guzzle-sphinx-theme==0.*',
'm2r2==0.*',
'pep8==1.*',
'pycodestyle==2.*',
'pytest-cov==2.*',
'sphinx==3.*',
'sphinxcontrib-log-cabinet==1.*',
'sphinxcontrib-websupport==1.*',
'twine==3.*'
],
setup_requires=[
'autopep8',
'guzzle_sphinx_theme',
'pycodestyle',
'sphinx',
'sphinxcontrib-log-cabinet',
'twine'
'pytest-runner'
],
tests_require=[
'pytest',
'pytest-cov'
],
tests_require=['six'],
license="MIT",
scripts=[],
zip_safe=True,
Expand Down

0 comments on commit 2bd868a

Please sign in to comment.