generated from cvxgrp/cvxcli
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from cvxgrp/6-experiments-as-first-template
6 experiments as first template
- Loading branch information
Showing
24 changed files
with
912 additions
and
58 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
project_name: | ||
type: str | ||
help: "Your project name? It must start with a lowercase letter, followed by letters, digits, or underscores." | ||
validator: >- | ||
{% if not (project_name | regex_search('^[a-z][a-z0-9_]+$')) %} | ||
project_name must start with a lowercase letter, followed by one or more lowercase letters, digits, or underscores. | ||
{% endif %} | ||
username: | ||
type: str | ||
default: 'tschm' | ||
help: "Home of your future repo (either 'cvxgrp' or your private GitHub account name)" | ||
validator: >- | ||
{% if not username %} | ||
Username cannot be empty. | ||
{% endif %} | ||
description: | ||
type: str | ||
help: "Enter a brief description of your project." | ||
default: "Some computations" | ||
validator: >- | ||
{% if not description %} | ||
Description cannot be empty. | ||
{% endif %} | ||
status: | ||
type: str | ||
help: "What is the visibility status of the repository?" | ||
choices: | ||
- "public" | ||
- "private" | ||
- "internal" | ||
default: "public" | ||
validator: >- | ||
{% if status not in ['public', 'private', 'internal'] %} | ||
Status must be one of: public, private, or internal. | ||
{% endif %} | ||
command: | ||
type: str | ||
default: "gh repo create {{username}}/{{ project_name | lower }} --{{status}} --description '{{description}}'" | ||
when: false | ||
|
||
ssh_uri: | ||
type: str | ||
default: "git@github.com:{{username}}/{{ project_name | lower }}.git" | ||
when: false |
30 changes: 30 additions & 0 deletions
30
cvx/cradle/templates/experiments/.devcontainer/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "Marimo Dev Container", | ||
"image": "mcr.microsoft.com/devcontainers/python:3.12", | ||
"hostRequirements": { | ||
"cpus": 4 | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": {} | ||
}, | ||
"forwardPorts": [8080], | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.defaultInterpreterPath": ".venv/bin/python", | ||
"python.linting.enabled": true, | ||
"python.linting.pylintEnabled": true, | ||
"marimo.pythonPath": ".venv/bin/python", | ||
"marimo.marimoPath": ".venv/bin/marimo" | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"marimo-team.vscode-marimo" | ||
] | ||
} | ||
}, | ||
"onCreateCommand": ".devcontainer/startup.sh", | ||
"postStartCommand": "uv run marimo --yes edit --host=localhost --port=8080 --headless --no-token", | ||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
uv venv | ||
uv pip install --no-cache-dir marimo | ||
uv pip install --no-cache-dir -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
interval: "weekly" |
41 changes: 41 additions & 0 deletions
41
cvx/cradle/templates/experiments/.github/workflows/marimo.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: MARIMO | ||
|
||
on: | ||
push | ||
|
||
permissions: | ||
contents: read | ||
|
||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@7768fe6bf07695625e41df8b6253deeb006301d9 | ||
|
||
- name: Create virtual environment | ||
run: | | ||
uv venv | ||
- name: Install dependencies with uv | ||
run: | | ||
uv pip install --no-cache-dir -r requirements.txt | ||
- name: Install marimo | ||
run: | | ||
uv pip install --no-cache-dir marimo | ||
- name: Convert notebooks to HTML | ||
run: | | ||
mkdir -p html_exports | ||
for file in notebooks/*.py; do | ||
if [ -f "$file" ]; then | ||
filename=$(basename "$file" .py) | ||
echo "Converting $filename.py to HTML..." | ||
# Can't work as it relies on license files not part of this repo | ||
# uv run marimo export html "$file" -o "html_exports/${filename}.html" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.idea | ||
.venv | ||
__pycache__ | ||
.ruff_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: 'v0.8.6' | ||
hooks: | ||
- id: ruff | ||
args: [ --fix, --exit-non-zero-on-fix ] | ||
# Run the formatter | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.43.0 | ||
hooks: | ||
- id: markdownlint-fix | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.19.1 | ||
hooks: | ||
- id: pyupgrade | ||
|
||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.30.0 | ||
hooks: | ||
- id: check-renovate | ||
args: [ "--verbose" ] | ||
|
||
- id: check-github-workflows | ||
args: ["--verbose"] | ||
|
||
- repo: https://github.com/rhysd/actionlint | ||
rev: v1.7.6 | ||
hooks: | ||
- id: actionlint | ||
args: [ -ignore, SC ] | ||
|
||
- repo: https://github.com/crate-ci/typos | ||
rev: v1.29.4 | ||
hooks: | ||
- id: typos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.12 |
Oops, something went wrong.