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

hextask

v0.1.4

Published

TaskObject derived to make a Hex Task

Downloads

3

Readme

HexTask

Hextask is an instance of taskobject (Git repo, NPM package), used to process a simple Hex job (Hex website).

Installation

In your project repository :

npm install hextask

Usage

You can either make a test in your proper JS file or use the test file we provide.

Your proper test

In your JS script, import the test file :

var hexTestModule = require('./node_modules/hextask/test/test');

Then you have to start and set up a JM (= Job Manager, more info in the More section). We provide a method that takes care of that :

hexTestModule.JMsetup();

JMsetup returns an object instance of EventEmitter. It emits "ready" when the JM is ready to receive jobs, and provide the JM object. Then, you can run the hexTest method :

hexTestModule.JMsetup().on('ready', function (JMobject) {
	hexTestModule.hexTest(pdbFile, management, probeContent, ncpu);
});
  • pdbFile is the absolute path to your PDB file.
  • probeContent is the content of the PDB file of your probe.
  • ncpu is the number of CPUs on which you want to run Hex. WARNING : for now, only 16 is available !
  • management is a literal like :
let management = {
	'jobManager' : JMobject // provided by the JMsetup method
}

The hexTest method :

  1. creates a stream (Readable) containing a JSON with your pdbFile content,
  2. instantiates a hextask (more info on the Hex website),
  3. pipes the stream on the hextask, also piped on process.stdout, so you can watch the results in your console.

The test file

The previous test is already implemented in the ./node_modules/hextask/test/ directory. To use it :

node ./node_modules/hextask/test.js

This script needs some command line options. You can use option -u to display the documentation.

Loading library

In your JavaScript module :

var hexModule = require('hextask');

Creating an instance of hextask - not updated !!!!

In your JavaScript module :

var h = new hexModule.Hex (management);

Note that you need a job manager to use hextask, like nslurm (GitHub repo, NPM package) adapted to SLURM manager.

Using in a pipeline - not updated !!!!

In your JavaScript module :

readableStream
	.pipe(h)
	.pipe(writableStream);

Setting the hextask - not updated !!!!

You can modify the parameters in the ./data/settings.json file :

{
	"coreScript": "./data/run_hex.sh",
	"automaticClosure": false,
	"settings": {} // proper hex parameters
}

Proper hextask parameters must be defined in the "settings" part of the JSON.

More

Job Manager

Coming soon...
A Job Manager (JM) is necessary to run a Task. In our case, we use the nslurm package (GitHub repo, NPM package), adapted for SLURM.