Skip to content

Conversation

jeremymanning
Copy link
Member

also added github actions tests (they run automatically on pull requests to master or dev)

jeremymanning and others added 4 commits July 9, 2025 13:21
This file provides comprehensive guidance for future Claude Code instances
working with the HyperTools codebase, including:
- Key commands for testing, development, and documentation
- High-level architecture overview and data flow
- Core component descriptions and design patterns
- Testing strategy and development notes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The test was failing because t-SNE's default perplexity (30) was larger
than the number of samples (10) in the test data. Fixed by explicitly
setting perplexity=5 which is less than the sample count.

This ensures the test passes while maintaining the same test coverage
for t-SNE dimensionality reduction functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Critical fixes:
- Replace deprecated pkg_resources with importlib.metadata in config.py
- Fix scipy.stats.stats.pearsonr import to use scipy.stats.pearsonr
- Add comprehensive compatibility review tracking in notes/

All 129 tests pass with numpy 2.0.2 and pandas 2.2.3.

The codebase is now fully compatible with:
- NumPy ≥ 2.0.0 (already specified in requirements.txt)
- Pandas ≥ 2.2.0 (already specified in requirements.txt)
- Python 3.9+ (as specified in setup.py)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Features:
- Test matrix across Python 3.9, 3.10, 3.11, 3.12
- Cross-platform testing: Ubuntu, Windows, macOS
- Dependency caching for faster builds
- System dependencies (FFmpeg) installation
- Coverage reporting on Ubuntu Python 3.12
- Parallel execution with fail-fast disabled
- Triggers on push/PR to master and dev branches

The workflow runs 12 parallel jobs (4 Python versions × 3 OS) to ensure
comprehensive compatibility testing across all supported environments.

Also added importlib_metadata fallback dependency for Python < 3.8
compatibility in requirements.txt.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jeremymanning jeremymanning requested a review from Copilot July 9, 2025 17:42
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates compatibility with NumPy 2.0+ and pandas 2.0+ and adds a GitHub Actions CI workflow.

  • Tests: updated test_reduce_TSNE to use the new reduce dict signature
  • Code: fixed deprecated imports (scipy.stats.stats, pkg_resources)
  • CI: added GitHub Actions workflow and related documentation files

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_reduce.py Updated TSNE test to use reduce={'model': ..., 'params': {...}}
hypertools/tools/describe.py Changed import from scipy.stats.stats to scipy.stats
hypertools/config.py Switched from pkg_resources to importlib.metadata for version
notes/numpy_pandas_compatibility_review.csv Added compatibility notes for NumPy 2.0+ and pandas 2.0+
notes/github_actions_info.md Documented GitHub Actions CI/CD setup
.github/workflows/test.yml Added GitHub Actions workflow for tests and coverage reporting
CLAUDE.md Added AI guidance documentation
Comments suppressed due to low confidence (3)

tests/test_reduce.py:95

  • Consider adding tests for other reduce algorithms with parameter dicts and edge cases to ensure the new API signature is consistently handled across different configurations.
    reduced_data_3d = reducer(data, reduce={'model': 'TSNE', 'params': {'perplexity': 5}}, ndims=3)

.github/workflows/test.yml:50

  • The continue-on-error: true setting for Windows ffmpeg installation may mask failures and lead to inconsistent test environments; consider removing it to surface installation issues.
      continue-on-error: true

tests/test_reduce.py:95

  • [nitpick] The inline nested dict for reduce arguments is verbose; consider extracting it into a named variable or fixture to improve readability and reuse.
    reduced_data_3d = reducer(data, reduce={'model': 'TSNE', 'params': {'perplexity': 5}}, ndims=3)

@jeremymanning jeremymanning merged commit c42babe into master Jul 9, 2025
24 checks passed
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