-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set the next dev version number: 1.0.4-dev * Include python 3.9 in tests * Use a static python version when linting No need for matrix support over all python version when linting. * Fix lint.yml indent * Update index.rst * Include codeql-analysis * style: fixing some code smells * Update tox.ini * Update test.yml * add valve support * fix program string * roll back to what worked try readd python 3.6 Revert "update formatting" This reverts commit 5b4ec91. update formatting * remove python 3.6 * try to make black happy * build: update supported python versions * build: quote python test versions * chore: readd removed blank line * docs: add all-contributors config * docs: add all-contributors config * docs: update README.md [skip ci] * docs: create .all-contributorsrc [skip ci] * update tests * Update publish.yml * Update publish_test.yml * Update publish_test.yml * Update setup.cfg * Update setup.py * Delete setup.cfg * Update setup.py * Update publish.yml * Update setup.py with new version number * Update setup.py version number --------- Co-authored-by: Brian Rogers <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e078d33
commit 7f3c210
Showing
27 changed files
with
871 additions
and
59 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"files": [ | ||
"README.md" | ||
], | ||
"imageSize": 100, | ||
"commit": false, | ||
"commitType": "docs", | ||
"commitConvention": "angular", | ||
"contributors": [ | ||
{ | ||
"login": "brg468", | ||
"name": "Brian Rogers", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/19143191?v=4", | ||
"profile": "https://github.com/brg468", | ||
"contributions": [ | ||
"code", | ||
"doc", | ||
"test" | ||
] | ||
} | ||
], | ||
"contributorsPerLine": 7, | ||
"skipCi": true, | ||
"repoType": "github", | ||
"repoHost": "https://github.com", | ||
"projectName": "rachiopy", | ||
"projectOwner": "rfverbruggen" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"projectName": "rachiopy", | ||
"projectOwner": "rfverbruggen" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ dev, master ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ dev ] | ||
schedule: | ||
- cron: '28 6 * * 6' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'python' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
"""Program module for the smart hose timer.""" | ||
|
||
from rachiopy.rachioobject import RachioObject | ||
|
||
|
||
class Program(RachioObject): | ||
"""Program class for the smart hose timer.""" | ||
|
||
def list_programs(self, valve_id: str): | ||
"""Retreive the list of programs (schedules) for a valve. | ||
For more info of the content in the response see: | ||
https://rachio.readme.io/docs/programservice_listprograms | ||
:param valve_id: Valve's unique id | ||
:type valve_id: str | ||
:return: The return value is a tuple of (response, content), the first | ||
being and instance of the httplib2.Response class, the second | ||
being a string that contains the response entity body. | ||
:rtype: tuple | ||
""" | ||
path = f"program/listPrograms/{valve_id}" | ||
return self.valve_get_request(path) | ||
|
||
def get_program(self, program_id: str): | ||
"""Retreive the information for a specific program. | ||
For more info of the content in the response see: | ||
https://rachio.readme.io/docs/programservice_getprogram | ||
:param program_id: Program's unique id | ||
:type program_id: str | ||
:return: The return value is a tuple of (response, content), the first | ||
being and instance of the httplib2.Response class, the second | ||
being a string that contains the response entity body (Python | ||
object if it contains JSON). | ||
:rtype: tuple | ||
""" | ||
path = f"program/getProgram/{program_id}" | ||
return self.valve_get_request(path) | ||
|
||
def create_skip_overrides(self, program_id: str, timestamp: str): | ||
"""Create manual skips for the specific program run time. | ||
You can retrieve the runtimes from SummaryService.getValveDayViews | ||
For more info of the content in the response see: | ||
https://rachio.readme.io/docs/programservice_createskipoverrides | ||
:param program_id: Program's unique id | ||
:type program_id: str | ||
:param timestamp: Timestamp of the run to skip | ||
:type timestamp: timestamp | ||
:return: The return value is a tuple of (response, content), the first | ||
being and instance of the httplib2.Response class, the second | ||
being a string that contains the response entity body (Python | ||
object if it contains JSON). | ||
:rtype: tuple | ||
""" | ||
payload = {"programId": program_id, "timestamp": timestamp} | ||
return self.valve_post_request("program/createSkipOverrides", payload) | ||
|
||
def delete_skip_overrides(self, program_id: str, timestamp: str): | ||
"""Cancel program skips for the specified program run time. | ||
You can retrieve upcoming skips from SummaryService.getValveDayViews | ||
For more info of the content in the response see: | ||
https://rachio.readme.io/docs/programservice_deleteskipoverrides | ||
:param program_id: Program's unique id | ||
:type program_id: str | ||
:param timestamp: Timestamp of the run skip to delete | ||
:type timestamp: timestamp | ||
:return: The return value is a tuple of (response, content), the first | ||
being and instance of the httplib2.Response class, the second | ||
being a string that contains the response entity body (Python | ||
object if it contains JSON). | ||
:rtype: tuple | ||
""" | ||
payload = {"programId": program_id, "timestamp": timestamp} | ||
return self.valve_post_request("program/deleteSkipOverrides", payload) |
Oops, something went wrong.