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

OPS Support for Citation Style Languages Plugin #6700

Closed
1 task
withanage opened this issue Feb 1, 2021 · 23 comments
Closed
1 task

OPS Support for Citation Style Languages Plugin #6700

withanage opened this issue Feb 1, 2021 · 23 comments
Labels
Enhancement:3:Major A new feature or improvement that will take a month or more to complete.
Milestone

Comments

@withanage
Copy link
Member

withanage commented Feb 1, 2021

Add compatibility for CSL Plugin up from 3.3

  • OPS
@withanage withanage self-assigned this Feb 1, 2021
@nils-stefan-weiher
Copy link

nils-stefan-weiher commented Feb 4, 2021

Hi Dulip @withanage ,

Alec already opened an issue for citationStyleLanguage Plugin for OMP here:
#6201

A colleague of mine wants to start working on the port for OMP starting with version 3.3.0

Shall we split the work, so that we focus on OMP?

@asmecher Where should we discuss the update?

Best regards,

NIls

@withanage
Copy link
Member Author

withanage commented Feb 4, 2021

Hi @isgrim ,

Thanks a lot !

Please go ahead with the OMP in the other issue #6201 and create a PR.

If there are clarifications needed, that can be discussed there.

I have removed OMP from this ticket and can take care of the OPS side.

@withanage withanage changed the title OPS/OMP Support for Citation Style Languages Plugin OPS Support for Citation Style Languages Plugin Feb 4, 2021
@diegoabadan
Copy link
Contributor

We are porting to OPS, soon we will send the PR.

@diegoabadan
Copy link
Contributor

Hi!

We have a preliminary version of the OPS plugin at https://github.com/lepidus/citationStyleLanguage/tree/stable-3_3_0

Adaptations are lacking so that references are generated in a format suitable for a preprint and not as a journal article.

I imagine it might also be necessary to update the styles https://github.com/pkp/citationStyleLanguage/tree/main/citation-styles

Can someone from PKP or community with greater familiarity with this subject help us with these points? CC @NateWr and @asmecher

@asmecher
Copy link
Member

asmecher commented Sep 8, 2021

@diegoabadan, were these changes made in order to convert the plugin so that the modified version only works with OPS? I would recommend making the changes so that the plugin works with both OJS and OPS -- see e.g. the usage stats plugin, which has a few conditional areas for each application: https://github.com/pkp/usageStats/blob/main/UsageStatsPlugin.inc.php

@asmecher
Copy link
Member

asmecher commented Sep 8, 2021

I'll ask a few of our friendly librarians what they think about citations for preprints rather than articles!

@diegoabadan
Copy link
Contributor

Hi Alec!

@diegoabadan, were these changes made in order to convert the plugin so that the modified version only works with OPS?

We are modifying it to work on both OJS and OPS! :)

I'll ask a few of our friendly librarians what they think about citations for preprints rather than articles!

Thanks!

@kshuttle
Copy link
Collaborator

Hi Everyone,

I've done some research and come up with what I think are the correct citation formats for preprints in the various styles.

As is always the case with citations, there is some room for interpretation. I've done my best with the information available, but I'll note that some style guides don't seem to have articulated a format for preprints yet. Those that have seem to style preprints very similar to online reports, so where I was unsure I've generally gone with a report format. I used the sample article below and followed the lead of the citation styles in Zotero (which aligned with the report-like format for the preprint citations). For each citation I've included a description of the format along with an example from the sample article (with a reduced number of authors for simplicity).

I would love another set of eyes on these if someone else would like to weigh-in.

Sample article https://preprints.scielo.org/index.php/scielo/preprint/view/2968

ACM

Format:
First Middle Last, First Middle Last, and First Middle Last. Year. Title of the work. DOI:

Example:
Laís de Almeida Relvas-Brandt, Caroline Gava, and Ronaldo Fernandes Santos Alves. 2021. Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020. DOI: https://doi.org/10.1590/s1679-49742021000400005

ACS

Format:
Last, F. M.; Last, F. M.; Last, F. M. Title of the work. Preprint server name Month dd, yyyy. URL

Example:
Relvas-Brandt, L. de A.; Gava, C.; Alves, R. F. S. Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020. SciELO Preprints September 20, 2021. https://doi.org/10.1590/s1679-49742021000400005.

APA

Format:
Last, F. M., Last F. M., & Last, F. M. (Year). Title of the work. Preprint server name. URL

Example:
Relvas-Brandt, L. de A., Gava, C., & Alves, R. F. S. (2021). Síndrome inflamatória multissistêmica pediátrica: Estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020. SciELO Preprints. https://doi.org/10.1590/s1679-49742021000400005

