Skip to content

Check that datamap matches 3D format#10

Merged
vrjuliao merged 12 commits intomasterfrom
check3D
Mar 11, 2021
Merged

Check that datamap matches 3D format#10
vrjuliao merged 12 commits intomasterfrom
check3D

Conversation

@Yowgf
Copy link
Copy Markdown
Contributor

@Yowgf Yowgf commented Feb 16, 2021

As of now, to generate the YAML file, the datamap of a Hapi program has to consist of exactly ("Actors", "Actions", "Resources"), in this order.

This update obligates the user not to generate ill-formed YAML files, by throwing an exception in that case.

And that these entries match, in order, ("Actors", "Actions", "Resources")
@Yowgf Yowgf requested a review from vrjuliao February 16, 2021 16:24
@vrjuliao
Copy link
Copy Markdown
Contributor

vrjuliao commented Feb 23, 2021

Could you write a unit test to show a case where Check3D throws an exception?
I guess the class name would be better if it was more expressive. Maybe NestingOrderChecker or any name that denotes shortly the objective of that class.

@Yowgf
Copy link
Copy Markdown
Contributor Author

Yowgf commented Mar 2, 2021

I was just thinking, maybe I should move the procedure "yamlFromFile" that I put in "Helpers.kt" to the package "utils", so that we can use it in the YAML.kt main function as well?

By doing this, we could avoid code duplication. What do you think, @vrjuliao ?

@vrjuliao
Copy link
Copy Markdown
Contributor

Hi @Yowgf! it is a nice thing to think.
We can discuss about code redundancy and create a new PR to solve that problem? Maybe we can fix another duplicated code on the same PR.

@vrjuliao vrjuliao merged commit 1a74dcc into master Mar 11, 2021
@vrjuliao vrjuliao deleted the check3D branch March 11, 2021 20:23
vrjuliao added a commit that referenced this pull request May 12, 2021
* Code styling

Specially usage of lower camelCase, for some functions, and then also moving stuff in main to a proper function in the class MatrixPrinter.

* Refactoring and doc

Some unused imports were removed, some things renamed, and so on.

* Documentation

* Ignore IntelliJ IDEA config folder

* Error messages (#8)

* init issue of error messages manipulation

* error(messages): showing runtime error messages with the file coordinates

* error(messages): DONE, but lacking unit tests

* fix(error messages): DONE

* fix(error messages): removing log files

* fix(test): Unit tests description

* fix(test): Unit tests function names

* Fixing first line of printed YAML (#9)

* Move to ./hapi folder (#11)

These should be separated from the tests of other modules. Soon we plan to add the ./tasks folders, for unit tests that concern the "tasks"

* Check that datamap matches 3D format (#10)

* Checks if given datamap has 3 entries

And that these entries match, in order, ("Actors", "Actions", "Resources")

* Added check3D

* Fixed names of classes

* Renamed Check3D class

* Moved check to inside the class

* Added help to YAML testing

* Fixtures to facilitate YAML tests

* YAMLGenerator tests

* Just change a comment

* Delete the temp. result form yaml task

* Fixing bug of generating HTML

The HTML was only being generated if the actions were 'Reads', 'Updates', 'Deletes', which is obviously something not wanted.

Also, added the DataMapOrderChecker checks.

* Access matrix only displays atoms

Co-authored-by: Yowgf <alexthomasmol@gmail.com>
Co-authored-by: Yowgf <48073242+Yowgf@users.noreply.github.com>
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