Skip to content

Commit

Permalink
Update barebone project (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
1755 authored Feb 2, 2022
1 parent 19e0f3b commit 881f865
Show file tree
Hide file tree
Showing 26 changed files with 2,006 additions and 1 deletion.
112 changes: 112 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
[MASTER]

ignore=migrations,tests
load-plugins=pylint_quotes
persistent=yes
extension-pkg-whitelist=ujson,pydantic


[MESSAGES CONTROL]

disable=
abstract-method,
invalid-name,
locally-disabled,
missing-docstring,
duplicate-code,
c-extension-no-member,
fixme,
raise-missing-from,
unsubscriptable-object,
too-few-public-methods


[REPORTS]

output-format=colorized
reports=no
score=yes


[REFACTORING]

max-nested-blocks=5


[MISCELLANEOUS]

notes=FIXME,XXX,TODO


[VARIABLES]

# Tells whether we should check for unused import in __init__ files.
init-import=no


[FORMAT]

max-line-length=120
max-module-lines=1000


[CLASSES]

defining-attr-methods=__init__,__new__

# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls

# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs


[IMPORTS]

# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no


[DESIGN]

# Maximum number of arguments for function / method
max-args=8

# Maximum number of attributes for a class (see R0902).
max-attributes=12

# Maximum number of boolean expressions in a if statement
max-bool-expr=8

# Maximum number of branch for function / method body
max-branches=12

# Maximum number of locals for function / method body
max-locals=15

# Maximum number of parents for a class (see R0901).
max-parents=24

# Maximum number of public methods for a class (see R0904).
max-public-methods=20

# Maximum number of return / yield for function / method body
max-returns=6

# Maximum number of statements in function / method body
max-statements=50

# Minimum number of public methods for a class (see R0903).
min-public-methods=1


[EXCEPTIONS]

overgeneral-exceptions=Exception


[QUOTES]

string-quote=single-avoid-escape
triple-quote=single
docstring-quote=double
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
# workshop2022
# workshop2022

This repository contains a demo application for a definition 2022 workshop.

It implements simple API for a twitter-like application by using web3 approaches.


## How to Run

1. Install `poetry`: https://python-poetry.org/docs/
2. Install dependencies by using `$ poetry install`
3. Run background service: `$ workshop2022 run-background`
4. Run API service: `$ workshop2022 run-api`
26 changes: 26 additions & 0 deletions dump.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CREATE TABLE address_portfolio (
address text PRIMARY KEY,
assets_value real,
deposited_value real,
borrowed_value real,
locked_value real,
staked_value real,
total_value real,
updated_at timestamp without time zone DEFAULT now() NOT NULL
);


CREATE TABLE params (
name text PRIMARY KEY,
value text NOT NULL,
updated_at timestamp without time zone DEFAULT now() NOT NULL
);


CREATE TABLE status (
id SEQUENCE PRIMARY KEY,
author_address text NOT NULL,
text text NOT NULL,
block_number integer NOT NULL
);

Loading

0 comments on commit 881f865

Please sign in to comment.