From c948a6bbe3ba42ca62c64e9daca426da49d5c81c Mon Sep 17 00:00:00 2001 From: Kavya Wadhwa Date: Mon, 12 Oct 2026 23:25:10 +0530 Subject: [PATCH 1/3] Tell users to install into a fresh virtual environment, fix PyPI credits Installing into the system Python or conda's base environment mixes the package with other Qt/PyQt, numpy or Geant4 builds, the most common cause of library mismatch errors (and Ubuntu refuses system pip installs). The README and INSTALLATION.md now start with creating a venv or conda env. PyPI shows only the first person of an Author-email list, so 0.1.1 lists just Luis. List authors and maintainers by name so both are shown. --- INSTALLATION.md | 24 ++++++++++++++++++++++++ README.md | 19 ++++++++++++++++++- pyproject.toml | 9 +++++---- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/INSTALLATION.md b/INSTALLATION.md index 5b321f8..f8ccfdd 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -13,6 +13,30 @@ requires a Geant4 installation. ## Install a prebuilt wheel +### Create a virtual environment first + +Always install into a fresh virtual environment. Installing into the system +Python or conda's `base` environment mixes this package with whatever is +already there (other Qt/PyQt, numpy or Geant4 builds), which is the most common +cause of library mismatch errors. On recent Ubuntu/Debian, `pip install` +outside a virtual environment is refused with `externally-managed-environment`. + +```bash +python3 -m venv g4-env +source g4-env/bin/activate +python -m pip install --upgrade pip +``` + +or with conda: + +```bash +conda create -n g4 python=3.12 -y +conda activate g4 +``` + +Activate the environment again in every new terminal. All commands below +assume it is active. + ### From PyPI ```bash diff --git a/README.md b/README.md index 8dc2f66..10fbf22 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,29 @@ reach out to kavyavadhwa@gmail.com. ## Installation The package is published on -[PyPI](https://pypi.org/project/geant4-python-application/): +[PyPI](https://pypi.org/project/geant4-python-application/). Install it into a +fresh virtual environment: mixing it with packages already in your system or +base conda Python (other Qt/PyQt, numpy or Geant4 builds) is the most common +cause of library mismatch errors. ```bash +python3 -m venv g4-env +source g4-env/bin/activate +python -m pip install --upgrade pip pip install "geant4-python-application[gui]" ``` +With conda, create a new environment instead of using `base`: + +```bash +conda create -n g4 python=3.12 -y +conda activate g4 +pip install "geant4-python-application[gui]" +``` + +Activate the environment again (`source g4-env/bin/activate` or +`conda activate g4`) in every new terminal before using the package. + - Prebuilt wheels for macOS (Apple Silicon and Intel) and Linux x86_64, Python 3.8–3.13. Geant4 is bundled, so no separate Geant4 (C++) installation is needed. diff --git a/pyproject.toml b/pyproject.toml index 4ab5e53..3d20533 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,13 +3,14 @@ build-backend = "scikit_build_core.build" requires = ["scikit-build-core>=0.3.3", "pybind11"] [project] +# Names only: PyPI shows just the first person when authors carry emails. authors = [ - { name = "Luis Antonio Obis Aparicio", email = "luis.antonio.obis@gmail.com" }, - { name = "Kavya Wadhwa", email = "kavyavadhwa@gmail.com" }, + { name = "Luis Antonio Obis Aparicio" }, + { name = "Kavya Wadhwa" }, ] maintainers = [ - { name = "Luis Antonio Obis Aparicio", email = "luis.antonio.obis@gmail.com" }, - { name = "Kavya Wadhwa", email = "kavyavadhwa@gmail.com" }, + { name = "Luis Antonio Obis Aparicio" }, + { name = "Kavya Wadhwa" }, ] classifiers = [ "Intended Audience :: Developers", From e881f551d4165c54640827aaaedf26e68f16d1fc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Oct 2026 17:55:28 +0000 Subject: [PATCH 2/3] style: pre-commit fixes --- INSTALLATION.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/INSTALLATION.md b/INSTALLATION.md index f8ccfdd..c806dbd 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -16,10 +16,10 @@ requires a Geant4 installation. ### Create a virtual environment first Always install into a fresh virtual environment. Installing into the system -Python or conda's `base` environment mixes this package with whatever is -already there (other Qt/PyQt, numpy or Geant4 builds), which is the most common -cause of library mismatch errors. On recent Ubuntu/Debian, `pip install` -outside a virtual environment is refused with `externally-managed-environment`. +Python or conda's `base` environment mixes this package with whatever is already +there (other Qt/PyQt, numpy or Geant4 builds), which is the most common cause of +library mismatch errors. On recent Ubuntu/Debian, `pip install` outside a +virtual environment is refused with `externally-managed-environment`. ```bash python3 -m venv g4-env @@ -34,8 +34,8 @@ conda create -n g4 python=3.12 -y conda activate g4 ``` -Activate the environment again in every new terminal. All commands below -assume it is active. +Activate the environment again in every new terminal. All commands below assume +it is active. ### From PyPI From 3c0e0a0c8d9d5d1e4549072244e6791a4b5d532d Mon Sep 17 00:00:00 2001 From: Kavya Wadhwa Date: Thu, 15 Oct 2026 00:33:23 +0530 Subject: [PATCH 3/3] Show download and view counts in the README badges --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 10fbf22..e5742c2 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ [![PyPI](https://img.shields.io/pypi/v/geant4-python-application)](https://pypi.org/project/geant4-python-application/) [![Python](https://img.shields.io/pypi/pyversions/geant4-python-application)](https://pypi.org/project/geant4-python-application/) +[![Downloads](https://static.pepy.tech/badge/geant4-python-application)](https://pepy.tech/projects/geant4-python-application) +[![Downloads/month](https://static.pepy.tech/badge/geant4-python-application/month)](https://pepy.tech/projects/geant4-python-application) +[![Views](https://hits.sh/github.com/lobis/geant4-python-application.svg?label=views)](https://hits.sh/github.com/lobis/geant4-python-application/) [![Wheels](https://github.com/lobis/geant4-python-application/actions/workflows/wheels.yaml/badge.svg)](https://github.com/lobis/geant4-python-application/actions/workflows/wheels.yaml) [![Build and Test](https://github.com/lobis/geant4-python-application/actions/workflows/build-test.yaml/badge.svg)](https://github.com/lobis/geant4-python-application/actions/workflows/build-test.yaml)