diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 941c8a099..000000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug -about: Notify that an error has ben found on the app and what happened. -title: '' -labels: Bug -assignees: '' - ---- - -**Bug Description** -What is happening? - -**Steps to reproduce** -How do I replicate the issue, what where you doing? - -**Screenshots** -Provide screenshots, videos, links, etc. - -**Context** -What is your environment? - -Fill the following information and add any relevant information: -*OS*: Windows, Mac, Linux, Android, iOS... -*Browser*: Chrome, Opera, Firefox, Safari... -*App Version*: v1.0.0 - -**Notes** -Extra information relevant to the issue. diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index 6aee6e0d5..000000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature -about: Propose a feature to be added to the application. -title: '' -labels: Feature -assignees: '' - ---- - -**Feature description** -What is the feature supposed to do, what will it include? - -**Possible solutions** -What are the possible ways to implement this feature that you can think of? - -**Notes** -What context / extra information is required to understand the proposal? diff --git a/.github/ISSUE_TEMPLATE/task.md b/.github/ISSUE_TEMPLATE/task.md deleted file mode 100644 index 8a717356d..000000000 --- a/.github/ISSUE_TEMPLATE/task.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Task -about: Tasks are units of work assigned to members to be completed. -title: '' -labels: Task -assignees: '' - ---- - -**Description** -Brief description of the task and important details - -**Related** -Related Issues, PRs, Documents, etc. - -**Notes** -Extra information that might be good to know about it diff --git a/.github/workflows/rust-tests.yaml b/.github/workflows/rust-tests.yaml new file mode 100644 index 000000000..6ab44a9ce --- /dev/null +++ b/.github/workflows/rust-tests.yaml @@ -0,0 +1,30 @@ +name: Rust Tests + +on: + pull_request: + paths: + - "backend/**" + - ".github/workflows/rust-tests.yaml" + +jobs: + test: + name: Test (${{ matrix.crate }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + crate: [software-core, station] + steps: + - uses: actions/checkout@v4 + + - name: Set up Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo + uses: Swatinem/rust-cache@v2 + with: + workspaces: backend + + - name: Run tests + working-directory: backend + run: cargo test --package ${{ matrix.crate }} diff --git a/.gitignore b/.gitignore index bc66fec72..35fee63ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ # Monorepo / IDE node_modules/ .turbo/ -.vscode/ +.vscode/* +!.vscode/settings.json +!.vscode/extensions.json +!.vscode/launch.json +!.vscode/tasks.json .DS_Store *.code-workspace diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..37006f2d8 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "rust-lang.rust-analyzer", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "ms-python.python", + "tamasfe.even-better-toml" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..617eff252 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug Backend (Rust)", + "program": "${workspaceFolder}/backend/target/debug/station", + "args": [], + "cwd": "${workspaceFolder}/backend/crates/station", + "preLaunchTask": "Build Backend (Rust)", + "sourceLanguages": ["rust"] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 9ef398bb3..6f381d6a0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -50,5 +50,33 @@ "editor.codeActionsOnSave": { "source.fixAll.rust-analyzer": "explicit" } + }, + "rust-analyzer.linkedProjects": ["backend/Cargo.toml"], + "rust-analyzer.check.command": "clippy", + "rust-analyzer.check.extraArgs": ["--all-targets"], + + // ESLint: each frontend/* package has its own flat eslint.config.js + "eslint.workingDirectories": [{ "mode": "auto" }], + + // Python: blcu-programming is the only Python project, venv created by + // its postinstall script (blcu-programming/scripts/setup.mjs) + "python.defaultInterpreterPath": "${workspaceFolder}/blcu-programming/.venv/bin/python", + + // Keep VS Code from indexing/watching generated and vendored trees + "files.watcherExclude": { + "**/node_modules/**": true, + "**/target/**": true, + "**/dist/**": true, + "**/.venv/**": true, + "**/.venv-build/**": true, + "**/.turbo/**": true + }, + "search.exclude": { + "**/node_modules": true, + "**/target": true, + "**/dist": true, + "**/.venv": true, + "**/.venv-build": true, + "**/.turbo": true } } diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..10489440d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,187 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run Testing View", + "type": "shell", + "command": "pnpm", + "args": ["dev", "--filter", "testing-view"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "dedicated" + } + }, + { + "label": "Run Competition View", + "type": "shell", + "command": "pnpm", + "args": ["dev", "--filter", "competition-view"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "dedicated" + } + }, + { + "label": "Run Flashing View", + "type": "shell", + "command": "pnpm", + "args": ["dev", "--filter", "flashing-view"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "dedicated" + } + }, + { + "label": "Run Logging View", + "type": "shell", + "command": "pnpm", + "args": ["dev", "--filter", "logging-view"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "dedicated" + } + }, + { + "label": "Run ADJ View", + "type": "shell", + "command": "pnpm", + "args": ["dev", "--filter", "adj-view"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "dedicated" + } + }, + { + "label": "Run Backend (Rust)", + "type": "shell", + "command": "cargo", + "args": ["run", "--package", "station"], + "options": { + "cwd": "${workspaceFolder}/backend" + }, + "problemMatcher": ["$rustc"], + "presentation": { + "reveal": "always", + "panel": "dedicated" + } + }, + { + "label": "Run Python (BLCU Programming)", + "type": "shell", + "command": "pnpm", + "args": ["dev", "--filter", "blcu-programming"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "presentation": { + "reveal": "always", + "panel": "dedicated" + } + }, + { + "label": "Build App", + "type": "shell", + "command": "pnpm", + "args": ["run", "build"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "group": "build" + }, + { + "label": "Build Backend (Rust)", + "type": "shell", + "command": "cargo", + "args": ["build", "--package", "station"], + "options": { + "cwd": "${workspaceFolder}/backend" + }, + "problemMatcher": ["$rustc"], + "group": "build" + }, + { + "label": "Test App", + "type": "shell", + "command": "pnpm", + "args": ["run", "test"], + "options": { + "cwd": "${workspaceFolder}" + }, + "problemMatcher": [], + "group": "test" + }, + { + "label": "Test Backend (Rust)", + "type": "shell", + "command": "cargo test ${input:rustTestScope} ${input:rustTestFilter}", + "options": { + "cwd": "${workspaceFolder}/backend" + }, + "problemMatcher": ["$rustc"], + "group": "test" + }, + { + "label": "Clippy Backend (Rust)", + "type": "shell", + "command": "cargo", + "args": ["clippy", "--workspace", "--all-targets", "--", "-D", "warnings"], + "options": { + "cwd": "${workspaceFolder}/backend" + }, + "problemMatcher": ["$rustc"], + "group": "test" + }, + { + "label": "Format Backend (Rust)", + "type": "shell", + "command": "cargo", + "args": ["fmt", "--all"], + "options": { + "cwd": "${workspaceFolder}/backend" + }, + "problemMatcher": [], + "group": "none" + } + ], + "inputs": [ + { + "id": "rustTestScope", + "type": "pickString", + "description": "¿Qué crate del backend querés testear?", + "options": [ + { "label": "Todo el workspace", "value": "--workspace" }, + { "label": "software-core", "value": "-p software-core" }, + { "label": "station", "value": "-p station" } + ], + "default": "--workspace" + }, + { + "id": "rustTestFilter", + "type": "promptString", + "description": "Filtro de test/módulo dentro del crate elegido (ej. adj::tests, vacío = todos)", + "default": "" + } + ] +}