aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2022-09-04 23:35:14 +0200
committerbozo.kopic <bozo@kopic.xyz>2022-09-04 23:35:14 +0200
commitcfbb22658fae9759b5d39e63b40e237245b6db59 (patch)
treea895e0aa7436321b11ed2dd5ace1010f6438df5f
parent6a76aa69d86be9515418424305687d0fec6eaed6 (diff)
requirements update
-rw-r--r--.clang-format65
-rw-r--r--.eslintrc.yml26
-rw-r--r--README.rst8
-rw-r--r--requirements.pip.dev.txt13
-rw-r--r--requirements.pip.runtime.txt2
-rw-r--r--src_doit/__init__.py21
6 files changed, 14 insertions, 121 deletions
diff --git a/.clang-format b/.clang-format
deleted file mode 100644
index 8c67bcb..0000000
--- a/.clang-format
+++ /dev/null
@@ -1,65 +0,0 @@
----
-Language: Cpp
-BasedOnStyle: LLVM
-AccessModifierOffset: -4
-AlignAfterOpenBracket: true
-AlignEscapedNewlinesLeft: false
-AlignOperands: true
-AlignTrailingComments: true
-AllowAllParametersOfDeclarationOnNextLine: true
-AllowShortBlocksOnASingleLine: false
-AllowShortCaseLabelsOnASingleLine: false
-AllowShortIfStatementsOnASingleLine: false
-AllowShortLoopsOnASingleLine: false
-AllowShortFunctionsOnASingleLine: All
-AlwaysBreakAfterDefinitionReturnType: false
-AlwaysBreakTemplateDeclarations: false
-AlwaysBreakBeforeMultilineStrings: false
-BreakBeforeBinaryOperators: None
-BreakBeforeTernaryOperators: true
-BreakConstructorInitializersBeforeComma: false
-BinPackParameters: true
-BinPackArguments: true
-ColumnLimit: 80
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
-ConstructorInitializerIndentWidth: 4
-DerivePointerAlignment: false
-ExperimentalAutoDetectBinPacking: false
-IndentCaseLabels: false
-IndentWrappedFunctionNames: false
-IndentFunctionDeclarationAfterType: false
-MaxEmptyLinesToKeep: 2
-KeepEmptyLinesAtTheStartOfBlocks: true
-NamespaceIndentation: None
-ObjCBlockIndentWidth: 2
-ObjCSpaceAfterProperty: false
-ObjCSpaceBeforeProtocolList: true
-PenaltyBreakBeforeFirstCallParameter: 19
-PenaltyBreakComment: 300
-PenaltyBreakString: 1000
-PenaltyBreakFirstLessLess: 120
-PenaltyExcessCharacter: 1000000
-PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Right
-SpacesBeforeTrailingComments: 1
-Cpp11BracedListStyle: true
-Standard: Cpp11
-IndentWidth: 4
-TabWidth: 4
-UseTab: Never
-BreakBeforeBraces: Attach
-SpacesInParentheses: false
-SpacesInSquareBrackets: false
-SpacesInAngles: false
-SpaceInEmptyParentheses: false
-SpacesInCStyleCastParentheses: false
-SpaceAfterCStyleCast: false
-SpacesInContainerLiterals: true
-SpaceBeforeAssignmentOperators: true
-ContinuationIndentWidth: 4
-CommentPragmas: '^ IWYU pragma:'
-ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
-SpaceBeforeParens: ControlStatements
-DisableFormat: false
-SortIncludes: false
-...
diff --git a/.eslintrc.yml b/.eslintrc.yml
deleted file mode 100644
index e8ee5b7..0000000
--- a/.eslintrc.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-env:
- browser: true
- node: true
- commonjs: true
- es6: true
-extends: 'eslint:recommended'
-parserOptions:
- sourceType: module
- ecmaVersion: 8
-rules:
- indent:
- - error
- - 4
- - ArrayExpression: off
- SwitchCase: 1
- CallExpression:
- arguments: first
- no-unused-vars:
- - error
- - argsIgnorePattern: ^_$
- semi:
- - error
- - always
- linebreak-style:
- - error
- - unix
diff --git a/README.rst b/README.rst
index 8e893a7..8b29452 100644
--- a/README.rst
+++ b/README.rst
@@ -127,15 +127,15 @@ creates wheel package inside `build` directory.
JSON Schema
-----------
-.. literalinclude:: schemas/opcut.yaml
- :language: yaml
+.. include:: schemas/opcut.yaml
+ :code: yaml
OpenAPI
-------
-.. literalinclude:: schemas/openapi.yaml
- :language: yaml
+.. include:: schemas/openapi.yaml
+ :code: yaml
License
diff --git a/requirements.pip.dev.txt b/requirements.pip.dev.txt
index e50b545..33d4612 100644
--- a/requirements.pip.dev.txt
+++ b/requirements.pip.dev.txt
@@ -1,14 +1,3 @@
-r requirements.pip.runtime.txt
-build >= 0.7.0
-doit >= 0.36.0
-flake8 >= 4.0.1
-furo >= 2022.4.7
-hat-doit ~= 0.9.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
+hat-doit ~= 0.11.3
diff --git a/requirements.pip.runtime.txt b/requirements.pip.runtime.txt
index 61c3790..9d02fa1 100644
--- a/requirements.pip.runtime.txt
+++ b/requirements.pip.runtime.txt
@@ -1,4 +1,4 @@
aiohttp ~= 3.8.1
hat-aio ~= 0.7.0
-hat-json ~= 0.5.6
+hat-json ~= 0.5.8
pycairo ~= 1.21.0
diff --git a/src_doit/__init__.py b/src_doit/__init__.py
index 3daba9f..c25a42c 100644
--- a/src_doit/__init__.py
+++ b/src_doit/__init__.py
@@ -1,6 +1,5 @@
from pathlib import Path
import subprocess
-import sys
import tempfile
from hat import json
@@ -9,6 +8,7 @@ from hat.doit.py import (build_wheel,
run_pytest,
run_flake8)
from hat.doit.js import run_eslint
+from hat.doit.c import get_task_clang_format
from .c import * # NOQA
from .dist import * # NOQA
@@ -21,7 +21,7 @@ __all__ = ['task_clean_all',
'task_check',
'task_test',
'task_ui',
- 'task_deps',
+ 'task_node_modules',
'task_format',
'task_json_schema_repo',
*c.__all__,
@@ -61,7 +61,6 @@ def task_wheel():
description='Cutting stock problem optimizer',
url='https://github.com/bozokopic/opcut',
license=common.License.GPL3,
- packages=['opcut'],
console_scripts=['opcut = opcut.main:main'])
return {'actions': [build],
@@ -75,7 +74,7 @@ def task_check():
return {'actions': [(run_flake8, [src_py_dir]),
(run_flake8, [pytest_dir]),
(run_eslint, [src_js_dir])],
- 'task_dep': ['deps']}
+ 'task_dep': ['node_modules']}
def task_test():
@@ -107,22 +106,18 @@ def task_ui():
return {'actions': [build],
'pos_arg': 'args',
- 'task_dep': ['deps']}
+ 'task_dep': ['node_modules']}
-def task_deps():
- """Install dependencies"""
+def task_node_modules():
+ """Install node modules"""
return {'actions': ['yarn install --silent']}
def task_format():
"""Format"""
- files = [*Path('src_c').rglob('*.c'),
- *Path('src_c').rglob('*.h')]
- for f in files:
- yield {'name': str(f),
- 'actions': [f'clang-format -style=file -i {f}'],
- 'file_dep': [f]}
+ yield from get_task_clang_format([*Path('src_c').rglob('*.c'),
+ *Path('src_c').rglob('*.h')])
def task_json_schema_repo():