File tree Expand file tree Collapse file tree 6 files changed +56
-105
lines changed
Expand file tree Collapse file tree 6 files changed +56
-105
lines changed Original file line number Diff line number Diff line change 3131 - name : Install dependencies
3232 run : |
3333 python -m pip install --upgrade pip
34- pip install flake8
35- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
34+ pip install -e .[dev]
3635 - name : Lint with flake8
3736 run : |
3837 # stop the build if there are Python syntax errors or undefined names
@@ -50,10 +49,12 @@ jobs:
5049 if : env.COVERAGE == 1
5150 run : |
5251 coverage run -m unittest tests/*.py
53- - name : Coverage
52+ coverage xml
53+ - name : Upload coverage to Codecov
5454 env :
5555 COVERAGE : ${{ matrix.coverage }}
5656 if : env.COVERAGE == 1
57- run : |
58- bash <(curl -s https://codecov.io/bash)
59- rm .coverage coverage.xml
57+ uses : codecov/codecov-action@v4
58+ with :
59+ file : ./coverage.xml
60+ fail_ci_if_error : false
Original file line number Diff line number Diff line change @@ -17,12 +17,9 @@ readme = "README.md"
1717requires-python = " >=3.8"
1818dependencies = [
1919 " multidimensional-urlencode==0.0.4" ,
20- " nose==1.3.7" ,
2120 " requests==2.32.4" ,
22- " coverage==4.5.4" ,
23- " pook==1.3.0" ,
24- " hatchling >= 1.26"
2521]
22+
2623classifiers = [
2724 " Development Status :: 5 - Production/Stable" ,
2825 " Environment :: Other Environment" ,
@@ -39,7 +36,15 @@ classifiers = [
3936 " Topic :: Software Development :: Libraries :: Python Modules" ,
4037]
4138license = " MIT"
42- license-files = [" LICEN[CS]E*" ]
39+ license-files = [" LICENSE" ]
40+
41+ [project .optional-dependencies ]
42+ dev = [
43+ " nose==1.3.7" ,
44+ " coverage==4.5.4" ,
45+ " pook==1.3.0" ,
46+ " flake8" ,
47+ ]
4348
4449[project .urls ]
4550Homepage = " https://github.com/retailcrm/api-client-python"
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4085,45 +4085,45 @@ def test_offers(self):
40854085 """
40864086
40874087 (pook .get (os .getenv ('RETAILCRM_URL' ) + '/api/v5/store/offers' )
4088- .headers ({'X-API-KEY' : os .getenv ('RETAILCRM_KEY' )})
4089- .params ({'filter[site]' : 'https://retailcrm.pro' })
4090- .reply (200 )
4091- .headers (self .__header )
4092- .json (
4093- {
4094- 'success' : 'true' ,
4095- 'pagination' : {
4096- 'limit' : 20 ,
4097- 'totalCount' : 1 ,
4098- 'currentPage' : 1 ,
4099- 'totalPageCount' : 1
4100- },
4101- 'offers' : [
4102- {
4103- 'images' : [],
4104- 'id' : 33937 ,
4105- 'site' : 'https://retailcrm.pro' ,
4106- 'name' : 'Shirt' ,
4107- 'article' : 'SHIRT-BLACK' ,
4108- 'prices' : {
4109- "priceType" : "base" ,
4110- "price" : 4 ,
4111- "ordering" : 100 ,
4112- "currency" : "EUR"
4113- },
4114- 'purchasePrice' : 1 ,
4115- 'vatRate' : 'none' ,
4116- 'product' : {},
4117- 'properties' : {
4118- 'color' : 'black'
4119- },
4120- 'quantity' : 10 ,
4121- 'active' : True ,
4122- 'barcode' : '12345'
4123- }
4124- ]
4125- }
4126- )
4088+ .headers ({'X-API-KEY' : os .getenv ('RETAILCRM_KEY' )})
4089+ .params ({'filter[site]' : 'https://retailcrm.pro' })
4090+ .reply (200 )
4091+ .headers (self .__header )
4092+ .json (
4093+ {
4094+ 'success' : 'true' ,
4095+ 'pagination' : {
4096+ 'limit' : 20 ,
4097+ 'totalCount' : 1 ,
4098+ 'currentPage' : 1 ,
4099+ 'totalPageCount' : 1
4100+ },
4101+ 'offers' : [
4102+ {
4103+ 'images' : [],
4104+ 'id' : 33937 ,
4105+ 'site' : 'https://retailcrm.pro' ,
4106+ 'name' : 'Shirt' ,
4107+ 'article' : 'SHIRT-BLACK' ,
4108+ 'prices' : {
4109+ "priceType" : "base" ,
4110+ "price" : 4 ,
4111+ "ordering" : 100 ,
4112+ "currency" : "EUR"
4113+ },
4114+ 'purchasePrice' : 1 ,
4115+ 'vatRate' : 'none' ,
4116+ 'product' : {},
4117+ 'properties' : {
4118+ 'color' : 'black'
4119+ },
4120+ 'quantity' : 10 ,
4121+ 'active' : True ,
4122+ 'barcode' : '12345'
4123+ }
4124+ ]
4125+ }
4126+ )
41274127 )
41284128
41294129 response = self .client .offers ({'site' : 'https://retailcrm.pro' })
You can’t perform that action at this time.
0 commit comments