Skip to content

Commit

Permalink
add virtue plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisma committed Aug 15, 2022
1 parent 5802f06 commit b756893
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/source/development/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Development Setup
#. Setup development environment using the dev.yml file in envs/
#. Open a project using the sp command with the -p option to specify the development
environment.
#. | For SKILL code development, the SKILL IDE can be opened from within Virtuoso.
| For general development it is recommended that Softworks be attached to the User's IDS PyCharm project.
#. For SKILL code development, the SKILL IDE can be opened from within Virtuoso.

Note that Updates to the SKILL code can be reloaded directly from the SKILL IDE. However updates to the
to any of the data.reg will require the Softworks Conda package to be rebuilt and the
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ dynamic = ["version", "description"]
"Documentation" = "http://www.cascode-labs.org/softworks/"
"Source" = "https://github.com/cascode-labs/softworks"

[project.entry-points."virtue"]
softworks = "softworks.virtue_softworks"

[tool.flit.module]
name = "softworks"
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let((dir_path src_path packages)
"/code_workspace.il" ; Create Code Workspace
)
Import['Module]->LoadList(packages
?root_path strcat(Import['Virtue]->GetCurrentFileDirectory() "/softworks"))
?root_path Import['Virtue]->GetCurrentFileDirectory())

SdmWorkspace->init()
SdmPy->init()
Expand Down
33 changes: 33 additions & 0 deletions softworks/virtue_softworks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from typing import Tuple
from pathlib import Path
from importlib.resources import files
import virtue
import softworks


@virtue.hookimpl
def virtue_python_package_name() -> str:
return "softworks"

@virtue.hookimpl
def virtue_skill_package_name() -> str:
return "Softworks"

@virtue.hookimpl
def virtue_skill_initialization_paths() -> Tuple[Path]:
return (files(softworks) / "softworks.cdsinit.ils"),

@virtue.hookimpl
def virtue_cdslibmgr_paths() -> Tuple[Path]:
return (files(softworks) / "softworks.cdsLibMgr.il"),

@virtue.hookimpl
def virtue_data_reg_paths() -> Tuple[Path]:
return (
files(softworks) / "python" / "SdmPy.data.reg",
files(softworks) / "skill" / "SdmSkill.data.reg",
files(softworks) / "pptx" / "SdmPptx.data.reg",
files(softworks) / "xlsx" / "SdmXlsx.data.reg",
files(softworks) / "pdf" / "SdmPdf.data.reg",
files(softworks) / "html" / "SdmHtml.data.reg",
)

0 comments on commit b756893

Please sign in to comment.