From cb0c2d942402a7096e9008aea381662aea77c891 Mon Sep 17 00:00:00 2001 From: eatyourpeas Date: Sun, 17 Aug 2025 16:07:25 +0100 Subject: [PATCH] removes the manifest.ini, moves into pyproject. refactors docker compose to remove warning. removes binder link fromo readme. resets the bash starter scripts to s/up as the entry point - this will launch a container with the notebooks and the package in editable mode (hot reload) --- .binder/requirements.txt | 6 +----- MANIFEST.in | 1 - README.md | 29 +++-------------------------- docker-compose.yml | 1 - pyproject.toml | 5 ++--- s/dev | 18 ------------------ s/notebooks | 20 -------------------- 7 files changed, 6 insertions(+), 74 deletions(-) delete mode 100644 MANIFEST.in delete mode 100755 s/dev delete mode 100755 s/notebooks diff --git a/.binder/requirements.txt b/.binder/requirements.txt index 3f15335..7010c2e 100644 --- a/.binder/requirements.txt +++ b/.binder/requirements.txt @@ -1,5 +1 @@ -rcpchgrowth -pandas>=1.5 -matplotlib>=3.7 -jupyterlab -ipykernel \ No newline at end of file +-e ".[notebook]" \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 8d51d0b..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -recursive-include rcpchgrowth/data_tables * \ No newline at end of file diff --git a/README.md b/README.md index ae46bce..25f1834 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [![PyPI version](https://img.shields.io/pypi/v/rcpchgrowth.svg?style=flat-square&labelColor=%2311a7f2&color=%230d0d58)](https://pypi.org/project/rcpchgrowth/) [![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg?style=flat-square&labelColor=%2311a7f2&color=%230d0d58)](https://www.gnu.org/licenses/agpl-3.0) -[![Binder](https://img.shields.io/badge/Binder-Launch?style=flat-square&labelColor=%2311a7f2&color=%230d0d58&logo=binder&logoColor=white)](https://mybinder.org/v2/gh/rcpch/rcpchgrowth-python/live?labpath=notebooks%2FQuickstart.ipynb) [![Codespaces](https://img.shields.io/badge/Codespaces-Open_in_Cloud?style=flat-square&labelColor=%2311a7f2&color=%230d0d58&logo=github&logoColor=white)](https://codespaces.new/rcpch/rcpchgrowth-python?quickstart=1) Please go to for full documentation. @@ -19,19 +18,13 @@ Issues can be raised here If you want to avoid setting up docker environments, there are shortcut scripts the create a dockerized environment with RCPCHGrowth already installed. -First ensure the folders have the correct permissions: +This will generate a container which will launch some Jupyter notebooks in a browser and allow local dev ( with hot reload). ```bash -chmod +x s/dev +s/up ``` -To generate a container which will launch the notebooks in a browser and allow local dev ( with hot reload) - -```bash -s/dev -``` - -### Minimal installation (assuming you have a python virtual env setup) +### Minimal installation (without docker) assuming you have a python virtual env setup ```bash pip install rcpchgrowth @@ -45,22 +38,6 @@ pip install "rcpchgrowth[notebook]" The `notebook` extra currently pulls in: `pandas`, `matplotlib`, `jupyterlab`, `ipykernel`. -To verify versions inside a Jupyter session: - -```python -import rcpchgrowth, pandas as pd, sys -print(rcpchgrowth.__version__, pd.__version__, sys.version) -``` - -## Example notebooks - -Example notebooks live in `notebooks/`: - -- `Quickstart.ipynb` – single measurement, small batch, simple plot. -- `ResearchTemplate.ipynb` – structured workflow for batch CSV processing (ages, SDS, centiles, quality flags, export). -- `AdditionalFunctions.ipynb` - exposes some of the date and calculation functions for more in-depth exploration -- `ExperimentalFunctions.ipynb` - exposes functions that are in development and more experimental - ## Data handling / privacy diff --git a/docker-compose.yml b/docker-compose.yml index b721bf6..7f9fe3f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.9" services: dev: build: . diff --git a/pyproject.toml b/pyproject.toml index cceadca..61f5fa9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,5 @@ exclude = ["notebooks"] file = "README.md" content-type = "text/markdown" -# Future: you can move package-data patterns here instead of MANIFEST.in if desired: -# [tool.setuptools.package-data] -# rcpchgrowth = ["data_tables/**/*.csv", "data_tables/**/*.json"] +[tool.setuptools.package-data] +rcpchgrowth = ["data_tables/**/*.csv", "data_tables/**/*.json", "data_tables/**/*.xls", "data_tables/**/*.pdf", "data_tables/**/*.bas", "data_tables/**/*.xlsx"] \ No newline at end of file diff --git a/s/dev b/s/dev deleted file mode 100755 index 8c5fa38..0000000 --- a/s/dev +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e -set -o pipefail - -# Launch an interactive shell in the dev container (build if needed) -# Usage: s/dev - -# Ensure images are built -docker compose build rcpchgrowth-dev - -# Start (detached) if not already running -if ! docker compose ps --status=running | grep -q rcpchgrowth-dev; then - docker compose up -d rcpchgrowth-dev -fi - -# Exec into container -exec docker compose exec rcpchgrowth-dev bash diff --git a/s/notebooks b/s/notebooks deleted file mode 100755 index dec0cad..0000000 --- a/s/notebooks +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e -set -o pipefail - -# Launch Jupyter Lab in the notebooks service (build/start as needed) -# Usage: s/notebooks - -# Build images (only if missing / outdated) -docker compose build rcpchgrowth-notebooks - -# Start notebooks service (and dependency) in background -if ! docker compose ps --status=running | grep -q rcpchgrowth-notebooks; then - docker compose up -d rcpchgrowth-notebooks -fi - -# Show the access URL -echo "Jupyter Lab should now be available at: http://localhost:8888" - -echo "To stop: docker compose stop rcpchgrowth-notebooks"