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

Upgrades to austraits for v.5.0.0 #85

Merged
merged 30 commits into from
Nov 22, 2023
Merged

Upgrades to austraits for v.5.0.0 #85

merged 30 commits into from
Nov 22, 2023

Conversation

fontikar
Copy link
Collaborator

  • Bumped version number
  • Updated NEWS
  • Minor import fix in get_version_latest

fontikar and others added 23 commits January 12, 2023 16:04
…king for new version, waiting for austraits.build update
…rough the internal data subsets for version 3.0.2 and version 4.0.0. Pivot_ needs austraits.build fixes to implenment. Some minor fix to pivot_wider for dependencies #60
Some packages needed to make plots are included in suggests. This means that core functions of package may not work.
- reuse outputs from previous function calls to reduce runtime
- reduce dataset sizes for slow functions (summarise_trait_means, trait_pivot_wider, plot_locations)
- silence some outputs

closes #62
- As documented in #79 , the Zenodo API has changed, breaking our download feature. 
- This commit updates the internals to work with the latest changes. 

Specifically: 

- the way to access json for all versions has changed (changed url structure, and for id we now use one of the record ids, rather than the conceptid)
- the call to download file has changed
- format of the API json has changed

Also

- added record id to the table of versions
- put a check in to remove "v" from any version entered by user
* changes required for v5 austraits.build

* Removed original_name for trait_pivot_wider3 for v5.0.0

* Added trait_pivot_wider for v4.x.x and code for what_version

* Making new switches for join and as_wide_table based on new versioning

* Sub switch for extract_ and recreated internal data

* Sub switches for trait_pivot_longer

* Minor fix in join_methods

* Added vars a global vars

* Removed .data calls when not needed

* Update to work with latest zenodo API (#81)


- As documented in #79 , the Zenodo API has changed, breaking our download feature. 
- This commit updates the internals to work with the latest changes. 

Specifically: 

- the way to access json for all versions has changed (changed url structure, and for id we now use one of the record ids, rather than the conceptid)
- the call to download file has changed
- format of the API json has changed

Also

- added record id to the table of versions
- put a check in to remove "v" from any version entered by user

* Recreated data so extract is passing

* Update `treatment_id` with `treatment_context_id`

* Revert "Update `treatment_id` with `treatment_context_id`"

This reverts commit 3fc6717.

* minor column name changes

Changes column names, reflecting recent changes to traits.build output.

* Update as_wide_table.R

add `any_of` to column selection within `as_wide_table` to accommodate other traits.build databases that don't have the same columns in taxon_list.csv

* Fixed getting versions and load austraits with zenodo updates and minor update with as_wide_table with removal of variable

* Fixed minor bug in get_version_latest

---------

Co-authored-by: Elizabeth Wenk <[email protected]>
Co-authored-by: Daniel Falster <[email protected]>
Co-authored-by: yangsophieee <[email protected]>
@fontikar fontikar requested review from dfalster and ehwenk and removed request for dfalster November 21, 2023 00:31
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 49 lines in your changes are missing coverage. Please review.

Comparison is base (53b637c) 77.37% compared to head (147030b) 81.26%.

❗ Current head 147030b differs from pull request most recent head d1c6f61. Consider uploading reports for the commit d1c6f61 to get more accurate results

Files Patch % Lines
R/trait_pivot_wider.R 12.19% 36 Missing ⚠️
R/trait_pivot_longer.R 41.66% 7 Missing ⚠️
R/load_austraits.R 84.00% 4 Missing ⚠️
R/plot_locations.R 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   77.37%   81.26%   +3.88%     
==========================================
  Files          20       19       -1     
  Lines         800      902     +102     
==========================================
+ Hits          619      733     +114     
+ Misses        181      169      -12     

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

R/as_wide_table.R Outdated Show resolved Hide resolved
R/join_all.R Show resolved Hide resolved
R/trait_pivot_wider.R Outdated Show resolved Hide resolved
Copy link
Collaborator

@ehwenk ehwenk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've previously tested whether the functions run, so now looking at syntax,

I didn't review the tests thoroughly

* Created lites for all main versions of AusTraits

* Passing for as_wide_table

* Passing for as_wide_table and for extract_

* expanding test suite to all 3 majors, switches for method id adjusted

* expanding test suite to all 3 majors for summarise_D

* Expanding these for all 3 versions

* Added PR trigger for dev branch
@fontikar fontikar merged commit 181e695 into master Nov 22, 2023
8 checks passed
@fontikar fontikar deleted the develop branch November 22, 2023 02:25
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