Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support include yaml #51

Merged
merged 10 commits into from
Apr 26, 2022
Merged

support include yaml #51

merged 10 commits into from
Apr 26, 2022

Conversation

mmsqe
Copy link
Collaborator

@mmsqe mmsqe commented Apr 25, 2022

No description provided.

mmsqe added 2 commits April 25, 2022 10:35
pystarport serve --data=./data --config=cronos_has_dotenv.yaml --dotenv=overwrite.env
@mmsqe mmsqe changed the title merge env field instead of replace whole dotenv allow dotenv from param overwrite yaml config one Apr 25, 2022
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Apr 25, 2022

This pull request introduces 3 alerts when merging 3c85574 into 4d8e677 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 1 for Comparison using is when operands support `__eq__`

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Apr 25, 2022

This pull request introduces 3 alerts when merging 92a434c into 4d8e677 - view on LGTM.com

new alerts:

  • 2 for Unused import
  • 1 for Comparison using is when operands support `__eq__`

pystarport/expansion.py Outdated Show resolved Hide resolved
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Apr 25, 2022

This pull request introduces 1 alert when merging 2bfcf6d into 4d8e677 - view on LGTM.com

new alerts:

  • 1 for Comparison using is when operands support `__eq__`

@mmsqe mmsqe changed the title allow dotenv from param overwrite yaml config one support include yaml Apr 26, 2022
pyproject.toml Outdated
@@ -22,6 +22,8 @@ docker = "^4.3.1"
bech32 = "^1.1.0"
multitail2 = "^1.5.2"
python-dotenv = "^0.19.2"
pyyaml-include = "^1.3"
mergedeep = {git = "https://github.com/mmsqe/mergedeep.git", rev = "nested-merge"}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already used a jsonmerge, what's the difference with this one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just more strategies, but can use without nested merge


include = config.pop("include", {})
if include:
config = merge(include, config, strategy=Strategy.ADDITIVE)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ADDITIVE sounds non-intuitive, I think people will expect REPLACE.

Copy link
Collaborator

@yihuang yihuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we can deprecate the dotenv feature now with this? seems not, right?

@mmsqe
Copy link
Collaborator Author

mmsqe commented Apr 26, 2022

Can we can deprecate the dotenv feature now with this? seems not, right?

no change in dotenv func, but why deprecate it, no harms to keep?

@yihuang yihuang merged commit 005cc5c into crypto-com:main Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants