Open sweep-ai[bot] opened 1 year ago
src/main/twirl/views/index.scala.html
β
Sandbox logs for
trunk fmt src/main/twirl/views/index.scala.html || exit 0
1/2 βFAILURES prettier src/main/twirl/views/index.scala.html .trunk/out/vCGFq.yaml NOTICES A tool failed to run. You can open the details yaml file for more information. Checked 0 files β No issues, 1 failure
trunk check --fix --print-failures src/main/twirl/views/index.scala.html
2/2 β (`1`)ISSUES src/main/twirl/views/index.scala.html:95:1 95:1 high trailing whitespace. git-diff-check/error FAILURES prettier src/main/twirl/views/index.scala.html .trunk/out/tCUIR.yaml NOTICES A tool failed to run. You can open the details yaml file for more information. Checked 1 file β 1 new issue # .trunk/out/tCUIR.yaml trunk_cli_version: 1.17.2 title: prettier exited with exit_code=2 report: - prettier exited with exit_code=2 - linter: command: | /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w src/main/twirl/views/index.scala.html stdin_path: (none) run_from: /tmp/trunk-0/2lbTP3/aRdxv9 timeout: 10m rerun: (cd /tmp/trunk-0/2lbTP3/aRdxv9; env -i PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3/bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NODE_PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules HOME=/root /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w src/main/twirl/views/index.scala.html) affects_cache: [] direct_configs: [] exit_status: exited exit_code: 2 stdout: (none) stderr: | [error] src/main/twirl/views/index.scala.html: SyntaxError: Unexpected closing tag "script". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (155:9) [error] 153 | [error] 154 | [error] > 155 | [error] | ^^^^^^^^^ [error] 156 |
[error] 157 |
PR Feedback: π
Description
This PR modifies the
index.scala.html
file to retrieve JSON data from the/data/consumption
REST endpoint defined inJsonDataRoutes.scala
and uses that data as the source for thetrace1
Plotly scatter graph. It also adds a new test case inJsonDataRoutesTest.scala
to ensure that the/data/consumption
endpoint returns data in the correct format for the graph.Summary of Changes
index.scala.html
to replace the hardcoded data in thetrace1
data structure with a placeholder variable and added a new function to make an HTTP GET request to the/data/consumption
endpoint and assign the returned JSON data totrace1Data
.index.scala.html
to call the new function before drawing the graph and modified thetrace1
data structure to usetrace1Data
for itsx
andy
properties.JsonDataRoutesTest.scala
to ensure that the/data/consumption
endpoint returns data in the correct format for the graph.Please review and merge these changes.
Fixes #3.
π Latest improvements to Sweep:
rope
library to refactor Python! Check out Large Language Models are Bad at Refactoring Code. To have Sweep refactor your code, trysweep: Refactor <your_file>.py to be more modular
!π‘ To get Sweep to edit this pull request, you can: