Metadata-Version: 2.4
Name: alphanso-gui
Version: 0.0.2
Summary: GUI wrapper for the ALPHANSO (α,n) neutron source calculator
License: MIT
Project-URL: Package Index, https://gitlab.asnr.fr/api/v4/projects/wmonange%2Falphansogui/packages/pypi/simple
Keywords: nuclear,neutron,alpha-n,GUI,alphanso
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: alphanso
Requires-Dist: PyQt5>=5.15
Requires-Dist: matplotlib>=3.5
Dynamic: license-file

# ALPHONSO GUI

A graphical interface for the [ALPHANSO](https://github.com/alphanso-org/alphanso)
(α,n) neutron source calculator.

## Installation

### From a GitLab Release ✓ recommended

1. **Download the wheel** from the Releases page:
   - Open the project on GitLab → *Deploy → Releases*.
   - Click the release you want (e.g. `v0.1.0`).
   - Under **Assets**, download the file named
     `alphanso_gui-<VERSION>-py3-none-any.whl`.

   Or download directly with `curl`:

   ```bash
   # Linux / macOS
   curl --location --output alphanso_gui.whl \
     --header "PRIVATE-TOKEN: <YOUR_TOKEN>" \
     "https://gitlab.asnr.fr/wmonange/alphansogui/-/releases/v<VERSION>/downloads/alphanso_gui-<VERSION>-py3-none-any.whl"
   ```

   ```powershell
   # Windows (PowerShell)
   Invoke-WebRequest `
     -Headers @{"PRIVATE-TOKEN"="<YOUR_TOKEN>"} `
     -Uri "https://gitlab.asnr.fr/wmonange/alphansogui/-/releases/v<VERSION>/downloads/alphanso_gui-<VERSION>-py3-none-any.whl" `
     -OutFile alphanso_gui.whl
   ```

2. **Install** with pip — identical command on Linux and Windows:

   ```bash
   pip install alphanso_gui-<VERSION>-py3-none-any.whl
   ```

   pip will fetch the remaining dependencies (`alphanso`, `PyQt5`,
   `matplotlib`) from PyPI automatically.

3. **Fully offline / air-gapped** — pre-download all dependencies on a
   machine with internet access, then transfer the `wheelhouse/` folder:

   ```bash
   # On the internet-connected machine
   pip download alphanso_gui-<VERSION>-py3-none-any.whl -d ./wheelhouse

   # On the isolated machine (Linux or Windows)
   pip install --no-index --find-links ./wheelhouse alphanso_gui-<VERSION>-py3-none-any.whl
   ```

> The wheel is tagged `py3-none-any` — pure Python, no compilation needed,
> installs on Linux and Windows with the same file.

---

### From the GitLab PyPI Package Registry

`alphanso-gui` is also published to the internal GitLab PyPI registry. You need
a **GitLab personal access token** with at least the `read_package_registry`
scope (*GitLab → User settings → Access tokens*).

**Install directly with pip:**

```bash
pip install alphanso-gui \
  --extra-index-url https://__token__:<YOUR_TOKEN>@gitlab.asnr.fr/api/v4/projects/wmonange%2Falphansogui/packages/pypi/simple
```

**Or configure pip permanently** by copying the provided template:

```bash
# For a virtualenv only (recommended)
cp pip.conf.template $VIRTUAL_ENV/pip.conf

# Or globally for your user
cp pip.conf.template ~/.config/pip/pip.conf
```

Edit the file and replace `<your-gitlab-personal-access-token>` with your
token. After that a plain `pip install alphanso-gui` is enough.

> **Security note** — never commit a `pip.conf` or `.pypirc` containing a real
> token. Both template files are listed in `.gitignore`.

---

### From source

```bash
# Clone the repository then install in editable mode
pip install -e .
```

This will also install `alphanso` and its dependencies.  On first use ALPHANSO
automatically downloads ~1.1 GB of nuclear data.

## Usage

```bash
# Launch the GUI (after installation)
alphanso-gui

# Or directly with Python
python -m alphanso_gui
```

## Requirements

- Python ≥ 3.10
- `alphanso` (pinned by this package)
- `PyQt5 ≥ 5.15`
- `matplotlib ≥ 3.5`
