Skip to content

Commit 496de53

Browse files
authored
Merge pull request #1 from someengineering/mv/genesis
[feat] Genesis
2 parents 8676e2a + 151c6a9 commit 496de53

33 files changed

+2251
-1
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @lloesche @aquamatthias @meln1k

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: 🐛 Bug Report
2+
description: Report a problem
3+
labels: ['bug']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: Description
13+
description: Please provide a clear and concise description of the bug or issue.
14+
validations:
15+
required: true
16+
- type: input
17+
id: version
18+
attributes:
19+
label: Version
20+
description: What version of Cloud2SQL are you running?
21+
validations:
22+
required: true
23+
- type: input
24+
id: environment
25+
attributes:
26+
label: Environment
27+
description:
28+
validations:
29+
required: false
30+
- type: textarea
31+
id: repro-steps
32+
attributes:
33+
label: Steps to Reproduce
34+
description: Please tell us how we can reproduce the undesired behavior.
35+
placeholder: |
36+
1.
37+
2.
38+
3.
39+
validations:
40+
required: false
41+
- type: textarea
42+
id: logs
43+
attributes:
44+
label: Logs
45+
description: Please copy and paste any relevant log output. (This will be automatically formatted into code, so no need for backticks.)
46+
render: shell
47+
- type: textarea
48+
id: additional-context
49+
attributes:
50+
label: Additional Context
51+
description: Provide any additional information or screenshots that may be relevant or helpful.
52+
- type: markdown
53+
attributes:
54+
value: |
55+
By submitting this bug report, I agree to follow the [code of conduct](https://cloud2sql.com/code-of-conduct).

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Discord
4+
url: https://discord.gg/someengineering
5+
about: Chat with other users and the development team
6+
- name: 📄 Documentation
7+
url: https://cloud2sql.com/docs
8+
about: Read and search documentation
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: ✨ Feature Request
2+
description: Suggest an idea
3+
labels: ['enhancement']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this feature request!
9+
- type: textarea
10+
id: motivation
11+
attributes:
12+
label: Motivation
13+
description: Please provide a clear and concise description of the rationale behind this request.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: desired-behavior
18+
attributes:
19+
label: Desired Behavior
20+
description: Provide a clear and concise description of what you want to happen.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: additional-context
25+
attributes:
26+
label: Additional Context
27+
description: Provide any additional information or screenshots that may be relevant or helpful.
28+
- type: markdown
29+
attributes:
30+
value: |
31+
By submitting this feature request, I agree to follow the [code of conduct](https://cloud2sql.com/code-of-conduct).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Description
2+
3+
<!-- Please describe the changes included in this PR here. -->
4+
5+
# To-Dos
6+
7+
<!-- Before submitting this PR, please lint and test your changes locally. -->
8+
<!-- Add an 'x' between the brackets to mark each checkbox as checked. -->
9+
<!-- (Feel free to remove any items that do not apply to this PR.) -->
10+
11+
- [ ] Add test coverage for new or updated functionality
12+
- [ ] Lint and test with `tox`
13+
- [ ] Document new or updated functionality (someengineering/cloud2sql.com#XXXX)
14+
15+
# Issues Fixed
16+
17+
<!-- If this PR will fix/resolve an open issue on the repository, please reference it below. -->
18+
<!-- (Otherwise, feel free to delete this section.) -->
19+
20+
- Fixes #XXXX
21+
22+
# Code of Conduct
23+
24+
By submitting this pull request, I agree to follow the [code of conduct](https://cloud2sql.com/code-of-conduct).

.github/holopin.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
organization: someengineering
2+
defaultSticker: cle9bxdma159008l6g0nj6aut
3+
stickers:
4+
- id: cle9bxdma159008l6g0nj6aut
5+
alias: contributor-badge
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Check PR resoto-datalink
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*'
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
workflow_dispatch:
12+
13+
jobs:
14+
resoto-datalink:
15+
name: 'resoto-datalink'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Setup Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.9'
25+
architecture: 'x64'
26+
27+
- name: Restore dependency cache
28+
uses: actions/cache@v3
29+
with:
30+
path: ~/.cache/pip
31+
key: ${{runner.os}}-pip-${{hashFiles('**/requirements*.txt')}}
32+
restore-keys: |
33+
${{runner.os}}-pip-
34+
35+
- name: Install Dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install -r requirements-all.txt
39+
40+
- name: Run tests
41+
run: tox
42+
43+
- name: Build a binary wheel and a source tarball
44+
run: >-
45+
python -m build --sdist --wheel --outdir dist/
46+
47+
- name: Publish distribution to PyPI
48+
if: github.ref_type == 'tag'
49+
continue-on-error: true # Ignore failure to publish to PyPI (e.g., when re-tagging a release)
50+
uses: pypa/gh-action-pypi-publish@release/v1
51+
with:
52+
user: __token__
53+
password: ${{ secrets.PYPI_RESOTO_DATALINK }}
54+
packages_dir: ./dist/

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,4 @@ cython_debug/
157157
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
#.idea/
160+
.idea/

Makefile

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
PHONY: clean clean-test clean-pyc clean-build clean-env docs help setup test test-all coverage list-outdated install-latest setup
2+
.DEFAULT_GOAL := help
3+
.SILENT: clean clean-build clean-pyc clean-test setup
4+
5+
define BROWSER_PYSCRIPT
6+
import os, webbrowser, sys
7+
8+
from urllib.request import pathname2url
9+
10+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
11+
endef
12+
export BROWSER_PYSCRIPT
13+
14+
define PRINT_HELP_PYSCRIPT
15+
import re, sys
16+
17+
for line in sys.stdin:
18+
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
19+
if match:
20+
target, help = match.groups()
21+
print("%-20s %s" % (target, help))
22+
endef
23+
export PRINT_HELP_PYSCRIPT
24+
25+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
26+
27+
help:
28+
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
29+
30+
clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts
31+
32+
clean-build: ## remove build artifacts
33+
rm -fr build/
34+
rm -fr out/
35+
rm -fr gen/
36+
rm -fr dist/
37+
rm -fr .eggs/
38+
rm -fr .hypothesis/
39+
rm -fr .mypy_cache/
40+
find . -name '*.egg-info' -exec rm -fr {} +
41+
find . -name '*.egg' -exec rm -fr {} +
42+
43+
clean-pyc: ## remove Python file artifacts
44+
find . -name '*.pyc' -exec rm -f {} +
45+
find . -name '*.pyo' -exec rm -f {} +
46+
find . -name '*~' -exec rm -f {} +
47+
find . -name '__pycache__' -exec rm -fr {} +
48+
49+
clean-test: ## remove test and coverage artifacts
50+
rm -fr .tox/
51+
rm -f .coverage
52+
rm -fr htmlcov/
53+
rm -fr .pytest_cache
54+
55+
clean-env: ## remove environment
56+
rm -fr venv-pypy
57+
58+
lint: ## static code analysis
59+
black --line-length 120 --check resoto_datalink tests
60+
flake8 resoto_datalink
61+
mypy --python-version 3.9 --strict --install-types --non-interactive resoto_datalink tests
62+
63+
test: ## run tests quickly with the default Python
64+
pytest
65+
66+
test-all: ## run tests on every Python version with tox
67+
tox
68+
69+
coverage: ## check code coverage quickly with the default Python
70+
coverage run --source resotolib -m pytest
71+
coverage combine
72+
coverage report -m
73+
coverage html
74+
$(BROWSER) htmlcov/index.html
75+
76+
setup:
77+
python3 -m venv venv --prompt "resoto-datalink venv"
78+
./venv/bin/python3 -m pip install --upgrade pip tox
79+
./venv/bin/pip3 install -r requirements-all.txt
80+
./venv/bin/pip3 install ".[dev,test]"
81+
echo "\n\n\nUse the following command to activate the venv"
82+
echo "source venv/bin/activate"
83+
84+
requirements:
85+
pip-compile -q --no-annotate --resolver=backtracking --upgrade --allow-unsafe --no-header -o requirements.txt
86+
pip-compile -q --all-extras --no-annotate --resolver=backtracking --upgrade --allow-unsafe --no-header -o requirements-all.txt
87+
88+
list-outdated:
89+
pip list --outdated
90+
91+
install-latest:
92+
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# resoto-datalink
22
Data Pipelines for Resoto infrastructure data
3+
4+

0 commit comments

Comments
 (0)