Skip to content

Commit

Permalink
Added development information (#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
legovaer authored Aug 17, 2023
1 parent 6a0372d commit f556d6d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
## TODO

- Re-write readme file for new project structure

## Contributing

Information on setting up diyHue as a development environment can be found in our docs.
64 changes: 64 additions & 0 deletions docs/development-environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Set up Development Environment

You'll need to set up a development environment if you want to develop a new feature or component
for diyHue. Read on to learn how to set up.

## Developing with Visual Studio Code + devcontainer

The easiest way to get started with development is to use Visual Studio Code with devcontainers.
This approach will create a preconfigured development environment with all the tools you need.
(Learn more about devcontainers)[https://code.visualstudio.com/docs/devcontainers/containers]

### Prerequisites

* (Docker)[https://docs.docker.com/get-docker/]
* (Visual Studio Code)[https://code.visualstudio.com/]
* (Git)[https://git-scm.com/]

### Getting started

1. Go to (diyHue repository)[https://github.com/diyhue/diyHue] and click _fork_.
2. Once your fork is created, clone the repository to your local environment.
3. Open the cloned folder in Visual Studio Code
4. Run the Dev Containers: Open Folder in Container... command from the Command Palette (F1) or
quick actions Status bar item.
(More information can be found in the official documentation)[https://code.visualstudio.com/docs/devcontainers/containers]
5. The Dev Container image will then be built (this may take a few minutes), after this your
development environment will be ready.

In the future, if you want to get back to your development environment: open Visual Studio Code,
click on the "Remote Explorer" button in the sidebar, select "Containers" at the top of the sidebar.

## Setup Local Repository

Go to (diyHue repository)[https://github.com/diyhue/diyHue] and click _fork_. Once forked, setup
your local copy of the source using the commands:

```
git clone https://github.com/YOUR_GIT_USERNAME/diyHue.git
cd diyHue
git remote add upstream https://github.com/diyhue/diyHue.git
```

install the requirements with a provided script named `setup`.

```
script/setup
```

This will create a virtual environment and install all necessary requirements. You're now set!

Each time you start a new terminal session, you will need to activate your virtual environment:

```
source venv/bin/activate
```

After that you can run diyHue like this:

```
diyhue -c config
```

The diyHue configuration is stored in the `config` directory in your repository.

0 comments on commit f556d6d

Please sign in to comment.