Skip to content

Conversation

@tkknight
Copy link
Contributor

Minor PR to:

  • Tidy up imports on gallery code
  • Remove old init.py

tkknight added 2 commits July 22, 2020 10:44
* master:
  pin matplotlib<3.3 (SciTools#3763)
  moved to oceanography section of gallery (SciTools#3761)
  unpin cftime (SciTools#3757)
  flake8 outstanding files (SciTools#3755)
  Numpy rounding fix (SciTools#3758)
@tkknight tkknight requested a review from bjlittle July 30, 2020 11:04
@bjlittle bjlittle self-assigned this Aug 3, 2020
@bjlittle
Copy link
Member

bjlittle commented Aug 3, 2020

@tkknight Thanks for this...

However, in terms of imports we've adopted the following style to group imports into the following blocks:

  1. import Python builtin modules i.e., those modules that ship with Python e.g., collections, datetime etc
  2. import third-party modules i.e., those modules that are not part of iris nor Python e.g., cftime, matplotlib, numpy etc
  3. import iris specific modules i.e., those modules that are part of iris e.g., iris.coord, iris.cube, iris.plot etc

The blocks of imports are separated by blank lines, and within each block the modules are listed alphabetically

@bjlittle
Copy link
Member

bjlittle commented Aug 3, 2020

@tkknight Awesome, thanks 👍

@bjlittle bjlittle merged commit b22fbfd into SciTools:master Aug 3, 2020
tkknight added a commit to tkknight/iris that referenced this pull request Aug 3, 2020
* master:
  Gallery code consistency (SciTools#3766)
  enabled pdf creation (SciTools#3765)
tkknight added a commit to tkknight/iris that referenced this pull request Aug 14, 2020
* master:
  remove duplicate whats new entries from the last release (SciTools#3773)
  whatsnew latest update (SciTools#3771)
  whatsnew overhaul (SciTools#3769)
  Gallery code consistency (SciTools#3766)
  enabled pdf creation (SciTools#3765)
tkknight added a commit to tkknight/iris that referenced this pull request Aug 15, 2020
* master:
  remove duplicate whats new entries from the last release (SciTools#3773)
  whatsnew latest update (SciTools#3771)
  whatsnew overhaul (SciTools#3769)
  Gallery code consistency (SciTools#3766)
  enabled pdf creation (SciTools#3765)
  pin matplotlib<3.3 (SciTools#3763)
  moved to oceanography section of gallery (SciTools#3761)
  unpin cftime (SciTools#3757)
  flake8 outstanding files (SciTools#3755)
  Numpy rounding fix (SciTools#3758)
owena11 pushed a commit to owena11/iris that referenced this pull request Aug 19, 2020
@tkknight tkknight deleted the gallery_code_consistency branch September 10, 2020 13:57
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.

2 participants