librelist archives

« back to archive

command to update files for an exercise

command to update files for an exercise

From:
David Rueck
Date:
2014-01-17 @ 21:03
Hi All,

I was nitpicking the JavaScript anagram exercise and I was trying out a
suggested implementation idea and then running the tests to make sure it
worked, and while my implementation was correct, one of the tests failed.
It was because at the time I originally implemented it "abc" was supposed
to be an anagram of "abc". Future updates to the test suite made it so that
a word was not considered an anagram of itself and also added additional
requirements such as case-insensitivity, etc. Anyway, I thought it would be
nice to be able to update the test suite to the latest version, but because
I had already completed the exercise, deleting the file and running
"exercism fetch" didn't do the trick (nor should it, really).

So, I was wondering if you all thought a feature to fetch updated versions
of exercise files for a given exercise would be useful?

Something maybe like:

> exercism fetch javascript/anagram
or
> exercism fetch javascript anagram

Which would grab the latest versions of the files that originally came with
the exercise, but wouldn't overwrite any files that are already there.

So, if you wanted to update the README or the tests or the implementation
template (if one exists for that exercise) you could delete the file(s) you
want updated and then fetch the latest ones.

I know this is kind of an edge case and probably kind of hard to design or
implement well, but I just thought I'd throw it out there for discussion.
 :)

-David

Re: [exercism] command to update files for an exercise

From:
Katrina Owen
Date:
2014-01-17 @ 23:38
On 01/17, David Rueck wrote:
> Anyway, I thought it would be
> nice to be able to update the test suite to the latest version, but because
> I had already completed the exercise, deleting the file and running
> "exercism fetch" didn't do the trick (nor should it, really).

With the latest CLI, `exercism restore` will add any files that are not
already there.

> > exercism fetch javascript anagram

> Which would grab the latest versions of the files that originally came with
> the exercise, but wouldn't overwrite any files that are already there.

> So, if you wanted to update the README or the tests or the implementation
> template (if one exists for that exercise) you could delete the file(s) you
> want updated and then fetch the latest ones.

This also works with the recent versions of the CLI

> I know this is kind of an edge case and probably kind of hard to design or
> implement well, but I just thought I'd throw it out there for discussion.
>  :)

It's not really an edge-case, because I wanted people to be able to
cherry-pick exercises, so you don't have to have completed/started the
exercise.

Katrina

Re: [exercism] command to update files for an exercise

From:
David Rueck
Date:
2014-01-17 @ 23:44
Ah, cool. That's awesome. So, just to clarify, if the files are already
there, exercism restore won't overwrite them, right? If so, that totally
solves this issue.  :)

-David


On Fri, Jan 17, 2014 at 3:38 PM, Katrina Owen <_@kytrinyx.com> wrote:

> On 01/17, David Rueck wrote:
> > Anyway, I thought it would be
> > nice to be able to update the test suite to the latest version, but
> because
> > I had already completed the exercise, deleting the file and running
> > "exercism fetch" didn't do the trick (nor should it, really).
>
> With the latest CLI, `exercism restore` will add any files that are not
> already there.
>
> > > exercism fetch javascript anagram
>
> > Which would grab the latest versions of the files that originally came
> with
> > the exercise, but wouldn't overwrite any files that are already there.
>
> > So, if you wanted to update the README or the tests or the implementation
> > template (if one exists for that exercise) you could delete the file(s)
> you
> > want updated and then fetch the latest ones.
>
> This also works with the recent versions of the CLI
>
> > I know this is kind of an edge case and probably kind of hard to design
> or
> > implement well, but I just thought I'd throw it out there for discussion.
> >  :)
>
> It's not really an edge-case, because I wanted people to be able to
> cherry-pick exercises, so you don't have to have completed/started the
> exercise.
>
> Katrina
>
>

Re: [exercism] command to update files for an exercise

From:
Katrina Owen
Date:
2014-01-17 @ 23:59
On 01/17, David Rueck wrote:
> So, just to clarify, if the files are already
> there, exercism restore won't overwrite them, right? If so, that totally
> solves this issue.  :)

Correct. Files do not get overwritten.

:) Katrina

Re: [exercism] command to update files for an exercise

From:
David Rueck
Date:
2014-01-18 @ 00:00
Awesome, thanks.  :)

-David


On Fri, Jan 17, 2014 at 3:59 PM, Katrina Owen <_@kytrinyx.com> wrote:

> On 01/17, David Rueck wrote:
> > So, just to clarify, if the files are already
> > there, exercism restore won't overwrite them, right? If so, that totally
> > solves this issue.  :)
>
> Correct. Files do not get overwritten.
>
> :) Katrina
>
>