-
Notifications
You must be signed in to change notification settings - Fork 0
Klaus 65 extend jpp table feature column code #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bergsalex
merged 9 commits into
master
from
KLAUS-65-extend-jpp-table-feature-column-code
Aug 26, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6ea0610
Add missing __init__ files
bergsalex 02a0286
Add method to calculate aggregate statistics
bergsalex 18da384
Integrate method into CLI
bergsalex 2218a72
Update gitignore & add dockerignore
bergsalex bbfa1da
Unit tests for and .
bergsalex 8a1d3aa
Merge remote-tracking branch 'origin/master' into KLAUS-65-extend-jpp…
bergsalex dac9ce0
Bump minor version
bergsalex d4473d1
Add newline at end of gitignore
bergsalex 00e7ac0
Set CLI default for --add-statistics to True on generate-tables command
bergsalex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .github/ | ||
| .venv/ | ||
| .temp/ | ||
| vm/ | ||
| tests/ | ||
| *.csv/ | ||
| .python-version/ | ||
| dist/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,4 @@ __pycache__/ | |
| .venv/ | ||
| .pytest_cache/ | ||
| .ruff_cache/ | ||
| .temp/ | ||
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
Empty file.
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
Empty file.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Tests for the CLI module.""" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| """Fixtures for the CLI tests.""" | ||
|
|
||
| from typer.testing import CliRunner | ||
| import pytest | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def runner(): | ||
| """Create a Typer CLI test runner.""" | ||
| return CliRunner() | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_project_folder(tmp_path): | ||
| """Create a mock project folder for testing.""" | ||
| project_folder = tmp_path / "test_project" | ||
| project_folder.mkdir() | ||
| return project_folder | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_feature_folder(tmp_path): | ||
| """Create a mock feature folder for testing.""" | ||
| feature_folder = tmp_path / "features" | ||
| feature_folder.mkdir() | ||
| return feature_folder | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_table_folder(tmp_path): | ||
| """Create a mock table folder with CSV files for testing.""" | ||
| table_folder = tmp_path / "tables" | ||
| table_folder.mkdir() | ||
|
|
||
| # Create mock CSV files | ||
| files = [] | ||
| for i in range(3): | ||
| file_path = table_folder / f"behavior_{i}_bout.csv" | ||
| file_path.write_text(f"Behavior,Animal,Frame\nbehavior_{i},mouse1,100") | ||
| files.append(file_path) | ||
|
|
||
| return table_folder, files | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def nonexistent_folder(tmp_path): | ||
| """Create path to nonexistent folder for testing.""" | ||
| return tmp_path / "nonexistent" | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_bout_table_files(tmp_path): | ||
| """Create mock bout table files for testing.""" | ||
| files = [] | ||
| for i in range(6): # Create enough files for all test cases | ||
| file_path = tmp_path / f"test_bout_{i}.csv" | ||
| file_path.write_text("mock,csv,content") | ||
| files.append(file_path) | ||
| return files | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def nonexistent_files(tmp_path): | ||
| """Create paths to nonexistent files for testing.""" | ||
| return [tmp_path / "nonexistent1.csv", tmp_path / "nonexistent2.csv"] |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.