Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

POPO

Define everything using POPOs (Plain Old Python Object), then you can easily use it from SQLAlchemy ORM, Protobuf3, and so on.

Wanted Goals

  • Python 3
  • $ popo input.py
    • -> input.sqla.py
    • -> input.proto
  • POPO input files just work as normal python file
  • Pipeline:
    • Read Input
    • Convert to Own DataTypes
    • Target Factories
    • Outputs

Wanted Types

Wanted Targets

Wanted Features

  • Versioning
    • SQLAlchemy will cover this by alembic
    • Protobuf need to consider this
      • read olders and managing the
  • Targets Factory and Configurable Targets? (custom type converter?)
  • Prefix/Postfix naming
  • ...

Resolved Question

  • PEP 484 - Type Hints?
    • Nope, it's not for class defining.
  • How to get parse tree of python?
    • ast: "designed to generate an abstract syntax tree and ignores all comments and formatting"
    • parser: "internal code parser, which is optimized to generate byte code and too low level"
    • lib2to3: "high level and contains all formatting, but that doesn’t mean it’s easy to use"
      • Why don't you just make 2to3 fixer for converting those?
        • I don't think 2to3 is not for it.
      • how to get the parse tree form lib2to3?
        • lib2to3.pgen2, but it's for python2 (maybe)
          • oops, our target is python3
    • yo yo yo yo yo!!! We don't need to parse! We just used class.
      • So Class.dict() and instanceof() will cover all.
        • really? dive it now!
          • import popo-input
            • I want cli, but how to import /path/popo-input.py?
              • just use popo-input and see you next time.
              • I found modulefinder, is it related?
          • dir(popo-input)
            • ignore __.*__
          • .__dict__
            • ignore __.*__
          • .

Unresolved Questions

  • Is really needed? helpful?
  • How to ...
    • save datetime @ protobuf?
      • maybe timestamp and timezone.
    • manage the build?
    • name exported output?
    • limit the type of contents?
    • limit the size of string with this?
      • using comment? (noooooooooo..)
      • using
    • manage the metadata of input/output source code?
      • why need it?
        • ...
  • Where is the gap for adding versioning process.
  • No Private / Forgien Key?!
  • Nested Class!
  • Alphabetical Order Class Contents?!!!
  • How to save the order of input, and keep it as output?!!!!!!!!!! <- currently biggest mission blocker (lib2to3 needed?)

TODO

  • .gitignore

Milestone

  1. Set the clear blueprint for v0.0.0 (due: 151115)
    • minimum wanted-types:
      • integer
      • string
      • ?
    • 2 targets
      • sqlalchemy
      • protobuf
    • 1 feature
      • target factory
    • Goal: directory design
    • Goal: pipeline design
  2. ...

About

plain old python object

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages