From 7ae83fa2217994ffd6fcf4fdcecd59a8cadf5449 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Thu, 8 Jun 2023 12:45:01 -0500 Subject: [PATCH 01/19] move stix related maintainer files to dedicated directory --- Pipfile => stix-extensions/Pipfile | 0 Pipfile.lock => stix-extensions/Pipfile.lock | 0 generate.py => stix-extensions/generate.py | 0 pytest.ini => stix-extensions/pytest.ini | 0 tests.py => stix-extensions/tests.py | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename Pipfile => stix-extensions/Pipfile (100%) rename Pipfile.lock => stix-extensions/Pipfile.lock (100%) rename generate.py => stix-extensions/generate.py (100%) rename pytest.ini => stix-extensions/pytest.ini (100%) rename tests.py => stix-extensions/tests.py (100%) diff --git a/Pipfile b/stix-extensions/Pipfile similarity index 100% rename from Pipfile rename to stix-extensions/Pipfile diff --git a/Pipfile.lock b/stix-extensions/Pipfile.lock similarity index 100% rename from Pipfile.lock rename to stix-extensions/Pipfile.lock diff --git a/generate.py b/stix-extensions/generate.py similarity index 100% rename from generate.py rename to stix-extensions/generate.py diff --git a/pytest.ini b/stix-extensions/pytest.ini similarity index 100% rename from pytest.ini rename to stix-extensions/pytest.ini diff --git a/tests.py b/stix-extensions/tests.py similarity index 100% rename from tests.py rename to stix-extensions/tests.py From a4504e32cdf2d55b71903b4b4a22ef0981d9d13c Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Sat, 10 Jun 2023 15:27:35 -0500 Subject: [PATCH 02/19] new project for easy python imports of love language schemas --- projects/python/README.md | 0 projects/python/lovelanguage/__init__.py | 5 + .../python/lovelanguage/schemas/__init__.py | 0 .../schemas/use-of-force.schema.json | 1 + projects/python/poetry.lock | 349 ++++++++++++++++++ projects/python/pyproject.toml | 19 + projects/python/pytest.ini | 7 + projects/python/tests.py | 6 + 8 files changed, 387 insertions(+) create mode 100644 projects/python/README.md create mode 100644 projects/python/lovelanguage/__init__.py create mode 100644 projects/python/lovelanguage/schemas/__init__.py create mode 120000 projects/python/lovelanguage/schemas/use-of-force.schema.json create mode 100644 projects/python/poetry.lock create mode 100644 projects/python/pyproject.toml create mode 100644 projects/python/pytest.ini create mode 100644 projects/python/tests.py diff --git a/projects/python/README.md b/projects/python/README.md new file mode 100644 index 0000000..e69de29 diff --git a/projects/python/lovelanguage/__init__.py b/projects/python/lovelanguage/__init__.py new file mode 100644 index 0000000..4a5a5c4 --- /dev/null +++ b/projects/python/lovelanguage/__init__.py @@ -0,0 +1,5 @@ +from importlib.resources import files + +USEOFFORCE = files('lovelanguage.schemas').joinpath('use-of-force.schema.json').read_text() + +__all__ = ['USEOFFORCE'] diff --git a/projects/python/lovelanguage/schemas/__init__.py b/projects/python/lovelanguage/schemas/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/projects/python/lovelanguage/schemas/use-of-force.schema.json b/projects/python/lovelanguage/schemas/use-of-force.schema.json new file mode 120000 index 0000000..b8887c3 --- /dev/null +++ b/projects/python/lovelanguage/schemas/use-of-force.schema.json @@ -0,0 +1 @@ +../../../../schemas/use-of-force.schema.json \ No newline at end of file diff --git a/projects/python/poetry.lock b/projects/python/poetry.lock new file mode 100644 index 0000000..7053fe5 --- /dev/null +++ b/projects/python/poetry.lock @@ -0,0 +1,349 @@ +# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. + +[[package]] +name = "binaryornot" +version = "0.4.4" +description = "Ultra-lightweight pure Python package to check if a file is binary or text." +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "binaryornot-0.4.4-py2.py3-none-any.whl", hash = "sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4"}, + {file = "binaryornot-0.4.4.tar.gz", hash = "sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061"}, +] + +[package.dependencies] +chardet = ">=3.0.2" + +[[package]] +name = "boolean-py" +version = "4.0" +description = "Define boolean algebras, create and parse boolean expressions and create custom boolean DSL." +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "boolean.py-4.0-py3-none-any.whl", hash = "sha256:2876f2051d7d6394a531d82dc6eb407faa0b01a0a0b3083817ccd7323b8d96bd"}, + {file = "boolean.py-4.0.tar.gz", hash = "sha256:17b9a181630e43dde1851d42bef546d616d5d9b4480357514597e78b203d06e4"}, +] + +[[package]] +name = "chardet" +version = "5.1.0" +description = "Universal encoding detector for Python 3" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "chardet-5.1.0-py3-none-any.whl", hash = "sha256:362777fb014af596ad31334fde1e8c327dfdb076e1960d1694662d46a6917ab9"}, + {file = "chardet-5.1.0.tar.gz", hash = "sha256:0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5"}, +] + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +category = "dev" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "exceptiongroup" +version = "1.1.1" +description = "Backport of PEP 654 (exception groups)" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, + {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "flake8" +version = "6.0.0" +description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" +optional = false +python-versions = ">=3.8.1" +files = [ + {file = "flake8-6.0.0-py2.py3-none-any.whl", hash = "sha256:3833794e27ff64ea4e9cf5d410082a8b97ff1a06c16aa3d2027339cd0f1195c7"}, + {file = "flake8-6.0.0.tar.gz", hash = "sha256:c61007e76655af75e6785a931f452915b371dc48f56efd765247c8fe68f2b181"}, +] + +[package.dependencies] +mccabe = ">=0.7.0,<0.8.0" +pycodestyle = ">=2.10.0,<2.11.0" +pyflakes = ">=3.0.0,<3.1.0" + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "license-expression" +version = "30.1.1" +description = "license-expression is a comprehensive utility library to parse, compare, simplify and normalize license expressions (such as SPDX license expressions) using boolean logic." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "license-expression-30.1.1.tar.gz", hash = "sha256:42375df653ad85e6f5b4b0385138b2dbea1f5d66360783d8625c3e4f97f11f0c"}, + {file = "license_expression-30.1.1-py3-none-any.whl", hash = "sha256:8d7e5e2de0d04fc104a4f952c440e8f08a5ba63480a0dad015b294770b7e58ec"}, +] + +[package.dependencies] +"boolean.py" = ">=4.0" + +[package.extras] +docs = ["Sphinx (==5.1.0)", "doc8 (>=0.8.1)", "sphinx-rtd-theme (>=0.5.0)", "sphinxcontrib-apidoc (>=0.3.0)"] +testing = ["black", "isort", "pytest (>=6,!=7.0.0)", "pytest-xdist (>=2)", "twine"] + +[[package]] +name = "markupsafe" +version = "2.1.3" +description = "Safely add untrusted strings to HTML/XML markup." +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] + +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + +[[package]] +name = "packaging" +version = "23.1" +description = "Core utilities for Python packages" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, +] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "pycodestyle" +version = "2.10.0" +description = "Python style guide checker" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pycodestyle-2.10.0-py2.py3-none-any.whl", hash = "sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610"}, + {file = "pycodestyle-2.10.0.tar.gz", hash = "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053"}, +] + +[[package]] +name = "pyflakes" +version = "3.0.1" +description = "passive checker of Python programs" +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pyflakes-3.0.1-py2.py3-none-any.whl", hash = "sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf"}, + {file = "pyflakes-3.0.1.tar.gz", hash = "sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd"}, +] + +[[package]] +name = "pytest" +version = "7.3.2" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"}, + {file = "pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "python-debian" +version = "0.1.49" +description = "Debian package related modules" +category = "dev" +optional = false +python-versions = ">=3.5" +files = [ + {file = "python-debian-0.1.49.tar.gz", hash = "sha256:8cf677a30dbcb4be7a99536c17e11308a827a4d22028dc59a67f6c6dd3f0f58c"}, + {file = "python_debian-0.1.49-py3-none-any.whl", hash = "sha256:880f3bc52e31599f2a9b432bd7691844286825087fccdcf2f6ffd5cd79a26f9f"}, +] + +[package.dependencies] +chardet = "*" + +[[package]] +name = "reuse" +version = "1.1.2" +description = "reuse is a tool for compliance with the REUSE recommendations." +category = "dev" +optional = false +python-versions = ">=3.6.2,<4.0.0" +files = [ + {file = "reuse-1.1.2-cp311-cp311-manylinux_2_36_x86_64.whl", hash = "sha256:d3cf6981e9b2855845a0cf323526fd1cde94a640ea1d8dce22d4156788b282bc"}, + {file = "reuse-1.1.2.tar.gz", hash = "sha256:80eb6e5ab5f73c784b5a9153e61a282045f6f9292124e1b55d4a7265dbad4246"}, +] + +[package.dependencies] +binaryornot = ">=0.4.4,<0.5.0" +"boolean.py" = ">=3.8" +Jinja2 = ">=3.0.0,<4.0.0" +license-expression = ">=1.0" +python-debian = ">=0.1.38,<0.1.45 || >0.1.45,<0.1.46 || >0.1.46,<0.1.47 || >0.1.47,<0.2.0" +setuptools = "*" + +[[package]] +name = "setuptools" +version = "67.8.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools-67.8.0-py3-none-any.whl", hash = "sha256:5df61bf30bb10c6f756eb19e7c9f3b473051f48db77fddbe06ff2ca307df9a6f"}, + {file = "setuptools-67.8.0.tar.gz", hash = "sha256:62642358adc77ffa87233bc4d2354c4b2682d214048f500964dbe760ccedf102"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[metadata] +lock-version = "2.0" +python-versions = "^3.8" +content-hash = "5855be663cd395408653b6946b79e02ed4ebf33f37d40c73b4e887b7e745a060" diff --git a/projects/python/pyproject.toml b/projects/python/pyproject.toml new file mode 100644 index 0000000..a6ddd2c --- /dev/null +++ b/projects/python/pyproject.toml @@ -0,0 +1,19 @@ +[tool.poetry] +name = "lovelanguage" +version = "0.1.0" +description = "An importable collection of JSON schems for Human betterment." +authors = ["'Jurnell Cockhren' "] +license = "LGPL-3.0-or-later" +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.8" + +[tool.poetry.group.dev.dependencies] +flake8 = { version = "^6.0.0", python = ">=3.8.1" } +reuse = "^1.1.2" +pytest = "^7.3.2" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/projects/python/pytest.ini b/projects/python/pytest.ini new file mode 100644 index 0000000..780ccad --- /dev/null +++ b/projects/python/pytest.ini @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2023 Civic Hacker, LLC +# SPDX-License-Identifier: GPL-3.0-or-later +[pytest] +addopts = -p no:warnings +python_files = tests.py test_*.py *_tests.py +env_files = + .env.test diff --git a/projects/python/tests.py b/projects/python/tests.py new file mode 100644 index 0000000..5433e1c --- /dev/null +++ b/projects/python/tests.py @@ -0,0 +1,6 @@ +import importlib + + +def test_use_of_force_import(): + lib = importlib.import_module('lovelanguage') + assert hasattr(lib, 'USEOFFORCE') From f9235d35f04413a2e83f4c05a18934e259e1fb30 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Sat, 10 Jun 2023 16:29:09 -0500 Subject: [PATCH 03/19] fixup typo --- projects/python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/python/pyproject.toml b/projects/python/pyproject.toml index a6ddd2c..b78efba 100644 --- a/projects/python/pyproject.toml +++ b/projects/python/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "lovelanguage" version = "0.1.0" -description = "An importable collection of JSON schems for Human betterment." +description = "An importable collection of JSON schemas for Human betterment." authors = ["'Jurnell Cockhren' "] license = "LGPL-3.0-or-later" readme = "README.md" From 46dcdc11f6b7d674eba321d938dbd5aa2c58d094 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Sat, 10 Jun 2023 16:35:20 -0500 Subject: [PATCH 04/19] be sure that schema will still convert to a dictionary --- projects/python/tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/python/tests.py b/projects/python/tests.py index 5433e1c..8c6170c 100644 --- a/projects/python/tests.py +++ b/projects/python/tests.py @@ -1,6 +1,10 @@ import importlib +import json def test_use_of_force_import(): lib = importlib.import_module('lovelanguage') assert hasattr(lib, 'USEOFFORCE') + USEOFFORCE = getattr(lib, 'USEOFFORCE') + force = json.loads(USEOFFORCE) + assert 'force' in force.get('title') From b11676ddd093dc6a6f3b745200d855767bd6e5cc Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Sat, 10 Jun 2023 16:41:55 -0500 Subject: [PATCH 05/19] use to hardlink to ensure pypi package build succeeds --- .../schemas/use-of-force.schema.json | 70 ++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) mode change 120000 => 100644 projects/python/lovelanguage/schemas/use-of-force.schema.json diff --git a/projects/python/lovelanguage/schemas/use-of-force.schema.json b/projects/python/lovelanguage/schemas/use-of-force.schema.json deleted file mode 120000 index b8887c3..0000000 --- a/projects/python/lovelanguage/schemas/use-of-force.schema.json +++ /dev/null @@ -1 +0,0 @@ -../../../../schemas/use-of-force.schema.json \ No newline at end of file diff --git a/projects/python/lovelanguage/schemas/use-of-force.schema.json b/projects/python/lovelanguage/schemas/use-of-force.schema.json new file mode 100644 index 0000000..2a8e7d7 --- /dev/null +++ b/projects/python/lovelanguage/schemas/use-of-force.schema.json @@ -0,0 +1,69 @@ +{ + "$id": "https://raw.githubusercontent.com/civichacker/love-language/master/schemas/use-of-force.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "x-use-of-force", + "description": "Most law enforcement agencies have policies that guide their use of force. These policies describe a escalating series of actions an officer may take to resolve a situation. This continuum generally has many levels, and officers are instructed to respond with a level of force appropriate to the situation at hand, acknowledging that the officer may move from one part of the continuum to another in a matter of seconds. https://nij.ojp.gov/topics/articles/use-force-continuum", + "type": "object", + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/sros/relationship.json" + }, + { + "properties": { + "x_civichacker_deadly_force": { + "type": "string", + "enum": [ + "anticipatory", + "premptive", + "reactive" + ] + }, + "source_ref": { + "type": "string", + "pattern": "^(incident|identity)--" + }, + "target_ref": { + "type": "string", + "pattern": "^identity--" + }, + "x_civichacker_force_applied": { + "type": "string", + "description": "Indicates where on the Use of Force continuum force was used.", + "enum": [ + "presence", + "verbalization", + "empty-hand-control", + "less-lethal-methods", + "lethal-force" + ] + } + } + }, + { + "if": { + "properties": { + "extensions": { + "type": "object", + "required": ["extension-definition--9c59fd79-4215-4ba2-920d-3e4f320e1e62"] + } + } + }, + "then": { + "required": ["x_civichacker_use_of_force"] + } + }, + { + "if": { + "properties": { + "x_civichacker_use_of_force": { + "type": "string", + "pattern": "^lethal-force$" + } + } + }, + "then": { + "required": ["x_civichacker_deadly_force"] + } + } + ] +} From 0af87251e94297fc470ac5cff0b13b76e4df7e6f Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 12 Jun 2023 10:52:26 -0500 Subject: [PATCH 06/19] ignores --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b15837 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.swp +*.pyc +*__pycache__/ +dist/ From 00318527cfb5f951a2678ad4dd484fc6da86f4a9 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Sat, 17 Jun 2023 13:26:11 -0500 Subject: [PATCH 07/19] new project for golang. Leveraging go:embed --- projects/golang/go.mod | 3 + projects/golang/main.go | 8 +++ projects/golang/main_test.go | 29 ++++++++ .../golang/schemas/use-of-force.schema.json | 69 +++++++++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 projects/golang/go.mod create mode 100644 projects/golang/main.go create mode 100644 projects/golang/main_test.go create mode 100644 projects/golang/schemas/use-of-force.schema.json diff --git a/projects/golang/go.mod b/projects/golang/go.mod new file mode 100644 index 0000000..31e4794 --- /dev/null +++ b/projects/golang/go.mod @@ -0,0 +1,3 @@ +module civichacker/lovelanguage + +go 1.18 diff --git a/projects/golang/main.go b/projects/golang/main.go new file mode 100644 index 0000000..60957b5 --- /dev/null +++ b/projects/golang/main.go @@ -0,0 +1,8 @@ +package main + +import ( + "embed" +) + +//go:embed schemas/*.json +var schemas embed.FS diff --git a/projects/golang/main_test.go b/projects/golang/main_test.go new file mode 100644 index 0000000..1016355 --- /dev/null +++ b/projects/golang/main_test.go @@ -0,0 +1,29 @@ +package main + +import ( + "testing" + "encoding/json" + "fmt" +) + +func TestSchemaLoading(t *testing.T){ + var tests = []struct { + name string + filename string + }{ + // the table itself + {"use of force", "schemas/use-of-force.schema"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + content, err := schemas.ReadFile(fmt.Sprintf("%s.json", tt.filename)) + result := json.Valid([]byte(content)) + + if err != nil { + t.Errorf("loading schema failed: %s", err) + } else if !result { + t.Errorf("schema is not valid JSON") + } + }) + } +} diff --git a/projects/golang/schemas/use-of-force.schema.json b/projects/golang/schemas/use-of-force.schema.json new file mode 100644 index 0000000..2a8e7d7 --- /dev/null +++ b/projects/golang/schemas/use-of-force.schema.json @@ -0,0 +1,69 @@ +{ + "$id": "https://raw.githubusercontent.com/civichacker/love-language/master/schemas/use-of-force.schema.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "x-use-of-force", + "description": "Most law enforcement agencies have policies that guide their use of force. These policies describe a escalating series of actions an officer may take to resolve a situation. This continuum generally has many levels, and officers are instructed to respond with a level of force appropriate to the situation at hand, acknowledging that the officer may move from one part of the continuum to another in a matter of seconds. https://nij.ojp.gov/topics/articles/use-force-continuum", + "type": "object", + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/sros/relationship.json" + }, + { + "properties": { + "x_civichacker_deadly_force": { + "type": "string", + "enum": [ + "anticipatory", + "premptive", + "reactive" + ] + }, + "source_ref": { + "type": "string", + "pattern": "^(incident|identity)--" + }, + "target_ref": { + "type": "string", + "pattern": "^identity--" + }, + "x_civichacker_force_applied": { + "type": "string", + "description": "Indicates where on the Use of Force continuum force was used.", + "enum": [ + "presence", + "verbalization", + "empty-hand-control", + "less-lethal-methods", + "lethal-force" + ] + } + } + }, + { + "if": { + "properties": { + "extensions": { + "type": "object", + "required": ["extension-definition--9c59fd79-4215-4ba2-920d-3e4f320e1e62"] + } + } + }, + "then": { + "required": ["x_civichacker_use_of_force"] + } + }, + { + "if": { + "properties": { + "x_civichacker_use_of_force": { + "type": "string", + "pattern": "^lethal-force$" + } + } + }, + "then": { + "required": ["x_civichacker_deadly_force"] + } + } + ] +} From 1b754b84365b185bbb6557dd77520c5d194c5d59 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 13:57:53 -0500 Subject: [PATCH 08/19] test multiple langs enable setup mode fixup job names --- .circleci/config.yml | 30 ++++++++-------- .circleci/test_langs.yml | 78 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 14 deletions(-) create mode 100644 .circleci/test_langs.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index c070d8f..6baaa25 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,20 +1,22 @@ version: 2.1 +setup: true + orbs: python: circleci/python@2.0.3 -jobs: - check schemas: - docker: - - image: cimg/python:3.8 - steps: - - checkout - - python/install-packages: - args: '--dev' - venv-cache: true - pkg-manager: pipenv - - run: - command: pipenv run pytest + continuation: circleci/continuation@0.1.2 + path-filtering: circleci/path-filtering@0.0.2 workflows: - check schemas: + always-run: jobs: - - check schemas + - path-filtering/filter: + name: check-updated-files + mapping: | + projects/python/.* python true + projects/golang/.* golang true + projects/csharp/.* csharp true + projects/rust/.* rust true + projects/nim/.* nimlang true + .circleci/.* build-all true + base-revision: master + config-path: .circleci/test_langs.yml diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml new file mode 100644 index 0000000..37a8db9 --- /dev/null +++ b/.circleci/test_langs.yml @@ -0,0 +1,78 @@ +version: 2.1 + +orbs: + python: circleci/python@2.0.3 + go: circleci/go@1.20.5 + +parameters: + python: + type: boolean + default: false + golang: + type: boolean + default: false + csharp: + type: boolean + default: false + rust: + type: boolean + default: false + nimlang: + type: boolean + default: false + build-all: + type: boolean + default: false + +jobs: + python: + parameters: + appname: + type: string + default: "" + docker: + - image: cimg/python:3.10.1 + working_directory: /tmp/<< parameters.appname >> + steps: + - checkout + - python/install-packages: + args: '--dev' + venv-cache: true + pkg-manager: pipenv + - run: + command: pipenv run pytest + + golang: + parameters: + appname: + type: string + default: "" + docker: + - image: cimg/go:1.20.5 + working_directory: /tmp/<< parameters.appname >> + steps: + - checkout + - go/load-cache + - go/mod-download + - go/save-cache + - go/test: + failfast: true + + + +workflows: + version: 2 + python: + when: << pipeline.parameters.python >> + jobs: + - python: + filters: + branches: + ignore: master + golang: + when: << pipeline.parameters.golang >> + jobs: + - golang: + filters: + branches: + ignore: master From 8469ee3698cfee9f751f32bf804a930efc601b5a Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:15:32 -0500 Subject: [PATCH 09/19] remove python orb from setup file --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6baaa25..daf296a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,6 @@ version: 2.1 setup: true orbs: - python: circleci/python@2.0.3 continuation: circleci/continuation@0.1.2 path-filtering: circleci/path-filtering@0.0.2 From 1e6f78a3cfc881d227abeb561b4fadd07ff6a216 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:15:54 -0500 Subject: [PATCH 10/19] fixup go orb version --- .circleci/test_langs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 37a8db9..10a25b0 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: python: circleci/python@2.0.3 - go: circleci/go@1.20.5 + go: circleci/go@1.7.3 parameters: python: From 86437b5f6f236517344027fa9fa7e13673c585b6 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:18:00 -0500 Subject: [PATCH 11/19] go into each folder --- .circleci/test_langs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 10a25b0..8a1fc45 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -32,9 +32,9 @@ jobs: default: "" docker: - image: cimg/python:3.10.1 - working_directory: /tmp/<< parameters.appname >> steps: - checkout + - cd projects/python - python/install-packages: args: '--dev' venv-cache: true @@ -49,9 +49,9 @@ jobs: default: "" docker: - image: cimg/go:1.20.5 - working_directory: /tmp/<< parameters.appname >> steps: - checkout + - cd projects/golang - go/load-cache - go/mod-download - go/save-cache From 543a468356bfdde2ec98139399316f749ca6d9a6 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:19:00 -0500 Subject: [PATCH 12/19] run this in shell --- .circleci/test_langs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 8a1fc45..d102a45 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -34,7 +34,7 @@ jobs: - image: cimg/python:3.10.1 steps: - checkout - - cd projects/python + - run: cd projects/python - python/install-packages: args: '--dev' venv-cache: true @@ -51,7 +51,7 @@ jobs: - image: cimg/go:1.20.5 steps: - checkout - - cd projects/golang + - run: cd projects/golang - go/load-cache - go/mod-download - go/save-cache From 7163989d948c43d41c4f2a097c5e1e04ce682216 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:21:26 -0500 Subject: [PATCH 13/19] fixup package manager --- .circleci/test_langs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index d102a45..b30b63d 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -36,11 +36,10 @@ jobs: - checkout - run: cd projects/python - python/install-packages: - args: '--dev' venv-cache: true - pkg-manager: pipenv + pkg-manager: poetry - run: - command: pipenv run pytest + command: poetry run pytest golang: parameters: From 3743b7b3069b7891391125f293dbd6cdfd9686d6 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:29:40 -0500 Subject: [PATCH 14/19] run test in project directory --- .circleci/test_langs.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index b30b63d..8b2b751 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -34,9 +34,9 @@ jobs: - image: cimg/python:3.10.1 steps: - checkout - - run: cd projects/python - python/install-packages: venv-cache: true + app-dir: projects/python pkg-manager: poetry - run: command: poetry run pytest @@ -51,11 +51,14 @@ jobs: steps: - checkout - run: cd projects/golang - - go/load-cache - - go/mod-download - - go/save-cache - - go/test: - failfast: true + - run: + command: | + cd projects/golang + go mod download + - run: + command: | + cd projects/golang + go test From 455d9cdddae8fee13faac231717c301326370dc9 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:31:32 -0500 Subject: [PATCH 15/19] update orb --- .circleci/test_langs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 8b2b751..4829939 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - python: circleci/python@2.0.3 + python: circleci/python@2.1.1 go: circleci/go@1.7.3 parameters: From 43b0965fa08c0d2f5eb0cee0ff338b1ce76840c3 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:32:36 -0500 Subject: [PATCH 16/19] poetry version --- .circleci/test_langs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 4829939..34a04a1 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -38,6 +38,8 @@ jobs: venv-cache: true app-dir: projects/python pkg-manager: poetry + - run: + command: poetry --version - run: command: poetry run pytest From 32c36c74be8695c6b7503e084b2ed6e21296ea2d Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:36:32 -0500 Subject: [PATCH 17/19] version check --- .circleci/test_langs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 34a04a1..7b0a1bb 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -34,12 +34,12 @@ jobs: - image: cimg/python:3.10.1 steps: - checkout + - run: + command: poetry --version - python/install-packages: venv-cache: true app-dir: projects/python pkg-manager: poetry - - run: - command: poetry --version - run: command: poetry run pytest From de2665af21c452bf7652a9f10261b4627c819c10 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:38:38 -0500 Subject: [PATCH 18/19] fixup image version --- .circleci/test_langs.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 7b0a1bb..76fc4a0 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -31,11 +31,9 @@ jobs: type: string default: "" docker: - - image: cimg/python:3.10.1 + - image: cimg/python:3.10 steps: - checkout - - run: - command: poetry --version - python/install-packages: venv-cache: true app-dir: projects/python From 20ab88deb87d2797567cd5174e4f01b43aac4532 Mon Sep 17 00:00:00 2001 From: Jurnell Cockhren Date: Mon, 19 Jun 2023 14:39:44 -0500 Subject: [PATCH 19/19] move into dir --- .circleci/test_langs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/test_langs.yml b/.circleci/test_langs.yml index 76fc4a0..1dbfba5 100644 --- a/.circleci/test_langs.yml +++ b/.circleci/test_langs.yml @@ -39,7 +39,9 @@ jobs: app-dir: projects/python pkg-manager: poetry - run: - command: poetry run pytest + command: | + cd projects/python + poetry run pytest golang: parameters: