FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

458-Add question for citation files by fdiblen · Pull Request #471 · NLeSC/python-template · GitHub

458-Add question for citation files - #471

Merged
fdiblen merged 23 commits into
mainfrom
458_citation
Aug 21, 2024
Merged

458-Add question for citation files#471
fdiblen merged 23 commits into
mainfrom
458_citation

Conversation

fdiblen commented Aug 20, 2024
edited
Loading

Copy link
Copy Markdown
Member

Checks

Description
This PR adds a question about citation. If the user decides to add citation,

  • CITATION.cff is created
  • cffconvert workflow, which validates the CITATION.cff file, is added
  • a Github issue about citation is created by next_steps_citation.yml. next_steps_citation.yml then removes itself.
  • fixes escape character issues in next_steps*yml workflows (see here)
  • adds CITATION.cff to pyproject.toml
  • adds cffconvert badge to README.md
  • adds CITATION.cff to MANIFEST.in
  • adds citation-related text to README.md, README.dev.md, CONTRIBUTING.md, project_setup.md

Related issues:

Instructions to review the pull request

Install the requirements

cd $(mktemp -d --tmpdir py-tmpl-XXXXXX)
pip install pipx
pipx install copier

Test 1:
Run the command below and say 'yes' to citation question

copier copy --vcs-ref 458_citation https://github.com/nlesc/python-template test_yes

Test 2:
Run the command below and say 'no' to citation question

copier copy --vcs-ref 458_citation https://github.com/nlesc/python-template test_no

What to check in Test 1 and Test 2:
You should see the files below only when you say 'yes':

  • .github/workflows/next_steps_citation.yml
  • .github/workflows/cffconvert.yml
  • .github/next_steps/02_citation.md
  • CITATION.cff

The text related to citation (any sentence includes the words citation, cite) will only be present when you say 'yes'.

Test 3:

  • Push the generated package to a GitHub repository
  • Check if cffconvert workflow runs
  • Check if a Github issue about citation is created

Example test repository:
https://github.com/fdiblen/test_citation

fdiblen marked this pull request as ready for review August 20, 2024 15:18
fdiblen requested review from lyashevska and sjvrijn August 20, 2024 15:18
fdiblen changed the title Add question for citation files 458-Add question for citation files Aug 20, 2024

sjvrijn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good, except for the action failing on the echo command because of a missing single quote.
I'm a bit confused why the Citation issue has shown up twice in your demo repo though. I haven't been able to reproduce that, but would prefer to avoid duplicates if possible.

id: citation
- name: List created issues
run: |
echo 'Created issues that must be completed to have fully working Python package:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Missing ' at the end of the line

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Run echo 'Created issues that must be completed to have fully working Python package:
/home/runner/work/_temp/9d06e288-374f-4dd9-b641-81ec33ef6439.sh: line 1: unexpected EOF while looking for matching `''
Error: Process completed with exit code 2.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

done

lyashevska left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

thanks @fdiblen I have tested all steps, it looks good but there is one typo which I highlighted.

fdiblen marked this pull request as draft August 21, 2024 10:05
fdiblen marked this pull request as ready for review August 21, 2024 12:09

sverhoeven left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

On

- Instructions how to make package [citable](template/.github/next_steps/02_citation.md.jinja)
the link is kaput. it should be '.github/next_steps/%7B%25%20if%20AddCitation%20%25%7D02_citation.md%7B%25%20endif%20%25%7D.jinja'

git config --global user.name 'NLeSC Python template'
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
git rm .github/workflows/next_steps_citation.yml
git rm -r .github/next_steps

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This might be a problem for jobs running in parallel.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

done

sverhoeven left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I got a 'Next step: Citation data' issue and cffconvert ran in new repo.

fdiblen commented Aug 21, 2024

Copy link
Copy Markdown
Member Author

Thank you for the review @sverhoeven!

Comment thread template/README.dev.md.jinja Outdated
{%- endif %}
{% if AddChangeLog -%}1. Update the <CHANGELOG.md> (don't forget to update links at bottom of page).{%- endif %}
{% if AddCitation -%}1. Verify that the information in [`CITATION.cff`](CITATION.cff) is correct.{%- endif %}
1. Verify that the information in [`CITATION.cff`](CITATION.cff) is correct.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This line is a duplicate. Should be removed.

lyashevska left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks great @fdiblen! Ready to go 🥇

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL