From 117c1f7e6412fbd3a86e035807645b534de7c5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=20Vinh=20LUONG=20=28LU=CC=9BO=CC=9BNG=20The=CC=82?= =?UTF-8?q?=CC=81=20Vinh=29?= Date: Wed, 13 Dec 2023 11:15:44 -0800 Subject: [PATCH 1/3] restructure examples --- examples/{ssa => notebooks}/OODA-SSA-Semiconductor-ALD.ipynb | 0 examples/{ssa => notebooks}/OODA-SSA.ipynb | 0 examples/{ => notebooks}/integrations/lepton_ai.ipynb | 0 examples/{ => notebooks}/integrations/llama_index.ipynb | 0 examples/{ => notebooks}/integrations/openai.ipynb | 0 openssa/contrib/custom_example.py => examples/scripts/OODA-SSA.py | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename examples/{ssa => notebooks}/OODA-SSA-Semiconductor-ALD.ipynb (100%) rename examples/{ssa => notebooks}/OODA-SSA.ipynb (100%) rename examples/{ => notebooks}/integrations/lepton_ai.ipynb (100%) rename examples/{ => notebooks}/integrations/llama_index.ipynb (100%) rename examples/{ => notebooks}/integrations/openai.ipynb (100%) rename openssa/contrib/custom_example.py => examples/scripts/OODA-SSA.py (100%) diff --git a/examples/ssa/OODA-SSA-Semiconductor-ALD.ipynb b/examples/notebooks/OODA-SSA-Semiconductor-ALD.ipynb similarity index 100% rename from examples/ssa/OODA-SSA-Semiconductor-ALD.ipynb rename to examples/notebooks/OODA-SSA-Semiconductor-ALD.ipynb diff --git a/examples/ssa/OODA-SSA.ipynb b/examples/notebooks/OODA-SSA.ipynb similarity index 100% rename from examples/ssa/OODA-SSA.ipynb rename to examples/notebooks/OODA-SSA.ipynb diff --git a/examples/integrations/lepton_ai.ipynb b/examples/notebooks/integrations/lepton_ai.ipynb similarity index 100% rename from examples/integrations/lepton_ai.ipynb rename to examples/notebooks/integrations/lepton_ai.ipynb diff --git a/examples/integrations/llama_index.ipynb b/examples/notebooks/integrations/llama_index.ipynb similarity index 100% rename from examples/integrations/llama_index.ipynb rename to examples/notebooks/integrations/llama_index.ipynb diff --git a/examples/integrations/openai.ipynb b/examples/notebooks/integrations/openai.ipynb similarity index 100% rename from examples/integrations/openai.ipynb rename to examples/notebooks/integrations/openai.ipynb diff --git a/openssa/contrib/custom_example.py b/examples/scripts/OODA-SSA.py similarity index 100% rename from openssa/contrib/custom_example.py rename to examples/scripts/OODA-SSA.py From 9809622f016bbcc147d2b9a6ff52033127cbe20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=20Vinh=20LUONG=20=28LU=CC=9BO=CC=9BNG=20The=CC=82?= =?UTF-8?q?=CC=81=20Vinh=29?= Date: Wed, 13 Dec 2023 11:17:14 -0800 Subject: [PATCH 2/3] update linting config in example script --- examples/scripts/OODA-SSA.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/scripts/OODA-SSA.py b/examples/scripts/OODA-SSA.py index 8a551ba82..b3b94ba11 100644 --- a/examples/scripts/OODA-SSA.py +++ b/examples/scripts/OODA-SSA.py @@ -1,3 +1,6 @@ +# pylint: disable=invalid-name + + from openssa.core.ooda_rag.heuristic import ( TaskDecompositionHeuristic, ) From 7838159a208bca8d2808817357c429db6f4ba85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=20Vinh=20LUONG=20=28LU=CC=9BO=CC=9BNG=20The=CC=82?= =?UTF-8?q?=CC=81=20Vinh=29?= Date: Wed, 13 Dec 2023 11:37:54 -0800 Subject: [PATCH 3/3] update examples-supporting files --- examples/.gitignore | 3 --- examples/MAKEFILE.md | 12 --------- examples/Makefile | 61 -------------------------------------------- examples/README.md | 13 ---------- 4 files changed, 89 deletions(-) delete mode 100644 examples/.gitignore delete mode 100644 examples/MAKEFILE.md delete mode 100644 examples/Makefile delete mode 100644 examples/README.md diff --git a/examples/.gitignore b/examples/.gitignore deleted file mode 100644 index 4f1e723dd..000000000 --- a/examples/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -**/tmp -.openssa -token.json diff --git a/examples/MAKEFILE.md b/examples/MAKEFILE.md deleted file mode 100644 index 72c1935e5..000000000 --- a/examples/MAKEFILE.md +++ /dev/null @@ -1,12 +0,0 @@ -# Makefile guide - -We use Makefiles extensively to help make the developer’s life simpler and more efficient. -Here are the key targets for this `Makefile`. - -You don’t normally run `make` here, but rather in the top-level directory. - -- `install-gcloud-cli`: convenient target to set up your GCloud CLI environment, so you can deploy these examples to your Gcloud-hosted space. - -## Links - -- [README](README.md) diff --git a/examples/Makefile b/examples/Makefile deleted file mode 100644 index b71dcc8e4..000000000 --- a/examples/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# A bunch of convenience utilities to get the examples built or deployed - - -# For installing GCloud CLI - -TMP_DIR=/tmp -GCLOUD_DOWNLOAD_DIR=$(TMP_DIR)/google-cloud-sdk -OS := $(shell uname -s) -ARCH := $(shell uname -a | awk '{print $$NF}') -ifeq ($(ARCH),arm64) - GCLOUD_CLI_FILE=google-cloud-cli-437.0.1-darwin-arm.tar.gz -else - ifeq ($(ARCH),x86_64) - GCLOUD_CLI_FILE=google-cloud-cli-437.0.1-darwin-x86_64.tar.gz - endif -endif - - -none: - @echo ... This Makefile has only utility targets - -#test: -# @echo ... This will run "npx jest" Javascript testing on all subdirs. -# @echo ... Make sure you have set up Jest testing with "make dev-setup" -# npx jest -# -#dev-setup: -# @echo ... Setting up JS testing environment -# @echo "" -# npm install --save-dev fetch-mock -# npm install --save-dev jest -# npm install --save-dev jest-fetch-mock -# npm install --save-dev jsdom @testing-library/jest-dom -# npm install --save-dev @testing-library/dom -# npm install --save-dev jest-environment-jsdom - - -# -# GCloud stuff -# -ifeq ($(ARCH),arm64) -install-gcloud-cli: do-install-gcloud-cli -else - ifeq ($(ARCH),x86_64) -install-gcloud-cli: do-install-gcloud-cli - endif -install-gcloud-cli: - @echo ... Please follow GCloud installation instructions here: https://cloud.google.com/sdk/docs/install - @open https://cloud.google.com/sdk/docs/install -endif - -do-install-gcloud-cli: - @echo ... Downloading and installing $(GCLOUD_CLI_FILE) ... - @echo "" - @GCLOUD_CLI_URL=https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/$(GCLOUD_CLI_FILE) ;\ - mkdir -p $(TMP_DIR) ;\ - cd $(TMP_DIR) && rm -f $(GCLOUD_CLI_FILE) && wget $$GCLOUD_CLI_URL && tar xvf $(GCLOUD_CLI_FILE) ;\ - cd $(GCLOUD_DOWNLOAD_DIR) && ./install.sh ;\ - cd $(TMP_DIR) && rm -fr $(GCLOUD_CLI_FILE) && rm -fr $(GCLOUD_DOWNLOAD_DIR) - @echo "" - @echo ... Now run gcloud init diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index b0b02f3e0..000000000 --- a/examples/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenSSM Examples - -These are example *user code* that uses OpenSSM. They serve two main funcdtions: - -1. To provide examples for users to learn how to use and leverage OpenSSM for their own work. - -2. To provide a use-case-driven design for the development of OpenSSM itself. - -See the associated `Makefile` for how to build and use these examples. - -## Links - -- [MAKEFILE](MAKEFILE.md)