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 fixes for Windows / CI #238

Merged
merged 3 commits into from
Mar 20, 2023
Merged

Make fixes for Windows / CI #238

merged 3 commits into from
Mar 20, 2023

Conversation

NickleDave
Copy link
Collaborator

  • Fixes the Nox session 'dev' so it works on Windows
  • Fix how we convert numpy integers to Python native integers for Segment instances, so that it doesn't fail on Windows, where the default numpy integer dtype is int32 not int64

The onset/offset sample attributes of Segment
have a converter that was written to convert
numpy int64 to Python int.

But it turns out that we don't always default to int64,
e.g., on Windows it's int32.
The converter failed then since it first checked for a dtype
attribute, then checked *only* for int64.
This logical error caused us to return None for int32.

Instead we check whether there's a dtype *and* it's an instance
of np.integer, which catches any numpy int type.
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2023

Codecov Report

Patch coverage: 54.54% and project coverage change: -0.25 ⚠️

Comparison is base (64fcd8d) 94.10% compared to head (b76482b) 93.85%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #238      +/-   ##
==========================================
- Coverage   94.10%   93.85%   -0.25%     
==========================================
  Files          41       41              
  Lines        1510     1514       +4     
==========================================
  Hits         1421     1421              
- Misses         89       93       +4     
Impacted Files Coverage Δ
noxfile.py 0.00% <0.00%> (ø)
tests/test_sequence.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@NickleDave NickleDave merged commit 4afb900 into main Mar 20, 2023
@NickleDave NickleDave deleted the make-windows-fixes branch March 29, 2023 12:35
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