Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python automation script #40

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/pr-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ jobs:
run: |

# Collects all the plugin names that have changes.
# If there is directory that isn't a plugin then it will need to skip it. Currently there is none.
# If there is directory that isn't a plugin then it will need to skip it. Currently skipping plugin_globals
declare -a changed_dirs=()
for dir in ./*/; do
current_folder=$(basename "$dir")
if [[ $current_folder == "plugin_globals" ]]; then
continue
fi
for changed_file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $changed_file == *"$current_folder"* ]]; then
if ! [[ ${changed_dirs[*]} =~ $current_folder ]]; then
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr-linting-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ jobs:
run: |

# Collects all the plugin names that have changes.
# If there is directory that isn't a plugin then it will need to skip it. Currently there is none.
# If there is directory that isn't a plugin then it will need to skip it. Currently skipping plugin_globals
declare -a changed_dirs=()
for dir in ./*/; do
current_folder=$(basename "$dir")
if [[ $current_folder == "plugin_globals" ]]; then
continue
fi
for changed_file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $changed_file == *"$current_folder"* ]]; then
if ! [[ ${changed_dirs[*]} =~ $current_folder ]]; then
Expand Down
100 changes: 45 additions & 55 deletions basicmessage_storage/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,48 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "basicmessage_storage",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"VARIANT": "3.9-bullseye",
"POETRY_VERSION": "1.4.2"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
],
"settings": {
"python.testing.pytestArgs": [
"./basicmessage_storage",
"--no-cov"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestPath": "pytest",
"editor.defaultFormatter": null,
"editor.formatOnSave": false, // enable per language
"[python]": {
"editor.formatOnSave": true
},
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.blackArgs": []
}
}
},

"features": {
"docker-in-docker": "latest"
},

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",

"remoteEnv": {
"RUST_LOG":"aries-askar::log::target=error"
//"PATH": "${containerEnv:PATH}:${workspaceRoot}/.venv/bin"
},

"mounts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
3000,
3001
],
"postCreateCommand": "bash ./.devcontainer/post-install.sh"
}
"name": "basicmessage_storage",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
"VARIANT": "3.9-bullseye",
"POETRY_VERSION": "1.4.2"
}
},
"customizations": {
"vscode": {
"extensions": ["ms-python.python", "ms-python.vscode-pylance"],
"settings": {
"python.testing.pytestArgs": ["./basicmessage_storage", "--no-cov"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestPath": "pytest",
"editor.defaultFormatter": null,
"editor.formatOnSave": false, // enable per language
"[python]": {
"editor.formatOnSave": true
},
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.blackArgs": []
}
}
},

"features": {
"docker-in-docker": "latest"
},

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",

"remoteEnv": {
"RUST_LOG": "aries-askar::log::target=error"
},

"mounts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000, 3001],
"postCreateCommand": "bash ./.devcontainer/post-install.sh"
}
110 changes: 52 additions & 58 deletions basicmessage_storage/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,58 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"name": "Run/Debug Plugin",
"type": "python",
"request": "launch",
"module": "aries_cloudagent",
"justMyCode": false,
"args": [
"start",
"--arg-file=${workspaceRoot}/docker/default.yml"
]
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Run/Debug Plugin",
"type": "python",
"request": "launch",
"module": "aries_cloudagent",
"justMyCode": false,
"args": ["start", "--arg-file=${workspaceRoot}/docker/default.yml"]
},
{
"name": "ruff - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "ruff",
"console": "integratedTerminal",
"sudo": true,
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": ["check", "."]
},
{
"name": "ruff - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "ruff",
"console": "integratedTerminal",
"sudo": true,
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": ["check", "."],
"name": "ruff fix - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "ruff",
"console": "integratedTerminal",
"sudo": true,
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": ["check", ".", "--fix"]
},
{
"name": "ruff fix - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "ruff",
"console": "integratedTerminal",
"sudo": true,
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": ["check", ".", "--fix"],
"name": "black (check) - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "black",
"console": "integratedTerminal",
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": [".", "--check"]
},
{
"name": "black (check) - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "black",
"console": "integratedTerminal",
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": [
".",
"--check"
],
},
{
"name": "black (format) - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "black",
"console": "integratedTerminal",
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": [
"."
],
},]
}
{
"name": "black (format) - basicmessage_storage",
"type": "python",
"request": "launch",
"module": "black",
"console": "integratedTerminal",
"justMyCode": true,
"cwd": "${workspaceFolder}/basicmessage_storage",
"args": ["."]
}
]
}
11 changes: 5 additions & 6 deletions basicmessage_storage/integration/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
name = "basicmessage_storage-tests"
version = "0.1.0"
description = ""
authors = ["Jason Sherman <tools@usingtechnolo.gy>"]
authors = []

[tool.poetry.dependencies]
python = "^3.9"
aries-cloudagent = { version = "0.10.3" }
asynctest = "^0.13.0"
pytest = "^7.4.0"
pytest-asyncio = "^0.21.0"
asynctest = "^0.13.0"
python = "^3.9"
requests = "^2.31.0"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Loading
Loading