Skip to content

Commit

Permalink
Merge pull request #3 from illallangi/development
Browse files Browse the repository at this point in the history
v0.0.1
  • Loading branch information
andrewcole authored Oct 2, 2022
2 parents 2b99e1e + 46d864d commit 4f9f63d
Show file tree
Hide file tree
Showing 9 changed files with 378 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.dockerignore
.flake8
.git
.github
.gitignore
.yamllint
Dockerfile
LICENSE
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
exclude = .git, __pycache__
ignore =
E501 # line too long
W503 # Line break occurred before a binary operator
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
updates:
- assignees:
- andrewcole
directory: /
open-pull-requests-limit: 10
package-ecosystem: docker
schedule:
interval: daily
- assignees:
- andrewcole
directory: /
open-pull-requests-limit: 10
package-ecosystem: github-actions
schedule:
interval: daily
- assignees:
- andrewcole
directory: /
open-pull-requests-limit: 10
package-ecosystem: pip
schedule:
interval: daily
version: 2
54 changes: 54 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
- env:
DEFAULT_BUMP: patch
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
id: version
name: Bump version and push tag
uses: anothrNick/[email protected]
- id: meta
name: Docker meta
uses: docker/metadata-action@v4
with:
flavor: prefix=v,onlatest=false
images: ghcr.io/${{ github.repository }}
tags: type=semver,pattern={{version}},value=${{ steps.version.outputs.new_tag }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.repository_owner }}
- name: Build and push
uses: docker/build-push-action@v3
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
- env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.version.outputs.new_tag }}
name: Release
on:
push:
branches:
- master
61 changes: 61 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
jobs:
lint-actions: # https://github.com/reviewdog/action-actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-actionlint@v1
with:
fail_on_error: "true"
filter_mode: nofilter
- uses: reviewdog/action-suggester@v1
lint-dockerfile: # https://github.com/reviewdog/action-hadolint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-hadolint@v1
with:
fail_on_error: "true"
filter_mode: nofilter
- uses: reviewdog/action-suggester@v1
lint-spelling: # https://github.com/reviewdog/action-misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-misspell@v1
with:
exclude: |
*/*.min.css
*/*.svg
fail_on_error: "true"
filter_mode: nofilter
- uses: reviewdog/action-suggester@v1
lint-yaml: # https://github.com/reviewdog/action-yamllint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-yamllint@v1
with:
fail_on_error: "true"
filter_mode: nofilter
- uses: reviewdog/action-suggester@v1
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v3
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
platforms: linux/amd64,linux/arm64
push: false
name: Test
on: pull_request
140 changes: 140 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
debug/
55 changes: 55 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
extends: default
rules:
braces:
forbid: non-empty
brackets:
forbid: non-empty
colons:
max-spaces-after: 1
max-spaces-before: 0
commas:
max-spaces-after: 1
max-spaces-before: 0
min-spaces-after: 1
comments:
ignore-shebangs: true
min-spaces-from-content: 2
require-starting-space: true
comments-indentation: {}
document-end:
present: false
document-start:
present: true
empty-lines:
max: 0
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
hyphens:
max-spaces-after: 1
indentation:
check-multi-line-strings: false
indent-sequences: false
spaces: 2
key-duplicates: {}
key-ordering: {}
line-length:
max: 160
new-line-at-end-of-file: {}
new-lines:
type: unix
octal-values:
forbid-explicit-octal: true
forbid-implicit-octal: true
quoted-strings:
extra-allowed: []
extra-required: []
quote-type: double
required: only-when-needed
trailing-spaces: {}
truthy:
allowed-values:
- "true"
- "false"
check-keys: false
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Andrew Cole

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 🤖 [Telegraf UptimeRobot](https://github.com/illallangi/telegraf-uptimerobot)
# 🧦 [Telegraf Stockdata](https://github.com/illallangi/telegraf-stockdata)

Inspired by [uptime-robot.py](https://github.com/bentasker/telegraf-plugins/blame/master/uptime-robot/uptime-robot.py)
TODO: SET DESCRIPTION

## Installation

TODO: DOCUMENT INSTALLATION

## Usage

TODO: DOCUMENT USAGE

0 comments on commit 4f9f63d

Please sign in to comment.