Skip to content

Commit

Permalink
Added support for Allegro /myorder-api/myorders
Browse files Browse the repository at this point in the history
Updated documentation, added additional attributes
  • Loading branch information
Przemko92 committed Jan 23, 2023
1 parent 8b88341 commit dc3567c
Show file tree
Hide file tree
Showing 52 changed files with 1,167 additions and 1,051 deletions.
11 changes: 0 additions & 11 deletions .cookiecutter.json

This file was deleted.

60 changes: 60 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## Developing with Visual Studio Code + devcontainer

The easiest way to get started with custom integration development is to use Visual Studio Code with devcontainers. This approach will create a preconfigured development environment with all the tools you need.

In the container you will have a dedicated Home Assistant core instance running with your custom component code. You can configure this instance by updating the `./devcontainer/configuration.yaml` file.

**Prerequisites**

- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- Docker
- For Linux, macOS, or Windows 10 Pro/Enterprise/Education use the [current release version of Docker](https://docs.docker.com/install/)
- Windows 10 Home requires [WSL 2](https://docs.microsoft.com/windows/wsl/wsl2-install) and the current Edge version of Docker Desktop (see instructions [here](https://docs.docker.com/docker-for-windows/wsl-tech-preview/)). This can also be used for Windows Pro/Enterprise/Education.
- [Visual Studio code](https://code.visualstudio.com/)
- [Remote - Containers (VSC Extension)][extension-link]

[More info about requirements and devcontainer in general](https://code.visualstudio.com/docs/remote/containers#_getting-started)

[extension-link]: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

**Getting started:**

1. Fork the repository.
2. Clone the repository to your computer.
3. Open the repository using Visual Studio code.

When you open this repository with Visual Studio code you are asked to "Reopen in Container", this will start the build of the container.

_If you don't see this notification, open the command palette and select `Remote-Containers: Reopen Folder in Container`._

### Tasks

The devcontainer comes with some useful tasks to help you with development, you can start these tasks by opening the command palette and select `Tasks: Run Task` then select the task you want to run.

When a task is currently running (like `Run Home Assistant on port 9123` for the docs), it can be restarted by opening the command palette and selecting `Tasks: Restart Running Task`, then select the task you want to restart.

The available tasks are:

Task | Description
-- | --
Run Home Assistant on port 9123 | Launch Home Assistant with your custom component code and the configuration defined in `.devcontainer/configuration.yaml`.
Run Home Assistant configuration against /config | Check the configuration.
Upgrade Home Assistant to latest dev | Upgrade the Home Assistant core version in the container to the latest version of the `dev` branch.
Install a specific version of Home Assistant | Install a specific version of Home Assistant core in the container.

### Step by Step debugging

With the development container,
you can test your custom component in Home Assistant with step by step debugging.

You need to modify the `configuration.yaml` file in `.devcontainer` folder
by uncommenting the line:

```yaml
# debugpy:
```

Then launch the task `Run Home Assistant on port 9123`, and launch the debugger
with the existing debugging configuration `Python: Attach Local`.

For more information, look at [the Remote Python Debugger integration documentation](https://www.home-assistant.io/integrations/debugpy/).
5 changes: 3 additions & 2 deletions .devcontainer/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ default_config:
logger:
default: info
logs:
custom_components.home_assistant_allegro: debug
# If you need to debug uncommment the line below (doc: https://www.home-assistant.io/integrations/debugpy/)
custom_components.allegro_buyer: debug

# If you need to debug uncomment the line below (doc: https://www.home-assistant.io/integrations/debugpy/)
debugpy:
57 changes: 31 additions & 26 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"image": "ludeeus/container:integration-debian",
"name": "home-assistant-allegro integration development",
"context": "..",
"appPort": ["9123:8123"],
"postCreateCommand": "container install",
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters",
"ms-python.vscode-pylance"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/bin/python3",
"python.analysis.autoSearchPaths": false,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
"image": "ghcr.io/ludeeus/devcontainer/integration:stable",
"name": "Blueprint integration development",
"context": "..",
"appPort": [
"9123:8123"
],
"postCreateCommand": "container install",
"extensions": [
"ms-python.python",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters",
"ms-python.vscode-pylance"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/bin/python3",
"python.analysis.autoSearchPaths": false,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.linting.pylintArgs": [
"--disable=C0111"
],
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* text=auto eol=lf
* text=auto eol=lf
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
Expand All @@ -13,4 +14,4 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here.
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/issue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Issue
about: Create a report to help us improve

---

<!-- Before you open a new issue, search through the existing issues to see if others have had the same problem.
Expand All @@ -14,21 +15,22 @@ Issues not containing the minimum requirements will be closed:
-->

## Version of the custom_component

<!-- If you are not using the newest version, download and try that before opening an issue
If you are unsure about the version check the const.py file.
-->

## Configuration

```yaml

Add your logs here.

```

## Describe the bug

A clear and concise description of what the bug is.


## Debug log

<!-- To enable debug logs check this https://www.home-assistant.io/components/logger/ -->
Expand All @@ -37,4 +39,4 @@ A clear and concise description of what the bug is.
Add your logs here.
```
```
14 changes: 0 additions & 14 deletions .github/dependabot.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/labels.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/release-drafter.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/constraints.txt

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cron actions

on:
schedule:
- cron: '0 0 * * *'

jobs:
validate:
runs-on: "ubuntu-latest"
name: Validate
steps:
- uses: "actions/checkout@v2"

- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
ignore: brands

- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"
20 changes: 0 additions & 20 deletions .github/workflows/labeler.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull actions

on:
pull_request:

jobs:
validate:
runs-on: "ubuntu-latest"
name: Validate
steps:
- uses: "actions/checkout@v2"

- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
ignore: brands

- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"

style:
runs-on: "ubuntu-latest"
name: Check style formatting
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v1"
with:
python-version: "3.x"
- run: python3 -m pip install black
- run: black .
Loading

0 comments on commit dc3567c

Please sign in to comment.