Git Product home page Git Product logo

Comments (2)

duboise-cnes avatar duboise-cnes commented on August 17, 2024

Ok for me, it is the demcompare simple cli interface (name_of_program_exe configfileinjson.json).
Some quick remarks:

  • I would prefer a dedicated xdem_cli.py explicitely file and so xdem = xdem.xdem_cli:main in the console_scripts for only high level argparse easy part (arguments and call to the xdem pipeline run to be done).
  • and also change from demcompare historic choice from init.py to xdem_pipeline.py or something explicit like that (glaciohack validation needed of course).

As said this week, I would be watchful on this new xdem (inspired demcompare) run pipeline architecture (for following issues from the story to add cli): demcompare is not perfect because it cannot be easily run only in memory. So I would add constraint to be able to test directly in memory only and not with data structure on disk (which must exist also but with on option when directory_output is set for the pipeline and all of its substeps to define (typically coreg substep, dem_processing substep, stats substep, report....). I would say we will need a face to face meeting for technical convergence on this pipeline at some point before coding too far on the pipeline...

This would ease also testing to not be mandatory on getting generated on disk but directly from in memory object.
I think it could be important at the beginning reporting the CLI from demcompare.

Typo: you have kept demcompare in the main doctype --> xdem ;)

from xdem.

adehecq avatar adehecq commented on August 17, 2024

Some comments from my side:

  • I agree with Emmanuel, we should not name the file xdem.py but something different like xdem/cli/main.py or xdem/xdem_cli.py
  • for the parser, I now tend to use click, which makes it much easier to add parsers around functions compared to argparse which forces you to duplicate the argument list. It's also easier to add callbacks to check the arguments and create subcommands. An example in a recent repository I worked on is here.
  • a question: why did you choose the JSON format? I imagine that's the format you're most used to at CNES? Otherwise, I find yaml or toml more readable (much fewer brackets 😉). I don't know JSON very well, but a quick search raises also a few concerns about JSON: it does not support comments (I like to put comments in my config files), support fewer data types (integer/floats/lists). I would say that for xdem users, toml or yaml files would be easier, but I could understand if CNES users are so used to JSON that we would lose them with this format.

from xdem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.