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

chore: set vscode configuration up #130

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 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: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ venv.bak/
.mypy_cache/

# IDE and Editors
.vscode/
.idea/

# MACOS Files and Property file
Expand Down
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance",
"njpwerner.autodocstring"
],
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.pythonPath": ".venv\\Scripts\\python.exe",
"python.analysis.extraPaths": ["bot"],
}
35 changes: 35 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Setup",
"type": "shell",
"command": "poetry install && poetry run task precommit && poetry run pre-commit run --all-files",
"problemMatcher": []
},
{
"label": "Run Bot With Docker",
"type": "shell",
"command": "docker-compose up",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Build and Run Bot With Docker",
"type": "shell",
"command": "docker-compose up --build",
"problemMatcher": [],
},
{
"label": "Run Bot Manually",
"type": "shell",
"command": "poetry run task bot",
"problemMatcher": [],
}
]
}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,19 @@ Then navigate to the directory `cd gurkbot/`
poetry run task bot

```

5. Lint and format your code properly using `poetry run task lint`, and push changes `git push -u origin <name of new remote branch>`

## Set Development Environment up With Editor
srinivasayush marked this conversation as resolved.
Show resolved Hide resolved

### VSCode
<img src="assets/task.png"></img>

1. Run the setup task by pressing `Ctrl + P` and typing `task Setup`

2. Run the bot in development using the any of the `Run Bot` tasks(You can run them just like the Setup task
srinivasayush marked this conversation as resolved.
Show resolved Hide resolved
in the previous step). You can also run the default build task by pressing `Ctrl + Shift + B`

## Commands to Remember
`poetry run task precommit` - Installs the pre-commit git hook

Expand Down
Binary file added assets/task.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.