Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/output-citation' into citation-c…
Browse files Browse the repository at this point in the history
…ff-zenodo
  • Loading branch information
alexlancaster committed Nov 18, 2024
2 parents 819737b + 005741c commit 620c05e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,18 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Install a recent stable Python to handle Python deps
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Query version with setuptools_scm
id: version
shell: bash
run: |
python -m pip install setuptools_scm
VERSION=$(python -c "from src.PyPop import __version_scheme__; import setuptools_scm; print(setuptools_scm.get_version(version_scheme=__version_scheme__))")
echo "VERSION=${VERSION}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Install toml and remove cffconvert from pyproject.toml
run: |
python -m pip install toml
Expand All @@ -220,10 +232,6 @@ jobs:
with open('pyproject.toml', 'w') as f:
toml.dump(config, f)
"
- name: Install a recent stable Python to handle cffconvert
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Generate citation formats
run: |
python --version
Expand All @@ -234,6 +242,8 @@ jobs:
env:
# FIXME: only run the slow tests when doing regular pushes, or manual - not for PRs
CIBW_TEST_COMMAND: "pytest -v {package}/tests ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && '--runslow' || '' }}"
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.VERSION }}
CIBW_ENVIRONMENT_PASS_LINUX: SETUPTOOLS_SCM_PRETEND_VERSION
with:
only: ${{ matrix.only }}
package-dir: .
Expand Down
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ If you write a paper that uses PyPop in your analysis, please cite

Here's how to cite the correct version:

* If you have PyPop currently installed simply run:
* If you have PyPop version 1.1.2 or later, currently installed, you
can run:

.. code-block:: shell
Expand All @@ -49,8 +50,9 @@ If you write a paper that uses PyPop in your analysis, please cite
<http://pypop.org/docs/guide-chapter-usage.html#command-line-interfaces>`_
in the *User Guide* for more details).

* If you do not have PyPop installed, or otherwise want to obtain
the DOI and citation for specific versions, follow these steps:
* If you do not have PyPop installed, have a release of PyPop
earlier than 1.1.2, or otherwise want to obtain the DOI and
citation for specific versions, follow these steps:

1) First visit the DOI for the overall Zenodo record:
`10.5281/zenodo.10080667
Expand Down
2 changes: 1 addition & 1 deletion src/PyPop/citation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import os
import shutil

citation_output_formats = ['apalike', 'bibtex', 'endnote', 'ris', 'codemeta', 'cff']
citation_output_formats = ['apalike', 'bibtex', 'endnote', 'ris', 'codemeta', 'cff', 'schema.org', 'zenodo']

def convert_citation_formats(build_lib, citation_path):

Expand Down

0 comments on commit 620c05e

Please sign in to comment.