diff --git a/.clang-format b/.clang-format deleted file mode 100644 index e69de29bb..000000000 diff --git a/.github/bin/install-deps-ubuntu.sh b/.github/bin/install-deps-ubuntu.sh index 9c523c15d..ab31b58cc 100755 --- a/.github/bin/install-deps-ubuntu.sh +++ b/.github/bin/install-deps-ubuntu.sh @@ -4,9 +4,9 @@ apt-get -y update || exit 1 apt-get -y install libboost-dev libcgal-dev libgmp-dev libmpfr-dev \ libvtk9-dev libxi-dev libocct-*-dev occt-misc numdiff || exit 1 -root_version="6.28.04" +root_version="6.28.10" ROOTSYS="/opt/root" mkdir -p "$ROOTSYS" || exit 1 -wget -q -O- "https://root.cern/download/root_v${root_version}.Linux-ubuntu22-x86_64-gcc11.3.tar.gz" \ +wget -q -O- "https://root.cern/download/root_v${root_version}.Linux-ubuntu22-x86_64-gcc11.4.tar.gz" \ | tar --strip-components 1 -C "$ROOTSYS" --strip=1 -x -z || exit 1 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 368d295a8..f9ecf576e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,5 +5,3 @@ updates: directory: "/" schedule: interval: "monthly" - ignore: - - dependency-name: "actions/*" diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml index c3476d643..4e34420dd 100644 --- a/.github/workflows/distribution.yml +++ b/.github/workflows/distribution.yml @@ -11,14 +11,14 @@ jobs: name: Make SDist runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Build SDist run: pipx run build --sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz @@ -31,7 +31,7 @@ jobs: os: [ubuntu-latest, macos-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -44,7 +44,7 @@ jobs: MAKEFLAGS: -j${{ steps.cpu-cores.outputs.count }} - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: wheelhouse/*.whl @@ -53,12 +53,12 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.8.10 + - uses: pypa/gh-action-pypi-publish@v1.8.11 with: user: __token__ password: ${{ secrets.pypi_password }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 74b3c7c5e..de3609314 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] os: [ubuntu-latest, macOS-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install non-pip dependencies on Ubuntu if: runner.os == 'Linux' run: sudo .github/bin/install-deps-ubuntu.sh @@ -30,7 +30,7 @@ jobs: if: runner.os == 'macOS' run: .github/bin/install-deps-macos.sh - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Get number of CPU cores @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest container: docker://g4edge/ubuntu:latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v2 id: cpu-cores @@ -65,14 +65,14 @@ jobs: name: Calculate and upload test coverage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 2 - name: Install non-pip dependencies on Ubuntu run: | sudo .github/bin/install-deps-ubuntu.sh .github/bin/setenv-ubuntu.sh - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.10" - name: Get number of CPU cores diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ed8559145..8d637a8ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,7 +49,7 @@ repos: rev: "v2.2.6" hooks: - id: codespell - args: ["-L", "commun,precess", "-x", "docs/source/authorship.rst"] + args: ["-L", "commun,precess"] types_or: [rst] - repo: https://github.com/pre-commit/pygrep-hooks diff --git a/CITATION.cff b/CITATION.cff index b8bb8a6f7..33b6fe1e6 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,62 +1,62 @@ cff-version: 1.2.0 -title: "pyg4ometry" -doi: UPDATEME -date-released: 2000-01-01 +title: pyg4ometry +doi: 10.5281/zenodo.10449301 +date-released: 2024-01-01 url: https://github.com/github-linguist/linguist message: "If you use this software, please cite it as below." authors: - family-names: Boogert given-names: Stewart - orcid: + orcid: https://orcid.org/0000-0002-7742-4237 - family-names: Abramov given-names: Andrey - orcid: + orcid: https://orcid.org/0000-0003-4764-771X - family-names: Nevay given-names: Laurence - orcid: + orcid: https://orcid.org/0000-0001-7225-9327 - family-names: Shields given-names: William - orcid: + orcid: https://orcid.org/0000-0002-4825-0303 - family-names: Walker given-names: Stuart - orcid: + orcid: https://orcid.org/0000-0003-1301-2724 - family-names: Butcher given-names: Alistar - orcid: + affiliation: "Royal Holloway, University of London" - family-names: Hernalsteens given-names: Cedric - orcid: + orcid: https://orcid.org/0000-0003-4038-6246 - family-names: Shellswell - given-names: Ben - orcid: + given-names: Benjamin + affiliation: "Royal Holloway, University of London" - family-names: Ramoisiaux given-names: Eliott - orcid: + orcid: https://orcid.org/0000-0001-6523-2337 - family-names: Pertoldi given-names: Luigi orcid: https://orcid.org/0000-0002-0467-2571 - family-names: Huber given-names: Manuel - email: ich@manuelhu.de + email: info@manuelhu.de preferred-citation: type: article authors: - - family-names: "Boogert" - given-names: "Stewart" - orcid: - - family-names: "Abramov" - given-names: "Andrey" - orcid: - - family-names: "Nevay" - given-names: "Laurence" - orcid: - - family-names: "Shields" - given-names: "William" - orcid: - - family-names: "Walker" - given-names: "Stuart" - orcid: + - family-names: Boogert + given-names: Stewart + orcid: https://orcid.org/0000-0002-7742-4237 + - family-names: Abramov + given-names: Andrey + orcid: https://orcid.org/0000-0003-4764-771X + - family-names: Nevay + given-names: Laurence + orcid: https://orcid.org/0000-0001-7225-9327 + - family-names: Shields + given-names: William + orcid: https://orcid.org/0000-0002-4825-0303 + - family-names: Walker + given-names: Stuart + orcid: https://orcid.org/0000-0003-1301-2724 doi: 10.1016/j.cpc.2021.108228 journal: "Comput. Phys. Commun." title: "Pyg4ometry: A Python library for the creation of Monte Carlo radiation transport physical geometries" diff --git a/README.md b/README.md index 7331f6a1b..3a85d2a61 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Carlo (Geant4 and Fluka) geometries. ![GitHub issues](https://img.shields.io/github/issues/g4edge/pyg4ometry?logo=github) ![GitHub pull requests](https://img.shields.io/github/issues-pr/g4edge/pyg4ometry?logo=github) ![License](https://img.shields.io/github/license/g4edge/pyg4ometry) +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10449301.svg)](https://doi.org/10.5281/zenodo.10449301) [![Read the Docs](https://img.shields.io/readthedocs/pyg4ometry?logo=readthedocs)](https://pyg4ometry.readthedocs.io) ## Installing from PyPI @@ -20,7 +21,7 @@ Carlo (Geant4 and Fluka) geometries. > pip install pyg4ometry ``` -> **Note** +> [!NOTE] > Most dependencies are available from pip but you will need to install OpenCASCADE > cgal, mpfr, gmp, ROOT. Find [here](https://github.com/g4edge/pyg4ometry/tree/main/.github/bin) > installers for Ubuntu and MacOS. @@ -33,7 +34,7 @@ Carlo (Geant4 and Fluka) geometries. > pip install . # add --editable for a version which you can edit ``` -> **Note** +> [!NOTE] > If you update your Git clone and the pybind11 C++ has changes you will need > to reinstall and thus trigger a rebuild. diff --git a/docs/source/authorship.rst b/docs/source/authorship.rst deleted file mode 100644 index fe91453d5..000000000 --- a/docs/source/authorship.rst +++ /dev/null @@ -1,17 +0,0 @@ -========== -Authorship -========== - -The following people have contributed to pyg4ometry: - -* Stewart Boogert (RHUL) -* Andrey Abramov (RHUL -> CERN) -* Alistair Butcher (RHUL -> Amazon) -* Cedric Hernalsteens (ULB -> CERN) -* Laurie Nevay (RHUL) -* William Shields (RHUL) -* Ben Shellswell (former RHUL) -* Eliott Ramoisiaux (ULB) -* Stuart Walker (RHUL -> DESY) -* Luigi Pertoldi (TUM) -* Manuel Huber (TUM) diff --git a/docs/source/citation.rst b/docs/source/citation.rst index 6be6084a3..2ec68f9dc 100644 --- a/docs/source/citation.rst +++ b/docs/source/citation.rst @@ -2,46 +2,33 @@ Referencing & Citation ====================== -Any publications including simulations made using pyg4ometry **must** cite: - - S.D. Walker, A. Abramov, L.J. Nevay, W. Shields, S.T. Boogert, - pyg4ometry: A Python library for the creation of Monte Carlo radiation transport physical geometries, - Computer Physics Communications **272** 108228 (2022). - - -Run: :: - - pyg4ometry --citation - -to get the citation text in a human-readable and bibtex format. +.. important:: -* ``_ -* Preprint was: ``_, but the above should be used. + Citation information can be obtained on GitHub by pointing your browser to + `github.com/g4edge/pyg4ometry `_ and + selecting "Cite this repository" in the sidebar on the right. pyg4ometry + uses a `CITATION.cff + `_ file. -The bibtex citation from ``_: +Citations allow the authors to demonstrably show the code usage and therefore to +continue to support the development and maintenance of pyg4ometry. -.. code-block:: bibtex +Any publications including simulations made using pyg4ometry **must** cite: - @article{Boogert:2020cmn, - author = "Boogert, Stewart and Abramov, Andrey and Nevay, Laurence and Shields, William and Walker, Stuart", - title = "{Pyg4ometry: A Python library for the creation of Monte Carlo radiation transport physical geometries}", - eprint = "2010.01109", - archivePrefix = "arXiv", - primaryClass = "physics.comp-ph", - doi = "10.1016/j.cpc.2021.108228", - journal = "Comput. Phys. Commun.", - volume = "272", - pages = "108228", - year = "2022" - } + S.D. Walker, A. Abramov, L.J. Nevay, W. Shields, S.T. Boogert, + *"pyg4ometry: A Python library for the creation of Monte Carlo radiation transport physical geometries"*, + Computer Physics Communications **272** 108228 (2022). + DOI: `10.1016/j.cpc.2021.108228 `_ -Citations allow the authors to demonstrably show the code usage and therefore to -continue to support the development and maintenance of pyg4ometry. +Additionally, we automatically generate a DOI for each pyg4ometry code release +through Zenodo at `this page +`_, if you wish to cite a +specific pyg4ometry version. Other publications on pyg4ometry: -* `Pyg4ometry : A Tool To Create Geometries For Geant4, Bdsim, G4Beamline and -Fluka For Particle Loss and Energy Deposit Studies, IPAC2019, Melbourne, -Australia, 2019 `_ -(Google scholar `cites -`_) +* S.T. Boogert, A. Abramov, J. Albrecht, G. D’Alessandro, L.J. Nevay, W. Shields, S.D. Walker, + *Pyg4ometry : A Tool To Create Geometries For Geant4, Bdsim, G4Beamline and + Fluka For Particle Loss and Energy Deposit Studies*, IPAC2019, Melbourne, + Australia, 2019. DOI: `10.18429/JACoW-IPAC2019-WEPTS054 + `_ diff --git a/docs/source/index.rst b/docs/source/index.rst index 47997fb09..46cb27101 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -22,7 +22,6 @@ particle tracking simulations. Source Code License - authorship citation Changelog version_history diff --git a/src/pyg4ometry/cli.py b/src/pyg4ometry/cli.py index f32fa6aa4..25c67d084 100644 --- a/src/pyg4ometry/cli.py +++ b/src/pyg4ometry/cli.py @@ -78,24 +78,7 @@ def _parseStrPythonAsDict(strPython): def _printCitation(): - s = "S.D. Walker, A. Abramov, L.J. Nevay, W. Shields, S.T. Boogert,\n" - s += "pyg4ometry: A Python library for the creation of Monte Carlo radiation\n" - s += "transport physical geometries, Computer Physics Communications **272** 108228 (2022)." - print(s) - print("Bibtex entry:") - s = "@article{Boogert:2020cmn,\n" - s += ' author = "Boogert, Stewart and Abramov, Andrey and Nevay, Laurence and Shields, William and Walker, Stuart",\n' - s += ' title = "{Pyg4ometry: A Python library for the creation of Monte Carlo radiation transport physical geometries}",\n' - s += ' eprint = "2010.01109",\n' - s += ' archivePrefix = "arXiv",\n' - s += ' primaryClass = "physics.comp-ph",\n' - s += ' doi = "10.1016/j.cpc.2021.108228",\n' - s += ' journal = "Comput. Phys. Commun.",\n' - s += ' volume = "272",\n' - s += ' pages = "108228",\n' - s += ' year = "2022"\n' - s += "}" - print(s) + print("https://zenodo.org/doi/10.5281/zenodo.10449301") def cli(