Cadence Virtuoso SKILL library
Project description
VIRTUE
Cadence Virtuoso SKILL++ framework
Features:
- A standard library of packages with functions for common tasks
- A test framework modeled after pytest
- A TOML config file reader and writer
- A package import system that allows the library to define just a single top-level import table symbol that allows each package to be imported locally.
Example Test File
Note the package imports at the top
let(((Str Import['Str])
(Test Import['Test])
(Virtue Import['Virtue])
)
procedure(Test_emptyp()
assert(Str->emptyp(""))
assert(!Str->emptyp("test"))
)
procedure(Test_str2bool()
assert(Str->str2bool("true"))
assert(Str->str2bool("TRUE"))
assert(!Str->str2bool("false"))
)
procedure(Test_str2bool_error()
assert(!errset(Str->str2bool("Nothing")))
)
Test->RunFile(list(nil
'Test_emptyp Test_emptyp
'Test_str2bool Test_str2bool
'Test_str2bool_error Test_str2bool_error
)
?filepath Virtue->GetCurrentFilePath()
)
)
Prints out the following when ran in the CIW:
FILE: /path/to/file/test_Str.ils
passed: Test_emptyp
passed: Test_str2bool
passed: Test_str2bool_error
3 / 3 tests passed
Installation
It requires Python >= 3.7
Using Conda (recommended)
I would recommend using Conda to install Virtue and any related packages.
This will install both virtue and Python.
If you haven't already installed conda, I would recommend using the mambaforge installer. Then download the virtuoso environment definition file, environment-virtuoso.yml which will be used to create the environment with the recommended Virtue packages.
Install in a new environment named "virtuoso":
conda env create -f environment-virtuoso.yml
Install in an existing environment:
conda install -c conda-forge virtue
From Source
Just load the "virtue.init.ils" from the CIW window or add the following to your .cdsinit file:
load("/path/to/repo/virtue/virtue.init.ils")
Reminder: The following will change your top-level interpreter to SKILL++:
toplevel('ils)
Using Pip
You can install Virtue using pip from the virtue-skill PyPi package
pip install virtue-skill
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for virtue_skill-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91704cf2635353420d40783a803e41925aba6abbaf40ce3a1056ee860bd0bb2a |
|
MD5 | 10d92843da4b58e745d9e5dda6d1199e |
|
BLAKE2b-256 | 2a5f9bddaa5a5752f0869abd20800ff6df1aea9a6b7f966bf2acd4e9afd7a50a |