Code Monkey home page Code Monkey logo

admiraldev's Introduction

pharmaverse website

pharmaverse.org

This website is maintained and governed by our website community. Further details of this are available here. The community lead is considered the product owner for the website and has final say on any decisions related to the website.

For any questions or enhancements for the site, please make issues at this repo.

Hosted sites:

This website is available at 2 locations:

Development / git flow

When you push to develop OR make a pull request onto develop a github action will run which will render the site, and deploy it to the test server. But the test server is different depending on which route you took.

The code on develop is hosted to: http://openpharma.s3-website.us-east-2.amazonaws.com/develop/

The intended workflows expects that develop is the UAT branch where you check things pre-prod. While the 'build from PR` allows you to work on something very experimental and check results, before pushing it do develop.

This git flow is predicated on it being unlikely to have more than one person actively working on the site at any one time.

You cannot work directly on main branch. The only way to push in is via a PR. And it will be denied if you have not come through develop. Any PR requires approval from one other Technology and Templates WG member.

Data flows

'Scraped' data

Passive data is collected via openpharma.github.io, a sister org that is completely un-opinionated and has
a wider remit spanning discovery to access. This site contains no curated data beyond names - and is instead focused on collecting and sharing data on open source health and related metadata (e.g. CRAN status and riskmetric scores).
Information on the data collected is here: https://openpharma.github.io/#data.

Data is stored in a pharmaverse AWS account.

Package info

Curated package info is stored in the folder data/. pharmaverse packages are in the folder data/packages. Non-pharma packages that get a special mention are in data/nonpharma. Each package is a unique .yaml file.

The general structure is:

name: admiral
repo: pharmaverse/admiral
repo_source: github.com
docs: https://pharmaverse.github.io/admiral/cran-release/
hex: https://github.com/insightsengineering/hex-stickers/raw/main/PNG/admiral.png
task: ADaM
details: (ADaM In R Asset Library) - Modular framework to generate ADaM via R functions relying on community contributions
splash: include # this controls what is shown on the main page. Plan is to deprecate and put all hex's up

It should be self explanatory. Please use the categories in the site for task:.

People

Info on people is in data/people. The yaml should be something like below, with the filename being the github handle.

name: James Black
pharmaverse_roles: tech
company: Roche
company_logo: roche.png
# Following is more a nice to have for profile pages [and optional]
linkedin: https://www.linkedin.com/in/epijim/
site: https://epijim.uk
title: People and Product Family Leader for Insights Engineering, Scientific Computing Environment Product Owner
bio: James is currently leading our pan-study codebase for insights

General content of the site

Site content is in content. It's normal markdown files. See markdown-guide.md.

Calling package info in the site

To call a package, we have two shortcuts. pharmaverse means it's 'pharmaverse' - e.g. in the folder data/packages. otherpackages is for non-pharmaverse packages, in data/nonpharma.

{{< pharmaverse pkg="rtables" >}}

{{< otherpackages pkg="gt" >}}

Council meeting minutes

From 2023 onwards, our monthly council meeting minutes will be published in static/council meeting minutes. Other static files such as images are stored in static also.

admiraldev's People

Contributors

actions-user avatar aniagolab avatar bms63 avatar bundfussr avatar cicdguy avatar ddsjoberg avatar declanhodges avatar dgrassellyb avatar esimms999-gsk avatar fshanlee avatar galachad avatar jeffreyad avatar kaz462 avatar manciniedoardo avatar milesalmond avatar millerg23 avatar pharmaverse-bot avatar poojakumari05 avatar professorp-beep avatar rossfarrugia avatar sadchla-codes avatar slamao avatar zdz2101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

admiraldev's Issues

Documentation: Using Comment blocks in functions

Please select a category the issue is focused on?

Function Documentation

Let us know where something needs a refresh or put your idea here!

It could be advantageous for developers to have commented blocks of code for future developers making updates. These comment blocks could point out salient features of the code and/or give a more detailed explanation of how the code works/processes. This would be seen by developers or by users inspecting the code on github.

We would like to establish a common way to use these comment blocks in our code.

DoD:
Programming strategy has recommended best practice for using comments blocks in code.

@sgorm123 Does this capture our discussion yesterday?

Feature Request: Deprecation Function that automates Deprecation Strategy

Feature Idea

A function that helps to remind us when a function should be removed from the code-base.

Essentially a wrapper function around deprecate_stop, deprecate_warn but also causes the package to be unable to build once the function is no longer kept inside admiral.

