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

Add colortables as esmvaltool subcommand #1666

Merged
merged 11 commits into from Jul 23, 2020
Merged

Conversation

jvegreg
Copy link
Contributor

@jvegreg jvegreg commented May 26, 2020

In #1657 I propose a change in the CLI to make it more accesible and features more discoverable.

As an example, this pull request converts the showcolortables executable into an esmvaltool subcommand:

esmvaltool colortables ncl

Tasks

  • Create an issue to discuss what you are going to do, if you haven't done so already (and add the link at the bottom)
  • Give this pull request a descriptive title that can be used as a one line summary in a changelog
  • Make sure your code is composed of functions of no more than 50 lines and uses meaningful names for variables
  • Circle/CI tests pass. Status can be seen below your pull request. If the tests are failing, click the link to find out why.
  • Preferably Codacy code quality checks pass, however a few remaining hard to solve Codacy issues are still acceptable. Status can be seen below your pull request. If there is an error, click the link to find out why. If you suspect Codacy may be wrong, please ask by commenting.
  • Please use yamllint to check that your YAML files do not contain mistakes
  • (Only if really necessary) Add any additional dependencies needed for the diagnostic script to setup.py, esmvaltool/install/R/r_requirements.txt or esmvaltool/install/Julia/julia_requirements.txt (depending on the language of your script) and also to package/meta.yaml for conda dependencies (includes Python and others, but not R/Julia)
  • If new dependencies are introduced, check that the license is compatible with Apache2.0

New recipe/diagnostic

  • Add documentation for the recipe to the doc/sphinx/source/recipes folder and add a new entry to index.rst
  • Add provenance information

Modified recipe/diagnostic

  • Update documentation for the recipe to the doc/sphinx/source/recipes folder
  • Update provenance information if needed
  • Assign the author(s) of the affected recipe(s) as reviewer(s)

New data reformatting script

  • Test the CMORized data using recipes/example/recipe_check_obs.yml, to make sure the CMOR checks pass without errors
  • Add the new dataset to the table in the documentation
  • Tag @mattiarighi in this pull request, so that the new dataset can be added to the OBS data pool at DKRZ and synchronized with CEDA-Jasmin

Modified data reformatting script

  • Test the CMORized data using recipes/example/recipe_check_obs.yml, to make sure the CMOR checks pass without errors
  • Tag @mattiarighi in this pull request, so that the updated dataset can be added to the OBS data pool at DKRZ and synchronized with CEDA-Jasmin

If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.


Closes #issue_number

@bouweandela bouweandela changed the title Update CLI: convert shoecolortables to subcommand as an example Update CLI: convert showcolortables to subcommand as an example Jun 3, 2020
Copy link
Member

@bouweandela bouweandela left a comment

I tried this out and it seems to work nicely. Maybe it would be good to specify a directory in which to save the plots? Because now the command creates a lot of files in the current working directory.

@bouweandela
Copy link
Member

bouweandela commented Jul 8, 2020

@jvegasbsc Could you have a look at the merge conflict?

Javier Vegas-Regidor added 2 commits Jul 8, 2020
@bouweandela bouweandela added the requires new ESMValCore release A new release of ESMValCore is needed to solve this issue/merge this pull request.. label Jul 10, 2020
@mattiarighi
Copy link
Contributor

mattiarighi commented Jul 21, 2020

@jvegasbsc there are some codacy issues, could you have a look?

@jvegreg
Copy link
Contributor Author

jvegreg commented Jul 21, 2020

@jvegasbsc there are some codacy issues, could you have a look?

Most of those are related to the imports not being in the top but in the functions. This is a change I did to improve the response time of the CLI.

@mattiarighi
Copy link
Contributor

mattiarighi commented Jul 21, 2020

Most of those are related to the imports not being in the top but in the functions. This is a change I did to improve the response time of the CLI.

Ah, yes, now I remember the discussion.

@jvegreg
Copy link
Contributor Author

jvegreg commented Jul 21, 2020

There is one doc related in the middle. Let me fix it!

Javier Vegas-Regidor added 2 commits Jul 21, 2020
@bouweandela
Copy link
Member

bouweandela commented Jul 22, 2020

Could you have a look at the failing test?

@bouweandela bouweandela removed the requires new ESMValCore release A new release of ESMValCore is needed to solve this issue/merge this pull request.. label Jul 22, 2020
@bouweandela bouweandela merged commit c2a3a6f into master Jul 23, 2020
1 check failed
@bouweandela bouweandela deleted the new_cli_adaptation branch Jul 23, 2020
@bouweandela bouweandela changed the title Update CLI: convert showcolortables to subcommand as an example Add colortables as esmvaltool subcommand Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants