-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add CSV tag and node_tag stats downloads #5412
Comments
This one is for @skilfullycurled! |
@skillfullycurled we would love for you to solve this one! And don't hesitate to ask for help! Thanks. |
Adding in the other pieces that @jywarren wrote about in the original issue #5268 Oh sorry @skilfullycurled i didn't see this. A few thoughts that may help move it along:
plots2/app/controllers/stats_controller.rb Lines 103 to 106 in 4c6ecb2
But for the tables you're looking for: def tag
data = Tag.select(:tid, :name, :parent, :count).all
format(data, 'tag')
end
def node_tag
data = NodeTag.select(:tid, :nid, :uid).where(date: start.to_i...fin.to_i).all
format(data, 'node_tag')
end Then, adding routes to match; something like these for comments: Lines 252 to 253 in 4c6ecb2
And a link on this page to display it: plots2/app/views/stats/_range.html.erb Lines 77 to 95 in 4c6ecb2
(although the Tag model has not timestamps, so we'd just note there that it's ALL tags) Benjamin, this would be a pretty easy Originally posted by @jywarren in #5268 (comment) |
Thanks @IshaGupta18! Okay, I made the changes. Right now it's set to draft pull request but I'm not sure if that was the correct thing to do for reasons that I explained in the comments of the request. A follow up question, is it better to have conversations about the changes in the pull request or in this issue thread? For example I have two questions about the changes to the stats view.
However, with regard to the |
Hi, please make the pull request at publiclab/plots2 instead of skilfullycurled/plots2? |
Best of luck 👍 |
Okay, test failed but it's easy to see why. Will fix. |
I closed the other pull request thinking I could go back to the branch on my fork, make the changes, and then start a new one pull reqeust. Unfortunately, I am unable to commit my changes. Here's what the top and bottom of the page look like. Then the code where I made the edits... Also, if possible can you provide a few steps at a time instead of just one? Or, break down the step into even more baby steps? Thanks for your help, everyone! |
Okay, well I tried reading up on everything and the PR request page said to:
So I did that. The error seems to be fixed on my end. That is, when I go to the page and into the editor, the trailing white space that was causing the problem is no longer there. So, maybe that's why I can't commit because I'm not making any changes? Anyway, keep me posted on what to do next. I might just start over. |
Ah, actually, I think I got it. I made the change before the test on a different file was done. In between making the change on the first failed test, and it finishing the tests for the other file, there was a new error. I fixed it and it's re-running the tests automatically. |
Checks all passed now! I left a note for [at]publiclab/reviewers. Anything else I can slash should do? |
Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.
If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝
If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!
🤔 What you will need to know.
Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.
📋 Step by Step
🙋 Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!
📝 Update the file app/controllers/stats_controller.rb in the
plots2
repository (press the little pen Icon) and edit the line as shown below.See this page for some help in taking your first steps!
Below is a "diff" showing in red (and a
-
) which lines to remove, and in green (and a+
) which lines to add:💾 Commit your changes
🔀 Start a Pull Request. There are two ways how you can start a pull request:
If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.
You can also edit files directly in your browser and open a pull request from there.
Please keep us updated
💬⏰ - We encourage contributors to be respectful to the community and provide an update within a week of claiming a first-timers-only issue. We're happy to keep it assigned to you as long as you need if you update us with a request for more time or help, but if we don't see any activity a week after you claim it we may reassign it to give someone else a chance. Thank you in advance!
If this happens to you, don't sweat it! Grab another open issue.
Is someone else already working on this?
🔗- We encourage contributors to link to the original issue in their pull request so all users can easily see if someone's already started on it.
👥- If someone seems stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!
🤔❓ Questions?
Leave a comment below!
The text was updated successfully, but these errors were encountered: