Skip to content
Open
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
1 change: 1 addition & 0 deletions .devbox/virtenv/bin/initHook.sh
1 change: 1 addition & 0 deletions .devbox/virtenv/bin/venvShellHook.sh
3 changes: 3 additions & 0 deletions .devbox/virtenv/poetry/bin/initHook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

poetry env use $(command -v python) --directory="${DEVBOX_PYPROJECT_DIR:-$DEVBOX_DEFAULT_PYPROJECT_DIR}" --no-interaction --quiet >&2
55 changes: 55 additions & 0 deletions .devbox/virtenv/python312/bin/venvShellHook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/sh
set -eu
STATE_FILE="$DEVBOX_PROJECT_ROOT/.devbox/venv_check_completed"

is_valid_venv() {
[ -f "$1/bin/activate" ] && [ -f "$1/bin/python" ]
}

is_devbox_venv() {
[ "$1/bin/python" -ef "$DEVBOX_PACKAGES_DIR/bin/python" ]
}

create_venv() {
python -m venv "$VENV_DIR" --clear
echo "*\n.*" >> "$VENV_DIR/.gitignore"
}

# Check that Python version supports venv
if ! python -c 'import venv' 1> /dev/null 2> /dev/null; then
echo "WARNING: Python version must be > 3.3 to create a virtual environment."
touch "$STATE_FILE"
exit 1
fi

# Check if the directory exists
if [ -d "$VENV_DIR" ]; then
if is_valid_venv "$VENV_DIR"; then
# Check if we've already run this script
if [ -f "$STATE_FILE" ]; then
# "We've already run this script. Exiting..."
exit 0
fi
if ! is_devbox_venv "$VENV_DIR"; then
echo "WARNING: Virtual environment at $VENV_DIR doesn't use Devbox Python."
echo "Do you want to overwrite it? (y/n)"
read reply
echo
case "$reply" in
[Yy]) echo "Overwriting existing virtual environment..."
create_venv ;;
[Nn]) echo "Using your existing virtual environment. We recommend changing \$VENV_DIR to a different location"
touch "$STATE_FILE"
exit 0 ;;
*) echo "Invalid input. Exiting..."
exit 1 ;;
esac
fi
else
echo "Directory exists but is not a valid virtual environment. Creating a new one..."
create_venv
fi
else
echo "Virtual environment directory doesn't exist. Creating new one..."
create_venv
fi
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ on:
- "!03-core-features/filters/*.txt"

### https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
# schedule:
# - cron: "0 0 * * *" # Midnight UTC
schedule:
- cron: "0 0 * * *" # Midnight UTC

## Manual Trigger
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::917774925227:role/github-actions-role
role-to-assume: arn:aws:iam::510773627529:role/gha-role
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_store
.DS_store
.lh/**
6 changes: 6 additions & 0 deletions .lh/.lhignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# list file to not track by the local-history extension. comment line starts with a '#' character
# each line describe a regular expression pattern (search for 'Javascript regex')
# it will relate to the workspace directory root. for example:
# '.*\.txt' ignores any file with 'txt' extension
# '/test/.*' ignores all the files under the 'test' directory
# '.*/test/.*' ignores all the files under any 'test' directory (even under sub-folders)
26 changes: 26 additions & 0 deletions .lh/.vscode/settings.json.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"sourceFile": ".vscode/settings.json",
"activeCommit": 0,
"commits": [
{
"activePatchIndex": 2,
"patches": [
{
"date": 1777380663703,
"content": "Index: \n===================================================================\n--- \n+++ \n"
},
{
"date": 1777529865372,
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -0,0 +1,11 @@\n+{\n+ \"workbench.sideBar.location\": \"left\",\n+ \"editor.formatOnSave\": true,\n+ \"github-actions.workflows.pinned.workflows\": [],\n+ \"files.associations\": {\n+ \"**/.github/workflows/*.{yml,yaml}\": \"yaml\",\n+ \"**/Taskfile.{yml,yaml}\": \"yaml\"\n+ },\n+ \"editor.tabSize\": 2,\n+ \"extensions.ignoreRecommendations\": true\n+}\n\\ No newline at end of file\n"
},
{
"date": 1777533733645,
"content": "Index: \n===================================================================\n--- \n+++ \n@@ -1,16 +1,5 @@\n {\n- \"workbench.sideBar.location\": \"left\",\n- \"editor.formatOnSave\": true,\n- \"github-actions.workflows.pinned.workflows\": [],\n- \"files.associations\": {\n- \"**/.github/workflows/*.{yml,yaml}\": \"yaml\",\n- \"**/Taskfile.{yml,yaml}\": \"yaml\"\n- },\n- \"editor.tabSize\": 2,\n- \"extensions.ignoreRecommendations\": true\n-}\n-{\n \"workbench.sideBar.location\": \"right\",\n \"editor.formatOnSave\": true,\n \"github-actions.workflows.pinned.workflows\": [],\n \"files.associations\": {\n"
}
],
"date": 1777380663703,
"name": "Commit-0",
"content": "{\n \"workbench.sideBar.location\": \"right\",\n \"editor.formatOnSave\": true,\n \"github-actions.workflows.pinned.workflows\": [],\n \"files.associations\": {\n \"**/.github/workflows/*.{yml,yaml}\": \"yaml\",\n \"**/Taskfile.{yml,yaml}\": \"yaml\"\n },\n \"editor.tabSize\": 2,\n \"extensions.ignoreRecommendations\": true\n}"
}
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"workbench.sideBar.location": "right",
"editor.formatOnSave": true,
"github-actions.workflows.pinned.workflows": [],
"files.associations": {
"**/.github/workflows/*.{yml,yaml}": "yaml",
"**/Taskfile.{yml,yaml}": "yaml"
},
"editor.tabSize": 2,
"extensions.ignoreRecommendations": true
}