Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/measure_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Measure OpenBTMixing Python Coverage
name: Measure OpenBT Python Coverage
env:
CLONE_PATH: ${{ github.workspace }}
PKG_ROOT: ${{ github.workspace }}/openbtmixing_pypkg
PKG_ROOT: ${{ github.workspace }}/openbt_pypkg
COV_RAW: ${{ github.workspace }}/coverage
COV_XML: ${{ github.workspace }}/coverage.xml
COV_HTML: ${{ github.workspace }}/htmlcov
Expand All @@ -24,7 +24,7 @@ jobs:

steps:
##-- Setup Testing Environment
- name: Checkout OpenBTMixing
- name: Checkout OpenBT
uses: actions/checkout@v4
- name: Install mpich
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_CLTs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test OpenBTMixing C++ Command Line Tools
name: Test OpenBT C++ Command Line Tools
env:
CLONE_PATH: ${{ github.workspace }}
INSTALL_PATH: ${{ github.workspace }}/../local/OpenBT
Expand Down Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
##-- Setup Testing Environment
- name: Checkout OpenBTMixing
- name: Checkout OpenBT
uses: actions/checkout@v4
- name: Install ${{ matrix.mpi_impl }}
run: |
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
run: $CLONE_PATH/.github/workflows/install_meson.sh ${{ github.workspace }} ${{ runner.os }}

##-- Build CLTs from Scratch, Install, & Test
- name: Build OpenBTMixing C++ CLTs & Library
- name: Build OpenBT C++ CLTs & Library
run: |
$CLONE_PATH/tools/build_openbt_clt.sh $INSTALL_PATH --debug
echo " "
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_anaconda.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test OpenBTMixing in Anaconda
name: Test OpenBT in Anaconda
env:
CLONE_PATH: ${{ github.workspace }}
PKG_ROOT: ${{ github.workspace }}/openbtmixing_pypkg
PKG_ROOT: ${{ github.workspace }}/openbt_pypkg
on:
push:
branches:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
miniconda-version: ${{ matrix.miniconda-version }}
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Checkout OpenBTMixing
- name: Checkout OpenBT
uses: actions/checkout@v4
- name: Setup miniconda & log
shell: bash -el {0}
Expand All @@ -62,7 +62,7 @@ jobs:
mpicxx -show || echo "Cannot check the MPI wrapper specification"

##-- Run full test suite
- name: Run full OpenBtMixing test suite
- name: Run full OpenBT test suite
shell: bash -el {0}
run: |
which python
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/test_py_devmode.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test OpenBTMixing Developer-mode Installation
name: Test OpenBT Developer-mode Installation
env:
CLONE_PATH: ${{ github.workspace }}
PKG_ROOT: ${{ github.workspace }}/openbtmixing_pypkg
PKG_ROOT: ${{ github.workspace }}/openbt_pypkg
on:
push:
branches:
Expand All @@ -23,7 +23,7 @@ jobs:

