Skip to content

Commit

Permalink
update vscode task that build project
Browse files Browse the repository at this point in the history
  • Loading branch information
ikheifets-splunk committed Sep 27, 2023
1 parent 3596cee commit 91d5e43
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"python.pythonPath": "venv/bin/python3",
"python.defaultInterpreterPath": ".venv/bin/python3",
"python.testing.pytestEnabled": true,
"python.testing.autoTestDiscoverOnSaveEnabled": true
}
41 changes: 28 additions & 13 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,45 @@
"version": "2.0.0",
"tasks": [
{
"label": "Setup step 1: python venv",
"label": "Step 1: Install poetry",
"type": "shell",
"command": "python3 -m venv ./venv",
"windows": {
"command": "python venv"
},
"group": "Setup",
"command": "python3 -m pip install poetry",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
},
"runOptions": {
"runOn": "folderOpen"
}
},
{
"label": "Setup step 2: python requirements",
"label": "Step 2: Configure poetry",
"type": "shell",
"command": "pip3 install -r requirements.txt",
"windows": {
"command": "python requirements"
"command": "poetry config virtualenvs.in-project true --local",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
},
"runOptions": {
"runOn": "folderOpen"
},
"group": "Setup",
"dependsOn": ["Step 1: Install poetry"]
},
{
"label": "Step 3: Install deps",
"type": "shell",
"command": "poetry install",
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
}
}
},
"runOptions": {
"runOn": "folderOpen"
},
"dependsOn": ["Step 1: Install poetry", "Step 2: Configure poetry"]
},
]
}
20 changes: 11 additions & 9 deletions docs/developing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

## Get Docker

Development requires Docker desktop available for windows + and mac or Docker CE available for Linux. Visit (Docker)[https://www.docker.com/get-started]
Development requires Docker desktop available for windows + and mac or Docker CE available for Linux. Visit [Docker](https://www.docker.com/get-started)
for download instructions

## Setup VS Code IDE

VS Code provides a free IDE experience that is effective for daily development with SC4S. Visit (Microsoft)[https://code.visualstudio.com/docs/introvideos/basics]
VS Code provides a free IDE experience that is effective for daily development with SC4S. Visit [Microsoft](https://code.visualstudio.com/docs/introvideos/basics)
to download and install for your platform (windows/mac/linux)

## Fork and Clone the github repository

Visit our repository at (Github)[https://github.com/splunk/splunk-connect-for-syslog] and "fork" our repository. This will allow you to make changes and submit pull requests.
Visit our repository at [Github](https://github.com/splunk/splunk-connect-for-syslog) and "fork" our repository. This will allow you to make changes and submit pull requests.

![How to Fork](gh_fork.png)

Expand All @@ -24,16 +24,18 @@ Click the clone icon and select the location

The following steps are required _only_ on the first time run.

* Install VS Code Extensions S
Install VS Code Extensions:
* Python
* Test Explorer
* "Python Test Explorer"
* From the terminal menu select "Run Task"
* Select "Setup step 1: python venv" then "go without scanning output"
* From the terminal menu select "Run Task"
* Select "Setup step 2: python requirements" then "go without scanning output"

![VS Code setup](vsc_run.png)
Run command to setup the project:
* From the terminal menu select "Run Task" (Ctrl + Shift + B)
* Select "Step 1: Install poetry"
* From the terminal menu select "Run Task" (Ctrl + Shift + B)
* Select "Step 2: Configure poetry"
* From the terminal menu select "Run Task" (Ctrl + Shift + B)
* Select "Step 3: Install deps"

## Click the test lab icon

Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 91d5e43

Please sign in to comment.