Skip to content

Conversation

@seqasim
Copy link
Owner

@seqasim seqasim commented Nov 15, 2025

Summary

This PR improves the LFPAnalysis package for public use by fixing installation issues, adding a testing framework, and setting up CI/CD.

Changes

Installation Improvements

  • Fixed requirements.txt formatting (removed leading spaces)
  • Removed GitHub API dependency from setup.py that could cause installation failures
  • Added proper error handling and package metadata to setup.py
  • Added pip install option as recommended installation method

Testing Infrastructure

  • Added pytest testing framework
  • Created test suite with:
    • Import tests for all modules
    • Function tests for key utilities (mean_baseline_time, find_nearest_value, moving_average)
    • Test configuration via pytest.ini
  • Added pytest to requirements

CI/CD

  • Added GitHub Actions workflow to run tests automatically on push/PR
  • Tests run on Python 3.8, 3.9, and 3.10

Documentation

  • Updated README with:
    • Pip install instructions (recommended)
    • Updated conda installation steps
    • Testing section with instructions
    • Updated upgrade instructions for both installation methods

Testing

  • All tests pass locally
  • Installation verified with pip install -e .
  • Test suite runs successfully with pytest tests/ -v

Impact

  • Makes installation more reliable and user-friendly
  • Provides testing framework for future development
  • Enables automated testing on GitHub
  • No breaking changes to existing functionality

Note

Adds GitHub Actions tests, a pytest-based test suite, packaging/installation fixes, documentation updates, and a minor TFR API adjustment.

  • CI/CD:
    • Add GitHub Actions workflow /.github/workflows/tests.yml running pytest on Python 3.8–3.10.
  • Testing:
    • Introduce pytest config pytest.ini and test suite under tests/ (import checks and basic unit tests for key utilities).
    • Add pytest to requirements.txt.
  • Packaging/Installation:
    • Simplify setup.py (remove external API calls, add metadata, robust README/requirements loading, python_requires, classifiers, package_data).
    • Fix requirements.txt formatting; include pytest.
    • Update README.md with pip/conda install, update, and testing instructions.
  • Code:
    • In LFPAnalysis/lfp_preprocess_utils.py, switch TFR save object to mne.time_frequency.EpochsTFRArray and tidy docstrings.
  • Docs/Notebooks:
    • Add LFPAnalysisBook/module-02-01_AdvancedPreprocessing.ipynb and expand resource links in Jupyter Book modules.

Written by Cursor Bugbot for commit b7ec444. This will update automatically on new commits. Configure here.

…ocessing notebook

- Added introductory video resources and basic coding practice links to the Broad Introduction module.
- Removed the outdated Preprocessing Jupyter notebook.
- Updated the README with improved installation instructions for pip and conda, and clarified the update process.
- Enhanced the setup.py to handle missing files gracefully and updated package metadata.
@seqasim seqasim merged commit bf55d61 into main Nov 15, 2025
1 of 4 checks passed
seqasim added a commit that referenced this pull request Nov 15, 2025
Merge pull request #68 from seqasim/2025-11-15-96o6-91a92
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.

2 participants