Skip to content

Add CI/CD pipeline#14

Merged
andrewkern merged 19 commits into
mainfrom
ci
Jul 7, 2025
Merged

Add CI/CD pipeline#14
andrewkern merged 19 commits into
mainfrom
ci

Conversation

@andrewkern

Copy link
Copy Markdown
Member

Summary

  • Add GitHub Actions workflows for automated testing
  • Configure parallel test execution with pytest-xdist
  • Set up coverage reporting and code quality checks

Test plan

  • All tests pass locally with parallel execution
  • CI runs successfully on GitHub
  • Coverage reports generated

andrewkern added 19 commits July 6, 2025 15:29
- Add test workflow with parallel execution using pytest-xdist
- Support multi-Python version testing (3.9, 3.10, 3.11)
- Configure CPU-only mode to prevent GPU conflicts in CI
- Add coverage reporting with pytest-cov and Codecov integration
- Include code quality checks (black, isort, flake8)
- Add documentation building workflow
- Add PyPI publishing workflow for releases
- Add manual test trigger workflow for debugging
- Configure pytest settings in pyproject.toml
- Fix test_verbose_batch_size_auto to work with parallel execution
- Add CUDA_VISIBLE_DEVICES=-1 to prevent GPU conflicts
- Add Dependabot configuration for automated updates
- Add issue and PR templates

All tests now pass with parallel execution enabled.
- Add .pre-commit-config.yaml with black, isort, flake8 hooks
- Configure black with 89 char line limit to match existing style
- Configure isort to be compatible with black
- Format entire codebase with black and isort
- Fix trailing whitespace and missing newlines
- Update CI workflows to use consistent linting
- Add pre-commit workflow for automated checks
- Add scripts for easy formatting and setup
- Update documentation with pre-commit instructions

All Python files now follow consistent formatting standards.
- Fix boolean comparisons (E712) - use 'is' instead of '=='
- Remove/comment unused imports (F401)
- Convert f-strings without placeholders to regular strings (F541)
- Replace bare except with specific exceptions (E722)
- Fix unused variables with comments or underscore (F841, B007)
- Fix lambda assignment to def (E731)
- Fix undefined names in __all__ (F822)
- Add docstrings for missing __init__ methods (D107)
- Fix block comment formatting (E265)
- Fix blank line formatting and whitespace (E306, W293, D202)
- Add per-file-ignores for complex functions (C901)
- Apply black formatting to ensure consistency

All 69 flake8 errors have been resolved, code is now fully compliant.
- Remove trailing whitespace from YAML and markdown files
- Fix line endings and formatting inconsistencies
- Apply black formatting to remaining Python files
- Clean up imports and whitespace

These changes were automatically applied by pre-commit hooks.
The pyproject.toml already contains coverage configuration in addopts,
so passing duplicate --cov arguments was causing conflicts.
- Add pytest-cov and pytest-xdist to dev dependencies
- Remove coverage configuration from pyproject.toml to avoid conflicts
- Keep coverage arguments only in GitHub Actions workflow
- Add windows module exports to locator/data/__init__.py
- Export generate_genomic_windows function for window analysis tests
- Fix numpy boolean comparison in test_model_persistence.py
- Convert numpy.True_ to Python bool before comparison
- Add tensorflow import for GPU detection
- Update GPU config test to handle case when GPU is not available
- In CI with CUDA_VISIBLE_DEVICES=-1, mixed precision is correctly disabled
- Change 'data/' to '/data/' and './data/' to only exclude top-level data directories
- Add windows.py to git tracking (was previously excluded)
- This fixes ModuleNotFoundError for locator.data.windows in CI
- WindowGenerator class does not exist in windows.py
- Only generate_genomic_windows function is available
- This fixes ImportError in all test files
- Make parallel module imports optional when Ray is not installed
- Add stub functions with helpful error messages for parallel methods
- Fix duplicate object description warning for PlottingMixin.plot_history
- This allows docs to build successfully without Ray dependency
- Prevent accidentally committing large output files from examples
- This directory contains generated plots and CSVs from demo runs
- Filter out harmless protobuf version warnings from TensorFlow
- Fix module path for parallel functions in api.rst (use locator.parallel not locator.parallel.parallel_analysis)
- The protobuf warnings are from TensorFlow/Google libraries and cannot be fixed by us
- Documentation should now build successfully
@andrewkern andrewkern merged commit 20de595 into main Jul 7, 2025
6 checks passed
@andrewkern andrewkern deleted the ci branch July 7, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant