Skip to content

Latest commit

 

History

History
100 lines (74 loc) · 3.55 KB

GettingStarted.md

File metadata and controls

100 lines (74 loc) · 3.55 KB

Getting Started

Setup - .NET

  1. Install .NET SDK.
  2. Get the ARCtrl nuget package.
  3. (OPTIONAL) Use FsSpreadsheet.Net to get any xlsx files into the correct format with our supported readers.
  4. (OPTIONAL) You can use contract handling from ARCtrl.NET. This documentation will avoid using ARCtrl.NET and extract the relevant functions.

Thats it! 🎉

For any documentation we assume using ARCtrl from a .fsx file. Verify correct setup by creating a ARC.fsx file with the following content

#r "nuget: FsSpreadsheet.Net"
#r "nuget: ARCtrl"

open ARCtrl

printfn "%A" <| ARC()
// > printfn "%A" <| ARC();;
// ARCtrl.ARC
// val it: unit = ()

You can open and run this code from VisualStudio Code with the Ionide extension. Running the code should return the result written as comment at the end of the file.

Setup - JavaScript

  1. Install nodejs
  2. Create folder and inside run npm init.
    • This will trigger a chain of questions creating a package.json file. Answer them as you see fit.
  3. Edit the package.json file to include "type": "module". This allows us to use import syntax (read more).
  4. Install the npm package @nfdi4plants/arctrl with npm i @nfdi4plants/arctrl.
  5. (OPTIONAL) Install the npm package fsspreadsheet with npm i fsspreadsheet.
    • This will be moved to the @fslab organisation soon!

Thats it! 🎉

Your package.json might look similiar to this:

{
  "name": "docs",
  "version": "1.0.0",
  "description": "This subproject is only used to create test script used for documentation",
  "type": "module",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Kevin Frey",
  "license": "MIT",
  "dependencies": {
    "@nfdi4plants/arctrl": "^1.2.0",
    "fsspreadsheet": "^5.2.0"
  }
}

You can now reference ARCtrl in any .js file and run it with node path/to/Any.js.

Verify correct setup by creating ARC.js file with the content from below in the same folder, which contains your package.json. Then run node ./Arc.js. This will print [class ARC] into the console.

// ARC.js
import {ARC} from "@nfdi4plants/arctrl";

console.log(ARC) // [class ARC]

Setup - Python

  1. Install python >3.11.x

  2. Create folder and put an requirements.txt file inside.

  3. Write arctrl and fsspreadsheet in two separate lines into it

    arctrl
    fsspreadsheet
    
  4. run py -m pip install -r requirements.txt

    Of course you can replace the command py with anything that leads to the python executable of your liking.

Thats it! 🎉

You can now reference ARCtrl in any .py file and run it with py path/to/Any.py.

Verify correct setup by creating ARCTest.py file with the content from below in the same folder, which contains your requirements.txt. Then run py ./ArcTest.py. This will print <class 'arctrl.arc.ARC'> into the console.

# ARCTest.py
from arctrl.arctrl import ARC;

print(ARC) # <class 'arctrl.arc.ARC'>