Relevant Input

No response

Relevant Output

No response

Reproducible Example/Pseudo Code

No response

General Issue: Update Description with developers

Background Information

Developers of any function that is a dev_utility should be listed in the Description file. As well as anyone working on this package.

Definition of Done

Description file updated

General Issue: Undocumented function within `is_order_vars`

Background Information

image

quo_is_desc_call is used within is_order_vars. Do we want to separate out this function so it can be used other places if needed, provide context on what it is, easily test it, etc.

Definition of Done

Decide if we want to split out this function.

If yes, set up documentation and test the function

Documentation: Create a Standardized Roxygen Template for Developer Vignette

Please select a category the issue is focused on?

Developer Guides

Let us know where something needs a refresh or put your idea here!

It has been observed that our roxygen headers are not standardized across the admiral code-base. For example, some function headers have @author or @return in different places from other function headers.

In order to standardized all of our headers, we first need to create a Standard Template that shows the order of the tags and what should go in each tag. This template will live in the Developer Guide-Programming Strategy . An existing example and guidance already exists and can be updated once agreed upon structure is met.

  • Standardizing the headers also means a consistent structure across the Reference Tab on the packagedown site.
  • This might be good as a check in the PR checklist that the roxygen headers follow the standard template?

Proposed Structure (Updated based on Stefan's feedback)

#' Title
#'
#' Short Description (If the description consists of more than one paragraph, use the `@description` tag.)
#'
#' @param dataset Descriptive Text (order of @param tags should be order as they appear in function)
#'
.
.
#' @param an_input Descriptive Text
#'
#' @details (Deep dive of purpose, recommend workflow, documentation/links)
#'
#' @return (What is returned by this function)
#'
#' @author (original and updating authors)
#'
#' @family (This will create an additional See Also section that links to similar functions)
#'
#' @keywords (This is helpful for our packagedown site to organize the reference page)
#'  If possible, use keywords which are used in `_pgkdown.yml`.
#'  If a new keyword is required, a corresponding section needs to be added to `_pgkdown.yml`.
#'  All keywords must be lower case.
#'
#' @seealso [related_function()] (This tag is optional. It should be used to refer to related functions.)
#'
#' @export
#'
#' @examples (Use `library(pkg_name)` rather than `pgk_name::function()`)

General Issue: Bring over all assert functions

Background Information

admiral has assert functions and asset_that functions in several files. These should be confirmed and brought over.

Definition of Done

All tests and functions related to the assert should be brought over to admiraldev

General Issue: Bring over all warning functions

Background Information

Most of the admiral warning functions are within the warnings.R file. This should be confirmed. We want all warning functions used in development to be brought over.

Definition of Done

All warnings function and tests are brought over to admiraldev

Documentation: Explanation of why we need `compat_friendly_type.R`, when to retire and replacements developed to replace it

Please select a category the issue is focused on?

Function Documentation

Let us know where something needs a refresh or put your idea here!

https://github.com/pharmaverse/admiral/blob/main/R/compat_friendly_type.R

  • Why did we adopt this code?
  • Where is this code used in admiral and admiraldev?
  • Explore Alternatives that allow us to remove this code.

Once these are brought over, we need to make a note in the file of why we have them and when they can removed.

Definition of Done

  • Create a Details section with @zdz2101 explanations [craft in a way that makes sense for a new user]
  • Create a .Rd file
  • Make sure entry on site is legible and falls in a category that makes sense.

Documentation: How and when to use the Test Addin

Please select a category the issue is focused on?

I have a new documentation idea! Yay!

Let us know where something needs a refresh or put your idea here!

once the testthat addin is finalized we need to provide a little bit of documentation on how to use it and what to watch out for.

Documentation: `is_` functions using `@rd`

Please select a category the issue is focused on?

Function Documentation

Let us know where something needs a refresh or put your idea here!

Since we are splitting out these from admiral I feel that these can have proper documentation and read out to the pkgdown site.

image

General Issue: `valid_time_units` the same as `is_timeunit`?

Background Information

These look to be doing similar things. one is robustly documented and other is not. Do we need the undocumented function?

Is the undocumented function used in admiral? Yes, in derive_vars_duration.

image

image

Definition of Done

Keep or remove valid_time_units?

If we keep, then update roxygen documentation for this function.

General Issue: Functions not used in admiral or in admiraldev should be removed

Background Information

Check that functions are being used within admiral or admiraldev. If not, please create an issue for discussion if that unused function should be removed from this package.

Definition of Done

All functions within admiraldev have been checked for use within either admiral or admiraldev. Separate Issue created for each function that could be potentially removed.

Requesting Updates to renv.lock

Okay...how did you make that diagram...I want that power.

GitHub now support mermaid.js: https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

This all makes sense to me. We just need to be able to have a process, and make it well known, on how deverlopers can request updates to the renv.lock file. I think a lot of people think this thing is set in stone for eternity, but that is not the case.

Agreed - this will need to be documented and well-described.

Originally posted by @cicdguy in pharmaverse/admiralci#2 (comment)

Documentation: Release Process as its own vignette

Please select a category the issue is focused on?

Developer Guides

Let us know where something needs a refresh or put your idea here!

Since we have more room, we should split out some the vignettes to make it easier to find things and keep things fresh

Starting with vignette for release process - the really nit and gritty

Feature Request: Create addin for adding standard roxygen header

Feature Idea

This will follow our stated pharmaverse/admiral# roxygen template. A user can use the Addin feature to load in a template of the roxygen structure need to create an admiral function.

Relevant Input

Header should create what is laid out in programming strategy - https://pharmaverse.github.io/admiraldev/devel/articles/programming_strategy.html#function-header-documentation

Relevant Output

No response

Reproducible Example/Pseudo Code

No response

developer function messaging

I think in principle such a message could be helpful. However, I would not implement it just for one function. If we want to implement something like that, we should have a general concept for:

  • Which functions issue which messages?
  • Where are the messages written to?
  • How can the developer switch on and off the messages?

Originally posted by @bundfussr in pharmaverse/admiral#1110 (comment)

Feature Request: Tests are needed for is.R

Feature Idea

We need tests written for all the is.R functions. There are none available as far as I can tell.

Relevant Input

No response

Relevant Output

No response

Reproducible Example/Pseudo Code

No response

Feature Request: Pre-Release prompt questions

Feature Idea

Looking over the package manual. I see this idea of an unexported function for prompting us to remember certain release procedures, updates, etc. This might be better than a PR request template for releasing the package and could be used across the admiral family.

image

Relevant Input

No response

Relevant Output

No response

Reproducible Example/Pseudo Code

No response

General Issue: `on_failure` nested function

Background Information

A lot of the is functions have a nested on_failure function within them. Do we want to split this out? I see most of them follow the same pattern, but a few differ.

image

Definition of Done

No response

General Issue: Remove unused global variables from `globals.R`

Background Information

Current global.R file has a lot of unused global variables copied over from admiral. As these are not necessary they should be removed.

  • Create a list of the global variables in the global.R file
  • Identify global variables that are not used in this package.
  • Remove global variables.

Definition of Done

Unused global variables have been removed from admiraldev

Documentation: keywords/families

Please select a category the issue is focused on?

Function Documentation

Let us know where something needs a refresh or put your idea here!

We need keywords and families that can help developers quickly find and understand the suite of developer functions that we have avaialble.

General Issue: Develop a release strategy for admiraldev

Background Information

The functions within admiraldev are used in core, onco and roche packages. We need to think on how to deploy this package and how to deal with potential issues that could arise.

For example, one issue is where the assert_data_frame will now appears in multiple packages and how to only use the one from admiraldev.

  • When is this package deemed stable on Github
  • When do we release this package to CRAN?

Definition of Done

Release Strategy developed

General Issue: Site should publish from devel branch and not main branch

Background Information

As we develop our programming processes, we should keep these updated in the website for all core and extension packages to see. Rather than releasing updated website at every CRAN release, we should update it from devel so it stays current.

Definition of Done

pkgdown action is switched to devel

Automate adding function name and test number to the test title

A function should be implemented which adds the function name and a test number to the title of the tests. Additionally it should add a comment before the test such that it is displayed in the TOC in RStudio.
For example

test_that("duration and unit variable are added", {
...
}

should be transformed to

#---- derive_vars_aage, test 1: duration and unit variable are added ----
test_that("derive_vars_aage, test 1: duration and unit variable are added", {
...
}

If the function name and test number are already in the title, it should be updated if necessary.

Please note this is quite a large task and good for someone familiar with the RStudio API.

General Issue: Define scope of the package

Background Information

Current language in the Description File:

  • A toolbox for developers working on pharmaverse admiral packages.

Current language in the README:

  • Tools for developing functions and maintaining a healthy codebase within the family of admiral R packages.

But want to make sure we are all on the same page as these two phrases aren't exact and the overlap of admiral and admiraldev is a bit tricky.

I see this package as not only being for a place for specific functions that help our admiral packages functions, but also give us reports and tools to make our development life easier.

For example, the testing Addin that reformats the testthat files to adhere to our Unit Test Guidance. An addin that allows for easier setup of roxygen headers and reports on keywords and families being used. I see a lot more potential here, but don't want it to get too wild!

Definition of Done

The Scope of package is decided upon and written into the Readme.

Documentation: Examples of when to use Default and Permitted Values

Please select a category the issue is focused on?

Function Documentation

Let us know where something needs a refresh or put your idea here!

A good part of our function documentation have default and permitted values listed in the function arguments. However, this is not completely adopted across admiral.

To remedy this:

  • Update the Programming Strategy to have best practices on when and how Default to be used.
  • Update the Programming Strategy to have best practices on when and how Permitted Values are to be used.
  • #166
  • Update function documentation for Default per programming strategy
  • Update function documentation for Permitted Values per programming strategy

Documentation: How to create an admiral function

Please select a category the issue is focused on?

Vignette

Let us know where something needs a refresh or put your idea here!

goal: vignette that explains how to create a new admiral function

explain how to build a function with these in mind - link to manifesto, other vignettes, programming strategy, style guide?
Part 1

  • readability

  • findability

  • simplicity principles
    Part 2

  • technical: quoting and unquoting - how to use tidy within functions (i.e. !! vs. !!!) - Thomas

  • example: building blocks

Pick some existing functions to explain decisions why things were done this way and not other, e.g. generic functions vs specific functions. - is it needed?

General Issue: Running list of functions to remove from admiral

Background Information

  • .rlang_as_friendly_type
  • .rlang_as_friendly_vector_type
  • .rlang_stop_unexpected_typeof
  • %notin% (keep in admiral)
  • %or%
  • anti_join
  • arg_name
  • as_name
  • assert_character_scalar
  • assert_character_vector
  • assert_data_frame
  • assert_db_requirements (keep in admiral)
  • assert_expr
  • assert_filter_cond
  • assert_function
  • assert_function_param
  • assert_has_variables
  • assert_integer_scalar
  • assert_list_element
  • assert_list_of
  • assert_list_of_formulas (Removed from admiraldev and needs to be removed from admiral)
  • assert_logical_scalar
  • assert_named_exprs
  • assert_numeric_vector
  • assert_one_to_one
  • assert_order_vars
  • assert_param_does_not_exist
  • assert_s3_class
  • assert_symbol
  • assert_terms (keep in admiral - rename?)
  • assert_unit
  • assert_valid_queries
  • assert_vars
  • assert_varval_list
  • backquote
  • contains_vars
  • dataset_vignette
  • dquote
  • enumerate
  • expect_dfs_equal
  • extend_source_datasets (keep in admiral)
  • extract_vars
  • format.sdg_select (keep in admiral)
  • format.smq_select (keep in admiral)
  • format_arg
  • friendly_type_of
  • get_constant_vars
  • get_duplicates
  • get_source_vars
  • grapes-notin-grapes (not sure what this is?)
  • inner_join
  • is_auto
  • is_date
  • is_named
  • is_order_vars
  • is_timeunit
  • is_valid_date_entry
  • is_valid_day
  • is_valid_dtc
  • is_valid_hour
  • is_valid_month
  • is_valid_sec_min
  • is_valid_time_entry
  • left_join
  • print.duplicates (stay in admiral)
  • quo_c
  • quo_is_desc_call
  • quo_not_missing
  • replace_values_by_names
  • squote
  • stop_input_type
  • suppress_warning
  • valid_time_units
  • validate_query (keep in admiral)
  • validate_sdg_select (keep in admiral)
  • validate_smq_select (keep in admiral)
  • warn_if_incomplete_dtc
  • warn_if_inconsistent_list
  • warn_if_invalid_dtc
  • warn_if_vars_exist
  • what_is_it

Definition of Done

  • Final list of functions created
  • This list of functions and tests are removed from admiral

General Issue: Update badges

Background Information

Updates badges for readme. There should only be 4 badges on admiraldev homepage

image

Definition of Done

4 badges appear on the readme

  • pharmaverse admiraldev
  • CRAN 0.1.0
  • R-CMD-check
  • Test Coverage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.