Skip to content

Add codecov token to test_and_deploy.yml #129

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
merged 3 commits into from
Mar 8, 2024
Merged

Add codecov token to test_and_deploy.yml #129

merged 3 commits into from
Mar 8, 2024

Conversation

niksirbi
Copy link
Member

@niksirbi niksirbi commented Mar 4, 2024

This will have to wait until @lochhh has tested the updated action in PR 128, and a new v2 release of NIU actions is made.

  • test updated action from neuroinformatics-unit/actions/test@main
  • release a new v2 version of neuroinformatics-unit/actions

@lochhh
Copy link
Collaborator

lochhh commented Mar 4, 2024

not sure why the coverage reports are not found despite being successfully generated on macos-14 py3.10 and on windows-latest py3.10

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2024

not sure why the coverage reports are not found despite being successfully generated on macos-14 py3.10 and on windows-latest py3.10

Maybe because I'm using actions v2, and that still doesn't have the optional argument for the codecov token? Let me try with main.

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2024

Maybe because I'm using actions v2, and that still doesn't have the optional argument for the codecov token? Let me try with main.

I've tried this but it hasn't fixed the issue. I also refreshed (regenerated) the token and updated it in the secrets, but no luck also there. Is it possible that there is no code report because we there are no relevant code lines in the diff?

@lochhh
Copy link
Collaborator

lochhh commented Mar 4, 2024

Maybe because I'm using actions v2, and that still doesn't have the optional argument for the codecov token? Let me try with main.

I've tried this but it hasn't fixed the issue. I also refreshed (regenerated) the token and updated it in the secrets, but no luck also there. Is it possible that there is no code report because we there are no relevant code lines in the diff?

not sure that's the reason as uploading works in ubuntu and macOS-latest. I didn't encounter any issues with the toy example used to test the codecov PR in actions.

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2024

not sure that's the reason as uploading works in ubuntu and macOS-latest. I didn't encounter any issues with the toy example used to test the codecov PR in actions.

You are absolutely right. This is strange indeed. Tagging @adamltyson as he has more experience with codecov.

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.21%. Comparing base (33e09ed) to head (4bfbe7a).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
+ Coverage   99.13%   99.21%   +0.08%     
==========================================
  Files           8        8              
  Lines         461      509      +48     
==========================================
+ Hits          457      505      +48     
  Misses          4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamltyson
Copy link
Member

I think it's working now?

Based on this comment I generated a new org-level token and added that to the repo.

Assuming this works, I think this token should be added at the GitHub org level (and also for @brainglobe, cc @alessandrofelder).

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2024

I think it's working now?

Not sure. The report now appears on the PR, but Windows and macos-14 still fail to find the report, based on the tests I just rerun.

@adamltyson
Copy link
Member

Is that related to codecov though, the error says info - 2024-03-04 13:34:00,951 -- Found 0 coverage files to upload?

@adamltyson
Copy link
Member

codecov seems happy

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2024

Yes, it may be unrelated to codecov. It seems to me that the tests are not even being run on these two operating systems?
I think the problem might be with tox.

ERROR: Cannot locate the conda executable.

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2024

Aha, now finding a trail: quantumjot/btrack#119

@niksirbi
Copy link
Member Author

niksirbi commented Mar 4, 2024

We might have to replicate the solution implemented here: quantumjot/btrack#130
@alessandrofelder you seem to have reviewed that PR.

@niksirbi
Copy link
Member Author

niksirbi commented Mar 8, 2024

Now that we think the problem is not due to codecov, I plan to:

  • make a new actions v2 release
  • change this PR to use v2 again and merge
  • open a separate issue for the tox-conda problem

Copy link

sonarqubecloud bot commented Mar 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@lochhh lochhh marked this pull request as ready for review March 8, 2024 14:12
@lochhh lochhh merged commit aaba495 into main Mar 8, 2024
@lochhh lochhh deleted the codecov-token branch March 8, 2024 14:12
niksirbi added a commit to b-peri/movement that referenced this pull request Mar 11, 2024
* Add codecov token to test_and_deploy.yml

* use test action from main branch

* switch back to using v2 of the test action
niksirbi added a commit that referenced this pull request Mar 12, 2024
* Added `filtering.py` module, w/ draft `interp_pose()` & `filter_confidence()` fxns

* Fix logging for operations in place

* Renamed fxns to `interpolate_over_time()` and `filter_by_confidence`

* Cleaned up code + corrected docstrings

* Refactored `filtering.py` to movement base folder

* Improved logging logic, fixed diagnostic report, removed in-place

* Removed printing of diagnostic report

* Updated dependency from `xarray` to `xarray[accel]`

* Added testing for `filtering.py`

* Minor fixes and clean-up

* Reorganise Accessor (#122)

* Check for expected `dims` and `data_vars` in dataset

* Fix `missing_dim_dataset` fixture

* Rename `poses` accessor to `move`

* Rename `PoseAccessor` class to `MoveAccessor`

* Rename `poses_accessor.py` to `move_accessor.py`

* Move `move_accessor.py` to the top level

* Fix accessor docstring formatting

* Compute locomotion features (#106)

* Draft compute velocity

* Add test for displacement

* Fix confidence values in `valid_pose_dataset` fixture

* Refactor kinematics test and functions

* Vectorise kinematic functions

* Refactor repeated calls to compute magnitude + direction

* Displacement to return 0 instead of NaN

* Return x y components in kinematic functions

* Refactor kinematics tests

* Remove unnecessary instantiations

* Improve time diff calculation

* Prefix kinematics methods with `compute_`

* Add kinematic properties to `PosesAccessor`

* Update `test_property` docstring

* Refactor `_vector` methods and kinematics tests

* Update `expected_dataset` docstring

* Rename `poses` to `move` in `PosesAccessor`

* Refactor properties in `PosesAccessor`

* Remove vector util functions and tests

* Update `not_a_dataset` fixture description

* Validate dataset upon accessor property access

* Update `poses_accessor` test description

* Validate input data in kinematic functions

* Remove unused fixture

* Parametrise kinematics tests

* Set `compute_derivative` as internal function

* Update `kinematics.py` docstrings

* Add new modules to API docs

* Update `move_accessor` docstrings

* Rename `test_move_accessor` filename

* Include M1 runners in CI and update install instructions (#125)

* also test on macOS 14 M1 runner

* conda install hdf5

* Add dependabot config (#128)

* Bump actions/cache from 3 to 4 (#130)

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [pre-commit.ci] pre-commit autoupdate (#131)

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.3.0](astral-sh/ruff-pre-commit@v0.2.0...v0.3.0)
- [github.com/psf/black: 24.1.1 → 24.2.0](psf/black@24.1.1...24.2.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add codecov token to test_and_deploy.yml (#129)

* Add codecov token to test_and_deploy.yml

* use test action from main branch

* switch back to using v2 of the test action

* tweaked phrasing in docstrings

* added filtering functions to API index

* add note about default confidence threshold

* rename and reorganise filter_diagnostics as report_nan_values

* use xarray's copy method

* max_gaps is in seconds and also works at edges

* use xarray's built-in isnull method

* added sphinx-gallery example for filtering and interpolation

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Chang Huan Lo <[email protected]>
Co-authored-by: Niko Sirmpilatze <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

3 participants