Giter Club home page Giter Club logo

chain-smoker's Introduction

Hi there ๐Ÿ‘‹

My name is Philipp. I have a B. Sc. in Mathematics and am a big software engineering entusiast that loves to explore numerical and statistical methods to solve problems.

  • ๐Ÿง™โ€โ™‚๏ธ Over the past years I've been cooking several things
  • ๐ŸŒฑ Iโ€™m currently learning techniques of Game Development ๐Ÿ‘พ, Machine Learning ๐Ÿค–, Computer Vision ๐ŸŒŽ, Reinforced Deep-Q-Learning ๐Ÿค and solving differential equations ๐Ÿ“ˆ.
  • โœ๏ธ You can contact me via Mail or other social channels listed in my profile

Check out my contributions on other platforms, like HuggingFace ๐Ÿค—

https://philipp-zettl-my-heatmap.static.hf.space


  • ๐Ÿ‘จโ€๐Ÿซ Early 2022 I wrote my Thesis with the topic: "Machine Learning Methods for Localiazation and Classification of Insects in Images" and plan to build a more advanced guideline for object detection / image classification tasks.
  • ๐Ÿง‘โ€๐Ÿซ In summer 2023 I taught an introductory class to Machine Learning at Berliner Hochschule fรผr Technik (BHT)

chain-smoker's People

Contributors

dependabot[bot] avatar philsupertramp avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

chain-smoker's Issues

Add monitoring solution

There're several options how to do that

  • django app
  • python app with celery or other task scheduler
  • cron tasks in dedicated docker containers
  • implement github action

At the end we should decide which way to go, commit to it, build the monitoring solution and release this tool.

Add test suite generator

Utilize go-reverse-proxy

  • proxy incoming request to provided host
  • log request-response pairs as JSON to stdout

Build parser:

  • listens to stdin
  • build unique tests from incoming JSON of form
{"Request": {"Payload": "", "Protocol": "HTTP/1.1", "Path": "https://postman-echo.com/get/", "Method": "GET", "Headers": {"Accept": ["application/json"], "User-Agent": ["curl/7.82.0"], "X-Forwarded-For": ["127.0.0.1"]}}, "Response": {"Status_code": 200, "Body": "{\"args\":{},\"headers\":{\"x-forwarded-proto\":\"https\",\"x-forwarded-port\":\"443\",\"host\":\"postman-echo.com\",\"x-amzn-trace-id\":\"Root=1-636b9eb1-32e9a8e376d08f1854179afc\",\"user-agent\":\"curl/7.82.0\",\"accept\":\"application/json\",\"accept-encoding\":\"gzip\"},\"url\":\"https://postman-echo.com/get/\"}", "Headers": {"Content-Length": ["281"], "Content-Type": ["application/json; charset=utf-8"], "Date": ["Wed, 09 Nov 2022 12:36:01 GMT"], "Etag": ["W/\"119-oeZf0KoFbxz7XopTDTpm9GdAPOo\""], "Set-Cookie": ["sails.sid=s%3AD8J_rCEAoSONQwJGoQO31FC9isYn6uER.zcaeLNzYKBupkRBVpv2BJkU6m0esCe7bOcq8bjqFS00; Path=/; HttpOnly"], "Vary": ["Accept-Encoding"]}}}
  • store tests in directory for usage by chain-smoker

Implement on/off mechanic:

  • either parser.py or proxy.go need a mechanic how it can be de-/activated

New infrastructure diagram

(dashed lines: traffic flow; regular lines: internal flow)

graph LR;
    dev -- release --> proxy[Proxy];
    traffic -.-> proxy;
    proxy -. req .-> prod[Application];
    prod -. res .-> proxy;
    proxy -- build tests --> parser[Parser];
    prod -- run tests --> test[chain-smoker];
    test -- run tests --> prod;
    parser -- fills --> test_dir[Test directory];
    test -- uses --> test_dir;

Write documentation

By now the tool is already pretty complex.
To allow any kind of user to setup a test suite using chain-smoker, the user facing API, the test configuration, needs to be documented thoroughly.

We should first try to generate them out of the pydantic models. If this doesn't work out, it needs to be done manually!

A coffee, a glass of wine or whatever floats your boat is all you need to go through this pain, once. After the initial docs, we just need to append changes, not start from ground up.

If it ain't me doin it, I'll pay you a coffee from the most expensive specialty coffee place in your city!

Add additional client kwargs

Would be cool to be able to add default values for parameters of ApiClient request methods.
The idea would be to write configuration, e.g.

client:
  base_url: example.com
  kwargs:
    timeout: 15
    stream: false

Options documented in https://requests.readthedocs.io/en/latest/api/#requests.request

Then pass it into the method every time we execute a request

rsp = getattr(session, method)(self._build_url(path), **kwargs)

by enhancing the passed kwargs

**{**self.default_kwargs, **kwargs}

or

final_kwargs = self.default_kwargs.copy()
final_kwargs.update(kwargs)
**final_kwargs

Add cookies

We need support for

  • payload cookies
  • expected response cookies

Example:
Supposedly endpoint /step-6-of-10 requires two cookies, a key cookie and a sessionId cookie and responds with a progress cookie, then a test for this might look like this:

example_test:
  endpoint: /step-6-of-10
  method: get
  payload_cookies:
    - domain: example.com
      max_age: 2022-02-02T10:00:00+01:00:00
      name: key
      value: value
    - domain: example.com
      max_age: 2022-02-02T10:00:00+01:05:00
      key: sessionId
      value: 420
  response_cookies:
    - domain: example.com
      max_age: Session
      name: progress
      value: 60

Wrap YAML options into dataclasses

To generate documentation, for the options available in YAML config files, out of code and to simplify parsing it we can wrap the configuration options into a data structure of nested Python dataclass objects.

Example:

@dataclass
class Config:
    type: str
    ...

History

Would be great to have some service that collects data.
Optionally, we should publish those results as artifacts in the action

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.