Clean up `topics` vs `practices` in `config.json`
Per the current docs, the track-level config.json's per-exercise topics key isn't used for anything. This has the advantage that the items there aren't constrained by cross-checks, but the disadvantage that we're not fully exposing to the website the information we have about each exercise.
The general procedure we want to follow goes like this:
- Collect the list of all current concept exercises. Currently:
$ jq -r '.concepts[] | .slug' config.json | sort -u booleans box char collect destructuring entry-api enums floating-point-numbers fold functions hashmap integers loops match-basics mutability option references strings string-slices string-vs-str structs tuples vec-macro vec-stack - For each exercise among the practice exercises:
- For each item in
topics- If the topic is a current concept, move it from
topicstopractices
- If the topic is a current concept, move it from
- For each item in
This process needs to be repeated periodically as we add concepts, so PRs addressing this issue should not close it.
Hi! I created a PR for it.
PD: clould you add #hacktoberfest tag? Thanks.
@coriolinus, is this needs needed?
Hi @ferminhg, sorry, I stepped down as maintainer of this repo some time ago. I assume that your PR is still useful but I will not be reviewing it.
Hi @bobahop, do you know who can help me merge it?
I'm sorry that the scope of this is beyond me at the moment. @petertseng may have some thoughts about this.
Hi @petertseng , do you need help here?
Wow I thought this was going to be some difficult thing that requires specific knowledge to review, but it's actually a fairly strictly rules-based change, with the instructions given in the issue description. It just says for any concept that exists in https://github.com/exercism/rust/blob/d2a5ba340d89b296d98308c36538acca3ff0a5ab/config.json#L1495, move any instance of it from any practice exercise's topics to practices. Very rules-based, so reviewing pull requests just means checking that the rules are followed. CI validates that all concepts named in the practices array match a given concept so maintainers do not have to worry about that, just have to check that CI passes.
we also get warned if a concept is practiced more than 10 times, by https://github.com/exercism/configlet/blob/046e5c3bbb3a038bc6646604fcafc5d0747085a0/src/lint/track_config.nim#L340-L349. So we should probably avoid that.
https://github.com/exercism/rust/blob/main/bin/clean_topics_vs_practices.py is a possibly that can help with this operation.
Should this issue still be open?
I think this should be kept open as documentation of what the purpose of the field topics is. It can definitely be closed once there is a robust syllabus in place and the practices fields are well-populated. At that point, the topics field will have served its purpose and can be removed entirely.