Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/init confs #23

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions arlas/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,20 @@ def init(
os.makedirs(os.path.dirname(variables["configuration_file"]), exist_ok=True)
Configuration.settings = Settings(
arlas={
"demo": ARLAS(server=Resource(location="https://demo.cloud.arlas.io/arlas/server", headers={"Content-Type": "application/json"})),
"local": ARLAS(
server=Resource(location="http://localhost/server", headers={"Content-Type": "application/json"}),
server=Resource(location="http://localhost/arlas", headers={"Content-Type": "application/json"}),
persistence=Resource(location="http://localhost/persist", headers={"Content-Type": "application/json"}),
elastic=Resource(location="http://localhost:9200", headers={"Content-Type": "application/json"}),
allow_delete=True
)
},
mappings={
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove totally the mappings and models sections or leave it empty to know where to modify it?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be interesting to leave it, to tell the user that this option exists

"arlas_eo": Resource(location="https://raw.githubusercontent.com/gisaia/ARLAS-EO/master/mapping.json")
},
models={
"arlas_eo": Resource(location="https://raw.githubusercontent.com/gisaia/ARLAS-EO/master/collection.json")
}
)
Configuration.save(variables["configuration_file"])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line under:

Warning : no configuration file found, we created an empty one for you

is not totally true as the created configuration contains a local conf. Do we want to change it ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, saying "We created a default one that is compatible with the simple exploration stack" is more accurate

print("Warning : no configuration file found, we created an empty one for you ({}).".format(variables["configuration_file"]), file=sys.stderr)
print("Warning : no configuration file found, we created a default one with a 'local' confs accessing local ARLAS exploration stack ({}).".format(variables["configuration_file"]), file=sys.stderr)
sys.exit(0)


Expand Down
Loading