Chicago author date

Format:
Last, First Middle., First Middle Last, and First Middle Last. Year. "Title of the work." Preprint server name. URL.

Example:
Relvas-Brandt, Laís de Almeida, Caroline Gava, and Ronaldo Fernandes Santos Alves. 2021. “Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020.” SciELO Preprints. https://doi.org/10.1590/s1679-49742021000400005.

Harvard

Format:
Last, F.M., Last F.M., and Last, F.M. (Year) Title of the work, Preprint server name, Available at: URL (Accessed: dd Month yyyy).

Example:
Relvas-Brandt, L. de A., Gava, C., and Alves, R.F.S. (2021) Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020 SciELO Preprints, Available at: 10.1590/s1679-49742021000400005 (Accessed: 20 September 2021).

IEEE

Format:
F.M. Last et al., "Title of the work." Preprint server name, m. dd, yyyy. doi:

Example:
L. de A. Relvas-Brandt et al., “Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020.” SciELO Preprints, Sep. 20, 2021. doi: 10.1590/s1679-49742021000400005.

MLA

Format:
Last, First Middle, et al. Title of the work. Preprint server name, dd m. yyyy. preprint-server-URL, URL.

Example:
Relvas-Brandt, Laís de Almeida, et al. Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020. SciELO Preprints, 20 Sept. 2021. preprints.scielo.org, https://doi.org/10.1590/s1679-49742021000400005.

Turabian

Format:
Last, First Middle, First Middle Last, and First Middle Last. "Title of the work." Preprint server name, Month dd, yyyy. Accessed Month dd, yyyy. URL.

Example:
Relvas-Brandt, Laís de Almeida, Caroline Gava, and Ronaldo Fernandes Santos Alves. “Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020.” SciELO Preprints, September 20, 2021. Accessed September 20, 2021. https://preprints.scielo.org/index.php/scielo/preprint/view/2968.

Vancouver

Format:
Last FM, Last FM, Last FM. Title of the work [Internet]. Preprint server name; year [cited yyyy m. dd]. Available from: URL

Example:
Relvas-Brandt L de A, Gava C, Alves RFS. Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020 [Internet]. SciELO Preprints; 2021 [cited 2021 Sep 20]. Available from: https://preprints.scielo.org/index.php/scielo/preprint/view/2968

Associação Brasileira de Normas Técnicas - ABNT

Format:
LAST, F. M. et al. Title of the work, Preprint server name, dd m. yyyy. Disponível em: URL. Acesso em: dd m. yyyy

Example:
RELVAS-BRANDT, L. DE A. et al. Síndrome inflamatória multissistêmica pediátrica: estudo seccional dos casos e fatores associados aos óbitos durante a pandemia de COVID-19 no Brasil, 2020, SciELO Preprints, 20 set. 2021. Disponível em: < https://preprints.scielo.org/index.php/scielo/preprint/view/2968>. Acesso em: 20 set. 2021

@asmecher
Copy link
Member

Thanks, @kshuttle!

@NateWr NateWr added Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. Enhancement:3:Major A new feature or improvement that will take a month or more to complete. and removed Enhancement:1:Minor A new feature or improvement that can be implemented in less than 3 days. labels Oct 4, 2021
@diegoabadan
Copy link
Contributor

Thanks, @kshuttle and Alec!

We are working on this issue for Scielo.

@JhonathanLepidus
Copy link
Contributor

While trying to accomplish what was put on the comment above, we faced a problem with the citation-style files. Some of them need to be upgraded, something that has already been issued on #5629. Should we send a PR to accomplish this?

@NateWr
Copy link
Contributor

NateWr commented Mar 7, 2022

@JhonathanLepidus yes, thank you!

@NateWr
Copy link
Contributor

NateWr commented Mar 8, 2022

@JhonathanLepidus it seems like there are several PRs. Can you add a comment here with links to each of the related PRs, and identify which ones are for which branches?

@JhonathanLepidus
Copy link
Contributor

@NateWr , sure. These are the PRs related to this issue:

To add support of the CSL plugin to OPS:

To fix the DOI getting in OPS 3.3.0:

To upgrade the citation-style files in the CSL plugin

@NateWr
Copy link
Contributor

NateWr commented Mar 9, 2022

Thanks @JhonathanLepidus! I've left some comments on those PRs. It all looks really good, mostly style/convention changes. 👍

Once those changes are in place I'll check out the code locally and do some tests.

@NateWr
Copy link
Contributor

