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

Context enum #234

Merged
merged 2 commits into from
Aug 1, 2022
Merged

Context enum #234

merged 2 commits into from
Aug 1, 2022

Conversation

icepuma
Copy link
Member

@icepuma icepuma commented Jul 30, 2022

I'm submitting a

  • bug fix
  • feature
  • documentation addition

What is the current behaviour?

We use the Value struct from serde_yaml which is tied to their crate.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

nothing to say

What is the expected behavior?

We want to have an own implementation of a Value class which does not depend on any external crate.

What is the motivation / use case for changing the behavior?

Be more independent from outside development

Please tell us about your environment:

nothing to say

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2022

Codecov Report

Merging #234 (c4e6de0) into main (9221683) will increase coverage by 1.62%.
The diff coverage is 65.49%.

@@            Coverage Diff             @@
##             main     #234      +/-   ##
==========================================
+ Coverage   44.64%   46.26%   +1.62%     
==========================================
  Files          70       71       +1     
  Lines        2249     2475     +226     
==========================================
+ Hits         1004     1145     +141     
- Misses       1245     1330      +85     
Impacted Files Coverage Δ
lib/src/actions/binary/github.rs 0.00% <0.00%> (ø)
lib/src/contexts/variable_include/mod.rs 36.84% <0.00%> (ø)
lib/src/values/mod.rs 63.42% <63.42%> (ø)
lib/src/contexts/user.rs 88.23% <66.66%> (-11.77%) ⬇️
lib/src/contexts/mod.rs 73.75% <80.00%> (-3.89%) ⬇️
lib/src/contexts/env.rs 100.00% <100.00%> (ø)
lib/src/contexts/os.rs 96.96% <100.00%> (+0.19%) ⬆️
lib/src/contexts/variables.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9221683...c4e6de0. Read the comment docs.

- supports:
  - Null
  - String
  - Number
    - Unsigned (u64)
    - Signed (i64)
    - Float (f64)
  - List of Values

- A lot of the ideas come from https://github.com/dtolnay/serde-yaml/tree/master/src
- There is a lot to do till we support more value types and more From
  implementations for different numbers, but it's good enough for now.
@icepuma icepuma marked this pull request as ready for review July 30, 2022 13:42
@icepuma icepuma requested review from a team, rawkode and martintc and removed request for a team July 30, 2022 13:42
@icepuma
Copy link
Member Author

icepuma commented Aug 1, 2022

@rawkode anything to add or can I merge?

Copy link
Member

@rawkode rawkode left a comment

Choose a reason for hiding this comment

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

The Value type should probably support Map/Object types as well as lists , but I’m happy for that to come as needed.

@icepuma
Copy link
Member Author

icepuma commented Aug 1, 2022

That's what I intended. Bool is also a thing which we might need in the future 👍

@icepuma icepuma merged commit 1a4369f into comtrya:main Aug 1, 2022
@icepuma icepuma deleted the context_enum branch August 1, 2022 21:12
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.

None yet

4 participants