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

@datagrok/dev-tools

v1.4.0

Published

Tools for the Datagrok developers (TestManager, DevPanel).

Downloads

236

Readme

DevTools

DevTools is a package for the Datagrok platform. Its purpose is to simplify and assist in the development of platform extensions. This is achieved through familiarizing developers with Datagrok's object model and providing them with reproducible code snippets that fit their data. This approach allows to explore the key functionality from the interface, learn by example, jump to the documentation or API reference in one click, and much more. It also helps focus on the problem you are trying to solve: you can interact with your data from the outset while some of the program's building blocks are generated for you.

Components

  1. Dev info panel. It appears in the context panel whenever an entity becomes the current object. Under Dev, you will find links to the documentation and the object's class reference, a set of examples dynamically loaded from the ApiSamples package, and an editor with a template script with most common actions for this type of entity.

    Scripting

    In the first line, you will see the type and name of an object followed by two icons. The first one opens Datagrok's script editor with a few lines of code that obtain the object and save it to a variable. The second one logs the object to the browser's console. The next section contains links to documentation and the class reference. Below it, there are examples for the entity you are working with. Since some objects, such as dataframes, have a lot of applications, examples are grouped for them, with a choice input to switch between the groups. When you click on an example, it gets shown in the built-in editor. Use the 'Play' button to run the code and 'Reset' to bring the default template back. Other options let you copy the content or open it in the platform's full-scale script editor.

  2. The viewers' context menu command To JavaScript. It helps retrieve viewer options set from the interface. To use it, open a viewer and customize its appearance. Once this step is complete, choose the command from the menu:

    Retrieve viewer options with the 'To JavaScript' command

    The command outputs a code snippet that adds a viewer of this type to the current view. The options you selected are saved and passed to the addViewer method. See the How to manipulate viewers article to learn more about API to work with viewers.

  3. Test manager is a component that provides an interface for running package unit tests and further results exploration. To start Test manager go to top menu Tools -> Dev -> Test manager

Test manager start

Application starts showing a list of all packages containing unit tests. Inside each package, tests are divided by category. Categories support multiple nesting (subcategories should be divided by :). To select a test or a category, click on it, or use keyboard.

Tests list

Running tests

There are multiple ways you can run tests:

  • by right clicking on package, category, or test and selecting Run from context menu
  • by selecting package, category, or test and pushing Enter
  • by selecting package, category, or test and pushing Run on a ribbon panel
  • by selecting package, category, or test and pushing Run on a context panel
  • individual tests can be run by double click
  • you can run all tests at once using Run all button on the ribbon
  • package, category, or test can be run by putting the corresponding url into address bar of the browser. The format is the following your_server_name/apps/DevTools/TestManager/package_name/category_name/test_name Progress icon is shown opposite to active test/category/package, it will end up in result icon after completion. In case at least one test fails within category or package the fail icon will be shown.

Running tests

Progress bar on the bottom of the page will show the percentage of completed tests.

Progress bar

Reviewing results

Information about test results is available via tooltip or in the context panel. Selected test, category, or package to explore results. In case category/package contain multiple tests results are shown as a grid which can be added to workspace for further exploration.

Test results

See also: