swcarpentry / DEPRECATED-bc

DEPRECATED: This repository is now frozen - please see individual lesson repositories.
Other
299 stars 383 forks source link

Creating lesson on regular expressions #599

Closed danmaclean closed 9 years ago

danmaclean commented 10 years ago

Main changes

ctjacobs commented 10 years ago

Dan and I will be reviewing each other's pull requests for these intermediate regex lessons. I'll try to do this in the next week or two.

ctjacobs commented 10 years ago

Please change the target to 'swcarpentry:master'.

rgaiacs commented 10 years ago

@ctjacobs and @danmaclean At #618 I add YAML header Markdown files of intermediate/regex. Maybe you want to rebase this PR to take advantage of my changes. If you need any help with git please send me a email.

ctjacobs commented 9 years ago

There is one more broken glossary link remaining (the "postfix" one), but once that's fixed and the pull request is rebased, I think this is ready to be merged (preferably into master, if possible).

ctjacobs commented 9 years ago

@danmaclean: Please could you also use the "in", "out", "Key Points" and "Challenges" blocks (see the diff in #569 for some examples).

danmaclean commented 9 years ago

@ctjacobs all done! (I think..)

ctjacobs commented 9 years ago

Thanks. I think this is fine now.

rgaiacs commented 9 years ago

@danmaclean and @ctjacobs Thanks for the contribution. Could you try to address the follow requests and send me a note when they are done (or you need help).

    match = re.search('(.*)/(.*)/(.*)',
                      'Davison/May 22, 2010/1721.3')
    print match.group(1)

now we use

~~~
match = re.search('(.*)/(.*)/(.*)',
                  'Davison/May 22, 2010/1721.3')
print match.group(1)
~~~
{:class="in"}
danmaclean commented 9 years ago

@r-gaia-cs Never rebased anything before, do you have any hints? Likewise for new bug.

rgaiacs commented 9 years ago

@danabauer Could you try

$ cd bc
$ git fetch swcarpentry
$ git checkout master
$ git merge swcarpentry/master
$ git rebase master creating-lesson-on-regular-expressions
danmaclean commented 9 years ago

ok, @r-gaia-cs looks good. No errors. Now what?

rgaiacs commented 9 years ago

@danmaclean Thanks. I will review this again at the weekend.

rgaiacs commented 9 years ago

@danmaclean Something was wrong. 66eac2c should not exist, 0d60964 and d3f9101 are the same. Sorry about this.

@gvwilson Could you recommend someone that could help @danmaclean get this PR merged?

rgaiacs commented 9 years ago

@danmaclean and @ctjacobs we use

~~~
code sample
~~~
{class="in"}

instead of

    code sample

Note that the code sample start at the first column.

wking commented 9 years ago

On Fri, Aug 22, 2014 at 08:44:55PM -0700, r-gaia-cs wrote:

@danmaclean Something was wrong. 66eac2c should not exist, 0d60964 and d3f9101 are the same. Sorry about this.

It looks like d3f9101 has the rebased code, while 0d60964 is the pre-rebase code. I expect @danmaclean successfully rebased, but then forgot to force-push. The unforced-push complained about the divergence, so he pulled the original code back into the rebase with 66eac2c and then did another unforced-push.

@danmaclean, you can fix your local branch (unwinding the 66eac2c merge) with:

$ git checkout creating-lesson-on-regular-expressions $ git reset --hard HEAD^

Then force push that to your GitHub repository (clobbering the 0d60964 original) with:

$ git push --force danmaclean creating-lesson-on-regular-expressions

assuming 'danmaclean' is the name for your https://github.com/danmaclean/bc remote.

danmaclean commented 9 years ago

ok... seemed to go fine...

gvwilson commented 9 years ago

I just tried to merge this on my machine and got a ton o' conflicts with stuff already in intermediate/regex directory. Can you please merge from swcarpentry:master into danmaclean:creating-lesson-on-regular-expressions, or tell me what I should do at my end to make the conflict go away? Thanks much.

danmaclean commented 9 years ago

Happy to do whatever you need. Let me know what you want. Only done one rebase before (earlier in this thread, so obviously that didn't go so well!) and would be grateful of a walk through.

Sorry if I dropped the ball on this

gvwilson commented 9 years ago

Hi Dan, I'm the one who dropped the ball - I should have reviewed this much earlier. @wking, can you please walk @danmaclean through the necessary steps? Thanks, Greg

wking commented 9 years ago

On Tue, Sep 09, 2014 at 01:52:08AM -0700, Dan MacLean wrote:

Only done one rebase before (earlier in this thread, so obviously that didn't go so well!) and would be grateful of a walk through.

There are good docs if you want more background [1,2,3], but you have a good start with your first rebase. I'm not sure where your extra commits came from 4, because I don't get those when I repeat @r-gaia-cs' instructions. I do get a few conflicts (presumably due to

618). Resolve them in a way that respects both #618 and your changes

(I thought the resolutions were fairly clear, but ask if you're not sure).

That will get your branch to a merge-able state. However, it will make reviewing the rebased results easier if you refactor your commits a bit to make thinks more semantic. For example, your “key points and challenge blocks” commit is nice and compact, but the “updated as per

650” commit adjusts class labels added by “in and out burgers, err

blocks”. It would be easier to review if you squashed those two commits together so we didn't see you adding prefix classes and then removing those and adding postfix classes. Similarly, in “changes as suggested by @ctjacobs”, the “departments” → “department's” fix could be squashed into its introduction in “remove confusing anglification of time machine”. Fixing this sort of thing with interactive rebases is pretty straightforward, you take one pass through and split your original commits into smaller pieces [5](e.g. split “updated as per

650” into “remove single quotes from inline code”, “fix prefix

classes to postfix classes”, …). Then you take another pass though to squash the fixups into their initial commit (e.g. squash “fix prefix classes to postfix classes” into “in and out burgers, err blocks”). Still, splitting and squashing commits are not everyday activities for many folks, so I'm happy to help (here or on IRC) with any issues you run into.

rgaiacs commented 9 years ago

@danmaclean you can also call me at the IRC or send me a email.

rgaiacs commented 9 years ago

@danmaclean I'm closing this since the commits must be merge into swcarpentry:master and not swcarpentry:creating-lesson-on-regular-expressions.