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

Remove empty date-parts in issued #65

Merged
merged 4 commits into from
Oct 23, 2018
Merged

Conversation

dhimmel
Copy link
Member

@dhimmel dhimmel commented Oct 8, 2018

WIP: before merging, update manubot branch of dhimmel/csl-styles done in dhimmel/csl-schema@df3d1a3

See greenelab/meta-review#101 (comment)

Refs #66

@dhimmel
Copy link
Member Author

dhimmel commented Oct 8, 2018

What we used to do:

https://github.com/greenelab/manubot/blob/693fbb7758b5922add30ecaa6e30acb98426a977/manubot/cite/citeproc.py#L88-L95

Note this won't work anymore, since now date-parts is empty rather than being [None].

add additional tests

_remove_error: handle required validation errors
@dhimmel
Copy link
Member Author

dhimmel commented Oct 18, 2018

As of 9ad8fa3, manubot cite --render doi:10.22541/au.149693987.70506124 works and produces:

1. The arXiv of the future will not look like the arXiv
Alberto Pepe, Matteo Cantiello, Josh Nicholson
Authorea https://doi.org/gdqbz3
DOI: 10.22541/au.149693987.70506124

Note that issued is now an empty object, but does not get entirely removed: "issued": {},

manubot/cite/citeproc.py Show resolved Hide resolved
manubot/cite/citeproc.py Show resolved Hide resolved
tests/csl-json/excess-date-parts-csl/raw.json Show resolved Hide resolved
Thanks agitter for spotting this
@dhimmel dhimmel merged commit 1508f5a into manubot:master Oct 23, 2018
dhimmel added a commit that referenced this pull request Oct 23, 2018
Merges #65

Fixes empty issued date-parts bug reported in the following issues:
- Closes #66
- Closes #75
- Fixes greenelab/meta-review#101 (comment)

Recursively remove errors in remove_jsonschema_errors. Combined with a CSL
JSON schema that specifies minItems for date-parts, this change fixes the above
issues. See citation-style-language/schema#158 for the CSL
JSON schema changes that are intended to be present in the CSL schema loaded
by this package.

Tests removal of empty date-parts for issued object.
dhimmel added a commit that referenced this pull request Oct 23, 2018
Merges #65

Fixes empty issued date-parts bug reported in the following issues:
- Closes #66
- Closes #75
- Fixes greenelab/meta-review#101 (comment)

Recursively remove errors in remove_jsonschema_errors. Combined with a CSL
JSON schema that specifies minItems for date-parts, this change fixes the above
issues. See citation-style-language/schema#158 for the CSL
JSON schema changes that are intended to be present in the CSL schema loaded
by this package.

Tests removal of empty date-parts for issued object.
@dhimmel
Copy link
Member Author

dhimmel commented Oct 23, 2018

I forgot to change the JSON Schema URL back, so I amended the merged commit in master. The new commit that this has been merged via is 4e6a0f6

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

Successfully merging this pull request may close these issues.

2 participants