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

replace bib2df #13

Open
SimonGreenhill opened this issue Sep 7, 2021 · 9 comments
Open

replace bib2df #13

SimonGreenhill opened this issue Sep 7, 2021 · 9 comments

Comments

@SimonGreenhill
Copy link
Owner

https://github.com/ropensci/bibtex

@HedvigS
Copy link
Collaborator

HedvigS commented Jan 14, 2022

Hi Simon :).

I discovered a fun bug in the original bib2df today. Apparently if you don't have at least one space before and after the = when assigning fields, things go badly. Just thought maybe that'd be useful for you to know. Maybe you already know :)

@HedvigS
Copy link
Collaborator

HedvigS commented Jan 14, 2022

Like this.

@HedvigS
Copy link
Collaborator

HedvigS commented Dec 6, 2022

i just tried the R-package just called "bibtex", and I think it's not optimal because if a given entry don't have certain fields it's ignored. For example, for the bib file in grambank I get


ignoring entry 'Tournadre2017' (line 68747) because :
	A bibentry of bibtype ‘InBook’ has to specify the field: chapter

I can't see an argument to tell it to chill and not be so strict.

@HedvigS
Copy link
Collaborator

HedvigS commented Dec 6, 2022

If the cldf-dataset in question has been created with cldfbench, then the writing of the bib-file is with pybtex which in turn writes key = {value}, which is what bib2df expects (it doesn't parse key = "value"). So, bib2df is not so bad an idea for most cldf-datasets probably?

Given that... it seems to me like the disadvantages that remain with bib2df is mainly that

a) it gives this warning:

Column `YEAR` contains character strings.
              No coercion to numeric applied.

b) it gives this warning:

Warning message:
In bib2df_tidy(bib, separate_names) : NAs introduced by coercion

Both of these seem okay though, sometimes year is "n.d." etc and sometimes it struggles to parse names. Both fair warnings, but not that disruptive really, right?

@HedvigS
Copy link
Collaborator

HedvigS commented Dec 6, 2022

and then there's the aforementioned spaces issue which.. Yeah. Maybe reading in with read.lines, replacing and outputting would help? Haha!

@HedvigS
Copy link
Collaborator

HedvigS commented Apr 3, 2024

@SimonGreenhill what do you think about copying over some of the bib2df code into rcldf functions and solve the known issues? With proper accreditation to the original bib2df people of course.

@SimonGreenhill
Copy link
Owner Author

Don't want to have to maintain code for something that should be pretty standard!

@HedvigS
Copy link
Collaborator

HedvigS commented Apr 4, 2024

Sure, agreed. Just a suggestion, based on the title of this issue.

I've been submitting PRs over at ropensci and am in conversation with the folks over there to see if they can push to CRAN soon.

@HedvigS
Copy link
Collaborator

HedvigS commented Apr 5, 2024

Good news!

I'm in communication with the current caretaker maintainer of ropensci/bib2df, Prof Gianluca Baio. Several of the issues we've been having with the package have been fixed in the most recent version on GitHub. He hadn't considered a new CRAN release, but upon my request he said he'd look into it :)!

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

No branches or pull requests

2 participants