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

A generalised solution to deprecate switch functions #97

Closed
wants to merge 58 commits into from

Commits on Jan 12, 2023

  1. Trying out map for tests

    fontikar committed Jan 12, 2023
    Configuration menu
    Copy the full SHA
    64db845 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7704303 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5e2e6a2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    426fc4d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b677567 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c2008c5 View commit details
    Browse the repository at this point in the history

Commits on Jan 13, 2023

  1. Version tests for join_

    fontikar committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    5e47cfb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c0781b5 View commit details
    Browse the repository at this point in the history
  3. #60 fixed imports for pivot_wider, organised tests, currently not wor…

    …king for new version, waiting for austraits.build update
    fontikar committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    50154e1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    247db43 View commit details
    Browse the repository at this point in the history
  5. Merge branch 'multi_tests' into develop: All possible tests is run th…

    …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
    fontikar committed Jan 13, 2023
    Configuration menu
    Copy the full SHA
    2b79ab5 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2023

  1. 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.
    dfalster committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    82a0f0f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e0cb08 View commit details
    Browse the repository at this point in the history
  3. Update deprecated functions

    dfalster committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    8f79aa6 View commit details
    Browse the repository at this point in the history
  4. 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
    dfalster committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    30d95cc View commit details
    Browse the repository at this point in the history
  5. Change GH actions triggers

    dfalster committed Jan 25, 2023
    Configuration menu
    Copy the full SHA
    9615ed0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    87bdb95 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2023

  1. Configuration menu
    Copy the full SHA
    846ba84 View commit details
    Browse the repository at this point in the history
  2. bumped version number

    fontikar committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    3564de0 View commit details
    Browse the repository at this point in the history
  3. 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
    dfalster authored Oct 16, 2023
    Configuration menu
    Copy the full SHA
    4a534bf View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2023

  1. Configuration menu
    Copy the full SHA
    17de18c View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. 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>
    4 people authored Nov 21, 2023
    Configuration menu
    Copy the full SHA
    f9c1666 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10791de View commit details
    Browse the repository at this point in the history
  3. Added references to packages

    fontikar committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    32e5262 View commit details
    Browse the repository at this point in the history
  4. Updated version for GH steps

    fontikar committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    a64a360 View commit details
    Browse the repository at this point in the history
  5. Updated v number for GHA

    fontikar committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    23a2f7a View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. 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
    fontikar authored Nov 22, 2023
    Configuration menu
    Copy the full SHA
    147030b View commit details
    Browse the repository at this point in the history
  2. Added codecov yml

    fontikar committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    2bd66f1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cc8e8cf View commit details
    Browse the repository at this point in the history
  4. Setting limit for patch cov

    fontikar committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    d1c6f61 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2023

  1. Configuration menu
    Copy the full SHA
    91c94c4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a541663 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. Configuration menu
    Copy the full SHA
    277a7e5 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. Configuration menu
    Copy the full SHA
    9360930 View commit details
    Browse the repository at this point in the history
  2. Bumped version number

    fontikar committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    9d32105 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. create new function check_compatibility (#95)

    Create a new function to check if a database is compatible with austraits 3.0 functions
    
    In particular, this function is designed to check a database's metadata to determine if it has been built using `traits.build` versus older versions of AusTraits that were compiled by the internal `austraits.build` workflow. If a version of AusTraits (austraits.build) that is version 4.0 (or older) is detected, messages alert the user to how to download an old version of austraits.
    
    As part of this, the helper function `util_list_to_df2` that converts nested lists to dataframes is added to austraits as an internal function. (Needed to convert specified sections of the databases' metadata into a dataframe).
    
    Includes a test for the new `check_compatibility` function.
    
    Closes issue #93
    ehwenk authored Sep 4, 2024
    Configuration menu
    Copy the full SHA
    6928738 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d40ea94 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. Configuration menu
    Copy the full SHA
    85beb0a View commit details
    Browse the repository at this point in the history
  2. Added print_version and added dependency to CLI for nice messaging an…

    …d deprecating extract_dataset1
    fontikar committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    46769f2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    01af2da View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e65eebd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    55405e3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0ae346f View commit details
    Browse the repository at this point in the history
  7. Updated NEWS

    fontikar committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    20322af View commit details
    Browse the repository at this point in the history
  8. Tear down switch

    fontikar committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    3a7c1c3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    35c4f67 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ab07817 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    5d607eb View commit details
    Browse the repository at this point in the history
  12. Use abort instead of bullet

    fontikar committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    e4cf1b9 View commit details
    Browse the repository at this point in the history
  13. Test passing for extract_

    fontikar committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    fe15fb4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    2c9eb3a View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    50bd34f View commit details
    Browse the repository at this point in the history
  16. fix outdated functions

    Hopefully these will work now!
    ehwenk committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    6e8748d View commit details
    Browse the repository at this point in the history
  17. still a bug...

    I've continued to fuss with this function and there are still problems that are baffling me. I did realise that we also needed to collapse, then separate `basis_of_record` since that can vary with value_type.
    
    Also, there are ~50 datasets where info is collapsed: these are the datasets where, for instance, there are mins and maxs for the same observation_id. For instance, `ABRS_1981` which is in the austraits5.0.0-lite, so I switched to using it. But it is huge!
    
    Now, there is one bigger problem to discuss @dfalster. In AusTraits we now have `bin` and `range` as value types and for these, the delimiter is already `--`. So there is nothing to collapse, but the code will seek to separate these. And this will create a problem, since there won't be `--` in the other rows being separated.
    
    I'm not sure why these functions have been passing tests until now, but it is a pretty big rethink to get them running usefully on all datasets.
    ehwenk committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    ae89b15 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Update test-trait_bind_sep.R

    Removing tests for `separate_trait_values` - somehow a large number of extra rows are being created.
    
    This function needs a major revamp - for another day.
    
    ```
    Failure (test-trait_bind_sep.R:13:3): structure of dataframes is what we expect
    nrow(subset$traits) (`actual`) not equal to nrow(seperated) (`expected`).
    
     `actual`: 36603
    `expected`: 19675
    ```
    ehwenk committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    b01f944 View commit details
    Browse the repository at this point in the history
  2. Fix bind_trait_values and separate_trait_values (#99)

    The functions bind_trait_values and separate_trait_values were woefully out-of-date with the traits.build structure. We're not sure how the tests were passing previously -- but they weren't any longer. Lots of bugs have been changed, but two tests are currently commented out of separate_trait_values, pending a more major reworking/scrapping of this function.
    
    This function needs a major revamp - for another day.
    
    ```
    Failure (test-trait_bind_sep.R:13:3): structure of dataframes is what we expect
    nrow(subset$traits) (`actual`) not equal to nrow(seperated) (`expected`).
    
     `actual`: 36603
    `expected`: 19675
    ```
    ehwenk authored Sep 6, 2024
    Configuration menu
    Copy the full SHA
    3bd4942 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c4108f0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4ba7a1d View commit details
    Browse the repository at this point in the history