steps:
##-- Setup Testing Environment
- name: Checkout OpenBTMixing
- name: Checkout OpenBT
uses: actions/checkout@v4
- name: Install Open-MPI
run: |
Expand All @@ -40,16 +40,16 @@ jobs:
- name: Setup Python dependencies
run: $CLONE_PATH/.github/workflows/setup_base_python.sh ${{ runner.os }}
##-- Run full test suite
- name: Run full OpenBtMixing test suite
- name: Run full OpenBT test suite
run: |
pushd $PKG_ROOT
python -m pip install -v -e .
popd
ls -lart $PKG_ROOT/src/openbtmixing
ls -lart $PKG_ROOT/src/openbtmixing/bin
ls -lart $PKG_ROOT/src/openbt
ls -lart $PKG_ROOT/src/openbt/bin
if [ "${{ runner.os }}" = "Linux" ]; then
ldd $PKG_ROOT/src/openbtmixing/bin/openbtcli
ldd $PKG_ROOT/src/openbt/bin/openbtcli
elif [ "${{ runner.os }}" = "macOS" ]; then
otool -L $PKG_ROOT/src/openbtmixing/bin/openbtcli
otool -L $PKG_ROOT/src/openbt/bin/openbtcli
fi
pytest $PKG_ROOT/src/openbtmixing/tests
pytest $PKG_ROOT/src/openbt/tests
10 changes: 5 additions & 5 deletions .github/workflows/test_py_sdist.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test OpenBTMixing Python Source Distribution
name: Test OpenBT Python Source Distribution
env:
CLONE_PATH: ${{ github.workspace }}
PKG_ROOT: ${{ github.workspace }}/openbtmixing_pypkg
PKG_ROOT: ${{ github.workspace }}/openbt_pypkg
on:
push:
branches:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
##-- Setup Testing Environment
- name: Checkout OpenBTMixing
- name: Checkout OpenBT
uses: actions/checkout@v4
- name: Install ${{ matrix.mpi_impl }}
run: |
Expand Down Expand Up @@ -73,10 +73,10 @@ jobs:
run: $CLONE_PATH/.github/workflows/setup_base_python.sh ${{ runner.os }}

##-- Run full test suite
- name: Run full OpenBtMixing test suite
- name: Run full OpenBT test suite
run: |
pushd $PKG_ROOT
python -m build --sdist
python -m pip install -v dist/openbtmixing-*.tar.gz
python -m pip install -v dist/openbt-*.tar.gz
popd
$CLONE_PATH/tools/test_python_installation.py
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ subprojects/packagecache
__pycache__

# Standard intermediate products
openbtmixing_pypkg/dist
openbtmixing_pypkg/build
openbtmixing_pypkg/.coverage_openbt
openbtmixing_pypkg/coverage.xml
openbtmixing_pypkg/htmlcov
openbtmixing_pypkg/src/openbtmixing.egg-info
openbt_pypkg/dist
openbt_pypkg/build
openbt_pypkg/.coverage_openbt
openbt_pypkg/coverage.xml
openbt_pypkg/htmlcov
openbt_pypkg/src/openbt.egg-info

# Other files
.DS_Store
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions openbtmixing_pypkg/setup.py → openbt_pypkg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# ----- HARDCODED VALUES
PKG_ROOT = Path(__file__).resolve().parent
PY_SRC_PATH = PKG_ROOT.joinpath("src", "openbtmixing")
PY_SRC_PATH = PKG_ROOT.joinpath("src", "openbt")
CLT_SRC_PATH = PKG_ROOT.joinpath("cpp")

# Names of C++ products to include
Expand All @@ -28,15 +28,15 @@
INSTALL_REQUIRES = CODE_REQUIRES + TEST_REQUIRES

PACKAGE_DATA = {
"openbtmixing":
"openbt":
["tests/bart_bmm_test_data/2d_*.txt"] +
[f"bin/{clt}" for clt in CLT_NAMES]
}

PROJECT_URLS = {
"Source": "https://github.com/jcyannotty/OpenBT",
"Documentation": "https://github.com/jcyannotty/OpenBT",
"Tracker": "https://github.com/jcyannotty/OpenBT/issues",
"Source": "ttps://github.com/bandframework/OpenBT",
"Documentation": "https://github.com/bandframework/OpenBT",
"Tracker": "https://github.com/bandframework/OpenBT/issues",
}


Expand All @@ -50,7 +50,7 @@ class build(_build):


class build_clt(Command):
description = "Build the OpenBTMixing command line tools"
description = "Build the OpenBT command line tools"

def initialize_options(self):
pass
Expand Down Expand Up @@ -114,7 +114,7 @@ def version():


