-
-
Notifications
You must be signed in to change notification settings - Fork 14
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: allow creating of exercise #845
Conversation
29df2ce
to
3b7c6a3
Compare
276cd3d
to
f17c7c7
Compare
@@ -11,7 +11,7 @@ complete -c configlet -n "__fish_use_subcommand" -a lint -d "Check the tra | |||
|
|||
# subcommands with options | |||
complete -c configlet -n "__fish_use_subcommand" -a completion -d "Output a completion script for a given shell" | |||
complete -c configlet -n "__fish_use_subcommand" -a create -d "Add a new approach or article" | |||
complete -c configlet -n "__fish_use_subcommand" -a create -d "Add a new exercise, approach or article" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really familiar with how to configure this (the two new create options) for the fish shell. Would you mind taking a look?
@@ -11,7 +11,7 @@ _configlet_commands() { | |||
"lint:Check the track configuration for correctness" \ | |||
# subcommands with options | |||
"completion:Output a completion script for a given shell" \ | |||
"create:Add a new approach or article" \ | |||
"create:Add a new exercise, approach or article" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really familiar with how to configure this (the two new create options) for the zsh shell. Would you mind taking a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, with no network connectivity, the output is:
$ configlet create --practice-exercise bottle-song
fatal: unable to access 'https://github.com/exercism/problem-specifications/': Failed to connect to github.com port 443 after 1 ms: Couldn't connect to server
failed to fetch 'main' in problem-specifications directory: '/home/foo/.cache/exercism/configlet/problem-specifications'
Error: Unable to update the problem-specifications cache.
You can either:
- ensure that you have network connectivity, and run the same configlet command again
- or add the '--offline' option to skip updating the cache
The most recent commit in the problem-specifications cache is:
commit b639e933ac8b3db59b8f1f1fcd0da48159920119
Author: Jesse Kroon <156132898+jesse-kroon@users.noreply.github.com>
CommitDate: Mon, 15 Jan 2024 21:06:24 +0000
Fixing a few spelling and puncuation issues (#2361)
However, if we pass --offline
, we get:
Error: invalid option for 'create': '--offline'
Could you make create
support --offline
? Approval conditional upon that (but feel free to do a follow-up PR if that's easier).
Also, can we make create
output a status message when it hits the network? If we configlet sync
, we see:
Updating cached 'problem-specifications' data...
so that it doesn't appear to hang when there's network problems. But right now, create
can appear to hang, right?
I'm not able to review as thoroughly as I'd like, but I tried creating some practice exercises and it looked good to me :)
Great to finally have this feature.
16a61ff
to
26bfed4
Compare
I've added |
Great. I think this can close #675, right? Let's create follow-up issues if there's other things to track here. |
--article <slug> The slug of the article | ||
--practice-exercise <slug> The slug of the concept exercise | ||
--concept-exercise <slug> The slug of the practice exercise | ||
-e, --exercise <slug> Only operate on this exercise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the option description here. But unfortunately it's common to all of the --exercise
descriptions, I think.
FYI @ErikSchierboom , this release is missing the windows binary. |
@SleeplessByte I'm seeing several Windows files here: https://github.com/exercism/configlet/releases/tag/4.0.0-beta.18 And when I download one and extract, there is an executable. |
Weird! Those really were not showing up when I posted. Ignore then! |
Refs: #675