npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

study-manager

v0.2.0

Published

[![Build Status](https://jenkins.evidation.com/buildStatus/icon?job=study-manager-pipeline)](https://jenkins.evidation.com/job/study-manager-pipeline/)

Downloads

2

Readme

Build Status

Study Manager

A tool for helping setup studies by visualizing nodes that dictate study behavior.

** It is highly suggested to use NVM as a Node version management

Prerequisites

  1. Yarn or Npm installed locally (preferably Yarn as that is what our production build uses)
  2. You have been added to our NPM group, and logged in - create an account at npmjs.com, and provide your username to It/SysAdmin. (https://docs.npmjs.com/getting-started/installing-node#login-to-npm-from-a-terminal)
  3. You have been added to our Bitsrc group, and logged in - create an account at bitsrc.io, and provide your username to It/SysAdmin. (https://docs.bitsrc.io/)

Getting Started

After that's setup, run:

`yarn`

This will install of the dependencies needed to build the app. If you don't have npm, you're going to need to install it.

** IMPORTANT ** before running the app, you must run yarn run build-css to build the css file initially, before you can run npm run start

Then, to build the app, run:

`yarn start`

This will build the app and start a development server. The app will then be available at localhost:8001.

If you're looking to access the study node graph, you can find it at /studies/:studySlug/edit with :studySlug being the name of the study you want to see the nodes from. Currently, the tool support nodes from the hypertension study and that can be access via localhost:8001/studies/hypertension/edit.

Building

To build Scaffold, run

`yarn run build`

This will build the necessary files to a /build directory. The app should be able to run with the files located in the generated directory.

Environment Variables

Environment variables live in an .env.development.local file in the root of the project. Since the project is built on top of the Create React App base project, most variables need to be prefixed with REACT_APP_.

PORT='8001' NODE_ENV='(production/development)'

REACT_APP_TRIAGE_API_KEY REACT_APP_TRIAGE_API_URL REACT_APP_AUTH_API_URL

REACT_APP_BROWSERSTACK_USERNAME REACT_APP_BROWSERSTACK_ACCESS_KEY

Environment variables for testing live in .envrc file. When specifying the script command in package.json, add source .envrc before each command.

REACT_APP_TRIAGE_API_VERSION INTEGRATION_TEST_AUTH_TOKEN

Testing

If a test involves going through Visit Portal, one would need to configure the environment variable INTEGRATION_TEST_AUTH_TOKEN in both Triage and Study Manger (test will run on staging only because of security concerns to use INTEGRATION_TEST_AUTH_TOKEN in production environment).

Current tests in Study Manager (Visit Portal tests against staging, with roles of Production Support and CRC):

  1. activitypatterns. For each role there're 4 test cases that DQ in Billboard / before 6 min walk test / within 6 min walk test, and one qualifying test case.
  2. memory. For each role there're 3 test cases that DQ in Billboard / in Visit Portal, and one qualifying test case.

Puppeteer Tests

Selenium tests are migrated to Puppeteer tests.

Since sourcing .envrc is not allowed in CI, if one want to run yarn test locally with integration tests, one would need to add sourcing before the command. Currently the test avaiable is activitypatterns on staging. By default it only test two cases in headless mode. To run the test (to run like Selenium, simply add --debug after the command below):

$ . ./.envrc && yarn test:i:staging:activitypatterns

If the test cannot run and the error seems to be related to setup, try deleting package-lock.json, yarn.lock and folder node_module and run respective yarn run command again.

related discussion

Situations that might cause a test case to time out in memory tests:

  • Someone accidently time out all enrollments in Participant Explorer
  • Study Manager gets deployed in the middle of the test.
  • Mailing service down and emails can't be sent.
  • Triage / your network experiencing a congestion on registration / informed consent.
  • Some tile in the study not configured properly (for example, no event emitted event to assign external id).

Dev Resources

Adding a New Tile (FE)