diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ed2ac63e..23cea9e1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.13" - name: Install dependencies run: | python --version diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3802b505..e2af5c42 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,7 +10,7 @@ sphinx: build: os: ubuntu-22.04 tools: - python: "3.11" + python: "3.13" python: install: # This runs pip install .[docs] from the project root. diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 62d528de..cc93d14e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,7 @@ +**1.3.0 - TBD/TBD/TBD** + + - Add support for python 3.13 + **1.2.7 - 01/21/26** - Add support for python 3.12 and numpy 2.x diff --git a/Jenkinsfile b/Jenkinsfile index b82d8ee0..0f035008 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,8 +33,7 @@ reusable_pipeline( // Note: Newly added branches will require a manual trigger of the first build // for subsequent scheduled builds to run. "main", - "epic/full_scale_testing", - "release-candidate/v.orange.rebased", + "release-candidate-spring26", ], stagger_scheduled_builds: true, upstream_repos: ["layered_config_tree"], diff --git a/Makefile b/Makefile index af5ab279..22375473 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,93 @@ # Check if we're running in Jenkins ifdef JENKINS_URL - # Files are already in workspace from shared library +# Files are already in workspace from shared library MAKE_INCLUDES := . else - # For local dev, use the installed vivarium_build_utils package - MAKE_INCLUDES := $(shell python -c "from vivarium_build_utils.resources import get_makefiles_path; print(get_makefiles_path())") +# For local dev, use the installed vivarium_build_utils package if it exists +# First, check if we can import vivarium_build_utils and assign 'yes' or 'no'. +# We do this by importing the package in python and redirecting stderr to the null device. +# If the import is successful (&&), it will print 'yes', otherwise (||) it will print 'no'. + VIVARIUM_BUILD_UTILS_AVAILABLE := $(shell python -c "import vivarium_build_utils" 2>/dev/null && echo "yes" || echo "no") +# If vivarium_build_utils is available, get the makefiles path or else set it to empty + ifeq ($(VIVARIUM_BUILD_UTILS_AVAILABLE),yes) + MAKE_INCLUDES := $(shell python -c "from vivarium_build_utils.resources import get_makefiles_path; print(get_makefiles_path())") + else + MAKE_INCLUDES := + endif endif -PACKAGE_NAME = pseudopeople +# Set the package name as the last part of this file's parent directory path +PACKAGE_NAME = $(notdir $(CURDIR)) +ifneq ($(MAKE_INCLUDES),) # not empty # Include makefiles from vivarium_build_utils include $(MAKE_INCLUDES)/base.mk include $(MAKE_INCLUDES)/test.mk +else # empty +# Use this help message (since the vivarium_build_utils version is not available) +help: + @echo + @echo "For Make's standard help, run 'make --help'." + @echo + @echo "Most of our Makefile targets are provided by the vivarium_build_utils" + @echo "package. To access them, you need to create a development environment first." + @echo + @echo "make build-env" + @echo + @echo "USAGE:" + @echo " make build-env [name=] [py=]" + @echo + @echo "ARGUMENTS:" + @echo " name [optional]" + @echo " Name of the conda environment to create (defaults to )" + @echo " py [optional]" + @echo " Python version (defaults to latest supported)" + @echo + @echo "After creating the environment:" + @echo " 1. Activate it: 'conda activate '" + @echo " 2. Run 'make help' again to see all newly available targets" + @echo +endif + +build-env: # Create a new environment with installed packages +# Validate arguments - exit if unsupported arguments are passed + @allowed="name py"; \ + for arg in $(filter-out build-env,$(MAKECMDGOALS)) $(MAKEFLAGS); do \ + case $$arg in \ + *=*) \ + arg_name=$${arg%%=*}; \ + if ! echo " $$allowed " | grep -q " $$arg_name "; then \ + allowed_list=$$(echo $$allowed | sed 's/ /, /g'); \ + echo "Error: Invalid argument '$$arg_name'. Allowed arguments are: $$allowed_list" >&2; \ + exit 1; \ + fi \ + ;; \ + esac; \ + done + +# Handle arguments and set defaults +# name + @$(eval name ?= $(PACKAGE_NAME)) +# python version - validate if specified, else get default from json file + @supported_versions=$$(python -c "import json; print(' '.join(json.load(open('python_versions.json'))))" 2>/dev/null || echo ""); \ + if [ -n "$(py)" ] && ! echo "$$supported_versions" | grep -q "$(py)"; then \ + echo "Error: Python version '$(py)' is not supported. Available: $$(echo $$supported_versions | sed 's/ /, /g')" >&2; \ + exit 1; \ + fi + @$(eval py ?= $(shell python -c "import json; print(max(json.load(open('python_versions.json')), key=lambda x: tuple(map(int, x.split('.')))))")) + + + conda create -n $(name) python=$(py) --yes +# Bootstrap vivarium_build_utils into the new environment + conda run -n $(name) pip install vivarium_build_utils + conda run -n $(name) make install + + @echo + @echo "Finished building environment" + @echo " name: $(name)" + @echo " python version: $(py)" + @echo + @echo "Don't forget to activate it with:" + @echo "conda activate $(name)" + @echo + diff --git a/README.rst b/README.rst index 2cd5de9d..03dbf1d8 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ pseudopeople is a Python package that generates realistic simulated data about a fictional United States population, designed for use in testing entity resolution (record linkage) methods or other data science algorithms at scale. -**pseudopeople requires Python 3.10-3.12 to run** +**pseudopeople requires Python 3.10-3.13 to run** You can install pseudopeople from PyPI with pip: diff --git a/docs/source/index.rst b/docs/source/index.rst index 0e7063fd..8e32a11c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -48,7 +48,7 @@ out more about the principles and processes underlying this work. Quickstart ---------- -pseudopeople requires a version of `Python `_ between 3.10 and 3.12 (inclusive) to be installed. +pseudopeople requires a version of `Python `_ between 3.10 and 3.13 (inclusive) to be installed. Once Python is installed, you can install pseudopeople with `pip `_ by running the command: .. highlight:: console diff --git a/python_versions.json b/python_versions.json index 4a273941..350c415d 100644 --- a/python_versions.json +++ b/python_versions.json @@ -1 +1 @@ -["3.10", "3.11", "3.12"] \ No newline at end of file +["3.10", "3.11", "3.12", "3.13"] \ No newline at end of file diff --git a/setup.py b/setup.py index c84c25c4..f958d25e 100644 --- a/setup.py +++ b/setup.py @@ -40,8 +40,8 @@ install_requirements = [ "vivarium_dependencies[numpy,pandas,pyyaml,pyarrow]", - "vivarium_build_utils>=1.1.0,<2.0.0", - "vivarium>=1.2.0", + "vivarium_build_utils>=2.1.0,<3.0.0", + "vivarium>=3.0.0,<4.0.0", "tqdm", "layered_config_tree>=1.0.1", ] diff --git a/src/pseudopeople/noise_functions.py b/src/pseudopeople/noise_functions.py index 941f5b6f..4b28bebe 100644 --- a/src/pseudopeople/noise_functions.py +++ b/src/pseudopeople/noise_functions.py @@ -12,7 +12,6 @@ COPY_HOUSEHOLD_MEMBER_COLS, GUARDIAN_DUPLICATION_ADDRESS_COLUMNS, HOUSING_TYPE_GUARDIAN_DUPLICATION_RELATONSHIP_MAP, - INT_TO_STRING_COLUMNS, ) from pseudopeople.data.fake_names import fake_first_names, fake_last_names from pseudopeople.noise_scaling import (