Skip to content

Commit bce1f07

Browse files
authored
Release 20.8 (#5)
* Release 20.8 * Added Python 3.4
1 parent c7ff1f1 commit bce1f07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1160
-732
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [2.7, 3.4, 3.8]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install pytest flake8
30+
pip install -r requirements.txt -r test-requirements.txt
31+
- name: Lint with flake8
32+
run: |
33+
# stop the build if there are Python syntax errors or undefined names
34+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
- name: Test with pytest
38+
env:
39+
TEST_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }}
40+
run: |
41+
pytest

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@ SRC=./aspose_barcode_cloud
44
all: format test
55

66
.PHONY: format
7-
format:
8-
black --line-length=120 --target-version=py27 -v $(SRC)
7+
format: format_code format_doc
8+
9+
.PHONY: format_code
10+
format_code:
11+
python3 -m black --line-length=120 --target-version=py27 -v $(SRC) tests
12+
13+
.PHONY: format_doc
14+
format_doc:
15+
# Trim white space
916
sed -i -e 's_[[:space:]]*$$__' README.md
17+
# Replace true->True false->False: sed -e "s/\b\(false\|true\)/\u\1/g"
18+
find . -type f -iname '*.md' -exec sed -i -e 's_\b\(false\|true\)_\u\1_g' '{}' \;
1019

1120
.PHONY: test
1221
test:

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Aspose.BarCode Cloud SDK for Python
22

33
- API version: 3.0
4-
- Package version: 20.6.0
4+
- Package version: 20.8.0
55

66
[Aspose.BarCode for Cloud](https://products.aspose.cloud/barcode/cloud) is a REST API for Linear, 2D and postal barcode generation and recognition in the cloud. API recognizes and generates barcode images in a variety of formats. Barcode REST API allows to specify barcode image attributes like image width, height, border style and output image format in order to customize the generation process. Developers can also specify the barcode type and text attributes such as text location and font styles in order to suit the application requirements.
77

@@ -43,7 +43,7 @@ import aspose_barcode_cloud
4343
The examples below show how you can generate and recognize Code128 barcode and save it into local file using aspose-barcode-cloud:
4444

4545
```python
46-
from __future__ import print_function
46+
from __future__ import division, print_function
4747

4848
from pprint import pprint
4949

@@ -64,15 +64,15 @@ text = 'text_example' # str | Text to encode.
6464
try:
6565
# Generate barcode.
6666
response = api.get_barcode_generate(type, text)
67-
with open('example.png', 'wb') as f:
67+
with open("example.png", "wb") as f:
6868
f.write(response.data)
6969
print("Barcode saved to file 'example.png'")
7070
except ApiException as e:
7171
print("Exception when calling BarcodeApi->get_barcode_generate: %s\n" % e)
7272

7373

7474
# Recognize barcode
75-
response = api.post_barcode_recognize_from_url_or_content(image='example.png',
75+
response = api.post_barcode_recognize_from_url_or_content(image="example.png",
7676
preset=aspose_barcode_cloud.PresetType.HIGHPERFORMANCE)
7777
pprint(response)
7878
```
@@ -169,6 +169,8 @@ Class | Method | HTTP request | Description
169169
- [MaxiCodeParams](docs/MaxiCodeParams.md)
170170
- [ObjectExist](docs/ObjectExist.md)
171171
- [Padding](docs/Padding.md)
172+
- [PatchCodeParams](docs/PatchCodeParams.md)
173+
- [PatchFormat](docs/PatchFormat.md)
172174
- [Pdf417CompactionMode](docs/Pdf417CompactionMode.md)
173175
- [Pdf417ErrorLevel](docs/Pdf417ErrorLevel.md)
174176
- [Pdf417Params](docs/Pdf417Params.md)

aspose_barcode_cloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
from aspose_barcode_cloud.models.maxi_code_params import MaxiCodeParams
8585
from aspose_barcode_cloud.models.object_exist import ObjectExist
8686
from aspose_barcode_cloud.models.padding import Padding
87+
from aspose_barcode_cloud.models.patch_code_params import PatchCodeParams
88+
from aspose_barcode_cloud.models.patch_format import PatchFormat
8789
from aspose_barcode_cloud.models.pdf417_compaction_mode import Pdf417CompactionMode
8890
from aspose_barcode_cloud.models.pdf417_error_level import Pdf417ErrorLevel
8991
from aspose_barcode_cloud.models.pdf417_params import Pdf417Params

0 commit comments

Comments
 (0)