diff --git a/.github/workflows/test_py_sdist.yml b/.github/workflows/test_py_sdist.yml index ff75445..124d9ae 100644 --- a/.github/workflows/test_py_sdist.yml +++ b/.github/workflows/test_py_sdist.yml @@ -73,6 +73,9 @@ jobs: # # Next testing steps would be to build a minimal MPI program and see # if I can reproduce the issue. + # + # TODO: The C++ CLTs action successfully runs with this setup. Note + # that it doesn't load libmpich-dev. - os: ubuntu-24.04 mpi_impl: "mpich" diff --git a/.gitignore b/.gitignore index 6ff199f..15585df 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,8 @@ -# Text files -!Examples/Data/2d_x_test.txt -!Examples/Data/2d_x_train.txt -!Examples/Data/2d_y_train.txt -!Examples/Data/honda_x_test.txt -!Examples/Data/honda_x_train.txt -!Examples/Data/honda_y_train.txt - # Rhistory .Rhistory # Python cache -__pycache__/* +**/__pycache__ *.pyc # meson setup @@ -20,7 +12,6 @@ subprojects/.wraplock # Other folders .vscode/* -__pycache__ # Sphinx docs docs/build_pdf @@ -37,6 +28,5 @@ openbt_pypkg/src/openbt/_version.py openbt_pypkg/src/openbt/include/ openbt_pypkg/src/openbt/lib/ - # Other files -.DS_Store \ No newline at end of file +.DS_Store diff --git a/Ropenbt/DESCRIPTION b/Ropenbt/DESCRIPTION index 024a5fe..b8fcf25 100644 --- a/Ropenbt/DESCRIPTION +++ b/Ropenbt/DESCRIPTION @@ -2,7 +2,7 @@ Package: Ropenbt Type: Package Title: The Open Bayesian Trees Project Version: 1.2.0 -Date: 2026-07-09 +Date: 2026-07-29 Authors@R: c(person('Matthew', 'Pratola', role=c('aut','cre','cph'),email='mpratola@iu.edu')) URL: http://www.github.com/bandframework/OpenBT Description: diff --git a/docs/conf.py b/docs/conf.py index 92aa8e0..edb253a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,7 +6,7 @@ from openbt import __version__ project = 'OpenBT' -copyright = "2025, Matthew Pratola and John Yannotty" +copyright = "2025, Matthew T. Pratola and John Yannotty" author = "Matthew Pratola and John Yannotty" version = __version__ release = version diff --git a/docs/developer_environment.rst b/docs/developer_environment.rst index 6cbb816..a5c4f4b 100644 --- a/docs/developer_environment.rst +++ b/docs/developer_environment.rst @@ -61,7 +61,7 @@ package is installed |via| $ cd /path/to/OpenBT/openbt_pypkg $ python -m pip install . -or in editable mode |via| +or installed in editable mode |via| .. code-block:: console @@ -104,7 +104,8 @@ are Eigen headers change, the old files persist silently. Consider deleting these if the build produces unexpected behaviour. Note that, of these contents, only a subset of the command line tools in ``bin`` is included in a package - build. See ``meson.build`` for the current list of built tools. + build. See ``meson.build`` for the current list of built tools. See + ``setup.py`` to determine which of these are included in the Python package. * ``openbt_pypkg/src/openbt/include/eigen3/`` — Eigen headers installed under the package prefix as a side effect of Eigen's own Meson install step, diff --git a/docs/get_started_py.rst b/docs/get_started_py.rst index dba67bb..9db61e5 100644 --- a/docs/get_started_py.rst +++ b/docs/get_started_py.rst @@ -2,6 +2,11 @@ Getting Started with Python =========================== .. _Meson: https://mesonbuild.com .. _ninja: https://ninja-build.org +.. _Issue 53: https://github.com/bandframework/OpenBT/issues/53 + +.. note:: + While the Python package presently offers only mixing functionality, the + standard regression functionality will be made available (`Issue 53`_). Installed versions of the |openbt| Python package contain and wrap a dedicated set of |openbt| C++ command line tools. In particular, the package is @@ -62,12 +67,17 @@ prefer to use Conda should proceed with extra caution. Install from PyPI ----------------- -.. _project : https://pypi.org/project/openbt +.. _PyPI: https://pypi.org/project/openbt + +The |openbt| Python package is available for installation |via| PyPI_. It can +be installed by setting up a terminal with the desired target Python and +executing + +.. code:: console + + python -m pip install openbt -This |openbt| Python package is **not** currently distributed on PyPI since a -PyPI |openbt| project_ already exists. That PyPI project space will eventually -be transferred to this project so that distribution of this package will be -enabled by PyPI under the name ``openbt``. +The modern version of this package was first established at ``v1.2.0``. Install from clone ------------------ @@ -86,7 +96,7 @@ The package can be installed in developer/editable mode by executing $ cd /path/to/OpenBT/openbt_pypkg $ python -m pip install -v -e . -In this latter case, the command line tools are built automatically and +In this latter case, a full set of the command line tools is built automatically and installed at ``/path/to/OpenBT/openbt_pypkg/src/openbt/bin``. Testing diff --git a/docs/get_started_r.rst b/docs/get_started_r.rst index 5ccc551..cd7b5c4 100644 --- a/docs/get_started_r.rst +++ b/docs/get_started_r.rst @@ -1,6 +1,11 @@ Getting Started with R ======================= .. _remotes: https://remotes.r-lib.org +.. _Issue 52: https://github.com/bandframework/OpenBT/issues/52 + +.. note:: + While the R package presently offers only regression functionality, mixing + functionality will be made available (`Issue 52`_). Installed versions of the |openbt| R package, ``Ropenbt``, provide a front-end R interface that wraps a dedicated set of |openbt| C++ command line tools. The diff --git a/docs/git_workflow.rst b/docs/git_workflow.rst index 60c3fcd..b39965f 100644 --- a/docs/git_workflow.rst +++ b/docs/git_workflow.rst @@ -1,9 +1,12 @@ +Git Usage +========= + Git Workflow -============ +------------ .. note:: - If merge conflicts exist that block the merging of the PR through the GitHub + If merge conflicts exist that block the merging of a PR through the GitHub web interface, do **not** resolve the conflicts through the web interface, which might result in unwanted side effects. Rather, a gatekeeper should resolve the conflicts in a local clone, merge locally, and push. @@ -23,13 +26,15 @@ informal git workflow. A minimal set of rules are commits to the main repository. Ownership of the branch should be handed over to another developer by explicit communication only. #. Do not create branches off of other feature branches. -#. If the contents of a feature branch are deemed as good and ready for +#. If the contents of a feature branch are deemed good and ready for inclusion in the software, the branch's developer should create a PR for merging the feature branch into ``main``. #. If a PR is ready for review, the developer should first merge ``main`` into the feature branch if ``main`` has been updated since the feature branch was based off of it. This forces the integration of the new work in ``main`` to occur in the feature branch rather than in ``main``, which we try to protect. + Similarly, all merge conflict resolution occurs as subsequent commits on the + feature branch rather than on ``main``. #. If a PR is ready for review and synchronized with ``main``, the branch developer should perform a self-review of the PR. Once completed, the PR must undergo a review by a different developer that is also a gatekeeper of @@ -41,21 +46,26 @@ informal git workflow. A minimal set of rules are Developers are encouraged to create PRs early during branch development to begin and record a dialogue with potential reviewers in the PR. +While its up to the reviewers' discretion to determine what indicates a +successful PR, typically merges should only proceed after confirming that all +GitHub actions are passing on the latest commit of the feature branch. + GitHub Actions -------------- All of the following actions run automatically on every push and pull request to -``main``. A merge should only proceed once all actions pass. +``main``. Documentation ~~~~~~~~~~~~~ -* **Check Spelling** — Checks all files in the repository +* **Check Spelling** — Checks a (potentially proper) subset of files in the repository for typographic errors using the ``typos`` tool with the ``typos.toml`` - configuration file. + configuration file. Refer to the configuration to determine what files are + being checked. * **Check Links** — Checks all ``.rst`` and ``.md`` files for broken URLs using - the ``lychee`` tool. In addition to running on push and pull request, this + the ``lychee`` tool. In addition to running on pushes and pull requests, this action runs on a regular schedule to catch links that break between contributions. @@ -75,9 +85,9 @@ Python Package Testing artifact, can be manually uploaded to PyPI as the official release distribution. -* **Test** |openbt| **Developer-mode Installation** — Tests the editable installation +* **Test** |openbt| **Developer-mode Installation** — Tests editable installations (``pip install -e .``) on a reduced matrix. MPI is intentionally installed - |via| |pip| rather than a system package manager to confirm that pip-installed + |via| |pip| rather than a system package manager to confirm that |pip|-installed MPI implementations work correctly. * **Test** |openbt| **in Anaconda** — Tests installation inside a conda environment @@ -94,4 +104,5 @@ C++ Tools Testing * **Test** |openbt| **C++ Command Line Tools** — Builds and tests the C++ command line tools directly across a matrix of operating systems and MPI implementations, independently of the Python package. Prints dynamic library linkage information for each built binary so that developers can verify the - correct MPI implementation was linked. + correct MPI implementation was linked. Since this action uses the build + script recommended to users, it also confirms correct script functionality. diff --git a/docs/index.rst b/docs/index.rst index f9ddb99..f439ac9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,10 +1,12 @@ Welcome to |openbt|'s Documentation! ==================================== +.. _GitHub repository: https://github.com/bandframework/OpenBT .. _Open MPI: https://www.open-mpi.org .. _MPICH: https://www.mpich.org .. _framework: https://bandframework.github.io -.. _OpenBT repository: https://bitbucket.org/mpratola/openbt/src/master +.. _original Bitbucket OpenBT repository: https://bitbucket.org/mpratola/openbt/src/master .. _OpenBTMixing repository: https://github.com/jcyannotty/OpenBT +.. _Taweret: https://taweretdocs.readthedocs.io .. image:: images/openbt_logo_rect.png :align: center @@ -12,7 +14,7 @@ Welcome to |openbt|'s Documentation! :height: 165 :width: 451 -|openbt| is an extensible software project that implements a variety of Bayesian tree models for scientific and industry applications, including regression, model mixing, sensitivity analysis and multiobjective optimization. +|openbt| is an extensible software project managed in a `GitHub repository`_ that implements a variety of Bayesian tree models for scientific and industry applications, including regression, model mixing, sensitivity analysis and multiobjective optimization. The heart of |openbt| is a set of C++ tools that can be used directly |via| the command line or indirectly through the ``openbt`` Python package or ``RopenBT`` R package, which wrap @@ -27,13 +29,15 @@ it can be built with MPI installed on a laptop using the system's package manager or with MPI installations on leadership class platforms and clusters that were installed by experts and optimized for their specific platform. -This project was established by merging the contents of the original Bitbucket -`OpenBT repository`_ with the `OpenBTMixing repository`_, which was based off of +This project was established by merging the contents of the `original Bitbucket +OpenBT repository`_ with the `OpenBTMixing repository`_, which was based off of the former. It, therefore, will supersede those two repositories, which will be frozen. This repository and its contents are being established and developed as part of -|band| framework_. +the |band| framework_. In particular, OpenBTMixing was originally built in +conjunction with Taweret_, and the |openbt| Python package provides mixing +functionality for Taweret. .. toctree:: :numbered: diff --git a/docs/release_procedure.rst b/docs/release_procedure.rst index 94d4b03..a637a66 100644 --- a/docs/release_procedure.rst +++ b/docs/release_procedure.rst @@ -41,6 +41,8 @@ Seed the release process Once all tasks have been executed +* Determine if new Meson version constraints should be made and implement these + consistently in ``meson.build`` and ``pyproject.toml``. * Check if a new version of the Eigen package is available through the Meson build system's wrapdb facility and assess if the new version should be adopted and tested. @@ -108,6 +110,13 @@ Command line tools tools. This should include a review of the build logs and confirming correct logging of the new release version identifier. +R package +^^^^^^^^^ +The following can likely be piggybacked onto the above command line tool testing. + +#. Gatekeepers to follow installation guide to install and test the R + package in a clean environment + Python package ^^^^^^^^^^^^^^ .. _twine instructions: https://twine.readthedocs.io/en/stable/index.html#using-twine @@ -153,11 +162,6 @@ Otherwise, #. In a clean virtual environment, follow the installation guide for installing from |pip| and to test the installation -R package -^^^^^^^^^ -#. Gatekeepers to follow installation guide to install and test the R - package in a clean environment - Post-release actions -------------------- * Carry out all necessary tasks to integrate the release within the BAND diff --git a/openbt_pypkg/pyproject.toml b/openbt_pypkg/pyproject.toml index 8a4e5d4..bb1d35b 100644 --- a/openbt_pypkg/pyproject.toml +++ b/openbt_pypkg/pyproject.toml @@ -9,11 +9,18 @@ # All other information needed to compose the package itself is in setup.py. [build-system] +# setuptools/_scm version limits set following setuptools_scm documentation for +# custom configurations +# https://setuptools-scm.readthedocs.io +# +# Meson version limit, which likely needs to be maintained consistent with limits +# in meson.build, required to get necessary acceptable MPI external +# dependendence functionality. +# https://github.com/mesonbuild/meson/pull/13619 requires = [ - "setuptools", "ninja", "meson>=1.6.0", - "setuptools_scm[toml]>=6.0" + "setuptools>=80", "setuptools_scm[toml]>=8" ] build-backend = "setuptools.build_meta" diff --git a/openbt_pypkg/setup.py b/openbt_pypkg/setup.py index 66c8172..8af84e0 100644 --- a/openbt_pypkg/setup.py +++ b/openbt_pypkg/setup.py @@ -44,7 +44,7 @@ PROJECT_URLS = { "Source": "https://github.com/bandframework/OpenBT", - "Documentation": "https://github.com/bandframework/OpenBT", + "Documentation": "https://openbt.readthedocs.io", "Tracker": "https://github.com/bandframework/OpenBT/issues", } @@ -118,17 +118,17 @@ def readme_md(): setup( name='openbt', - author="John Yannotty", - author_email="yannotty.1@buckeyemail.osu.edu", - maintainer="John Yannotty", - maintainer_email="yannotty.1@buckeyemail.osu.edu", + author="Matthew Pratola, John Yannotty", + author_email="mpratola@iu.edu", + maintainer="Matthew Pratola", + maintainer_email="mpratola@iu.edu", license="MIT", package_dir={"": "src"}, package_data=PACKAGE_DATA, cmdclass=cmdclass, url=PROJECT_URLS["Source"], project_urls=PROJECT_URLS, - description="Model mixing using Bayesian Additive Regression Trees", + description="Bayesian Additive Regression Trees", long_description=readme_md(), long_description_content_type="text/markdown", python_requires=PYTHON_REQUIRES, diff --git a/typos.toml b/typos.toml index f491e6e..08dff41 100644 --- a/typos.toml +++ b/typos.toml @@ -1,6 +1,6 @@ [files] extend-exclude = [".git", - "misc", "R", + "Ropenbt/R", "includes", "src", "tests", "openbt_pypkg/src/openbt/include"] ignore-hidden = false