Samantha-Mcguigan / newsAnalysis

repository for our newsAnalysis web page
3 stars 0 forks source link

Code Clean Up #7

Closed Samantha-Mcguigan closed 6 years ago

Samantha-Mcguigan commented 7 years ago

@ajnewton1 @jonhoranic

Hey team! I was talking to Dr. B after class and I'm going to go ahead and take the lead on cleaning up the code and the schema. I'll add in the emo tags as well. I thought we might add another set of articles for the stories on the Syrian bombings? If someone wants to do the basic outline code for that I can also go in after to add emo tags. Let me know if you have any suggestions about the code!

dotfig commented 7 years ago

I can do the basic outline for the four other articles for the Syrian Bombings

Samantha-Mcguigan commented 7 years ago

@ajnewton1 @jonhoranic

Hi all, I was working on the schema and I'm trying to get it so the element siteInfo has a ref attribute as well as hyperlink section titleLine and pubInfo elements in any order and this is what I have

siteInfo = element siteInfo {"ref"| mixed{(hyperlink | section | titleLine | pubInfo)*}}

but when I associate it with an xml document I'm getting an error that the ref attribute is not allowed on the siteInfo element and I'm not sure why

ebeshero commented 7 years ago

@Samantha-Mcguigan The quotes around "ref" will be the problem here. You'd use those for defining attribute values, not designating the attribute names themselves.

Samantha-Mcguigan commented 7 years ago

@ebeshero Oh geez, sorry its been a while, thank you again!

Samantha-Mcguigan commented 7 years ago

@ajnewton1 @jonhoranic Hey friends! The schema and code is all updated and are all valid together and pushed to GitHub! YAY!! I made some comments on some questions I had for the group which we can go over in class on Wednesday. There is still a text article in the women'sMarch folder that is just text and needs to be converted to XML if someone wants to do that and then I can add the <emo> tags. Most of the other articles I need to add the <emo> tags on but I won't get to those tonight. I will do my best to get them all done by Wednesday however.

dotfig commented 7 years ago

I will do the basic mark up on the Women's Article as well as the Syrian Bombings. Are there any other articles that you had in mind?

dotfig commented 7 years ago

I am working on the Syrian Bombing articles right now.

Samantha-Mcguigan commented 7 years ago

Perfect! I am working on the emo tags!