NateWr commented Mar 16, 2022

Thanks @JhonathanLepidus, this looks good! I checked it out on main with your changes to the CSL plugin and all the styles worked smoothly. I think we're just about ready to merge the changes to the main branches.

Before merge, we need to get this added as a submodule to OPS and make sure the tests are running. To do this, there are a couple steps:

  1. Add the changes to the CSL files to your PR that adapts the CSL plugin, so they are all in one PR on your lepidus/main branch. This will ensure the tests run against all of the changes.
  2. Add the citationStyleLanguage plugin as a submodule to OPS. You can do that by running git submodule add https://github.com/pkp/citationStyleLanguage.git plugins/generic/citationStyleLanguage && git submodule update --init --recursive. (You'll then need to go back and add your repository as a remove and check out your branch.)
  3. Finally, create a PR to OPS that includes the submodule change. To make sure that the OPS tests run against your branch of the CSL plugin, there's a special commit syntax you need to use. Read the section in our docs on how to prepare pull requests for testing. (That section uses lib/pkp as an example submodule, but you'll use plugins/generic/citationStyleLanguage as the submodule.)

Let me know if you have any questions about this part. The submodules and testing takes a little bit of work to get right the first time.

@JhonathanLepidus
Copy link
Contributor

JhonathanLepidus commented Mar 17, 2022

@NateWr I couldn't understand this part in step 2:

You'll then need to go back and add your repository as a remove and check out your branch

I added the submodule to my fork using the same command in step 2, but I didn't get it if I can move to step 3 or need to do something else before it.

Update: We created the branches citationStyleLanguage/i6700-cslOps (containing all our work until now) and ops/i6700-cslOps in our repositories.

In the OPS repo we added this commit, which adds the CSL plugin submodule. We checked our citationStyleLanguage/i6700-cslOps branch, instead of PKP's citationStyleLanguage/main branch.

Can you give us feedback if this is right?

@NateWr
Copy link
Contributor

NateWr commented Mar 21, 2022

Yes, that looks great, @JhonathanLepidus! The only problem that I noticed is that the name of your branch in the commit message (##lepidus/i6700-cslOps##) used a - and the branch in in your citationStyleLanguage repository (i6700_cslOps) uses a _. The names have to match exactly because that's how our test software knows what branch to check out.

You can fix this in OPS by renaming your last commit:

git commit --amend -m "Submodule update ##lepidus/i6700_cslOps##"
git push

Once you've done that, open new PRs with your branches and the OPS tests should run against that.

@JhonathanLepidus
Copy link
Contributor

JhonathanLepidus commented Mar 21, 2022

@NateWr , in fact I named the branches wrongly, but I edited the commit message to match them and opened a PR: pkp/ops#251

The PR to the main branch still valid, since the branch i6700_cslOps was created from it, making them identical.

@NateWr
Copy link
Contributor

NateWr commented Mar 23, 2022

Thanks @JhonathanLepidus. I've gone ahead and opened a PR against OJS too, so that we can run the tests there. That will help catch any unintended regressions. I think these are all of the PRs.

PRs:
pkp/citationStyleLanguage#93
pkp/ops#251

Tests only:
pkp/ojs#3342

@JhonathanLepidus
Copy link
Contributor

Good! What about the PR to add compatibility with OPS 3.3.0 and the one to upgrade style files in 3.3.0? Should they be closed, since it's a big change to a stable version?

NateWr added a commit to pkp/citationStyleLanguage that referenced this issue Mar 24, 2022
@NateWr
Copy link
Contributor

NateWr commented Mar 24, 2022

I've merged the updates to citationStyleLanguage and the PR to add the submodule to OPS. Thanks @JhonathanLepidus! 🎉

What about the pkp/citationStyleLanguage#89 and pkp/citationStyleLanguage#91? Should they be closed, since it's a big change to a stable version?

At this time, we don't want to add them to the stable-3_3_0 branch. However, Alec set out some conditions that would need to be met if you did want to push for a merge to stable-3_3_0.

If you're happy with the merge to main, I can close the other PRs. But if you did want to push for a stable-3_3_0 change, we can keep them open. I'll leave this comment open until you've decided.

@NateWr NateWr added this to the 3.4 milestone Mar 24, 2022
@diegoabadan
Copy link
Contributor

Thank you, Nate.

Scielo can wait for 3.4.

Among other customers is not a strong demand.

@NateWr NateWr closed this as completed Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement:3:Major A new feature or improvement that will take a month or more to complete.
Projects
None yet
Development

No branches or pull requests

7 participants