diff --git a/.configs/registration-config-multi-dim.json b/.configs/registration-config-multi-dim.json new file mode 100644 index 0000000000..e8e0c481d9 --- /dev/null +++ b/.configs/registration-config-multi-dim.json @@ -0,0 +1,15 @@ +{ + "parameter_classes": { + "array": { + "nd": [1,2,3], + "dtype": [ + "int", + "uint", + "uint(8)", + "real", + "bool", + "bigint" + ] + } + } +} diff --git a/.configs/serverConfig-multi-dim.json b/.configs/serverConfig-multi-dim.json new file mode 100644 index 0000000000..5d3001b656 --- /dev/null +++ b/.configs/serverConfig-multi-dim.json @@ -0,0 +1,18 @@ +{ + "max_array_dims": 3, + "supported_scalar_types": { + "uint8": true, + "uint16": false, + "uint32": false, + "uint64": true, + "int8": false, + "int16": false, + "int32": false, + "int64": true, + "float32": false, + "float64": true, + "complex64": false, + "complex128": false, + "bool": true + } +} diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 75b856f583..e5609439a1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -125,6 +125,41 @@ jobs: run: | make test-python-proto size=100 + arkouda_proto_multi-dim: + runs-on: ubuntu-latest + strategy: + matrix: + chpl-version: ['2.0.0'] + container: + image: chapel/chapel:${{matrix.chpl-version}} + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + apt-get update && apt-get install -y -V ca-certificates lsb-release wget + wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb + apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb + apt-get update && apt-get install -y libhdf5-dev hdf5-tools libzmq3-dev python3-pip libarrow-dev libparquet-dev libcurl4-openssl-dev libidn2-dev + make install-iconv + echo "\$(eval \$(call add-path,/usr/lib/x86_64-linux-gnu/hdf5/serial/))" >> Makefile.paths + - name: Check chpl version + run: | + chpl --version + - name: Install Chapel frontend bindings + run: | + (cd $CHPL_HOME/tools/chapel-py && python3 -m pip install .) + - name: Use MultiDim Configs + run: | + cp .configs/serverConfig-multi-dim.json serverConfig.json + cp .configs/registration-config-multi-dim.json registration-config.json + - name: Build/Install Arkouda + run: | + make + python3 -m pip install -e .[dev] + - name: Arkouda unit tests + run: | + make test-python-proto size=100 + arkouda_proto_tests_linux: runs-on: ubuntu-latest strategy: diff --git a/PROTO_tests/tests/client_test.py b/PROTO_tests/tests/client_test.py index bbf014368b..69c4d6a539 100644 --- a/PROTO_tests/tests/client_test.py +++ b/PROTO_tests/tests/client_test.py @@ -67,11 +67,15 @@ def test_client_get_config(self): assert "arkoudaVersion" in config assert "INFO" == config["logLevel"] - try: - mar = ak.client.get_max_array_rank() - assert mar == 1 - except Exception as e: - raise AssertionError(e) + import json + + def get_server_max_array_dims(): + try: + return json.load(open("serverConfig.json", "r"))["max_array_dims"] + except (ValueError, FileNotFoundError, TypeError, KeyError): + return 1 + + assert get_server_max_array_dims() == ak.client.get_max_array_rank() def test_get_mem_used(self): """ @@ -155,7 +159,10 @@ def test_client_array_dim_cmd_error(self): with pytest.raises(RuntimeError) as cm: resp = generic_msg("reduce10D") - err_msg = "Error: Command 'reduce10D' is not supported with the current server configuration as the maximum array dimensionality is 1. Please recompile with support for at least 10D arrays" + err_msg = ( + f"Error: Command 'reduce10D' is not supported with the current server configuration as the maximum array dimensionality is {ak.client.get_max_array_rank()}. " + f"Please recompile with support for at least 10D arrays" + ) cm.match(err_msg) # Asserts the error msg matches the expected value def test_client_nd_unimplemented_error(self):