From de45750d4ef865525e3637821e9011e8428ba867 Mon Sep 17 00:00:00 2001 From: Eduard Prokhorikhin Date: Mon, 11 Mar 2024 11:30:45 +0100 Subject: [PATCH 1/3] chore: removed devcontainer settup to prepeare for venv --- .devcontainer/devcontainer.json | 41 --------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 9af928d..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,41 +0,0 @@ -// 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": "Python 3", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", - "settings": { - "terminal.integrated.shell.linux": "/bin/bash" - }, - // Add the IDs of extensions you want installed when the container is created. - "customizations": { - "vscode": { - "extensions": [ - "streetsidesoftware.code-spell-checker", - "ms-azuretools.vscode-docker", - "DavidAnson.vscode-markdownlint", - "esbenp.prettier-vscode", - "ms-python.python", - "ms-python.vscode-pylance", - "ms-python.debugpy" - ] - } - }, - // install the pip packages on container creation - "postCreateCommand": "pip3 install --user -r requirements.txt", - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "pip3 install --user -r requirements.txt", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} From 2a23a97e4201d3985de90d8a44e477d2d204f5d6 Mon Sep 17 00:00:00 2001 From: Eduard Prokhorikhin Date: Mon, 11 Mar 2024 11:31:33 +0100 Subject: [PATCH 2/3] docs: updated the environment settup docs to include venv --- docs/guide/{env.md => devContainer.md} | 0 docs/guide/venv.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+) rename docs/guide/{env.md => devContainer.md} (100%) create mode 100644 docs/guide/venv.md diff --git a/docs/guide/env.md b/docs/guide/devContainer.md similarity index 100% rename from docs/guide/env.md rename to docs/guide/devContainer.md diff --git a/docs/guide/venv.md b/docs/guide/venv.md new file mode 100644 index 0000000..3689853 --- /dev/null +++ b/docs/guide/venv.md @@ -0,0 +1,25 @@ +# Development Environment + +We will be utilizing a virtual environment to develop the project. This will allow us to have a consistent development environment across all developers.In this case we will be using `venv` to create the virtual environment. + +## Getting Started + +* Have [Python](https://www.python.org/downloads/) installed + * Verify that python is installed by running `python --version` +* Pip install the virtual environment package + * Verify that pip is installed by running `pip --version` + * Install the virtual environment package by running `pip install virtualenv` +* In the root of the project, create a virtual environment by running `python -m venv .venv` +* Activate the virtual environment + * On Windows, run `.venv\Scripts\activate` + * On Mac/Linux, run `source .venv/bin/activate` +* Done! You should now have a fully functional development environment +* To deactivate the virtual environment, run `deactivate` + +## Dependencies +Once you have entered venv you need to make sure the dependencies are installed by running `pip install -r requirements.txt`. +If you use a new pip dependency, make sure to add it to the `requirements.txt` file. This can be done by running: +```bash +pip freeze > requirements.txt +``` +after you pip installed it locally, and then committing the changes. From bb237eaf83d9a8634f3b041d11f7456c5f2e8428 Mon Sep 17 00:00:00 2001 From: Eduard Prokhorikhin Date: Mon, 11 Mar 2024 11:57:40 +0100 Subject: [PATCH 3/3] docs: Added planning folder and plan for upcoming work night --- docs/planning/12.03.2024.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/planning/12.03.2024.md diff --git a/docs/planning/12.03.2024.md b/docs/planning/12.03.2024.md new file mode 100644 index 0000000..6884f3a --- /dev/null +++ b/docs/planning/12.03.2024.md @@ -0,0 +1,14 @@ +# Cogito work night nr. 3 + +## Agenda + +- Venv +- [Mer klarere plan for Tetris](#tetris) +- Progge +- Hva skjer neste uke? + + +## Tetris +- **Headless:** ingen grafikk ting skjer sekvensielt. En viss boardstate og en ny block -> velger presist hvor den skal plasseres (blant mulige plasser) uten tidsbegrensning. + For development purpuses har vi en to print outs av brettet. Første viser brettet med den uplasserte blokken (øverst i midten), andre viser brettet etter at blokken er plassert. Bruker de objektene som vi har blitt enige om. Tanken er at vi kan bruke dette til å teste ut forskjellige algoritmer for å plassere blokken (ai/algorytme velger posisjonen). +- **Grafisk:** pygame. Adapsjon av samme objekter som headless bare at vi nå styrer hvor blokken skal plasseres dynamisk. Blokken faller nedover med en viss hastighet og vi kan flytte den rundt med en viss hastighet (feks. et tastetrykk = forflytter blokken en rute). For å la agenten spille må vi lage et oversettelses lag mellom headless og grafisk, hvor vi kan sende input til grafisk for å manuvrere blokken til samme posisjon som headless ville plassert den. \ No newline at end of file