Closed Quasar985 closed 3 months ago
In the Constellation Options screen, there's a setting where you can specify the REST directory:
This setting seems to be ignored. Starting the REST server when this setting is populated didn't put the rest.json file in the specified directory. Instead, the rest.json file was put into two folders: .CONSTELLATION and .ipython
Why are we writing two copies of the file? One copy should be sufficient.
Also, we should try to find a way to use the user specified directory to hold the rest.json file. There is a possibility that some users are on workstations that have limited permissions for writing files, so they will need the ability to specify which folder to use.
Issues
2 New issues
0 Accepted issues
Measures
2 Security Hotspots
82.5% Coverage on New Code
0.0% Duplication on New Code
Prerequisites
[x] Reviewed the checklist
[ ] Reviewed feedback from the "Sonar Cloud" bot. Note that you have to wait for the "CI / Unit Tests") to complete first. Failed Unit tests can be debugged by adding the label "verbose logging" to the GitHub PR.
Description of the Change
Changes include:
rest.json
secret is copied to the.iPython
directory. Otherwise,rest.json
is copied to the path specified in REST directory.rest.json
.rest.json
. Path can either be to the directory ofrest.json
or the exact path torest.json
. Documentation is updated to inform users of this. Documentation in training modules will also be updated.Alternate Designs
N/A
Why Should This Be In Core?
N/A
Benefits
Fix bug stopping package from working correctly and added functionality to reduce potential frustration.
Possible Drawbacks
None
Verification Process
FOR DEPRECATED CODE
Also import some of the notebook display methods so we can display nice things.
# from IPython.display import display, HTML, Image
This is a convenient Python interface to the REST API.
# import constellation_client
cc = constellation_client.Constellation()
df = cc.get_dataframe() df.head()
import io import os import pandas as pd import PIL.Image, PIL.ImageDraw, PIL.ImageFilter, PIL.ImageFont
Also import some of the notebook display methods so we can display nice things.
# from IPython.display import display, HTML, Image
This is a convenient Python interface to the REST API.
# import constellation_client
cc = constellation_client.Constellation()
Tell constellation_client where rest.json is.
CHANGE C:\Projects TO THE PATH SPECIFIED IN STEP 4 ON GITHUB
cc.update_rest(r"C:\Projects")
df = cc.get_dataframe() df.head()