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

[New Exercise]: Meet Up #260

Merged
merged 2 commits into from
Sep 2, 2023
Merged

Conversation

glaxxie
Copy link
Contributor

@glaxxie glaxxie commented Aug 28, 2023

Since this exercise use quite a number of test cases (95 based on pester) with only some minor differences, I streamlined them into groups and using array of testcases. The test names, particular the month is less descriptive, it will be number instead of word, e.g 5 instead of May. I tried a couple ways to expand variable and conversion to have more dynamic month name but got no luck with it. I also have a backup classic style of tests if you prefer that one.

@meatball133
Copy link
Member

meatball133 commented Sep 1, 2023

Well at some point a generator can be constructed, which allows for tests to be automatically generated based often on a template. The 3 other tracks I "maintain" have one, but I haven't got my way to this track and I am still working on templating all exercises on one track.

Until then, I think this structure is okay, one comment is:

Instead of:

"The first Monday of 5 in 1989"

We could do:

"The first Monday of month 5 in 1989"

which would have the template:

"The <schedule> <weekday> of month <month> in <year>"

@glaxxie
Copy link
Contributor Author

glaxxie commented Sep 1, 2023

Alright, I made the change for this.

Regarding a generator point, I did write a script to generates files and add some basic contents to them after you sync the exercise and get the exercise folder.
https://github.com/glaxxie/toolkit/blob/main/Powershell-Files-Generator.ps1
This script :
-add author name (default me atm, because im lazy to type it out every time lol) to config in .meta folder
-generate : solution file, example file, test file in respective folders
-it add basic content to solution file : function name, docstring for function, etc
-it parse the toml file and add in test cases based on the names to the test file. This save some time however i still go over and try to group them into different context to make it cleaner and easier to read. Or even change the style to mass test cases like this exercise when it make sense to do so.

@meatball133
Copy link
Member

Yeah that can be handy, the "generators" I am referring to are tools that take the problem spec tests json files and make the test files. It mostly aims at if the test files have to be updated so can only the script be run again and they will be up to date. And this tool is often apart of the track itself

But your tools seem quite handy anyway.

@meatball133 meatball133 merged commit 1ed4256 into exercism:main Sep 2, 2023
@glaxxie glaxxie deleted the pwrshll_meetup branch December 7, 2023 18:17
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