Skip to content
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

Rewrite examples to show real use #200

Open
LukasWallrich opened this issue Aug 2, 2024 · 10 comments
Open

Rewrite examples to show real use #200

LukasWallrich opened this issue Aug 2, 2024 · 10 comments
Assignees
Labels
Documentation Improvements or additions to documentation

Comments

@LukasWallrich
Copy link
Collaborator

Currently, some examples still refer to the development stage when functions were written to work on their own - and offer little information on how functions hang together ... for instance, ?plot_source_overlap_heatmap. To make them useful, we should rewrite them to (usually) start from example citations and produce a meaningful output.

@rootsandberries might you be able to have a look at that?

@LukasWallrich
Copy link
Collaborator Author

(On that note, we should also let examples run where possible - too many are wrapped in if (interactive()), which makes it harder to catch broken examples, such as compare_sources())

@rootsandberries
Copy link
Collaborator

I'm not sure I totally understand this, but once I get back into the vignettes, maybe it will become clear. If not, I will let you know!

@TNRiley
Copy link
Collaborator

TNRiley commented Aug 5, 2024

@rootsandberries @LukasWallrich I'd be happy to review the examples and see what needs to be changed.

@TNRiley TNRiley self-assigned this Aug 5, 2024
@TNRiley TNRiley added the Documentation Improvements or additions to documentation label Aug 5, 2024
@TNRiley
Copy link
Collaborator

TNRiley commented Aug 14, 2024

I'm thinking we can use a small subset of the new vignette data (7-10 rows?) and use real examples that would be meaningful. It should be easy to create the examples running only a few citations.

@LukasWallrich
Copy link
Collaborator Author

To make the plots meaningful, we might need more - but if we remove the abstracts, even 100 refs will be very lightweight.

@TNRiley
Copy link
Collaborator

TNRiley commented Aug 14, 2024

To make the plots meaningful, we might need more - but if we remove the abstracts, even 100 refs will be very lightweight.

We could probably have a sample of 100 from a sample of the vignettes where we strip the abstracts for example data.

@rootsandberries
Copy link
Collaborator

I'm afraid I'm just not understanding this train of thought--maybe we can discuss this at an upcoming meeting!

@TNRiley
Copy link
Collaborator

TNRiley commented Aug 14, 2024

I'm afraid I'm just not understanding this train of thought--maybe we can discuss this at an upcoming meeting!

No problem, we can discuss. In general functions have examples in their comments and those examples are what the tests check to make sure the function is working correctly, it is also used to show a user what the function is doing. We can set aside some citation data in .ris or .csv form that the examples could use, rather than using data that isn't really useful.

Since we'll have data that's used for the vignettes, I was just thinking we could pull some citation data from that for our examples.

@rootsandberries
Copy link
Collaborator

I see...thanks Trevor! I'm not familiar with these examples, so perhaps best if we chat about this before I try to change anything :-)

@TNRiley
Copy link
Collaborator

TNRiley commented Aug 14, 2024

I still struggle a bit with examples, they are a bit special, but worth understanding! Happy to work with you on this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants