netcreateorg / netcreate-itest

Developing the 2.0 version of NetCreate
https://github.com/netcreateorg/netcreate-2018
Other
0 stars 0 forks source link

Infrastructure: Module Architecture Stage 2 #132

Closed dsriseah closed 5 months ago

dsriseah commented 5 months ago

This pull request contains example addons that build on the core URSYS library. We're pushing it now to serve as the foundation for implementing the new comment system.

WHAT IS IT?

Collectively, the contents of the _ur directory is an independent build system for developing new system features from the command line without disrupting the main application. Once tested, they can be selected exported from @ursys/addons package for both server and client environments for import.

Creating new addons is as simple as creating a new folder in the _ur_addons folder and adding a @file.mts to it that will run. The system will automatically add it to the command list. Each addon directory can be its own standalone 'server' that is spawned by the ur <addon> command line.

More information about the URSYS build features will be available once we started implementing the COMMENT addon for our first real test of the new system

TESTING

We're largely testing to make sure there are no missing dependencies or weird crashes happening to your NetCreate build.

1. Test Build

open terminal at project root

2. Check NetCreate Function

still in project root

3. Test Addons for Errors

_cd _ur from project root_

These do not do anything amazing, but they demonstrate the use of different packages and use URSYS core in some cases.

To run ./ur loki, first create a folder called _data_nocommit in the loki folder and copy a NetCreate .lokijs file into it. Rename the file to netcreate-graph.loki.

[!TIP] If you are using the netcreate-itest.code-workspace file to open the project files in Visual Studio Code, the script adds ./ to the end of your PATH for integrated terminal windows. Otherwise, you can go into your ~/.bashrc or ~/.zshrc to add ./ to the end of your PATH variable with export PATH=$PATH:./

4. Test Network Process Controllers

_still in _ur directory_

For this we'll use the ur net command, which has several subcommands. You'll need to open two terminal windows for this test.

5. Test Standalone Appserver

_still in _ur directory_

This addon builds a webapp that can read input from a connected MIDI keyboard and play piano notes. You can also click on them. It imports the @ursys/core library to format the browser console output.

benloh commented 5 months ago

One minor issue:

  1. Need to update path?
    bash-3.2$ ur
    bash: ur: command not found

    But ./ur works.

I'm using the VSC Workspace. Not sure where path is set.

Everything else seems to work. Doing a general Net.Create test next.

dsriseah commented 5 months ago

Oh, I have my PATH set to include ./ at the end so I don't have to type that extra dot-slash. Will update instructions. I just set it in my ~/.zshrc file. I could probably modify the workspace to include it

dsriseah commented 5 months ago

I've added an extra detection method to the .vscode/check_env script that runs from the netcreate-itest.code-workspace project which will add it only to shells inside of the integrated VSCODE environment. You'll have to KILL the existing terminals (trash can icon in upper right of terminal panel) and reopen the terminal after you do this pull to test.

benloh commented 5 months ago

Confirmed path fix works. Merging.