setup(
name='openbtmixing',
name='openbt',
version=version(),
author="John Yannotty",
author_email="yannotty.1@buckeyemail.osu.edu",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

from .test import test

__version__ = version("openbtmixing")
__version__ = version("openbt")
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from pathlib import Path

import openbtmixing.interface_helpers as ih
import openbt.interface_helpers as ih

#from importlib import reload
#reload(ih)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def test(level=0):
"""
Execute openbtmixing's full test suite.
Execute openbt's full test suite.

:param level: Level 0 indicates the least logging. Level 2 indicates the
maximum logging possible.
Expand All @@ -16,4 +16,4 @@ def test(level=0):
elif level >= 1:
args = ["-" + "v"*level]

return (pytest.main(args + ["--pyargs", "openbtmixing.tests"]) == 0)
return (pytest.main(args + ["--pyargs", "openbt.tests"]) == 0)
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

from pathlib import Path

from openbtmixing.tests.polynomial_models import sin_cos_exp
from openbtmixing import Openbtmix
from openbt.tests.polynomial_models import sin_cos_exp
from openbt import Openbtmix


_TEST_DATA = Path(__file__).parent.joinpath("bart_bmm_test_data").resolve()
Expand Down
8 changes: 4 additions & 4 deletions openbtmixing_pypkg/tox.ini → openbt_pypkg/tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# Setup and manage Python virtual environments that allow users to develop and
# test the OpenBTMixing Python package.
# test the OpenBT Python package.
#

[tox]
requires = tox>=4
env_list =

[testenv]
description = Run OpenBTMixing's full test suite with or without coverage
description = Run OpenBT's full test suite with or without coverage
passenv =
COVERAGE_HTML
COVERAGE_XML
Expand All @@ -23,8 +23,8 @@ usedevelop =
nocoverage: false
coverage: true
commands =
nocoverage: pytest --pyargs openbtmixing.tests
coverage: coverage run --rcfile={toxinidir}/.coveragerc --data-file={env:COV_FILE} -m pytest ./src/openbtmixing/tests
nocoverage: pytest --pyargs openbt.tests
coverage: coverage run --rcfile={toxinidir}/.coveragerc --data-file={env:COV_FILE} -m pytest ./src/openbt/tests

[testenv:report]
description = Generate XML and HTML format coverage reports
Expand Down
2 changes: 1 addition & 1 deletion tools/build_openbt_clt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Build and install the OpenBT C++ library, the standalone command line tools,
# and tests of the library. These are **not** needed to install and use the
# OpenBTMixing Python package.
# OpenBT Python package.
#
# Users must pass the path to the folder in which OpenBT should be installed.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/check_flake8_compliance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ declare -a FOLDERS=("tools")

pushd $CLONE_PATH

pushd openbtmixing_pypkg &> /dev/null || exit 1
pushd openbt_pypkg &> /dev/null || exit 1
# Let Python package determine if its code is acceptable
tox -r -e check || exit $?

Expand Down
10 changes: 5 additions & 5 deletions tools/test_python_installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@


try:
import openbtmixing
import openbt
except ImportError as error:
print()
print(f"ERROR: {error.name} python package not installed")
Expand All @@ -62,7 +62,7 @@ def main():
DEFAULT_VERBOSITY = 0

# ----- SPECIFY COMMAND LINE USAGE
DESCRIPTION = "Return status of OpenBTMixing Python package full testing " \
DESCRIPTION = "Return status of OpenBT Python package full testing " \
+ "as exit code for use with CI\n"
VERBOSE_HELP = "Verbosity level of pytest logging"
parser = argparse.ArgumentParser(
Expand All @@ -80,8 +80,8 @@ def main():
verbosity_level = args.verbose

# ----- PRINT VERSION INFORMATION
pkg = importlib.metadata.distribution("openbtmixing")
location = Path(inspect.getfile(openbtmixing)).parents[0]
pkg = importlib.metadata.distribution("openbt")
location = Path(inspect.getfile(openbt)).parents[0]

print()
print("Name: {}".format(pkg.metadata["Name"]))
Expand All @@ -98,7 +98,7 @@ def main():
sys.stdout.flush()

# ----- RUN FULL TEST SUITE
return _SUCCESS if openbtmixing.test(verbosity_level) else _FAILURE
return _SUCCESS if openbt.test(verbosity_level) else _FAILURE


if __name__ == "__main__":
Expand Down
Loading