IEA-Task-43 / digital_wra_data_standard

IEA Task 43: pre-construction energy estimate data standard repository
BSD 3-Clause "New" or "Revised" License
56 stars 15 forks source link

JSON Forms React seed App not starting #256

Open SebAgain opened 2 months ago

SebAgain commented 2 months ago

Hi,

I tried to create the JSON Forms React seed App following the "Readme.md" file which is in the "app" folder and the app is not starting because of an error.

It seems that the schema.json file is missing in the "src" folder. Capture

Here are the steps I followed (the ones written in the readme.me file) :

In the "File structure" section, it's written that the most important files are "src/schema.json", "src/uischema.json", "src/index.js" and "src/App.js" but I don't see the following files "schema.json", "index.js" and "App.js".

What did I do wrong?

Thank you, Sébastien

stephenholleran commented 2 months ago

Hi @SebAgain,

Thanks for reaching out.

I'm afraid I have no idea myself. It was a different person who set up the From App within the GitHub repo. He also set up the GitHub Actions that generates it when a new push to master is deployed. These are the things I am not that familiar with. And these GitHub Actions, the Form App and the Documentation, have failed with the last push we did a few weeks ago. Maybe that has something to do with it but I think not as the Form App within the repo works fine, it is just reading the previous schema files from last year and not the one released a few weeks ago. I have manually triggered these workflows again so we'll see. I'm not hopeful though.

image

stephenholleran commented 2 months ago

Update:

Definitely one of the reasons both the Form App and the Documentation workflows were failing was due to them using the deprecated Ubuntu 16.04. I updated this to 20.04 where the Documentation workflow successfully ran but the Form App one is still failing. I also updated the node-version from 12 to 16 but that seems to have no effect and shouldn't actually fail the workflow. Below is the workflow logs.

https://github.com/IEA-Task-43/digital_wra_data_standard/actions/runs/8735867457 image

I have Google the error but I am completely out of my depth here and have no idea what is going on. Anyone else know much about GitHub Actions workflows??

cc @abohara @kersting @Dynorat

EDIT: It is a permissions thing. image

So something to do with the deploy keys. There was a Repository secret here: https://github.com/IEA-Task-43/digital_wra_data_standard/settings/secrets/actions called 'ACTIONS_DEPLOY_KEY' that was 4 years old and is also stated in the 'deploy_app.yml' file. I deleted it and attempted to create a new one but failed. I don't understand or know how to create theses deploy keys. Anyone know the procedure to follow?

stephenholleran commented 2 months ago

Hi @abohara,

Thanks for taking a look at this. I have given you Admin rights so you should be able to create the deploy keys or secrets or ??? As mentioned above there was a "Repository secret" called 'ACTIONS_DEPLOY_KEY' that I deleted to try and create a new one, but no deploy keys.

abohara commented 2 months ago

Hi @SebAgain

The missing schema.json needs to be copied into the app folder. You can copy the data model schema in the schema folder iea43_wra_data_model.schema.json into your app directory and rename as schema.json. This is likely what it is looking for. The github deployment pipeline shows the steps necessary . Line 19 shows the schema.json being copied over. Line 27 also specifies that the schema json needs to be processed with a python code ( transform_json_schema.py) to post process the schema file for some formatting issues. Will that solve your issues ? If it does , would you mind making suggestions on how to update the readme to allow for the app to run ?

cc: @stephenholleran

abohara commented 2 months ago

@stephenholleran Action pipelines running successfully. https://github.com/IEA-Task-43/digital_wra_data_standard/actions . Ok to close, but we should update the Run instruction for the app. Hopefully @SebAgain will have suggestion on what to add to documentation.

stephenholleran commented 1 month ago

Hi @abohara,

Thanks a million for fixing those. The Form App is working.

On the documentation though it doesn't seem to be capturing the newest release. It isn't capturing the model_config under measurement_location or even new values added to enums such as reanalysis to the measurement_Station_type. I don't know why. I thought the pipeline would create all the required docs based on the JSON Schema. It may be though as a result of a commit that modified those docs manually PR https://github.com/IEA-Task-43/digital_wra_data_standard/pull/228/files as wave_buoy is in there.

Would an experiment be to delete some of those files and then run the documentation pipeline again? I don't think there would be a config file that we need to update.

Thanks,

abohara commented 1 month ago

@stephenholleran I did trigger the documentation generation but it failed with the notice that I do not have the privileges to push to master ( see here ). Can you try to trigger it in the Actions tab ?

stephenholleran commented 1 month ago

Hi @abohara,

That is strange. You have Admin same as myself. Maybe it is because you are not a member of the organisation, so I have added you.

I clicked re-run all jobs anyway so we'll see if that works.

stephenholleran commented 1 month ago

Hi @abohara,

It seems to have completed successfully however the measurement_station_type still doesn't include reanalysis. I triggered it manually again. https://github.com/IEA-Task-43/digital_wra_data_standard/actions/runs/9005622871/job/24741359158 It says it is successful but it is doing the removing of the old docs and compiling in 0 sec which doesn't seem right. I don't think it is actually doing anything in those parts.

SebAgain commented 1 month ago

Hi @stephenholleran @abohara ,

Thank you for your support on this issue.

Unfortunately, I still can't launch the application successfully. Here is the process I followed :

  1. Copy "iea43_wra_data_model.schema" into "app/src" folder and rename it "schema.json"
  2. Process the "src/schema.json" with the following python code "transform_json_schema.py" as suggested
  3. npm install
  4. npm start

You'll find below the Error messages : image (1) image (2)

I've tried installing the libraries mentioned in the "stream-http", "https-browerify" error messages, but this generates new errors so I've stopped there. Maybe I missed something important.

Of course, once it's working, I'll suggest updating the readme if necessary.

Seb'

stephenholleran commented 1 month ago

Hi @SebAgain,

Sorry, I'm not going to mush help for you here. I just wanted to ask why are you trying to produce the Form App in your local env? It is on GitHub. Is there a reason why you can't use it there?

Stephen

SebAgain commented 1 month ago

Hi @stephenholleran,

The main reason is to be independent and most of all to be able to modify and customise the app's behaviour if I want to.

Using the project on GitHub makes it much less flexible and less interesting for me.

Seb'