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

create_exercise: Remove logic that adds version parameter and Generate exercises on a per test-case basis #269

Open
4 tasks
Stargator opened this issue Nov 27, 2020 · 7 comments

Comments

@Stargator
Copy link
Contributor

With problem-specifications removal of the version property from canonical-data.json and the reorganization of problem-specifications, our exercise generator is out of date.

Read the reorg link for details, but basically when we generate exercises from problem-specifications we need to use the .meta/tests.toml files created in #262 for each exercise. The tests.toml files will tell create_exercise which test cases to generate. And that is a big change.

So the create_exercise will need to be updated to do the following:

  • Determine if the exercise already exists by checking whether the exercise folder exists and contains a .meta/tests.toml file.
  • If the exercise does already exist, then create_exercise will only check to see if the .meta/tests.toml is still up to date. You may use the new canonical_data_syncer tool (via /bin/fetch-canonical_data_syncer) to do this check. Just need to verify that it fails properly.
  • If the exercise is missing the .meta/tests.toml file, then throw an error describing that the toml file is missing.
  • If the exercise does not exist or , then create the exercise as normal, but only the test cases defined in the .meta/tests.toml file.
@Zureka
Copy link
Contributor

Zureka commented Oct 4, 2021

@Stargator I know it has been a year since this issue was created, but is it still relevant? I'm looking to make some Hacktoberfest contributions this year that are more than exercise updates and this seems like this seem like it would be helpful.

@Stargator
Copy link
Contributor Author

@Zureka Yes, this is still needed.

@Stargator
Copy link
Contributor Author

@Zureka Let me know if you're going to work on this.

@Stargator
Copy link
Contributor Author

Related to and I think supersedes #183

@Zureka
Copy link
Contributor

Zureka commented Oct 18, 2021

@Stargator Yep, I plan to spend some time on this. I've been a bit busy this past week so I apologize for not looking at it sooner.

@Zureka
Copy link
Contributor

Zureka commented Oct 21, 2021

@Stargator I just want to clarify a few things after taking a closer look at this:

  • If the exercise does already exist, then create_exercise will only check to see if the .meta/tests.toml is still up to date. You may use the new canonical_data_syncer tool (via /bin/fetch-canonical_data_syncer) to do this check. Just need to verify that it fails properly.

Does the canonical_data_syncer still exist? I can't seem to find it anywhere.

@Stargator
Copy link
Contributor Author

That may have been replaced with configlet. I think configlet checks the tests toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants