Skip to content

Commit

Permalink
Merge branch 'main' into materialPropertyTransfer
Browse files Browse the repository at this point in the history
  • Loading branch information
gipert authored Jan 1, 2024
2 parents 0cc79fa + eaf1618 commit 267fea7
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 118 deletions.
Empty file removed .clang-format
Empty file.
4 changes: 2 additions & 2 deletions .github/bin/install-deps-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ updates:
directory: "/"
schedule:
interval: "monthly"
ignore:
- dependency-name: "actions/*"
12 changes: 6 additions & 6 deletions .github/workflows/distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -31,7 +31,7 @@ jobs:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -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

Expand All @@ -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/[email protected].10
- uses: pypa/[email protected].11
with:
user: __token__
password: ${{ secrets.pypi_password }}
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ 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
- name: Install non-pip dependencies on MacOS
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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
58 changes: 29 additions & 29 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand Down
17 changes: 0 additions & 17 deletions docs/source/authorship.rst

This file was deleted.

57 changes: 22 additions & 35 deletions docs/source/citation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

* `<https://doi.org/10.1016/j.cpc.2021.108228>`_
* Preprint was: `<https://arxiv.org/abs/2010.01109>`_, but the above should be used.
Citation information can be obtained on GitHub by pointing your browser to
`github.com/g4edge/pyg4ometry <https://github.com/g4edge/pyg4ometry>`_ and
selecting "Cite this repository" in the sidebar on the right. pyg4ometry
uses a `CITATION.cff
<https://github.com/g4edge/pyg4ometry/blob/main/CITATION.cff>`_ file.

The bibtex citation from `<https://inspirehep.net/literature/1821231>`_:
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 <https://doi.org/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
<https://zenodo.org/doi/10.5281/zenodo.10449301>`_, 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 <https://doi.org/10.18429/JACoW-IPAC2019-WEPTS054>`_
(Google scholar `cites
<https://scholar.google.com/scholar?cites=7483314837088930734&as_sdt=2005&sciodt=0,5&hl=en>`_)
* 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
<https://doi.org/10.18429/JACoW-IPAC2019-WEPTS054>`_
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ particle tracking simulations.

Source Code <https://github.com/g4edge/pyg4ometry>
License <https://github.com/g4edge/pyg4ometry/blob/main/LICENSE>
authorship
citation
Changelog <https://github.com/g4edge/pyg4ometry/releases>
version_history
Expand Down
19 changes: 1 addition & 18 deletions src/pyg4ometry/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 267fea7

Please sign in to comment.