-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #939 from sabeechen/upload-thorttling
Implement upload throttling
- Loading branch information
Showing
48 changed files
with
983 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.9-buster | ||
FROM python:3.11-buster | ||
|
||
WORKDIR /usr/src/install | ||
RUN apt-get update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ grpcio | |
aioping | ||
pytz | ||
tzlocal | ||
pytest-cov | ||
pytest-cov | ||
pytest-xdist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
{ | ||
"recommendations": ["wholroyd.jinja"] | ||
} | ||
"recommendations": [ | ||
"ms-python.python", | ||
"wholroyd.jinja", | ||
"ms-python.vscode-pylance", | ||
"cssho.vscode-svgviewer", // SVG viewer | ||
"eamodio.gitlens", // IDE Git information | ||
"ms-azuretools.vscode-docker", // Docker integration and linting | ||
"shardulm94.trailing-spaces", // Show trailing spaces | ||
"davidanson.vscode-markdownlint", | ||
"IBM.output-colorizer", // Colorize your output/test logs | ||
"Gruntfuggly.todo-tree", // Highlights TODO comments | ||
"bierner.emojisense", // Emoji sense for markdown | ||
"stkb.rewrap", // rewrap comments after n characters on one line | ||
"vscode-icons-team.vscode-icons", // Better file extension icons | ||
"github.vscode-pull-request-github", // Github interaction | ||
"GitHub.copilot", | ||
"mikoz.black-py" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
The project is mostly maintained by Stephen Beechen ([email protected]) whom you can reach out to for guidance. Before digging in to this, you might be helpful to familiarize yourself with some of the technologies used in the project. | ||
|
||
- [Developing Addons for Home Assistant](https://developers.home-assistant.io/docs/add-ons) - Useful to understand how addons work. | ||
- [Python](https://www.python.org/) - The addon is written in Python 3.8 and makes heavy use of the asyncio framework. | ||
- [Python](https://www.python.org/) - The addon is written in Python 3.11 and makes heavy use of the asyncio framework. | ||
- [AIOHTTP](https://docs.aiohttp.org/en/stable/) - The addon serves its web interface through an AIOHTTP server, and uses the AIOHTTP client library for all web requests. | ||
- [pytest](https://docs.pytest.org/en/latest/) - The addon uses pytest for all of its test. | ||
- [Visual Studio Code](https://code.visualstudio.com/) - The addon codebase is designed to work with Visual Studio code, but in practice you could use any editor (it would be harder). These instructions assume you're using VSCode, it’s a free cross-platform download. | ||
|
@@ -28,17 +28,17 @@ If the you open the repository folder in Visual Studio code with docker installe | |
|
||
### Harder but also works: Manual Setup | ||
1. Install [Visual Studio Code](https://code.visualstudio.com/) | ||
2. Install [Python 3.8](https://www.python.org/downloads/) for your platform. | ||
2. Install [Python 3.11](https://www.python.org/downloads/) for your platform. | ||
3. Install a git client. I like [GitHub Desktop](https://desktop.github.com/) | ||
4. Clone the project repository | ||
``` | ||
https://github.com/sabeechen/hassio-google-drive-backup.git | ||
``` | ||
5. Open Visual studio Code, go to the extension menu, and install the Desktop] (Python extension from Microsoft. It may prompt you to choose a Python interpreter (you want Python 3.8) and select a test framework (you want pytest). | ||
5. Open Visual studio Code, go to the extension menu, and install the Desktop] (Python extension from Microsoft. It may prompt you to choose a Python interpreter (you want Python 3.11) and select a test framework (you want pytest). | ||
6. <kbd>File</kbd> > <kbd>Open Folder</kbd> to open the cloned repository folder. | ||
7. Open the terminal (`Ctrl` + `Shift` + <code>`</code>) and install the Python packages required for development: | ||
``` | ||
> python3.8 -m pip install -r .devcontainer/requirements-dev.txt | ||
> python3.11 -m pip install -r .devcontainer/requirements-dev.txt | ||
``` | ||
That should set you up! | ||
|
||
|
@@ -98,7 +98,7 @@ I haven't tried using the Supervisor's new devcontainers for development yet (th | |
You should be able to run tests from within the Visual Studio tests tab. Make sure all the tests pass before you to make a PR. You can also run them from the command line with: | ||
|
||
```bash | ||
> python3.8 -m pytest hassio-google-drive-backup | ||
> python3.11 -m pytest hassio-google-drive-backup | ||
``` | ||
|
||
## Writing Tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.