File tree Expand file tree Collapse file tree 11 files changed +62
-55
lines changed
Expand file tree Collapse file tree 11 files changed +62
-55
lines changed Original file line number Diff line number Diff line change @@ -10,49 +10,47 @@ jobs:
1010 - name : Set up Python
1111 uses : actions/setup-python@v1
1212 with :
13- python-version : ' 3.7 '
13+ python-version : ' 3.8 '
1414 - name : Install dependencies
1515 run : make install-test
1616 - name : Lint
1717 run : make lint
1818
1919 test :
2020 runs-on : ubuntu-latest
21+ strategy :
22+ matrix :
23+ python-version : [3.6, 3.7, 3.8]
2124 steps :
2225 - uses : actions/checkout@v2
23- - name : Set up Python 3.7
26+ - name : Set up Python ${{ matrix.python-version }}
2427 uses : actions/setup-python@v1
2528 with :
26- python-version : 3.7
29+ python-version : ${{ matrix.python-version }}
2730 - name : Install dependencies
28- run : |
29- cp env.template .env
30- make install-test
31+ run : make install-test
3132 - name : Run tests
3233 run : |
33- export $(<. env)
34- make test
34+ export $(<env.template )
35+ pytest
3536 coverage :
3637 runs-on : ubuntu-latest
3738 steps :
3839 - uses : actions/checkout@master
3940 - name : Setup Python
4041 uses : actions/setup-python@master
4142 with :
42- python-version : 3.7
43+ python-version : 3.8
4344 - name : Install dependencies
44- run : |
45- make install-test
46- cp env.template .env
45+ run : make install-test
4746 - name : Generate coverage report
4847 run : |
49- export $(<. env)
48+ export $(<env.template )
5049 pytest --cov-report=xml
5150 - name : Upload coverage to Codecov
5251 uses : codecov/codecov-action@v1
5352 with :
54- token : c3898684-cb06-4229-b7fe-b8489a1b8fb2
5553 file : ./coverage.xml
5654 flags : unittests
5755 name : codecov-umbrella
58- fail_ci_if_error : true
56+ fail_ci_if_error : true
Original file line number Diff line number Diff line change 11SHELL := bash
22PATH := ./venv/bin:${PATH}
3- PYTHON = python3.7
4- PROJECT = arcus
5- isort = isort -rc -ac $(PROJECT ) tests setup.py
6- black = black -S -l 79 --target-version py37 $(PROJECT ) tests setup.py
3+ PYTHON = python3.7
4+ PROJECT = arcus
5+ isort = isort $(PROJECT ) tests setup.py
6+ black = black -S -l 79 --target-version py38 $(PROJECT ) tests setup.py
77
88
99all : test
1010
1111venv :
12- $(PYTHON ) -m venv --prompt $(PROJECT ) venv
13- pip install -qU pip
12+ $(PYTHON ) -m venv --prompt $(PROJECT ) venv
13+ pip install -qU pip
1414
1515install-test :
16- pip install -q .[test]
16+ pip install -q .[test]
1717
1818test : clean install-test lint
19- python setup.py test
19+ python setup.py test
2020
2121format :
22- $(isort )
23- $(black )
22+ $(isort )
23+ $(black )
2424
2525lint :
26- $( isort ) --check-only
27- $( black ) --check
28- flake8 $( PROJECT ) tests setup.py
29- mypy $(PROJECT ) tests
26+ flake8 $( PROJECT ) tests setup.py
27+ $( isort ) --check-only
28+ $( black ) --check
29+ mypy $(PROJECT ) tests
3030
3131clean :
32- find . -name ' *.pyc' -exec rm -f {} +
33- find . -name ' *.pyo' -exec rm -f {} +
34- find . -name ' *~' -exec rm -f {} +
35- rm -rf build dist $(PROJECT ) .egg-info
32+ rm -rf ` find . -name __pycache__`
33+ rm -f ` find . -type f -name ' *.py[co]' `
34+ rm -f ` find . -type f -name ' *~' `
35+ rm -f ` find . -type f -name ' .*~' `
36+ rm -rf .cache
37+ rm -rf .pytest_cache
38+ rm -rf .mypy_cache
39+ rm -rf htmlcov
40+ rm -rf * .egg-info
41+ rm -f .coverage
42+ rm -f .coverage.*
43+ rm -rf build
44+ rm -rf dist
3645
3746release : clean
38- python setup.py sdist bdist_wheel
39- twine upload dist/*
47+ python setup.py sdist bdist_wheel
48+ twine upload dist/*
4049
4150
4251.PHONY : all install-test test format lint clean release
Original file line number Diff line number Diff line change 22[ ![ test] ( https://github.com/cuenca-mx/arcus-python/workflows/test/badge.svg )] ( https://github.com/cuenca-mx/arcus-python/actions?query=workflow%3Atest )
33[ ![ codecov] ( https://codecov.io/gh/cuenca-mx/arcus-python/branch/master/graph/badge.svg )] ( https://codecov.io/gh/cuenca-mx/arcus-python )
44[ ![ PyPI] ( https://img.shields.io/pypi/v/arcus.svg )] ( https://pypi.org/project/arcus/ )
5+ [ ![ Downloads] ( https://pepy.tech/badge/arcus )] ( https://pepy.tech/project/arcus )
56
67
7- Arcus python3.6 + 3.7 client library for API version 3.1 of [ Arcus] ( https://www.arcusfi.com/ ) .
8+ Arcus python3.6+ client library for API version 3.1 of [ Arcus] ( https://www.arcusfi.com/ ) .
89
910
1011
Original file line number Diff line number Diff line change 44
55
66class Resource :
7- _client : ClassVar ['arcus.Client' ] # type: ignore
7+ _client : ClassVar ['arcus.Client' ] # type:ignore # noqa:F821
88 _endpoint : ClassVar [str ]
99
1010 # Just for mypy
Original file line number Diff line number Diff line change 22from dataclasses import dataclass , field
33from typing import ClassVar , Optional
44
5- from arcus .exc import UnprocessableEntity , raise_arcus_exception
6-
5+ from ..exc import UnprocessableEntity , raise_arcus_exception
76from .base import Resource
87
98"""
Original file line number Diff line number Diff line change 33
44from pydash import filter_
55
6- from arcus .exc import NotFound
7-
6+ from ..exc import NotFound
87from .base import Resource
98
109ENDPOINTS = ['topups' , 'utilities' ]
Original file line number Diff line number Diff line change 22from dataclasses import dataclass , field
33from typing import ClassVar , Optional , Union
44
5- from arcus .exc import (
5+ from . .exc import (
66 InvalidBiller ,
77 NotFound ,
88 UnprocessableEntity ,
99 raise_arcus_exception ,
1010)
11-
1211from .base import Resource
1312from .transactions import Transaction
1413
Original file line number Diff line number Diff line change 22from dataclasses import dataclass , field
33from typing import ClassVar , Union
44
5- from arcus .exc import UnprocessableEntity , raise_arcus_exception
6-
5+ from ..exc import UnprocessableEntity , raise_arcus_exception
76from .base import Resource
87
98
Original file line number Diff line number Diff line change 1- __version__ = '1.2.3 ' # pragma: no cover
1+ __version__ = '1.2.4 ' # pragma: no cover
Original file line number Diff line number Diff line change 22test =pytest
33
44[tool:pytest]
5- addopts = -p no:warnings -v --cov =arcus
5+ addopts = -p no:warnings -v --cov-report term-missing -- cov =arcus
66
77[flake8]
88inline-quotes = '
99multiline-quotes = """
10- builtins = arcus
1110
1211[isort]
13- multi_line_output=3
14- include_trailing_comma=True
15- force_grid_wrap=0
16- combine_as_imports=True
12+ profile=black
13+ line_length=79
1714
1815[mypy-iso8601]
1916ignore_missing_imports = true
2017
2118[mypy-pytest]
2219ignore_missing_imports = true
2320
24- [mypy]
25- ignore_missing_imports = True
21+ [mypy-pydash]
22+ ignore_missing_imports = true
23+
24+ [mypy-requests_mock]
25+ ignore_missing_imports = true
26+
27+ [coverage:report]
28+ precision = 2
You can’t perform that action at this time.
0 commit comments