Skip to content

CI Setup#6

Open
SebastianAment wants to merge 3 commits intomainfrom
ci-setup
Open

CI Setup#6
SebastianAment wants to merge 3 commits intomainfrom
ci-setup

Conversation

@SebastianAment
Copy link
Contributor

@SebastianAment SebastianAment commented Mar 10, 2026

Summary

Restructure the repository into a proper installable Python package (boxcrete/) and add GitHub Actions CI with 100% test coverage.

Changes

Package restructure:

  • Move models.py and utils.py into boxcrete/ package directory, eliminating namespace conflicts. Users now do from boxcrete import models or pip install -e ...
  • Add pyproject.toml with build config, dependencies, and optional extras ([dev], [notebooks]).
  • Add boxcrete/__init__.py with public API exports.
  • Add REPO_DIR / DEFAULT_DATA_PATH constants for robust data path resolution — notebooks and user code no longer depend on the working directory.
  • Replace all print-based verbose output with Python logging module.

Bug fixes uncovered during testing:

  • FixedFeatureModel._add_fixed_features: dtype mismatch when input dtype != value dtype.
  • FixedFeatureModel.subset_output: raise instead of return, plus _value_values typo.
  • SustainableConcreteModel.__init__: silently ignored strength_model/gwp_model constructor arguments.
  • load_concrete_strength: in-place /= failed on integer-typed Ystd tensors.
  • ModelListGPModelList: FixedFeatureModel is a Model, not a GPyTorchModel, so ModelListGP cannot be used.
  • Various docstring fixes (incorrect variable names, stale references).

CI & testing:

  • Add GitHub Actions workflows for unit tests (Python 3.9–3.12, black, flake8) and notebook execution (Python 3.10).
  • Add comprehensive test suite: 68 tests, 100% coverage, ~19s runtime.
  • Real-data regression tests using data/compressive_strength.csv.
  • Coverage threshold enforced at 100% in CI.

README:

  • Add Installation section with pip install git+https://... and pip install -e . instructions.
  • Fix typos, update import examples to boxcrete.*.

BREAKING: Import paths have changed:

  • import modelsfrom boxcrete import models
  • from utils import ...from boxcrete.utils import ...
  • Install with: pip install -e .

…ls.py

- Add .gitignore for Python/Jupyter/IDE artifacts
- Fix Y property docstring: correct variable name (X -> Y) and GWP/strength order
- Fix gwp_data property docstring: 'strength' -> 'GWP' model and variances
- Make time column detection case-insensitive (X_columns[-1].lower() != 'time')
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 10, 2026
@SebastianAment SebastianAment force-pushed the ci-setup branch 3 times, most recently from d18903f to 8c2bf23 Compare March 10, 2026 19:11
BREAKING: Import paths have changed. Update your code:
  - import models -> from boxcrete import models
  - from utils import ... -> from boxcrete.utils import ...
  - Install with: pip install -e .

- Move models.py and utils.py into boxcrete/ package directory
- Add boxcrete/__init__.py with public API exports
- Add REPO_DIR / DEFAULT_DATA_PATH for robust data path resolution
- Add pyproject.toml with build config, dependencies, and optional extras
- Add .flake8 with line-length=88 matching BoTorch convention
- Add comprehensive test suite (68 tests, 100% coverage, ~17s)
- Update notebook imports to use boxcrete.* namespace
- Rename '[Concrete] Strength Curve Prediction Plots Demo.ipynb'
  to 'strength_curve_prediction_demo.ipynb'
- Fix notebook strength calibration plots (use model.strength_model.posterior)
- Uncomment plt.legend() in Pareto frontier plots
- Replace print-based verbose output with Python logging
- Fix FixedFeatureModel dtype mismatch, subset_output bugs
- Fix SustainableConcreteModel.__init__ ignoring constructor args
- Fix load_concrete_strength Ystd in-place division with integer tensors
- Fix ModelListGP -> ModelList (FixedFeatureModel is Model, not GPyTorchModel)
- Modernize type annotations, remove dead code, apply black formatting
- Add GitHub Actions tests workflow: pytest on Python 3.10-3.12, nightly runs,
  coverage reporting (100% threshold), black/flake8 linting
- Add GitHub Actions notebooks workflow: notebook execution on Python 3.10,
  path-filtered triggers, format validation, nightly runs
- Add Installation section to README with pip install -e . instructions
- Update README import examples to use boxcrete.* namespace
- Fix README typo (responsbile -> responsible)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant