Giter Site home page Giter Site logo

configenv.jl's People

Contributors

arkoniak avatar teo-shaowei avatar vmari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

configenv.jl's Issues

Remove trailing spaces

It looks unreasonable to keep trailing spaces in variable value, taking into account the fact that we remove extra spaces on the left.

So, for variables like this:

foo = abc 

foo should be equal to abc, not abc . If someone requires this extra space, then he should use quotes:

foo = "abc "

template variables

Make possible to use template variables

#.env
FOO=ABC
BAR=ZXC${FOO}

Second should be resolved at the read time to BAR=ZXCABC

It should check for cycling dependencies and left them unresolved.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Refactor parse function

Current implementation of parse/dotenv is suboptimal. It returns Dict, but it should return EnvProxyDict. Also parse accepts String and IO, but dotenv not.

It should be all brought to a common denominator:

  • parse should return EnvProxyDict
  • dotenv should accept all possible inputs.

`dotenvx` as an nonoverwriting alias

Since it looks like other languages provide non overwriting version of dotenv function it make sense to have something like that without resorting to constantly use overwrite=false argument.

Proposal:

dotenv() # default is to load with overwrite
dotenvx() # default is to load without overwrite

Documentation of the new features

In docs:

Add documentation

  1. Motivation of dotenvx
  2. Intended usage of merge features.
  3. Variables interpolation
  4. use cases for isresolved and unresolved_keys
  5. IO data load from the web

Remove documentation

  1. parse function. It is part of internal implementation and should not be visible/recommended to use. May be add its description later as a part of contribution guide.

In README.md:

  1. Remove parse function description.

Merge function for EnvProxyDict

Proxy dictionaries should have the ability to merge together. I think, * sign is the best operation, since order matters

cfg1 = dotenv(".env1")
cfg2 = dotenv(".env2")
cfg = cfg1 * cfg2

Or even

cfg = maprrduce(dotenv, *, [".env1", ".env2"])

It can be also part of dotenv function

cfg = dotenv(".env1", ".env2")
cfg = dotenv([".env1", "env2"])

Second version can be supported through the multiple dispatch on Vector, and first one through splatting.

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.