UNPKG

1.11 kBTypeScriptView Raw
1import Parser from './Parser';
2import { SoftwarePackage } from '@stencila/schema';
3/**
4 * Dockter `Parser` class for R requirements files and source code.
5 *
6 * For each package, meta-data is obtained from http://crandb.r-pkg.org and used to create a `SoftwarePackage` instance
7 * using crosswalks from column "R Package Description" in https://github.com/codemeta/codemeta/blob/master/crosswalk.csv
8 *
9 * System dependencies for each package are obtained from https://sysreqs.r-hub.io.
10 */
11export default class RParser extends Parser {
12 /**
13 * Parse a folder by detecting any R requirements or source code files
14 * and return a `SoftwarePackage` instance
15 */
16 parse(): Promise<SoftwarePackage | null>;
17 /**
18 * Create a `SoftwarePackage` instance from a R package name
19 *
20 * This method fetches meta-data for a R package to populate the properties
21 * of a `SoftwarePackage` instance. It recursively fetches meta-data on the package's
22 * dependencies, including system dependencies.
23 *
24 * @param name Name of the R package
25 */
26 private createPackage;
27}