diff options
| -rw-r--r-- | README.rst | 2 | ||||
| -rw-r--r-- | VERSION | 2 | ||||
| -rw-r--r-- | compile_flags.txt | 3 | ||||
| -rw-r--r-- | requirements.pip.dev.txt | 24 | ||||
| -rw-r--r-- | requirements.pip.runtime.txt | 6 | ||||
| -rw-r--r-- | src_js/vt.js | 2 | ||||
| -rw-r--r-- | src_py/opcut/main.py | 12 | ||||
| -rw-r--r-- | src_py/opcut/server.py | 1 |
8 files changed, 29 insertions, 23 deletions
@@ -101,7 +101,7 @@ License ------- opcut - cutting stock problem optimizer -Copyright (C) 2017-2021 Bozo Kopic +Copyright (C) 2017-2022 Bozo Kopic This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1 +1 @@ -0.3.2-dev +0.3.2 diff --git a/compile_flags.txt b/compile_flags.txt new file mode 100644 index 0000000..ee29114 --- /dev/null +++ b/compile_flags.txt @@ -0,0 +1,3 @@ +-Ideps/argparse +-Ideps/hat-util/src_c +-Ideps/jsmn diff --git a/requirements.pip.dev.txt b/requirements.pip.dev.txt index 4a24a30..6f6d40d 100644 --- a/requirements.pip.dev.txt +++ b/requirements.pip.dev.txt @@ -1,15 +1,15 @@ -r requirements.pip.runtime.txt -build ~= 0.7.0 -doit ~= 0.33.1 -flake8 ~= 3.9.2 -furo >= 2021.10.9 -hat-doit ~= 0.8.1 +build >= 0.7.0 +doit >= 0.36.0 +flake8 >= 4.0.1 +furo >= 2022.4.7 +hat-doit ~= 0.8.2 peru >= 1.3.0 -pytest ~= 6.2.5 -pytest-asyncio ~= 0.15.1 -pytest-cov ~= 2.12.1 -pytest-timeout ~= 1.4.2 -setuptools ~= 58.5.3 -sphinx ~= 4.2.0 -wheel ~= 0.37.0 +pytest >= 7.1.2 +pytest-asyncio >= 0.18.3 +pytest-cov >= 3.0.0 +pytest-timeout >= 2.1.0 +setuptools >= 62.2.0 +sphinx >= 4.5.0 +wheel >= 0.37.1 diff --git a/requirements.pip.runtime.txt b/requirements.pip.runtime.txt index 1a49035..4499a99 100644 --- a/requirements.pip.runtime.txt +++ b/requirements.pip.runtime.txt @@ -1,6 +1,6 @@ aiohttp ~= 3.8.1 appdirs ~= 1.4.4 -click ~= 8.0.3 +click ~= 8.1.3 hat-aio ~= 0.6.0 -hat-json ~= 0.5.3 -pycairo ~= 1.20.1 +hat-json ~= 0.5.5 +pycairo ~= 1.21.0 diff --git a/src_js/vt.js b/src_js/vt.js index 878280f..b016018 100644 --- a/src_js/vt.js +++ b/src_js/vt.js @@ -73,7 +73,7 @@ function leftPanel() { r.get('form', 'min_initial_usage'), val => r.set(['form', 'min_initial_usage'], val)), ['label'], - checkboxInput('Use native implementation', + checkboxInput('Use native implementation (experimental)', r.get('form', 'native'), val => r.set(['form', 'native'], val)) ], diff --git a/src_py/opcut/main.py b/src_py/opcut/main.py index 475288e..b1d66a8 100644 --- a/src_py/opcut/main.py +++ b/src_py/opcut/main.py @@ -19,6 +19,10 @@ params_schema_id: str = 'opcut://opcut.yaml#/definitions/params' result_schema_id: str = 'opcut://opcut.yaml#/definitions/result' +def _doc_enum_values(enum_cls): + return ', '.join(str(i.value) for i in enum_cls) + + @click.group() def main(): """Application main entry point""" @@ -28,7 +32,7 @@ def main(): @click.option('--method', default=common.Method.FORWARD_GREEDY, type=common.Method, - help="calculate method") + help=f"calculate method ({_doc_enum_values(common.Method)})") @click.option('--output', default=None, metavar='PATH', @@ -42,7 +46,7 @@ def main(): def calculate(method: common.Method, output: typing.Optional[Path], params: typing.Optional[Path]): - """Calculate result""" + """Calculate result based on parameters JSON""" params = (json.decode_file(params) if params and params != Path('-') else json.decode_stream(sys.stdin)) common.json_schema_repo.validate(params_schema_id, params) @@ -66,7 +70,7 @@ def calculate(method: common.Method, @click.option('--output-type', default=common.OutputType.PDF, type=common.OutputType, - help="output type") + help=f"output type ({_doc_enum_values(common.OutputType)})") @click.option('--panel', default=None, help="panel identifier") @@ -84,7 +88,7 @@ def generate_output(output_type: common.OutputType, panel: typing.Optional[str], output: typing.Optional[Path], result: typing.Optional[Path]): - """Generate output""" + """Generate output based on result JSON""" result = (json.decode_file(result) if result and result != Path('-') else json.decode_stream(sys.stdin)) common.json_schema_repo.validate(result_schema_id, result) diff --git a/src_py/opcut/server.py b/src_py/opcut/server.py index 5e726ad..2ae76a2 100644 --- a/src_py/opcut/server.py +++ b/src_py/opcut/server.py @@ -18,7 +18,6 @@ async def create(host: str, ) -> 'Server': server = Server() server._async_group = aio.Group() - server._executor = aio.create_executor() app = aiohttp.web.Application() app.add_routes([ |
