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 validation_packages_yml (continued) #409

Merged
merged 12 commits into from
Jul 16, 2024
Merged

Conversation

kMutagene
Copy link
Member

@kMutagene kMutagene commented Jul 9, 2024

This PR continues #403 :

  • Adds top-level convenience APIs
  • tests
    • type model
    • read/write yaml
    • contracts
    • API

@kMutagene kMutagene linked an issue Jul 9, 2024 that may be closed by this pull request
@kMutagene kMutagene changed the title support validation_packages_yml (continued) support validation_packages_yml (continued) Jul 9, 2024
@kMutagene
Copy link
Member Author

@Freymaurer finally done adding all those tests 🥇

@kMutagene kMutagene marked this pull request as ready for review July 15, 2024 11:14
Copy link
Collaborator

@Freymaurer Freymaurer left a comment

Choose a reason for hiding this comment

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

Awesome tests ✅ Requested some minor changes!

src/ARCtrl/ARC.fs Show resolved Hide resolved
src/ARCtrl/ARC.fs Show resolved Hide resolved
@@ -22,6 +22,15 @@ type ValidationPackage(name, ?version) =
member this.Copy() =
ValidationPackage.make this.Name this.Version

/// Pretty printer
override this.ToString() =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe do not use yaml style for pretty printing, or use YAMLicious to generate this. But i would prefer typical f# printing syntax

Copy link
Member Author

Choose a reason for hiding this comment

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

If this is just taste, i would prefer keeping it as many tests would need to be adapted

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, i think the to string is valuable here because it represents something that only ever exists as a yaml file in the arc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is just that the ToString function should not be responsible for YAML formatting, this should be a different function.

Copy link
Member Author

Choose a reason for hiding this comment

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

it is not. it is just for printing. formatting for actual yaml export is done with yamlicious.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then why do we have tests for this? 😮

Copy link
Member Author

Choose a reason for hiding this comment

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

i just tested everything that i added

| :? ValidationPackagesConfig as other_vpc -> other_vpc.ValidationPackages = this.ValidationPackages && other_vpc.ARCSpecification = this.ARCSpecification

/// Pretty printer
override this.ToString() =
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as ValidationPackage.ToString()

src/Yaml/ValidationPackagesConfig.fs Outdated Show resolved Hide resolved
@Freymaurer Freymaurer merged commit 71a780f into main Jul 16, 2024
2 checks passed
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.

[Feature Request] Support validation_packages.yml
2 participants