Changes
Page history
Create Developer setup
authored
Oct 04, 2021
by
Mark Hewitt
Show whitespace changes
Inline
Side-by-side
Developer-setup.md
0 → 100644
View page @
ef0dc2e7
## Prerequisites
Before starting, install the following tools:
-
Python 3.8 or later
-
Pip package manager
For more information on these tools, see the public documentation on
[
Python
](
https://www.python.org/downloads/
)
or
[
Pip
](
https://pip.pypa.io/en/stable/installing/
)
Development can be done on Windows, macOS, and Linux.
## Installation
From the root of your cloned repo, generate a virtual environment with a
specific version of python.
Windows
```
bash
python
-m
venv .env
.env
\S
cripts
\a
ctivate.bat
```
Linux / MacOS
```
bash
python3
-m
venv .env
.
./.env/bin/activate
```
Next install the package in developer mode and any necessary development packages.
```
bash
pip
install
-e
.
pip
install
-r
requirements.txt
```
You should now be able to run the command line.
```
bash
osdu
```
## Validation
You can run local validation including testing and linting using the provided scripts.
Windows
```
bash
scripts
\v
erify.bat
```
Linux / MacOS
```
bash
./scripts/verify
```
The above can take the following optional arguments to just run specific portions of the validation:
*
lint
*
tests
e.g.
```
bash
./scripts/verify lint
```
To run a more fuller validation across all supported python versions run tox.
```
bash
tox
```
If needed, configure the paths to the relevant python installations for tox as follows.
```
bash
set
TOX_DISCOVER
=
C:
\A
pplications
\m
iniconda3
\e
nvs
\p
y39
\p
ython.exe
```
## VS Code Extensions
If you are using VS Code, it is recommended you install two extensions
(
`ext install <name>`
):
-
[
python
](
https://marketplace.visualstudio.com/items?itemName=donjayamanne.python
)
-
[
code-spell-checker
](
https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
)
Keep the project dictionary up to date by adding exclusions when running spell
check.
For different virtual environments, it is also important to update the workspace
Python interpreter. Select an interpreter by running the
`Python: Select
Workspace Interpreter`
command.
## Conventions
Before submitting any pull requests for merging, be sure to review the
requirements and suggestions outlined in the [[coding conventions|Conventions]] documentation.