Skip to content

Commit

Permalink
Merge pull request #665 from ibpsa/issue664_remove_javascript
Browse files Browse the repository at this point in the history
Closes #664
  • Loading branch information
dhblum authored Aug 2, 2024
2 parents 6d857bf + 695fa7a commit e3f28f1
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 12,387 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ that is being developed as part of the [IBPSA Project 2](https://ibpsa.github.io

## Structure
- ``/testcases`` contains test cases, including docs, models, and configuration settings.
- ``/examples`` contains code for interacting with a test case and running example tests with simple controllers. Those controllers are implemented in Python (Version 2.7 and 3.9), Julia (Version 1.0.3), and JavaScript (Version ECMAScript 2018).
- ``/examples`` contains code for interacting with a test case and running example tests with simple controllers. Those controllers are implemented in Python (3.9) and Julia (Version 1.0.3).
- ``/parsing`` contains code for a script that parses a Modelica model using signal exchange blocks and outputs a wrapper FMU and KPI json.
- ``/testing`` contains code for unit and functional testing of this software. See the README there for more information about running these tests.
- ``/data`` contains code for generating and managing data associated with test cases. This includes boundary conditions, such as weather, schedules, and energy prices, as well as a map of test case FMU outputs needed to calculate KPIs.
Expand Down Expand Up @@ -50,12 +50,6 @@ that is being developed as part of the [IBPSA Project 2](https://ibpsa.github.io
* Build and deploy ``testcase2``. Then, in a separate terminal, use ``$ cd examples/julia && make build Script=testcase2 && make run Script=testcase2`` to test a simple supervisory controller on this test case over a two-day period. Note that the Julia-based controller is run in a separate Docker container.
* Once either test is done, use ``$ make remove-image Script=testcase1`` or ``$ make remove-image Script=testcase2`` to removes containers, networks, volumes, and images associated with these Julia-based examples.

* For JavaScript-based example controllers:
* In a separate terminal, use ``$ cd examples/javascript && make build Script=testcase1 && make run Script=testcase1`` to test a simple proportional feedback controller on the testcase1 over a two-day period.
* In a separate terminal, use ``$ cd examples/javascript && make build Script=testcase2 && make run Script=testcase2`` to test a simple supervisory controller on the testcase2 over a two-day period.
* Ince the test is done, use ``$ make remove-image Script=testcase1`` or ``$ make remove-image Script=testcase2`` to removes containers, networks, volumes, and images, and use ``$ cd examples/javascript && rm geckodriver`` to remove the geckodriver file.
* Note that those two controllers can also be executed by web browers, such as chrome or firefox.

## Test Case RESTful API
- To interact with a deployed test case, use the API defined in the table below by sending RESTful requests to: ``http://127.0.0.1:5000/<request>``
- The API will return a JSON in the form ``{"status":<status_code_int>, "message":<message_str>, "payload":<relevant_return_data>}``. Status codes in ``"status"`` are integers: ``200`` for successful with or without warning, ``400`` for bad input error, or ``500`` for internal error. Data returned in ``"payload"`` is the data of interest relvant to the specific API request, while the string in ``"message"`` will report any warnings or error messages to help debug encountered problems.
Expand Down
27 changes: 0 additions & 27 deletions examples/javascript/Dockerfile

This file was deleted.

28 changes: 0 additions & 28 deletions examples/javascript/makefile

This file was deleted.

317 changes: 0 additions & 317 deletions examples/javascript/testcase1.html

This file was deleted.

Loading

0 comments on commit e3f28f1

Please sign in to comment.