From: Aaron Newton notifications@github.com Sent: Tuesday, April 11, 2017 8:56:48 PM To: Samantha-Mcguigan/newsAnalysis Cc: McGuigan, Samantha Elizabeth; Mention Subject: Re: [Samantha-Mcguigan/newsAnalysis] Code Clean Up (#7)

I am working on the Syrian Bombing articles right now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSamantha-Mcguigan%2FnewsAnalysis%2Fissues%2F7%23issuecomment-293441908&data=01%7C01%7Csem150%40pitt.edu%7Cd0ec649a50f343f9242c08d4813ecd4a%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1&sdata=OQrhU0bg4XyNAlBVjoeQSVqp6SUVyq%2FSjraJfwFmUfA%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXzkx3H3-DX7nxc6_p9Qc-LokeTLtcT3ks5rvCFQgaJpZM4M5BnC&data=01%7C01%7Csem150%40pitt.edu%7Cd0ec649a50f343f9242c08d4813ecd4a%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1&sdata=yTwpKoji9enPfoE12xaSTZGnX6cWwTAZHklhNcJUgC0%3D&reserved=0.

dotfig commented 7 years ago

I am having a conflict on pulling from my git command. I think it is a merge conflict. Any idea how I solve that anyone?

ebeshero commented 7 years ago

@ajnewton1 enter git status and what does the terminal tell you?

dotfig commented 7 years ago

On branch master
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   electionResults/electionResults_BBC.xml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    syrianBombings/

no changes added to commit (use "git add" and/or "git commit -a")```` @ebeshero 
ebeshero commented 7 years ago

@ajnewton1 Okay. First do a git pull What happens?

ebeshero commented 7 years ago

Also, as we're working on this, here's an old DHClass-Hub issue I've made to store handy resources in case of GitHub troubles: https://github.com/ebeshero/DHClass-Hub/issues/92

dotfig commented 7 years ago

@ebeshero


Updating f731afb..658d5d9
error: Your local changes to the following files would be overwritten by merge:
    electionResults/electionResults_BBC.xml
Please commit your changes or stash them before you merge.
Aborting````
ebeshero commented 7 years ago

@ajnewton1 OK--that's not a problem. Do a git commit -m "your message here" to stage your commit (which makes sure that you won't lose anything you've worked on)

ebeshero commented 7 years ago

@ajnewton1 Then do a git status again

dotfig commented 7 years ago

@ebeshero I don't think the git commit -m "your message here" worked.


On branch master
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
    modified:   electionResults/electionResults_BBC.xml

Untracked files:
    syrianBombings/

no changes added to commit
MacBook-Pro:newsAnalysis fig$ git status
On branch master
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   electionResults/electionResults_BBC.xml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    syrianBombings/

no changes added to commit (use "git add" and/or "git commit -a")
ebeshero commented 7 years ago

@ajnewton1 Looks like you need to do a git add . Then do the git commit -m "message" again

ebeshero commented 7 years ago

@ajnewton1 I always do those two in sequence like this:

git add .
git commit -a -m "commit message"

When I use the -a, I think that's pretty much doing the same thing as git add .

dotfig commented 7 years ago

@ebeshero ahh just noticed that! This is what shows up after the git status `


On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 3 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
ebeshero commented 7 years ago

@ajnewton1 Good--now try pulling again! If there's a conflict I'll walk you through it...

dotfig commented 7 years ago

@ebeshero unfortunately... there is a conflict.

dotfig commented 7 years ago

@ebeshero would the git checkout . work in this situation? I don't want to push the stuff that I did on that article.

ebeshero commented 7 years ago

@ajnewton1 no worries--we'll fix it! What happens with git status?

dotfig commented 7 years ago

@ebeshero ````MacBook-Pro:newsAnalysis fig$ git status On branch master Your branch and 'origin/master' have diverged, and have 1 and 3 different commits each, respectively. (use "git pull" to merge the remote branch into yours) You have unmerged paths. (fix conflicts and run "git commit") (use "git merge --abort" to abort the merge)

Changes to be committed:

modified:   articleRefGuide/newsAnalysisRelax-NG.rnc
modified:   electionResults/electionResults_CNN.xml
modified:   electionResults/electionResults_FOX.xml
modified:   electionResults/electionResults_NPR.xml
modified:   travelBan/travelBan_BBC.xml
modified:   travelBan/travelBan_CNN.xml
modified:   travelBan/travelBan_FOX.xml
modified:   travelBan/travelBan_NPR.xml
modified:   trumpsTaxes/trumpsTaxes_BBC.xml
modified:   trumpsTaxes/trumpsTaxes_CNN.xml
modified:   trumpsTaxes/trumpsTaxes_FOX.xml
modified:   trumpsTaxes/trumpsTaxes_NPR.xml
modified:   womensMarch/womensMarch_BBC.xml
modified:   womensMarch/womensMarch_CNN.xml
modified:   womensMarch/womensMarch_FOX.xml

Unmerged paths: (use "git add ..." to mark resolution)

both modified:   electionResults/electionResults_BBC.xml
ebeshero commented 7 years ago

@ajnewton1 You don't want git checkout (because that is when you have a separate branch in your repo--I'll show you how I use that sometime). I also think it's fine to commit what you have.

This might seem weird, but following the instructions in git status is usually the best thing to do. And if something happens that doesn't make sense or that you can't complete, there's no harm done in shutting down the terminal and reopening it.

So, first of all, try a git pull again, and let's see what happens. Follow up with a git status

ebeshero commented 7 years ago

@ajnewton1 My guess is that you're looking at @Samantha-Mcguigan 's changes (right?)

dotfig commented 7 years ago

@ebeshero Yes that is correct and I hit the format button and saved it by accident. Just a little simple stupid mistake. MacBook-Pro:newsAnalysis fig$ git pull error: Pulling is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict.

ebeshero commented 7 years ago

@ajnewton1 OK--is it just one file? If you still have it open, can you undo the change?

dotfig commented 7 years ago

@ebeshero No I actually already tried that. I tried to open it back up and tried to reverse what I did but it wouldn't let me

dotfig commented 7 years ago

@ebeshero but yes it is just one file

ebeshero commented 7 years ago

@ajnewton1 Well, you can always download it again from the web repo--just download it from the raw GitHub file, save in place...

ebeshero commented 7 years ago

@ajnewton1 Actually, if you just pretty-printed the file, it shouldn't be a big deal. You should be able to commit your change and merge it into the origin.

ebeshero commented 7 years ago

@ajnewton1 Thinking about this. When you open up the file in question, scroll through it and look for

>>>>>

notations--those are left by Git to indicate a conflicted area. If there are lots of these and they're hard to deal with, I'd maybe just download the file directly from the web GitHub into your local directory, then commit and push.

dotfig commented 7 years ago

@ebeshero I just downloaded the RAW file from GitHub. I don't know why but I didn't think of that. It was so easy that it was hard. Thank you for your help!

ebeshero commented 7 years ago

@ajnewton1 So now, do a git status

ebeshero commented 7 years ago

@ajnewton1 Do you have changes still to commit and push to the repo?

dotfig commented 7 years ago

@ebeshero no I do not right now

dotfig commented 7 years ago

@ebeshero I think I successfully commited everything