Skip to content
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

Make mypy happy again. #105

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/lint@v2.0.0
- uses: neuroinformatics-unit/actions/lint@v2

manifest:
name: Check Manifest
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/check_manifest@v2.0.0
- uses: neuroinformatics-unit/actions/check_manifest@v2

test:
needs: [linting, manifest]
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_sample_projects/pose_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def load_poses_from_dlc(file_path: Path) -> Optional[pd.DataFrame]:
return df


def save_poses_to_dlc(df: pd.DataFrame, file_path: Path):
def save_poses_to_dlc(df: pd.DataFrame | pd.Series, file_path: Path):
"""Save pose estimation results to a DeepLabCut (DLC) .h5 file.
Also saves the poses to a .csv file with the same name.

Expand Down
4 changes: 3 additions & 1 deletion wazp/callbacks/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,9 @@ def generate_yaml_files_from_spreadsheet(

# convert all fields in dataframe to strings
# (otherwise datetime fields are not encoded correctly in the YAML)
df = df.applymap(str)
df = df.applymap(str) # type: ignore[operator]
# TODO: remove mypy ignore comment 👆 if we update the linter job to
# 3.11 with newer pandas-stubs version

# check if columns in spreadsheet match metadata file:
# if not, add missing columns
Expand Down
Loading