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

Test/32 enable linters #52

Open
wants to merge 80 commits into
base: main
Choose a base branch
from
Open

Test/32 enable linters #52

wants to merge 80 commits into from

Conversation

AlexAxthelm
Copy link
Contributor

@AlexAxthelm AlexAxthelm commented Dec 17, 2024

  • Enable (most) lintr Linters
    • object_usage_linter is still disabled: heavy use of .data and.env pronouns gives false positives for that linter.
  • Explicitly namespace (rather than importFrom) most external function dependencies (logger is best used as an import, and rlang's .data, .env and := are difficult to use without importing)
  • Convert from magrittr to base pipe (%>% to |>)
  • Minor refactor of get_scenario and get_scenario_source to use base::strsplit over stringr::str_split
  • Remove dependencies on magrittr and stringr
  • Add some basic tests for low-level helper functions.
  • standardize formatting/style (don't end lines with <-, consistent function() style)

Closes #32

Copy link

github-actions bot commented Dec 17, 2024

Docker build status

commit_time git_sha image
2025-01-03T09:25:26Z 13dc609 ghcr.io/rmi-pacta/workflow.pacta.dashboard:pr-52

Copy link

github-actions bot commented Dec 17, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://RMI-PACTA.github.io/workflow.pacta.dashboard/pr-preview/pr-52/
on branch gh-pages at 2025-01-03 09:35 UTC

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 2.14329% with 1598 lines in your changes missing coverage. Please review.

Project coverage is 1.90%. Comparing base (df295d0) to head (13dc609).

Files with missing lines Patch % Lines
R/prepare_pacta_dashboard_data.R 0.00% 340 Missing ⚠️
R/prep_techmix_sector.R 0.00% 214 Missing ⚠️
R/prep_trajectory_alignment.R 0.00% 206 Missing ⚠️
R/prep_techexposure.R 0.00% 132 Missing ⚠️
R/prep_audit_table.R 0.00% 127 Missing ⚠️
R/prep_company_bubble.R 0.00% 123 Missing ⚠️
R/prep_key_bars_portfolio.R 0.00% 101 Missing ⚠️
R/prep_exposure_stats.R 0.00% 84 Missing ⚠️
R/prep_key_bars_company.R 0.00% 77 Missing ⚠️
R/prep_emissions_trajectory.R 0.00% 58 Missing ⚠️
... and 9 more
Additional details and impacted files
@@           Coverage Diff            @@
##            main     #52      +/-   ##
========================================
+ Coverage   0.00%   1.90%   +1.90%     
========================================
  Files         25      24       -1     
  Lines       1192    1839     +647     
========================================
+ Hits           0      35      +35     
- Misses      1192    1804     +612     

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

@AlexAxthelm AlexAxthelm marked this pull request as ready for review December 18, 2024 17:18
@jdhoffa
Copy link
Member

jdhoffa commented Dec 20, 2024

I will review this in January 😊
@AlexAxthelm please remind me in case I forget!

@cjyetman
Copy link
Member

cjyetman commented Jan 2, 2025

DESCRIPTION should specify minimum R version if you're using base pipe

@AlexAxthelm
Copy link
Contributor Author

DESCRIPTION should specify minimum R version if you're using base pipe

Good catch. Addressed in 13dc609

@AlexAxthelm
Copy link
Contributor Author

Note that #56 will introduce merge conflicts with this PR.

@AlexAxthelm AlexAxthelm self-assigned this Jan 3, 2025
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.

Enable Linters
3 participants