Implement CI/CD pipeline and enhance testing framework for PharmaPy#1
Merged
Conversation
- Added .github/workflows/test.yml for CI/CD pipeline - Created installation tests for various methods (pip-modern, pip-legacy, setup-develop) - Added unit tests for core functionality - Implemented script installation tests for Windows and Unix - Included build and distribution tests with Twine and check-manifest - Integrated code quality checks using black, isort, and flake8 chore: Update installation scripts for modern installation methods - Modified InstallOnMac.sh to prefer pip install with fallback to setup.py - Updated InstallOnWindows.bat to use pip install with fallback to setup.py - Added confirmation messages and error handling in both scripts docs: Enhance installation instructions and README - Updated install_instructions.txt with modern installation methods - Revised README.md for clearer installation options and quick start guide - Added sections for testing the installation and development setup build: Introduce pyproject.toml and setup.cfg for modern packaging - Created pyproject.toml to comply with PEP 517/518 - Updated setup.py for backward compatibility and enhanced metadata - Added setup.cfg for declarative configuration chore: Add Makefile and make.bat for common development tasks - Created Makefile for Unix-like systems with common commands - Added make.bat for Windows with equivalent commands test: Implement comprehensive test runner for PharmaPy - Created run_tests.py to execute all tests with detailed reporting - Updated pytest.ini for enhanced test discovery and configuration
…r PharmaPy - Added GitHub Actions workflows for installation script testing and manual installation verification. - Updated test.yml to reflect new installation methods and improved test structure. - Enhanced Makefile with granular test commands for quick, reactor, flowsheet, and import tests. - Created run_tests.py for comprehensive test execution and discovery of unittest-based tests. - Introduced test_discovery.py for structured test discovery and execution. - Updated README and SETUP_MODERNIZATION.md with installation and testing instructions. - Improved dependency management in pyproject.toml and requirements.txt. - Added PKG-INFO and other metadata files for package distribution. - Enhanced import tests to handle optional dependencies gracefully.
… setup instructions
- Added a comprehensive CI/CD workflow in `.github/workflows/ci.yml` to automate testing across multiple platforms and Python versions. - Configured jobs for unit tests, integration tests, coverage reporting, and documentation building. - Enhanced `.gitignore` to exclude additional files and directories related to testing and development. - Created `TESTING.md` to document the testing infrastructure and results. - Updated `environment.yml` to include new testing dependencies and tools. - Modified `pytest.ini` for improved test configuration and added custom markers. - Updated `requirements-conda.txt` to reflect new development tools. - Created a custom test runner script `run_tests_pytest.py` for flexible test execution. - Enhanced `conftest.py` with shared fixtures and environment setup for tests. - Added integration tests for the assimulo simulation engine in `test_assimulo.py`. - Implemented unit tests for core functionality in `test_core.py`.
…mproved functionality
…ration for improved efficiency and resource optimization
- Fixed scipy.integrate.simps import for scipy >= 1.14 (now simpson) - Simplified environment.yml for better dependency resolution - Updated workflow to handle assimulo installation gracefully - Fixed pytest.ini timeout configuration - All 45 tests now passing with Python 3.12 + assimulo 3.7.1
- Fix multi-line Python command syntax error for assimulo detection - Use importlib.util.find_spec for cleaner module detection
- Replace checkmark and warning emojis with plain ASCII text - Fix Windows terminal encoding issues (cp1252 doesn't support Unicode)
- Add timeouts to prevent long-running jobs (15-30 minutes max) - Streamline assimulo tests to run only fast subset - Use latest Ubuntu instead of Ubuntu 20.04 for faster setup - Reduce assimulo test complexity while maintaining coverage
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Add shared fixtures for common test problems (simple_decay_rhs, simple_decay_residual, simple_initial_condition) - Create AssimuloTestHelper class with static methods for common operations - Refactor test methods to use fixtures and helper methods - Eliminate duplicate RHS function definitions across multiple test methods - Maintain all existing test functionality while improving code maintainability All 15 assimulo tests still pass after refactoring.
- Add specific version information to scipy import fallback comment - Clarify that simps was renamed to simpson in scipy 1.9.0 - Enhance developer understanding of compatibility requirements
- Update requirements-assimulo.txt for clarity on verified working installations and conda-forge advantages.
- Removed unnecessary files from PharmaPy.egg-info and cleaned up SOURCES.txt. - Updated LaTeX formatting in various modules for consistency. - Enhanced test output messages for clarity and consistency. - Improved import testing mechanism in run_tests.py and validate_local.py. - Updated requirements files to reflect current dependencies. - Refined error handling and messaging in test scripts. - Ensured all modules are properly importing and functioning as expected.
… files, and test data
…ments in CI workflows
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive CI/CD pipeline with enhanced testing infrastructure and modernizes the PharmaPy codebase. It introduces automated testing through GitHub Actions, updates installation methods for modern Python packaging standards, and applies consistent code formatting throughout the project.
Key changes include:
- Implementation of GitHub Actions CI/CD pipeline with multi-platform testing
- Creation of comprehensive testing framework with pytest integration and conda-forge support
- Modernization of installation scripts and packaging configuration
- Code formatting improvements to follow Python best practices (double quotes, spacing, line breaks)
Reviewed Changes
Copilot reviewed 51 out of 78 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| doc/online_docs/conf.py | Updated Sphinx documentation configuration with consistent quote style and formatting |
| TESTING.md | New comprehensive documentation for testing infrastructure and CI/CD pipeline |
| SETUP_MODERNIZATION.md | New documentation detailing modernized installation and build processes |
| README.md | Enhanced installation instructions with multiple installation options and testing guidance |
| PharmaPy/*.py | Code formatting improvements including quote consistency, spacing, and line breaks across 8 Python modules |
This was referenced Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a comprehensive CI/CD pipeline using GitHub Actions, along with a robust testing framework. Update installation scripts for modern methods, enhance documentation, and improve dependency management. Ensure compatibility and clarify installation instructions for the assimulo simulation engine.