From ae3154221a173113591429187af6d2b5a95df674 Mon Sep 17 00:00:00 2001 From: akashdhruv Date: Fri, 14 Jul 2023 20:03:27 -0500 Subject: [PATCH 01/18] update docstrings --- boxkit/library/_block.py | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/boxkit/library/_block.py b/boxkit/library/_block.py index f3ba17cb..95920cd3 100644 --- a/boxkit/library/_block.py +++ b/boxkit/library/_block.py @@ -8,29 +8,23 @@ class Block: # pylint: disable=too-many-instance-attributes """ Class for storing block metadata - Parameters - ---------- - data : Boxkit Data object - attributes : Dictionary of attributes - - .. code-block:: - - 'dx' : grid spacing x direction - 'dy' : grid spacing y direction - 'dz' : grid spacing z direction - 'xmin' : low bound x direction - 'ymin' : low bound y direction - 'zmin' : low bound z direction - 'xmax' : high bound x direction - 'ymax' : high bound y direction - 'zmax' : high bound z direction - 'tag' : block ID + :param data: BoxKit Data object + :param attributes['dx']: Grid spacing in x direction + :param attributes['dy']: Grid spacing in y direction + :param attributes['dz']: Grid spacing in z direction + :param attributes['xmin']: Lower bound in x direction + :param attributes['ymin']: Lower bound in y direction + :param attributes['zmin']: Lower bound in z direction + :param attributes['xmax']: Higher bound in x direction + :param attributes['ymax']: Higher bound in y direction + :param attributes['zmax']: Higher bound in z direction + :param attributes['tag']: Block ID """ type_ = "default" def __init__(self, data=None, **attributes): - """Initialize the object and allocate the data.""" + """Initialize the object and map data.""" super().__init__() self.dx, self.dy, self.dz = [1.0, 1.0, 1.0] # pylint: disable=invalid-name From 034577c943f60d5d4f6481858bf773ab72ac3ff6 Mon Sep 17 00:00:00 2001 From: akashdhruv Date: Fri, 14 Jul 2023 20:28:16 -0500 Subject: [PATCH 02/18] add READMEs --- .gitignore | 5 ++--- requirements/README.rst | 1 + tests/README.rst | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 requirements/README.rst create mode 100644 tests/README.rst diff --git a/.gitignore b/.gitignore index bed977b6..7b293be4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,12 +8,11 @@ boxkit/options.py build/* dist/* dask-worker-space -*.rst boxkit/depends/boost/* +.sphinx/*/*.rst .sphinx/build/* .sphinx/source/media/* .sphinx/source/tutorials/* !.sphinx/source/index.rst -!./README.rst -!./DESIGN.rst +!requirements/README.rst !tutorials/*/*.rst diff --git a/requirements/README.rst b/requirements/README.rst new file mode 100644 index 00000000..2b695d57 --- /dev/null +++ b/requirements/README.rst @@ -0,0 +1 @@ +List of various dependencies organized based on install options. diff --git a/tests/README.rst b/tests/README.rst new file mode 100644 index 00000000..1d7e44b2 --- /dev/null +++ b/tests/README.rst @@ -0,0 +1,2 @@ +Organization of tests based on sites and functionality. All tests should +be resolved on `development` branch before merge to main. From 0cf4484fcb11f812c30446ffaad8b4008b329b63 Mon Sep 17 00:00:00 2001 From: akashdhruv Date: Fri, 14 Jul 2023 16:22:10 -0500 Subject: [PATCH 03/18] update NOTICE --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index 28858458..6835e0f8 100644 --- a/NOTICE +++ b/NOTICE @@ -1,4 +1,4 @@ -Copyright (c) 2023 UChicago Argonne LLC and contributors. All rights reserved. +Copyright (c) 2023 UChicago Argonne LLC. All rights reserved. Title: BoxKit (SF-23-067) From bdf080a6ba470078ac173a69931fb25baf972970 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 7 Sep 2023 12:16:10 -0500 Subject: [PATCH 04/18] update paper --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 2ada0582..2bc55e95 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -114,7 +114,7 @@ increases. Mapping of AMR data to contingous arrays becomes important for applications where global operations in space are required. An example of this is SciKit's -``skimage_measure`` method, which can be used to measure bubble shape and size +``skimage.measure`` method, which can be used to measure bubble shape and size for Flash-X boiling simulations. BoxKit improves performance of this operation by ~5x. Data for these performance studies along with corresponding IPython notebooks can be found in [@boxkit-performance]. From e758705debce0789460ffd31e2dd3e6b5c623788 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:38:54 -0500 Subject: [PATCH 05/18] update workflows --- .github/workflows/minimal.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index f4e0c601..c8480051 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -1,6 +1,8 @@ name: Minimal on: + push: + - development pull_request: branches: - main @@ -13,6 +15,24 @@ on: jobs: + windows: + name: "windows" + runs-on: windows-latest + - uses: actions/checkout@v2 + - uses: akashdhruv/Maple/.github/actions/maple@main + - name: Build Container + run: | + maple image build boxkit + - uses: ./.github/actions/install + with: + image: boxkit + - name: Run BoxKit tests + run: | + maple container pour --image=boxkit + maple container execute "python3 tests/container/create.py" + maple container rinse + maple image delete boxkit + library: name: "library" runs-on: ubuntu-latest From 5d0227130913c1ff3565c188d7878516612e7fe2 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:42:27 -0500 Subject: [PATCH 06/18] update minimal --- .github/workflows/minimal.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index c8480051..3ae24049 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -32,9 +32,9 @@ jobs: maple container execute "python3 tests/container/create.py" maple container rinse maple image delete boxkit - - library: - name: "library" + + ubuntu: + name: "ubuntu" runs-on: ubuntu-latest steps: #- name: Login to Docker Hub From 256e149f0490d34264b2dfa77cca1cc9252e6e0a Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:44:28 -0500 Subject: [PATCH 07/18] update names --- .github/workflows/minimal.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index 3ae24049..bca9ea29 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -15,8 +15,8 @@ on: jobs: - windows: - name: "windows" + windows-platform: + name: "windows-platform" runs-on: windows-latest - uses: actions/checkout@v2 - uses: akashdhruv/Maple/.github/actions/maple@main @@ -33,8 +33,8 @@ jobs: maple container rinse maple image delete boxkit - ubuntu: - name: "ubuntu" + ubuntu-platform: + name: "ubuntu-platform" runs-on: ubuntu-latest steps: #- name: Login to Docker Hub From d65cbc3e396164ee7753ac641c1776ed7e4be450 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:46:19 -0500 Subject: [PATCH 08/18] update names --- .github/workflows/minimal.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index bca9ea29..30d5f139 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -15,9 +15,10 @@ on: jobs: - windows-platform: - name: "windows-platform" + windows: + name: "windows" runs-on: windows-latest + steps: - uses: actions/checkout@v2 - uses: akashdhruv/Maple/.github/actions/maple@main - name: Build Container @@ -33,8 +34,8 @@ jobs: maple container rinse maple image delete boxkit - ubuntu-platform: - name: "ubuntu-platform" + ubuntu: + name: "ubuntu" runs-on: ubuntu-latest steps: #- name: Login to Docker Hub From bfc7cc4b438dbf3cd8f9d4e867b0f8b72cdc3383 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:47:22 -0500 Subject: [PATCH 09/18] change workflow trigger --- .github/workflows/minimal.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index 30d5f139..d4fbc385 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -2,7 +2,8 @@ name: Minimal on: push: - - development + branches: + - development pull_request: branches: - main From bd62982856e52a4232f0629b2447f11042ea4634 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:52:37 -0500 Subject: [PATCH 10/18] update minimal --- .github/workflows/minimal.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index d4fbc385..0c52f0ef 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -21,19 +21,14 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: akashdhruv/Maple/.github/actions/maple@main - - name: Build Container - run: | - maple image build boxkit - - uses: ./.github/actions/install + - uses: actions/setup-python@v4 with: - image: boxkit + python-version: '3.11' - name: Run BoxKit tests run: | - maple container pour --image=boxkit - maple container execute "python3 tests/container/create.py" - maple container rinse - maple image delete boxkit + pip3 install click + ./setup develop --enable-testing + python3 tests/container/create.py ubuntu: name: "ubuntu" From a58dc99393146019645a0a0896af4fd804853388 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:56:50 -0500 Subject: [PATCH 11/18] update workflows --- .github/workflows/minimal.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index 0c52f0ef..ad5fdbce 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -24,10 +24,15 @@ jobs: - uses: actions/setup-python@v4 with: python-version: '3.11' - - name: Run BoxKit tests + - name: Install dependencies run: | pip3 install click - ./setup develop --enable-testing + pip3 install -r requirements/core.txt + - name: Run setup + run: | + python3 setup.py develop --user + - name: Run tests + run: | python3 tests/container/create.py ubuntu: From 7e452fb57d96f90f525d72219b4b59548ad93438 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 14:59:26 -0500 Subject: [PATCH 12/18] update current directory paths --- bin/boost.py | 4 ++-- bin/cbox.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/boost.py b/bin/boost.py index efda962d..1978f4e5 100644 --- a/bin/boost.py +++ b/bin/boost.py @@ -21,7 +21,7 @@ def boost_build(): "cd submodules/boost && ./bootstrap.sh" + f" --with-python-version={get_python_version()}" + " --with-toolset=gcc" - + f" --prefix={os.getenv('PWD')}/boxkit/depends/boost && ./b2 install", + + f" --prefix={os.getcwd()}/boxkit/depends/boost && ./b2 install", shell=True, check=True, executable="/bin/bash", @@ -40,7 +40,7 @@ def boost_clean(): def boost_install(): """Install Boost library""" - if os.path.exists(os.getenv("PWD") + "/boxkit/depends/boost"): + if os.path.exists(os.getcwd() + "/boxkit/depends/boost"): subprocess.run( "mkdir -pv build/lib/boxkit/depends/boost/lib", shell=True, diff --git a/bin/cbox.py b/bin/cbox.py index 7e860df3..a3dadbc8 100644 --- a/bin/cbox.py +++ b/bin/cbox.py @@ -17,13 +17,13 @@ "boost_version": "".join(sysconfig.get_python_version().split(".")), "python_include_path": sysconfig.get_python_inc(), "boost_include_path": ( - os.getenv("PWD") + "/boxkit/depends/boost/include" - if os.path.exists(os.getenv("PWD") + "/boxkit/depends/boost") + os.getcwd() + "/boxkit/depends/boost/include" + if os.path.exists(os.getcwd() + "/boxkit/depends/boost") else os.getenv("BOOST_INCLUDE_DIR") ), "boost_lib_path": ( - os.getenv("PWD") + "/boxkit/depends/boost/lib" - if os.path.exists(os.getenv("PWD") + "/boxkit/depends/boost") + os.getcwd() + "/boxkit/depends/boost/lib" + if os.path.exists(os.getcwd() + "/boxkit/depends/boost") else os.getenv("BOOST_LIB_DIR") ), } From d4e5960f0d79beaf72cfa490048f04bfe8c5533c Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 15:12:22 -0500 Subject: [PATCH 13/18] fix setup for windows --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 87b80646..481778bc 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ author=metadata["__authors__"], description=metadata["__description__"], license=metadata["__license__"], - packages=find_packages(where="./"), + packages=find_packages(where=os.getcwd()), package_dir={"": "./"}, package_data={ "": [ From 73b1acc58ff0613a7e4dd7963b91a48f6216d6cb Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 15:31:41 -0500 Subject: [PATCH 14/18] test new setup on github --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 481778bc..5dbb0c7e 100644 --- a/setup.py +++ b/setup.py @@ -46,8 +46,8 @@ author=metadata["__authors__"], description=metadata["__description__"], license=metadata["__license__"], - packages=find_packages(where=os.getcwd()), - package_dir={"": "./"}, + packages=find_packages(where=os.path.dirname(os.path.abspath(__file__))), + package_dir={"": os.path.dirname(os.path.abspath(__file__))}, package_data={ "": [ "options.py", From ff5b8a26d8819198c7ba0cc6d15a94f47e10cd13 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 15:50:32 -0500 Subject: [PATCH 15/18] update setup --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5dbb0c7e..b2ddab60 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ import os import sys import re +import platform from setuptools import setup, find_packages sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) @@ -40,14 +41,19 @@ # Call setup command with necessary arguments # replace existing build and develop commands # with custom commands defined in 'bin.cmd' +if platform.system() == "Windows": + PACKAGE_DIR = ":\\" +else: + PACKAGE_DIR = "./" + setup( name=metadata["__pkgname__"], version=metadata["__version__"], author=metadata["__authors__"], description=metadata["__description__"], license=metadata["__license__"], - packages=find_packages(where=os.path.dirname(os.path.abspath(__file__))), - package_dir={"": os.path.dirname(os.path.abspath(__file__))}, + packages=find_packages(where=PACKAGE_DIR), + package_dir={"": PACKAGE_DIR}, package_data={ "": [ "options.py", From c7822b5c8bc29da57f66f97729ca3f0e0bbada8e Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 15:52:40 -0500 Subject: [PATCH 16/18] update setup again --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b2ddab60..3e0b6e4e 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ # replace existing build and develop commands # with custom commands defined in 'bin.cmd' if platform.system() == "Windows": - PACKAGE_DIR = ":\\" + PACKAGE_DIR = ".\\" else: PACKAGE_DIR = "./" From cf1c81a859dce5616fd98d41e29f9f1035a4b58a Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 15:54:45 -0500 Subject: [PATCH 17/18] update version --- .github/workflows/minimal.yml | 2 +- boxkit/__meta__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index ad5fdbce..1a2afc9d 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -30,7 +30,7 @@ jobs: pip3 install -r requirements/core.txt - name: Run setup run: | - python3 setup.py develop --user + python3 setup.py install --user - name: Run tests run: | python3 tests/container/create.py diff --git a/boxkit/__meta__.py b/boxkit/__meta__.py index d7fe2d99..c574b6e5 100644 --- a/boxkit/__meta__.py +++ b/boxkit/__meta__.py @@ -1,7 +1,7 @@ """Metadata for BoxKit package""" __pkgname__ = "BoxKit" -__version__ = "2023.07" +__version__ = "2023.9.1" __authors__ = "Akash Dhruv" __license__ = "Apache Software License" __copyright__ = "Copyright (c) 2023 UChicago Argonne LLC and contributors. All Rights Reserved." From 2bb9284a642876f26366ddbd7e983336fcdc9192 Mon Sep 17 00:00:00 2001 From: Akash Dhruv Date: Thu, 28 Sep 2023 16:23:58 -0500 Subject: [PATCH 18/18] add a place holder options.py --- boxkit/options.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 boxkit/options.py diff --git a/boxkit/options.py b/boxkit/options.py new file mode 100644 index 00000000..e0ca1ba6 --- /dev/null +++ b/boxkit/options.py @@ -0,0 +1,6 @@ +CBOX=None +PYARROW=None +ZARR=None +DASK=None +SERVER=None +TESTING=None