Git Product home page Git Product logo

fig's People

Contributors

jensenak avatar

Watchers

 avatar  avatar

fig's Issues

Proper test organization

You know... tests should be in a separate directory, instead of bundled with the prototype code.

Resolve references within a value of the hierarchy

A value in the hierarchy may refer to another value elsewhere. There are two ways this might be done:

  • The value itself is just a pointer to another value
  • The value is itself a value, but contains a reference to another value that must be interpolated with the remainder

The second bullet point is out of scope here. For the prototype, we're only denoting a value as a type of "pointer" to another value. Interpolation comes later.

For example:

/dev/app/web/db_password = "#REF:/dev/db/db_password"
# The value above resolves to the content of 
/dev/db/db_password = "thepassword"

Value resolution must happen at the time the value is requested, not when the reference is written. The actual markup that denotes a reference doesn't have to be "#REF:". That detail is left to the implementation.

Finalize interfaces

Between prototype and MVP phases, the primary features and functionality should be fairly locked down. Interfaces for main classes and methods should be locked down and documented.

CLI commands

Build a CLI mode with the following features:

  • All commands are passed as an argument to [script-name]
  • Commands supported for MVP:
    • Create a new value [ set ]
    • Read a single value [ get ]
    • Read all values at given branch [ export ]
    • Update value [ set, with "overwrite" prompt ]
    • Delete single value [ delete ]
    • Delete branch and all contained values [ delete, with "whole branch" prompt ]
    • "-f" flag to skip prompts
    • "-n" flag to disable recursion (single level exports)
    • "-v" flag to increase log level
    • "-o" flag to change output filename [ default .env ]

Add performance tests

Right now, all testing is focused on acceptable features and functionality. Performance will be a major concern for larger trees. Perf tests should help identify poorly designed functions with O(n^2) or worse performance.

Functions for listing and getting multiple values omit inherited keys

Prototype was built backwards, with recursive functionality retrieving values for more specific keys, rather than getting all values inherited at a given level of specificity.

Also, recursive should be default, with an option to only retrieve keys actually set at the given level.

Consistent naming

Prototype phase in particular generated a wide variety of variable names and function names. Now is a good time to refactor this application to use more consistent variable naming inside functions and methods. This makes it easier for maintainers down the line.

Given a path produce a list of values from a config hierarchy

For the sake of discussion, a hierarchy looks like a filesystem. Tiers are delimited with a slash "/", and more tiers in a path represent a more "specific" value. For example:

/ # This is a root
/name = "bob" # A global value (at the root) with the key "name" is set to "bob"
/dev/name = "alice" # The "name" in the "dev" space is set to "alice"

# If the user requests the value
/qa/name
# "bob" is returned, because it is the most specific value that has been set for /qa/name
/dev/name 
# returns "alice", however, since the more specific value overwrites the less specific one.

In implementation, the hierarchy may not necessarily involve "/" delimiters. This is only a feature of the presentation.

Essentially this hierarchy behaves like a dictionary. Each key may contain either a fixed value, or may contain a tier of the hierarchy (like a dict in a dict).

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.