From 3fe659725adf645104e54160aefc0fa55dcc5f01 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sat, 25 Nov 2023 18:23:59 -0500 Subject: [PATCH 01/22] Adding a github workflow --- .github/workflows/build_wheels.yml | 31 +++++++++++++++++++++++++++++- requirements-test.txt | 1 + 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 requirements-test.txt diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 7cce82be..f78e10f5 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-11] + os: [ubuntu-22.04, macos-11] steps: - uses: actions/checkout@v3 @@ -32,4 +32,33 @@ jobs: - uses: actions/upload-artifact@v3 with: + name: wheel-${{ matrix.os }} path: ./wheelhouse/*.whl + + test: + needs: [build_wheels] + name: Unit Test on ${{ matrix.os }} with Python ${{ python-version }} + runs-on: ${{ matrix.os }} + matrix: + os: [ubuntu-22.04, macos-11] + python-version: ["3.6", "3.8", "3.11"] + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - uses: actions/download-artifact@v3 + with: + name: wheel-${{ matrix.os }} + path: dist/ + + - run: pip install --upgrade + pip + dist/clp_ffi_py-*.whl + -r requirements-test.txt + + - run: cd tests + python -m unittest -fv diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 00000000..cbd539f2 --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1 @@ +smart_open>=6.3.0 \ No newline at end of file From d444a9ec28d416cc206e8f2e708c5887730c53c8 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sat, 25 Nov 2023 18:25:18 -0500 Subject: [PATCH 02/22] Fix workflow file syntax issue --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index f78e10f5..61a579e1 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -37,7 +37,7 @@ jobs: test: needs: [build_wheels] - name: Unit Test on ${{ matrix.os }} with Python ${{ python-version }} + name: Unit Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} matrix: os: [ubuntu-22.04, macos-11] From 73db57864dca99c49430037410e1d96f9ae4aca7 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sat, 25 Nov 2023 18:26:08 -0500 Subject: [PATCH 03/22] Fix workflow file syntax issue --- .github/workflows/build_wheels.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 61a579e1..39980e0e 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -39,7 +39,8 @@ jobs: needs: [build_wheels] name: Unit Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} - matrix: + strategy: + matrix: os: [ubuntu-22.04, macos-11] python-version: ["3.6", "3.8", "3.11"] From e5694604351d37783af30ebb6133ef0863a4e669 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sun, 26 Nov 2023 05:47:10 -0500 Subject: [PATCH 04/22] Using cibuildwheel for testing --- .github/workflows/build_wheels.yml | 29 ----------------------------- MANIFEST.in | 1 + pyproject.toml | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 39980e0e..797ac374 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -34,32 +34,3 @@ jobs: with: name: wheel-${{ matrix.os }} path: ./wheelhouse/*.whl - - test: - needs: [build_wheels] - name: Unit Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-22.04, macos-11] - python-version: ["3.6", "3.8", "3.11"] - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - uses: actions/download-artifact@v3 - with: - name: wheel-${{ matrix.os }} - path: dist/ - - - run: pip install --upgrade - pip - dist/clp_ffi_py-*.whl - -r requirements-test.txt - - - run: cd tests - python -m unittest -fv diff --git a/MANIFEST.in b/MANIFEST.in index 48c91d31..3287a7cb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -8,3 +8,4 @@ recursive-include clp_ffi_py *.pyi recursive-include clp_ffi_py py.typed include src/clp/components/core/submodules/json/single_include/nlohmann/json.hpp include src/GSL/include/gsl/* +recursive-include tests * \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 58db2e42..8d5be962 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,21 @@ target-version = ["py311"] color = true preview = true +[tool.cibuildwheel] +test-command = [ + "cd {package}/tests", + "python -m unittest -fv", +] +test-requires = "smart_open" +test-skip = [ + "cp36-*", + "cp37-*", + "cp39-*", + "cp310-*", + "*-*linux_i686", + "*-macosx_x86_64", +] + [tool.cibuildwheel.macos] archs = ["x86_64", "universal2", "arm64"] From 34888fdda7ea2594324fade3caedde1d2e03e0dd Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sun, 26 Nov 2023 06:15:26 -0500 Subject: [PATCH 05/22] Disable pypy --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 8d5be962..819d3b43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,7 @@ color = true preview = true [tool.cibuildwheel] +skip = "pp*" test-command = [ "cd {package}/tests", "python -m unittest -fv", From bc848d893c5072499891bb17f2cec257d34f4465 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sun, 26 Nov 2023 18:09:56 -0500 Subject: [PATCH 06/22] Upgrade to C++20 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 38b6c9a6..181ace2c 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ "src/clp_ffi_py/utils.cpp", ], extra_compile_args=[ - "-std=c++17", + "-std=c++20", "-O3", ], define_macros=[("SOURCE_PATH_SIZE", str(len(os.path.abspath("./src/clp/components/core"))))], From 847c4898e820911c27d6678949c8f672721d9690 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sun, 26 Nov 2023 20:10:03 -0500 Subject: [PATCH 07/22] Using musllinux_1_2 to enable c++20 --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 819d3b43..09c65d6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,6 +37,11 @@ color = true preview = true [tool.cibuildwheel] +musllinux-x86_64-image = "musllinux_1_2" +musllinux-i686-image = "musllinux_1_2" +musllinux-aarch64-image = "musllinux_1_2" +musllinux-ppc64le-image = "musllinux_1_2" +musllinux-s390x-image = "musllinux_1_2" skip = "pp*" test-command = [ "cd {package}/tests", From f1fcbcb279e82dd9119f22c9147a9775b3624637 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Sun, 26 Nov 2023 21:26:54 -0500 Subject: [PATCH 08/22] Test again --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 09c65d6c..c0160d77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,7 @@ musllinux-aarch64-image = "musllinux_1_2" musllinux-ppc64le-image = "musllinux_1_2" musllinux-s390x-image = "musllinux_1_2" skip = "pp*" +build = "*-musllinux*" test-command = [ "cd {package}/tests", "python -m unittest -fv", From 9561c966d30e672eb407a4b9d5918feb7920b38a Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 12:15:24 -0500 Subject: [PATCH 09/22] Update cibuildwheel version in workflow --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 797ac374..ad184491 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -25,7 +25,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.12.3 + uses: pypa/cibuildwheel@v2.16.2 env: CIBW_ARCHS_LINUX: auto aarch64 MACOSX_DEPLOYMENT_TARGET: 10.15 From a298367c103478c1041cbba2e72adefd51e01210 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 12:20:32 -0500 Subject: [PATCH 10/22] pyproject setting --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c0160d77..56ee72ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,6 @@ musllinux-aarch64-image = "musllinux_1_2" musllinux-ppc64le-image = "musllinux_1_2" musllinux-s390x-image = "musllinux_1_2" skip = "pp*" -build = "*-musllinux*" test-command = [ "cd {package}/tests", "python -m unittest -fv", @@ -58,6 +57,9 @@ test-skip = [ "*-macosx_x86_64", ] +[tool.ciduilwheel.linux] +build = "*-musllinux*" + [tool.cibuildwheel.macos] archs = ["x86_64", "universal2", "arm64"] From 85c04e36f1962dbcccd9b527c3f36afda2e2a6f7 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 12:37:03 -0500 Subject: [PATCH 11/22] Formal --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 56ee72ce..09c65d6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,9 +57,6 @@ test-skip = [ "*-macosx_x86_64", ] -[tool.ciduilwheel.linux] -build = "*-musllinux*" - [tool.cibuildwheel.macos] archs = ["x86_64", "universal2", "arm64"] From dcce2ea81d360afa34e5c3236d9d0d7df37101e4 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 16:54:10 -0500 Subject: [PATCH 12/22] test build --- MANIFEST.in | 1 + pyproject.toml | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 3287a7cb..a5cc53ab 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,7 @@ recursive-include src/clp_ffi_py *.inc recursive-include clp_ffi_py *.py recursive-include clp_ffi_py *.pyi recursive-include clp_ffi_py py.typed +include setup.cfg include src/clp/components/core/submodules/json/single_include/nlohmann/json.hpp include src/GSL/include/gsl/* recursive-include tests * \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 09c65d6c..a3a841ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,14 +47,14 @@ test-command = [ "cd {package}/tests", "python -m unittest -fv", ] -test-requires = "smart_open" +test-requires = [ + "smart_open" +] test-skip = [ - "cp36-*", "cp37-*", "cp39-*", "cp310-*", "*-*linux_i686", - "*-macosx_x86_64", ] [tool.cibuildwheel.macos] @@ -82,4 +82,3 @@ select = ["E", "I", "F"] [tool.ruff.isort] order-by-type = false - From 4aa6410661a16bd701c77a6ee9ac750abea70e6b Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:00:11 -0500 Subject: [PATCH 13/22] Add setup.cfg for python3.6 --- setup.cfg | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b1ac2cb0 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[options] +install_requires = + python-dateutil >= 2.7.0 + typing-extensions >= 4.1.1 + zstandard >= 0.18.0 diff --git a/setup.py b/setup.py index 181ace2c..38b6c9a6 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ "src/clp_ffi_py/utils.cpp", ], extra_compile_args=[ - "-std=c++20", + "-std=c++17", "-O3", ], define_macros=[("SOURCE_PATH_SIZE", str(len(os.path.abspath("./src/clp/components/core"))))], From 479f0cae07526843c90122e4a1a8969e8819c543 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:06:36 -0500 Subject: [PATCH 14/22] Remove unused test requirements --- requirements-test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 requirements-test.txt diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index cbd539f2..00000000 --- a/requirements-test.txt +++ /dev/null @@ -1 +0,0 @@ -smart_open>=6.3.0 \ No newline at end of file From e792563285c94b80153f464d3e276732ac83b0f2 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:33:33 -0500 Subject: [PATCH 15/22] Add linter check in github workflow --- .github/workflows/build_wheels.yml | 28 +++++++++++++++++++ requirements-dev.txt | 12 ++++---- src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp | 19 ++++++++----- src/clp_ffi_py/ir/native/decoding_methods.cpp | 19 ++++++++----- 4 files changed, 58 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index ad184491..ac84f0ea 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -3,7 +3,35 @@ name: Build on: [push, pull_request] jobs: + linter_check: + runs-on: ubuntu-latest + steps: + - uses: action/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - run: | + pip install --upgrade + pip -r requirements-dev.txt + + - run: docformatter --check --diff clp_ffi_py tests + + - run: black --diff --check clp_ffi_py tests + + - run: ruff check --output-format=github clp_ffi_py tests + + - run: mypy src tests + + - run: | + clang-format --dry-run --Werror \ + src/clp_ffi_py/*.* \ + src/clp_ffi_py/*/*.* \ + src/clp_ffi_py/*/*/*.* \ + build_wheels: + needs: [linter_check] name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/requirements-dev.txt b/requirements-dev.txt index ca6ef940..97df73f7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,12 +1,12 @@ -black>=22.10.0 +black>=23.11.0 build>=0.8.0 -cibuildwheel>=2.12.3 -clang-format>=16.0.4 +cibuildwheel>=2.16.2 +clang-format>=17.0.5 docformatter>=1.7.5 -mypy>=0.982 -mypy-extensions>=0.4.3 +mypy>=1.7.1 +mypy-extensions>=1.0.0 packaging>=21.3 -ruff>=0.0.278 +ruff>=0.1.6 smart_open>=6.3.0 toml>=0.10.2 tomli>=2.0.1 diff --git a/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp b/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp index d873c780..ea0a453b 100644 --- a/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp +++ b/src/clp_ffi_py/ir/native/PyDecoderBuffer.cpp @@ -32,7 +32,8 @@ auto PyDecoderBuffer_init(PyDecoderBuffer* self, PyObject* args, PyObject* keywo static char* keyword_table[]{ static_cast(keyword_input_stream), static_cast(keyword_initial_buffer_capacity), - nullptr}; + nullptr + }; // If the argument parsing fails, `self` will be deallocated. We must reset // all pointers to nullptr in advance, otherwise the deallocator might @@ -54,8 +55,8 @@ auto PyDecoderBuffer_init(PyDecoderBuffer* self, PyObject* args, PyObject* keywo return -1; } - PyObjectPtr const readinto_method_obj{ - PyObject_GetAttrString(input_stream, "readinto")}; + PyObjectPtr const readinto_method_obj{PyObject_GetAttrString(input_stream, "readinto") + }; auto* readinto_method{readinto_method_obj.get()}; if (nullptr == readinto_method) { return -1; @@ -153,7 +154,8 @@ PyMethodDef PyDecoderBuffer_method_table[]{ METH_O, static_cast(cPyDecoderBufferTestStreamingDoc)}, - {nullptr}}; + {nullptr} +}; /** * Declaration of Python buffer protocol. @@ -188,7 +190,8 @@ PyType_Slot PyDecoderBuffer_slots[]{ {Py_tp_init, reinterpret_cast(PyDecoderBuffer_init)}, {Py_tp_methods, static_cast(PyDecoderBuffer_method_table)}, {Py_tp_doc, const_cast(static_cast(cPyDecoderBufferDoc))}, - {0, nullptr}}; + {0, nullptr} +}; // NOLINTEND(cppcoreguidelines-avoid-c-arrays, cppcoreguidelines-pro-type-*-cast) /** @@ -199,7 +202,8 @@ PyType_Spec PyDecoderBuffer_type_spec{ sizeof(PyDecoderBuffer), 0, Py_TPFLAGS_DEFAULT, - static_cast(PyDecoderBuffer_slots)}; + static_cast(PyDecoderBuffer_slots) +}; // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays) PyDoc_STRVAR( @@ -225,7 +229,8 @@ auto PyDecoderBuffer::init(PyObject* input_stream, Py_ssize_t buf_capacity) -> b auto PyDecoderBuffer::populate_read_buffer(Py_ssize_t& num_bytes_read) -> bool { auto const unconsumed_bytes_in_curr_read_buffer{get_unconsumed_bytes()}; auto const num_unconsumed_bytes{ - static_cast(unconsumed_bytes_in_curr_read_buffer.size())}; + static_cast(unconsumed_bytes_in_curr_read_buffer.size()) + }; auto const buffer_capacity{static_cast(m_read_buffer.size())}; if (num_unconsumed_bytes > (buffer_capacity / 2)) { diff --git a/src/clp_ffi_py/ir/native/decoding_methods.cpp b/src/clp_ffi_py/ir/native/decoding_methods.cpp index 77136cdf..d19a95a9 100644 --- a/src/clp_ffi_py/ir/native/decoding_methods.cpp +++ b/src/clp_ffi_py/ir/native/decoding_methods.cpp @@ -50,7 +50,8 @@ auto decode( auto const unconsumed_bytes{decoder_buffer->get_unconsumed_bytes()}; BufferReader ir_buffer{ size_checked_pointer_cast(unconsumed_bytes.data()), - unconsumed_bytes.size()}; + unconsumed_bytes.size() + }; auto const err{ffi::ir_stream::four_byte_encoding::decode_next_message( ir_buffer, decoded_message, @@ -129,7 +130,8 @@ auto decode_preamble(PyObject* Py_UNUSED(self), PyObject* py_decoder_buffer) -> auto const unconsumed_bytes{decoder_buffer->get_unconsumed_bytes()}; BufferReader ir_buffer{ size_checked_pointer_cast(unconsumed_bytes.data()), - unconsumed_bytes.size()}; + unconsumed_bytes.size() + }; auto const err{ffi::ir_stream::get_encoding_type(ir_buffer, is_four_byte_encoding)}; if (ffi::ir_stream::IRErrorCode_Success == err) { ir_buffer_cursor_pos = ir_buffer.get_pos(); @@ -156,7 +158,8 @@ auto decode_preamble(PyObject* Py_UNUSED(self), PyObject* py_decoder_buffer) -> auto const unconsumed_bytes = decoder_buffer->get_unconsumed_bytes(); BufferReader ir_buffer{ size_checked_pointer_cast(unconsumed_bytes.data()), - unconsumed_bytes.size()}; + unconsumed_bytes.size() + }; auto const err{ffi::ir_stream::decode_preamble( ir_buffer, metadata_type_tag, @@ -178,7 +181,8 @@ auto decode_preamble(PyObject* Py_UNUSED(self), PyObject* py_decoder_buffer) -> auto const unconsumed_bytes = decoder_buffer->get_unconsumed_bytes(); auto const metadata_buffer{ - unconsumed_bytes.subspan(metadata_pos, static_cast(metadata_size))}; + unconsumed_bytes.subspan(metadata_pos, static_cast(metadata_size)) + }; decoder_buffer->commit_read_buffer_consumption(static_cast(ir_buffer_cursor_pos)); PyMetadata* metadata{nullptr}; try { @@ -187,8 +191,8 @@ auto decode_preamble(PyObject* Py_UNUSED(self), PyObject* py_decoder_buffer) -> nlohmann::json const metadata_json( nlohmann::json::parse(metadata_buffer.begin(), metadata_buffer.end()) ); - std::string const version{ - metadata_json.at(ffi::ir_stream::cProtocol::Metadata::VersionKey)}; + std::string const version{metadata_json.at(ffi::ir_stream::cProtocol::Metadata::VersionKey) + }; auto const error_code{ffi::ir_stream::validate_protocol_version(version)}; if (ffi::ir_stream::IRProtocolErrorCode_Supported != error_code) { switch (error_code) { @@ -232,7 +236,8 @@ auto decode_next_log_event(PyObject* Py_UNUSED(self), PyObject* args, PyObject* static_cast(keyword_decoder_buffer), static_cast(keyword_query), static_cast(keyword_allow_incomplete_stream), - nullptr}; + nullptr + }; PyDecoderBuffer* decoder_buffer{nullptr}; PyObject* query{Py_None}; From cb200a76506b71c0f51409dd3d897043861a13cc Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:35:48 -0500 Subject: [PATCH 16/22] actions not action --- .github/workflows/build_wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index ac84f0ea..ae9ee854 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -3,10 +3,10 @@ name: Build on: [push, pull_request] jobs: - linter_check: + linters: runs-on: ubuntu-latest steps: - - uses: action/checkout@v3 + - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: @@ -31,7 +31,7 @@ jobs: src/clp_ffi_py/*/*/*.* \ build_wheels: - needs: [linter_check] + needs: [linters] name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: From 2ab63926d02dea9a37daa39ff5431a358ef6a0ed Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:36:38 -0500 Subject: [PATCH 17/22] Forgot to specifile pip --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index ae9ee854..be1c0eab 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -13,7 +13,7 @@ jobs: python-version: "3.11" - run: | - pip install --upgrade + pip install --upgrade pip pip -r requirements-dev.txt - run: docformatter --check --diff clp_ffi_py tests From 364c6c56751eb733433771a756bb2c1974ac31a8 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:38:41 -0500 Subject: [PATCH 18/22] Forgot to add install --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index be1c0eab..c1b62f59 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -14,7 +14,7 @@ jobs: - run: | pip install --upgrade pip - pip -r requirements-dev.txt + pip install -r requirements-dev.txt - run: docformatter --check --diff clp_ffi_py tests From cbbe2ed88c7e52068e23a6da7bf15c96ae359496 Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:39:31 -0500 Subject: [PATCH 19/22] It's clp_ffi_py, not src --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index c1b62f59..1b478356 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -22,7 +22,7 @@ jobs: - run: ruff check --output-format=github clp_ffi_py tests - - run: mypy src tests + - run: mypy clp_ffi_py tests - run: | clang-format --dry-run --Werror \ From f2b55c614b71427f862145bdd62ba0677af25c9b Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 17:55:30 -0500 Subject: [PATCH 20/22] ababa --- pyproject.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a3a841ab..6854df2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,12 +37,13 @@ color = true preview = true [tool.cibuildwheel] -musllinux-x86_64-image = "musllinux_1_2" -musllinux-i686-image = "musllinux_1_2" musllinux-aarch64-image = "musllinux_1_2" +musllinux-i686-image = "musllinux_1_2" musllinux-ppc64le-image = "musllinux_1_2" musllinux-s390x-image = "musllinux_1_2" +musllinux-x86_64-image = "musllinux_1_2" skip = "pp*" + test-command = [ "cd {package}/tests", "python -m unittest -fv", From cbf2173ecb8ce8c51ff17f75396e5b9b9b944d1a Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 20:29:50 -0500 Subject: [PATCH 21/22] Haha --- .github/workflows/build_wheels.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 1b478356..1a4a580c 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -25,10 +25,7 @@ jobs: - run: mypy clp_ffi_py tests - run: | - clang-format --dry-run --Werror \ - src/clp_ffi_py/*.* \ - src/clp_ffi_py/*/*.* \ - src/clp_ffi_py/*/*/*.* \ + find src/clp_ffi_py/ -type f | xargs clang-format --dry-run --Werror build_wheels: needs: [linters] From dc18276cb82ea41e385b9dec6dfe1b6ec5d73aca Mon Sep 17 00:00:00 2001 From: LinZhihao-723 Date: Mon, 27 Nov 2023 20:40:19 -0500 Subject: [PATCH 22/22] djsaoifjalsdf --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6854df2c..d31e34b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,11 +37,6 @@ color = true preview = true [tool.cibuildwheel] -musllinux-aarch64-image = "musllinux_1_2" -musllinux-i686-image = "musllinux_1_2" -musllinux-ppc64le-image = "musllinux_1_2" -musllinux-s390x-image = "musllinux_1_2" -musllinux-x86_64-image = "musllinux_1_2" skip = "pp*" test-command = [