Skip to content

Commit

Permalink
Release 23.6 (#74)
Browse files Browse the repository at this point in the history
* Bump version to 23.6.0

* New Swagger spec

* All SDKs were released
  • Loading branch information
Denis-Averin committed Jun 29, 2023
1 parent d0ba9bc commit 32d6c0c
Show file tree
Hide file tree
Showing 25 changed files with 343 additions and 92 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.PHONY: all
all:


.PHONY: format
format: format-black

.PHONY: format-black
format-black:
python -m black --line-length=120 .
5 changes: 2 additions & 3 deletions codegen/Templates/csharp/README.mustache
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Aspose.BarCode Cloud SDK for .NET

[![License](https://img.shields.io/github/license/aspose-barcode-cloud/aspose-barcode-cloud-dotnet)](LICENSE)
[![.NET Core](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/dotnet-core.yml/badge.svg)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/dotnet-core.yml)
[![.NET 6](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/dotnet-net6.yml/badge.svg)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/dotnet-net6.yml)
[![.NET Framework](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/net-framework.yml/badge.svg)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/net-framework.yml)
[![.NET Core Linux](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/dotnet-core.yml/badge.svg)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/dotnet-core.yml)
[![.NET Framework Windows](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/net-framework.yml/badge.svg)](https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-dotnet/actions/workflows/net-framework.yml)
[![Nuget](https://img.shields.io/nuget/v/Aspose.BarCode-Cloud)](https://www.nuget.org/packages/Aspose.BarCode-Cloud/)

- API version: {{appVersion}}
Expand Down
2 changes: 1 addition & 1 deletion codegen/Templates/dart/pubspec.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ platforms:
windows:

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
dependencies:
http: '>=0.13.0 <0.14.0'
Expand Down
1 change: 0 additions & 1 deletion codegen/Templates/python/README.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ This repository contains Aspose.BarCode Cloud SDK for Python source code. This S

Supported Python versions:

- Python 2.7
- Python 3.5+

To use these SDKs, you will need Client Id and Client Secret which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/applications) (free registration in Aspose Cloud is required for this).
Expand Down
7 changes: 4 additions & 3 deletions codegen/Templates/python/tox.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
; Use tox version 3.x
[tox]
envlist = 2.7, 3.5, 3.11

Expand All @@ -8,10 +9,10 @@ whitelist_externals = docker
echo
commands_pre=
docker run --name test-py{envname} -ti -d -v {toxinidir}:/submodules/python -e TEST_CONFIGURATION_ACCESS_TOKEN python:{envname}-buster
docker exec --workdir /submodules/python test-py{envname} python -m pip install -r requirements.txt -r lint-requirements.txt -r test-requirements.txt
commands_post=
docker stop test-py{envname}
docker rm test-py{envname}
commands=
docker exec --workdir /submodules/python test-py{envname} make init
docker exec -t --workdir /submodules/python test-py{envname} make lint
docker exec -t --workdir /submodules/python test-py{envname} make clean-pyc test test-example
docker exec -t --workdir /submodules/python test-py{envname} python -Werror -m pytest --cov=aspose_barcode_cloud tests/
docker exec -t --workdir /submodules/python test-py{envname} python -Werror example.py
13 changes: 8 additions & 5 deletions codegen/Tools/split-cs-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
import os
import re

SPLIT_RE = re.compile(r'//\s+[-]+\n//\s+<copyright company="Aspose" file="(?P<file>.+?\.cs)">', re.MULTILINE)
SPLIT_RE = re.compile(
r'//\s+[-]+\n//\s+<copyright company="Aspose" file="(?P<file>.+?\.cs)">',
re.MULTILINE,
)


def main(src_file, dst_dir):
Expand All @@ -20,7 +23,7 @@ def main(src_file, dst_dir):
for match in reversed(list(SPLIT_RE.finditer(remaining))[1:]):
start_pos = match.span()[0]

with open(os.path.join(dst_dir, match.groupdict()['file']), 'wt') as out_f:
with open(os.path.join(dst_dir, match.groupdict()["file"]), "wt") as out_f:
out_f.write(remaining[start_pos:])

remaining = remaining[:start_pos]
Expand All @@ -33,12 +36,12 @@ def main(src_file, dst_dir):

def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('src_file', type=argparse.FileType('rt+'))
parser.add_argument('dst_dir', type=str)
parser.add_argument("src_file", type=argparse.FileType("rt+"))
parser.add_argument("dst_dir", type=str)
args = parser.parse_args()

return vars(args)


if __name__ == '__main__':
if __name__ == "__main__":
main(**parse_args())
13 changes: 8 additions & 5 deletions codegen/Tools/split-java-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
import os
import re

SPLIT_RE = re.compile(r'//\s+[-]+\n//\s+<copyright company="Aspose" file="(?P<file>.+?\.java)">', re.MULTILINE)
SPLIT_RE = re.compile(
r'//\s+[-]+\n//\s+<copyright company="Aspose" file="(?P<file>.+?\.java)">',
re.MULTILINE,
)


def main(src_file, dst_dir):
Expand All @@ -20,7 +23,7 @@ def main(src_file, dst_dir):
for match in reversed(list(SPLIT_RE.finditer(remaining))[1:]):
start_pos = match.span()[0]

with open(os.path.join(dst_dir, match.groupdict()['file']), 'wt') as out_f:
with open(os.path.join(dst_dir, match.groupdict()["file"]), "wt") as out_f:
out_f.write(remaining[start_pos:])

remaining = remaining[:start_pos]
Expand All @@ -33,12 +36,12 @@ def main(src_file, dst_dir):

def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('src_file', type=argparse.FileType('rt+'))
parser.add_argument('dst_dir', type=str)
parser.add_argument("src_file", type=argparse.FileType("rt+"))
parser.add_argument("dst_dir", type=str)
args = parser.parse_args()

return vars(args)


if __name__ == '__main__':
if __name__ == "__main__":
main(**parse_args())
19 changes: 9 additions & 10 deletions codegen/Tools/split-php-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

SPLIT_RE = re.compile(
r'/[\*]+\s*\n\s\*\s+[-]+\n\s*\*\s+<copyright company="Aspose" file="(?P<file>.+?\.php)">',
re.MULTILINE)
re.MULTILINE,
)


def main(src_file, dst_dir):
Expand All @@ -22,19 +23,17 @@ def main(src_file, dst_dir):
found = list(reversed(list(SPLIT_RE.finditer(remaining))[1:]))
assert found, "No parts matching regex '%s' found" % SPLIT_RE.pattern
for match in found:
filename = match.groupdict()['file']
filename = match.groupdict()["file"]
classname = os.path.splitext(filename)[0]

new_filename = filename[0].upper() + filename[1:]
new_classname = classname[0].upper() + classname[1:]
remaining = remaining.replace(
classname, new_classname
)
remaining = remaining.replace(classname, new_classname)

start_pos = match.span()[0]
part = remaining[start_pos:]
with open(os.path.join(dst_dir, new_filename), 'wt') as out_f:
out_f.write('<?php\n\n')
with open(os.path.join(dst_dir, new_filename), "wt") as out_f:
out_f.write("<?php\n\n")
out_f.write(part)

remaining = remaining[:start_pos]
Expand All @@ -47,12 +46,12 @@ def main(src_file, dst_dir):

def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('src_file', type=argparse.FileType('rt+'))
parser.add_argument('dst_dir', type=str)
parser.add_argument("src_file", type=argparse.FileType("rt+"))
parser.add_argument("dst_dir", type=str)
args = parser.parse_args()

return vars(args)


if __name__ == '__main__':
if __name__ == "__main__":
main(**parse_args())
2 changes: 1 addition & 1 deletion codegen/config-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"androidSdkVersion": "33",
"apiPackage": "com.aspose.barcode.cloud.demo_app",
"artifactId": "Android Application for Barcode Processing in the Cloud via REST API",
"artifactVersion": "23.5.0",
"artifactVersion": "23.6.0",
"groupId": "com.aspose",
"invokerPackage": "com.aspose.barcode.cloud.demo_app",
"modelPackage": "com.aspose.barcode.cloud.demo_app.model"
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-dart.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"browserClient": false,
"pubDescription": "This SDK allows you to work with Aspose.BarCode for Cloud REST APIs in your Dart or Flutter applications quickly and easily",
"pubName": "aspose_barcode_cloud",
"pubVersion": "0.23.5",
"pubVersion": "0.23.6",
"useEnumExtension": true
}
2 changes: 1 addition & 1 deletion codegen/config-go.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"packageName": "barcode",
"packageVersion": "0.2305.0"
"packageVersion": "0.2306.0"
}
2 changes: 1 addition & 1 deletion codegen/config-java.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"artifactDescription": "Aspose.BarCode Cloud SDK for Java",
"artifactId": "aspose-barcode-cloud",
"artifactUrl": "https://www.aspose.cloud",
"artifactVersion": "23.5.0",
"artifactVersion": "23.6.0",
"developerEmail": "[email protected]",
"developerName": "Denis Averin",
"developerOrganization": "Aspose",
Expand Down
2 changes: 1 addition & 1 deletion codegen/config-python.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packageName": "aspose_barcode_cloud",
"packageUrl": "https://github.com/aspose-barcode-cloud/aspose-barcode-cloud-python",
"packageVersion": "23.5.0",
"packageVersion": "23.6.0",
"projectName": "aspose-barcode-cloud"
}
6 changes: 3 additions & 3 deletions codegen/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"artifactVersion": "23.5.0",
"artifactVersion": "23.6.0",
"invokerPackage": "Aspose\\BarCode",
"npmName": "aspose-barcode-cloud-node",
"npmVersion": "23.5.0",
"npmVersion": "23.6.0",
"packageName": "Aspose.BarCode.Cloud.Sdk",
"packageVersion": "23.5.0",
"packageVersion": "23.6.0",
"supportsES6": true
}
24 changes: 9 additions & 15 deletions scripts/check-urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class Curl:
See: https://curl.se/libcurl/c/libcurl-errors.html
"""

CURL_STDERR_HTTP_RE = re.compile(
r"^curl: \(22\) The requested URL returned error: (?P<http_code>\d+)"
)
CURL_STDERR_HTTP_RE = re.compile(r"^curl: \(22\) The requested URL returned error: (?P<http_code>\d+)")
OK = 0
COULDNT_RESOLVE_HOST = 6
HTTP_RETURNED_ERROR = 22
Expand All @@ -41,7 +39,10 @@ class Curl:
Curl.HTTP_RETURNED_ERROR,
403,
),
"https://barcode.qa.aspose.cloud/v3.0/barcode/swagger/spec": (Curl.COULDNT_RESOLVE_HOST, None),
"https://barcode.qa.aspose.cloud/v3.0/barcode/swagger/spec": (
Curl.COULDNT_RESOLVE_HOST,
None,
),
# TODO: Temporary fix
"https://dashboard.aspose.cloud/applications": (Curl.HTTP_RETURNED_ERROR, 404),
}
Expand Down Expand Up @@ -103,9 +104,7 @@ def text_extractor(files):

class Task:
# To avoid 403 responses
USER_AGENT = (
"Googlebot/2.1 (+http://www.google.com/bot.html)"
)
USER_AGENT = "Googlebot/2.1 (+http://www.google.com/bot.html)"

def __init__(self, url, filename):
self.url = url
Expand Down Expand Up @@ -154,9 +153,7 @@ def create_new_task(url, filename) -> Task:

def process_finished_task(task) -> None:
# print("Finish task:", task.url)
expected_ret_code, expected_http_code = CURL_EXIT_CODES_AND_HTTP_CODES.get(
task.url, (0, None)
)
expected_ret_code, expected_http_code = CURL_EXIT_CODES_AND_HTTP_CODES.get(task.url, (0, None))
if task.ret_code == expected_ret_code:
print("OK:", "'%s' %.2fs" % (task.url, task.age))
return
Expand All @@ -171,8 +168,7 @@ def process_finished_task(task) -> None:
return

print(
"Expected %d got %d for '%s': %s"
% (expected_ret_code, task.ret_code, task.url, task.stderr),
"Expected %d got %d for '%s': %s" % (expected_ret_code, task.ret_code, task.url, task.stderr),
file=sys.stderr,
)
BROKEN_URLS[task.url].append(task.filename)
Expand Down Expand Up @@ -221,9 +217,7 @@ def main(files):
checker.join()

for url, files in BROKEN_URLS.items():
print(
"BROKEN URL: '%s' in files: %s" % (url, ", ".join(files)), file=sys.stderr
)
print("BROKEN URL: '%s' in files: %s" % (url, ", ".join(files)), file=sys.stderr)
if BROKEN_URLS:
exit(1)

Expand Down
32 changes: 8 additions & 24 deletions scripts/new-version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,20 @@
GO_VERSION_FORMAT = "0.{0}{1:02d}.{2}"


def set_android_version(
new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-android.json")
):
def set_android_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-android.json")):
config = read_config(filename)
config["artifactVersion"] = str.join(".", map(str, new_version))
save_config(config, filename)


def set_go_version(
new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-go.json")
):
def set_go_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-go.json")):
go_version = GO_VERSION_FORMAT.format(*new_version)
config = read_config(filename)
config["packageVersion"] = go_version
save_config(config, filename)


def set_dart_version(
new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-dart.json")
):
def set_dart_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-dart.json")):
config = read_config(filename)
pub_version = str.join(".", map(str, (0,) + new_version[:2]))
if new_version[2] > 0:
Expand All @@ -42,9 +36,7 @@ def set_dart_version(
save_config(config, filename)


def set_java_version(
new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-java.json")
):
def set_java_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-java.json")):
config = read_config(filename)
config["artifactVersion"] = str.join(".", map(str, new_version))
save_config(config, filename)
Expand All @@ -56,9 +48,7 @@ def set_net_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config.
save_config(config, filename)


def set_node_version(
new_version, filename=os.path.join(BASE_CONFIG_DIR, "config.json")
):
def set_node_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config.json")):
config = read_config(filename)
config["npmVersion"] = str.join(".", map(str, new_version))
save_config(config, filename)
Expand All @@ -70,9 +60,7 @@ def set_php_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config.
save_config(config, filename)


def set_python_version(
new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-python.json")
):
def set_python_version(new_version, filename=os.path.join(BASE_CONFIG_DIR, "config-python.json")):
config = read_config(filename)
config["packageVersion"] = str.join(".", map(str, new_version))
save_config(config, filename)
Expand Down Expand Up @@ -105,12 +93,8 @@ def main(new_versions):


def parse_args():
parser = argparse.ArgumentParser(
usage="%s %s" % (sys.argv[0], datetime.today().strftime("%y %#m"))
)
parser.add_argument(
"new_versions", type=int, nargs=2, help="Use separate int values like: 21 6"
)
parser = argparse.ArgumentParser(usage="%s %s" % (sys.argv[0], datetime.today().strftime("%y %#m")))
parser.add_argument("new_versions", type=int, nargs=2, help="Use separate int values like: 21 6")
args = parser.parse_args()
return vars(args)

Expand Down
Loading

0 comments on commit 32d6c0c

Please sign in to comment.