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

Changes for v5 austraits.build #78

Merged
merged 30 commits into from
Nov 21, 2023
Merged

Conversation

fontikar
Copy link
Collaborator

Working with @ehwenk to update functions so they work across all versions of AusTraits.

  • Update to the switches for trait_pivot, extract_ join_ functions.
  • Update to what_version function
  • Added dplyr::all_of due to their soft warning deprecation
  • Updated internal testing data

R CMD check still gives 1 x NOTE but I want see if I can deal with these later and if GitHub Action will be unhappy with me

@fontikar
Copy link
Collaborator Author

Zenodo is currently down so some tests will fail...

@fontikar
Copy link
Collaborator Author

I am a bit confused with .data$ usage now! Passing locally when I use .data$ throughout functions, but tidyselect throws warnings in GitHub Action R CMD check

@fontikar
Copy link
Collaborator Author

I am a bit confused with .data$ usage now! Passing locally when I use .data$ throughout functions, but tidyselect throws warnings in GitHub Action R CMD check

Less confused now after reading this: https://community.rstudio.com/t/use-of-data-in-tidyselect-expressions-is-now-deprecated/150092

@fontikar
Copy link
Collaborator Author

Bah! I can't get this passing with all the tidyselect stuff. Will look on Monday!!! Assistance would be great if someone knows what I am doing wrong

@fontikar fontikar changed the base branch from master to develop October 16, 2023 23:30
dfalster and others added 3 commits October 17, 2023 10:55
- 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
@fontikar
Copy link
Collaborator Author

@dfalster over to you :D

@yangsophieee
Copy link
Contributor

Sorry for touching this branch! I was trying to get austraits functions to work as I'm testing them on traits.build. I've reverted my commit which was failing R CMD check but it's still failing now so I'm not sure what happened.

@fontikar When you're back I'm happy to look through tidyselect warnings as I had to remove them for traits.build so might have an idea where they're coming from.

@yangsophieee
Copy link
Contributor

Also my changes were wrong, it was fine as is!

ehwenk and others added 3 commits November 10, 2023 10:11
Changes column names, reflecting recent changes to traits.build output.

One thing I haven't yet changed, under taxa, the only "required" columns going forward as `taxon_name`, `taxon_rank` and `aligned_name`, so maybe use an `any_of`? AusTraits will have all columns indicated, but other traits.build databases won't.
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
…or update with as_wide_table with removal of variable
@fontikar
Copy link
Collaborator Author

@dfalster all good to merge this??

@dfalster
Copy link
Member

Please coordinate with @ehwenk @dcol2804 as they're using it

@ehwenk
Copy link
Collaborator

ehwenk commented Nov 19, 2023

@fontikar The austraits.build tutorial that uses the functions is rendering. But maybe wait 1-2 hours until I've finished going through it line by line?

@fontikar
Copy link
Collaborator Author

Sounds good no worries! I reran tests locally and all passing so its should be smooth sailing from here

@fontikar fontikar merged commit f9c1666 into develop Nov 21, 2023
2 checks passed
@fontikar fontikar deleted the changes-for-v5-austraits.build branch November 21, 2023 00:08
fontikar added a commit that referenced this pull request Nov 22, 2023
* #60 fixed imports for pivot_wider, organised tests, currently not working for new version, waiting for austraits.build update

* Minor naming adjustments in test

* Change some dependencies to imports

Some packages needed to make plots are included in suggests. This means that core functions of package may not work.

* Remove helper functions to vignettes

* Update deprecated functions

* Restructure tests to run faster

- 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

* Change GH actions triggers

* ensure consistent ordering of rows

* bumped version number

* 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

* Pulled files we want to develop from change-v5

* Changes for v5 austraits.build (#78)

* 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 <ehwenk@gmail.com>
Co-authored-by: Daniel Falster <daniel.falster@unsw.edu.au>
Co-authored-by: yangsophieee <sophie.yang917@gmail.com>

* Bumped version number and updated news

* Added references to packages

* Updated version for GH steps

* Updated v number for GHA

* Expanding testing suite to all 3 major versions of AusTraits (#86)

* 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

* Added codecov yml

* Setting limit for patch cov

---------

Co-authored-by: Daniel Falster <daniel.falster@unsw.edu.au>
Co-authored-by: Elizabeth Wenk <ehwenk@gmail.com>
Co-authored-by: yangsophieee <sophie.yang917@gmail.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.

4 participants