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
var interupt = make(chan os.Signal) | |
var terminate = make(chan os.Signal) | |
signal.Notify(interupt, syscall.SIGINT) | |
signal.Notify(terminate, syscall.SIGTERM) | |
select { | |
case <-interupt: | |
// TODO: LOG AND SHUTDOWN | |
os.Exit(0) | |
break | |
case <-terminate: |
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
import os | |
from functools import partial | |
from typing import Any, Callable, Dict, Tuple | |
# Type Aliases | |
LogMap = Dict[str, str] | |
# Constant values | |
DEFAULTS: Dict[str, Any] = { | |
"ALERT_THRESHOLD": 2, |
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
""" | |
Defines concrete types of Person. | |
""" | |
from typing import ClassVar, List, Optional | |
from person import TPerson, Person # Update this to reflect whatever directory structure. | |
class Friend(Person): | |
""" |
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
# FILE LOCATION: <project_root>/tests/conftest.py | |
""" | |
Include common fixtures used by test cases. | |
""" | |
import pytest | |
@pytest.fixture(scope="module") | |
def example() -> str: | |
""" |
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
# FILE LOCATION: <project_root>/docs/Makefile | |
# Minimal makefile for Sphinx documentation | |
# | |
# You can set these variables from the command line. | |
SPHINXOPTS = | |
SPHINXBUILD = sphinx-build | |
SOURCEDIR = source | |
BUILDDIR = build |
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
""" | |
Setup info used by pip. | |
""" | |
from setuptools import setup, find_packages | |
setup( | |
name="my_project", | |
url="https://github.com/kcarretto/my_project_repo", | |
author="Kyle Carretto", | |
author_email="[email protected]", |