diff --git a/.github/workflows/openconcept.yaml b/.github/workflows/openconcept.yaml index 98b920f9..8eb10cd0 100644 --- a/.github/workflows/openconcept.yaml +++ b/.github/workflows/openconcept.yaml @@ -89,6 +89,31 @@ jobs: run: | python -m pytest --cov-config=.coveragerc --cov=openconcept --cov-report=xml + - name: Test if engine deck data is included in package + if: ${{ matrix.os == 'ubuntu-latest' && matrix.dep-versions == 'latest' }} + run: | + # Build the wheel and source distribution + pip install build setuptools wheel + python -m build + + # Create a fresh venv to simulate a clean install + python -m venv venv_test_pkg + source venv_test_pkg/bin/activate + + # Install the wheel, not in editable mode + pip install dist/openconcept-*.whl + + # Check that the .npy files are installed + python - <<'PYCODE' + import importlib.resources as r + import pathlib + + files = list(pathlib.Path(r.files('openconcept.propulsion.empirical_data')).rglob('*.npy')) + if not files: + raise SystemExit('No .npy files found in installed package!') + print(f'Found {len(files)} .npy data files.') + PYCODE + - name: Upload coverage to Codecov if: ${{ matrix.os == 'ubuntu-latest' }} uses: codecov/codecov-action@v4 diff --git a/readme.md b/README.md similarity index 100% rename from readme.md rename to README.md diff --git a/openconcept/__init__.py b/openconcept/__init__.py index b7e19904..64c7d51e 100644 --- a/openconcept/__init__.py +++ b/openconcept/__init__.py @@ -1 +1 @@ -__version__ = "1.2.5" +__version__ = "1.2.6" diff --git a/setup.py b/setup.py index 97ad2b67..7081b8f7 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ )[0] this_directory = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(this_directory, "readme.md"), encoding="utf-8") as f: +with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( @@ -37,6 +37,11 @@ download_url="https://github.com/mdolab/openconcept", license="MIT License", packages=find_packages(include=["openconcept*"]), + package_data={ + # engine deck data + "openconcept.propulsion.empirical_data": ["**/*.npy"], + }, + include_package_data=True, install_requires=[ # Update the oldest package versions in the GitHub Actions build file, the readme, # and the index.rst file in the docs when you change these