Skip to content

Commit

Permalink
Update Develop-ref after #1038 (#1050)
Browse files Browse the repository at this point in the history
* removed -ref from end of branch name when looking for new input data on web server so develop-ref can check for new develop data

* feature 779 add support for output_flag, nc_pairs_flag, and climo_cdf dictionaries in GridStat (#858)

* Feature 779 compare pdf (#860)

* Feature 857 tc stat met config (2nd attempt) (#862)

* remove quotes around branch items

* only build docs in GHA

* added missing jobs item

* cd back to GITHUB_WORKSPACE

* cd back to github workspace

* removed html theme options needed for version selector that are no longer used

* moved documentation building into script, use sphinx_rtd_theme from pip instead of custom version, added info to contrib guide about CI

* rename jobs and steps

* Feature 767 ext dependencies doc update (#866)

Co-authored-by: George McCabe <[email protected]>

* feature CI documentation (#867)

* Feature 836 rtd release doc (#870)

* Added section for ReadTheDocs, added basic info about the Release Guide and Verification Datasets Guide, but more information on those needs to be added later

* Added information about the various versions available in the documentation

* Updated the ReadTheDocs section with information on hidden branches and how to access them; Modified dtcenter.github.io references

* Added section to add_use_case.rst about Accessing the Documentation and modified documentation.rst to indicate the docs can still be built manually

* Modified format of list

* Modified formatting

* Changed GitHub Pages links to Read the Docs links

* Modified formatting

* Fixed typo

* Updated Release Guide for Read The Docs

* Took out duplicate data and consolidated sections

* Update docs/Contributors_Guide/add_use_case.rst

Removed sentence

Co-authored-by: George McCabe <[email protected]>

* Update docs/Contributors_Guide/add_use_case.rst

Fixed typo

Co-authored-by: George McCabe <[email protected]>

* Update docs/Contributors_Guide/add_use_case.rst

Removed end of previously removed sentence.

Co-authored-by: George McCabe <[email protected]>

Co-authored-by: George McCabe <[email protected]>

* Adding NOAA/CPC to the list of requestors. Already ran the script to push this change to all the METplus repos.

* Adding common label for NOAA/OPC. The new label has already been pushed to all the METplus-related repos.

* sort list of files in directory to ensure the same result regardless of OS

* Feature 852 series by same name (#868)

* feature 871 TCGen new MET config variables (#872)

* Feature 728 update python embedding (#876)

Co-authored-by: George McCabe <[email protected]>

* Feature 629 metdbload (#882)

Co-authored-by: johnhg <[email protected]>
Co-authored-by: George McCabe <[email protected]>

* feature_630_UIUC_GDF_TDF (#878)

Co-authored-by: George McCabe <[email protected]>

* moved new use case into another group

* Update MODE_fcstFV3_obsGOES_BrightnessTempObjs.py

* feature 880 improve field info handling (#881)

* Feature 686 hdr tdr (#885)

Co-authored-by: George McCabe <[email protected]>

* removed NEW from newly added use case

* feature 768 fix broken climo stdev (#886)

* Switched order of instructions to merge release branch and updating release notes.  Updating release notes should occur before merging the release branch.

* Feature 551 create pdf user guide (#890)

* Test latex_* settings in conf.py

* Test latex_* settings in conf.py

* Formatting in rst files for PDF

* Formatting in rst files for PDF

* Formatting in rst files for PDF

* Test rst file change for PDF formatting

* Change tocdepth to 3

* Change secnumdepth to 3

* Change secnumdepth/tocdepth to 4

* Change tocdepth to 3

* Change secnumdepth to 3

* Change secnumdepth/tocdepth to 4

* Test TOC settings

* Test TOC settings

* Test TOC settings

* Test reference section

* Test reference section

* Test quick search

* Test quick search

* Test quick search

* Test quick search

* Test quick search

* Test quick search

* Remove local pdf build lines

* Test quick search mods for PDF

* Test quick search mods for PDF

* Update quicksearch.rst

Format HTML and PDF separately

* Update quicksearch.rst

Fix typo in "only" directive

* Update quicksearch.rst

Fix typos in latex formatting

* Fix typo in quicksearch.rst

* Update systemconfiguration.rst

* Update conf.py

Address: WARNING: The config value `latex_show_pagerefs' has type `str', defaults to `bool'.

* Update conf.py

Fix typo, change master_doc variable to address warning

* Update conf.py

* Update conf.py

* Update conf.py

* Update conf.py

Test changing the root doc for PDF

* Update conf.py

Change latex_master_doc back to Users Guide

Co-authored-by: Keith Searight <[email protected]>

* Feature 779 add support for MODE and PointStat configs (#888)

* removed duplicate entry in glossary

* changed string to boolean to remove warning

* Added identifier to quicksearch.rst ci-docs-only

* Feature 779 pb2nc configs (#893)

* Feature 779 grid stat configs and climo_mean/stdev (#894)

* Changes to release guide steps for MET. Recommend making silimar changes for the other repos. For each release type, after the checkout_[develop|main]_branch.rst step, add a call to the new create_release_feature_branch.rst release step.

* Adding create_release_feature_branch.rst to all the release steps for METcalcpy, METplotpy, METdatadb, METviewer, and METexpress.

* Added argument to code-blocks

* Added release guide for METexpress development releases.

* Delete Regrid_PCP_obsERA_obsOnly_Blocking_orig.conf

Old configuration file

* Feature 626 hovmoeller diagram (#889)

Co-authored-by: Hank Fisher <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: MET Tools Test Account <[email protected]>
Co-authored-by: George McCabe <[email protected]>

* Feature 627 coherence spectra (#891)

Co-authored-by: Hank Fisher <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: MET Tools Test Account <[email protected]>
Co-authored-by: George McCabe <[email protected]>

* create 4.0.0-beta5 release (#897)

Co-authored-by: Julie.Prestopnik <[email protected]>

* Update pull_request_template.md

Added entry for completion date for pull request review.

* feature 900 single metplus_config.conf file (#901)

* update version for development towards rc1

* Feature authorship (#912)

* Add a direct link for the user's guide citation and then link to it from the top-level list of authors.

* Add a release_steps/rotate_authorship.rst step and update the official release instructions for MET, METcalcpy, METplotpy, and METplus. The other repos do not include a complete set of release instructions yet.

* Change top-level authorship list to alphabetical order.

* Define author_list in docs/conf.py and reference it in the citation.

* Adding author_list to the variables to be exported.

* Use CIRA and IMSG instead of CIR and IM, respectively.

* do not run documentation workflow on develop-ref branch, only run step to upload warnings artifact if there was a failure

* test sending slack message when a release is published

* tabs to spaces

* fixed multi line command

* removed old Travis-CI content

* clean docs, READMEs, and CI for release

* changed badge for testing workflow to display status of default branch instead of specific branch so users don't see accidental breaks in develop branch and we don't need to update it for each release

* fixed path to version file in docker hook helper script

* updated manage externals stable config and created symbolic link to Externals.cfg to avoid duplicate information

* updated METplus release instructions to isolate release specific changes to release branch to avoid having to change develop branch back to original content

* ci-run-diff

* run all use cases if push to develop or main_v* branches to ensure nothing breaks!

* run ALL use cases if push to develop on main_v*

* cast PosixPath to string to prevent crash when using Python 3.8.10

* feature 681 Modifed wording of regrid dictionary references (#916)

Co-authored-by: Julie.Prestopnik <[email protected]>
Co-authored-by: Lisa Goodrich <[email protected]>

* bugfix 914 handle complex _VAR<n>_OPTIONS like MET dictionaries (#915)

* added test to recreate error, then fix it

* ci-run-diff

* Feature 673 metviewer release (#910)

Co-authored-by: jprestop <[email protected]>
Co-authored-by: bikegeek <[email protected]>

* Updated directions per Tara's instructions.

* Added update_dtc_website.rst to metcalcpy and metplotpy subdirectories

* .. include:: release_steps/met/update_dtc_website.rst

* Corrected subdirectories from met to metcalcpy and metplotpy as needed

* Feature 903 update users guide (#919)

Co-authored-by: John Halley Gotway <[email protected]>

* Fixes to automation to handle main_vX.Y branches (#920)

* update version to show development towards 4.1.0-beta1

* changes made to main_v4.0 as bugfix to get docker data build to stop reporting a failure

* generate union of sample data with subset to force a successful build to remove failed check

* Added release guide for METexpress production releases.

* Added announcement section to release guide for METexpress production releases.

* Added rotate author section to release guide for METexpress production releases.

* Fixed length of title underlines for METexpress release guide.

* added useful logging messages to script that builds documentation so it is clear why it fails or if is succeeds

* Added new alert: REQUIRED FOR RELEASE label to all the METplus repos.

* modified steps for METplus to include updating release date and creating -ref branch to generate truth data for testing

* Added more content to METdatadb release guides, following model of METcalcpy (#927)

* added script to run on DTCenter web server to create a new input data directory for the next upcoming release and create symbolic links to the correct files from previous releases

* feature 928 PCPCombine option to skip lookback in derive mode (#930)

* Edits to METexpress release guide

* feature 924 support extra options in RegridDataPlane (#929)

* fixed minor bug in usage wrapper

* strip off whitespace from version numbers so they are read correctly when installing as a package

* Migrate issue and PR template changes from PR MET/#1803 into METplus develop branch.

* Update README.md

Adding GitHub Discussions info

* changed non-unicode apostrophe and fixed typo in URL

* feature 749 TCPairs refactor (#937)

* removed file that should have been deleted in merge

* Probability field threshold control in SeriesAnalysis (#942)

* Somehow the required labels weren't present. Adding 2 required: labels as well as one for requestor: NASA/other.

* feature 960 GenVxMask -type (#961)

* feature 926 TCMPRPlotter improvements (#959)

* changed variable name so that it does not overwrite author variable used in copyright

* add missing quick search items (#962)

* run pip freeze before use case commands to see python environment used to run in the logs

* Feature 933 cartopy hpc (#964)

* Modification to use NaturalEarth shapefiles that are already downloaded
and saved to file in location designated by the CARTOPY_DIR environment.

* Github Issue #933 Check for CARTOPY_DIR first, if unset, then proceed as
before.

* updated documentation for offline systems

* Updated docs based on feedback

Co-authored-by: Minna Win <[email protected]>

* Updated thumbnail path

* Feature 963 quick search (#965)

* Per #963, testing syntax

* Per #963, testing syntax again after error

* Per #963, testing string substitution

* Per #963, trying dot dot slash

* Per #963, found a relative path solution with dot dot slash, modified one line only

* updating quick search from develop to working branch with dot dot slash

* fixing typo

Co-authored-by: Julie.Prestopnik <[email protected]>

* Feature 839 conda envs in automation (#967)

* feature 641 MTD input to ExtractTiles (#968)

Co-authored-by: Daniel Adriaansen <[email protected]>

* fixed documentation typos from bad merge

* Feature 834 use case ice cover (#970)

Co-authored-by: George McCabe <[email protected]>

* doc updates (#972)

* fixed timing logs to show MM:SS instead of HH:MM

* fixed typo in doc

* feature 936 force MET version used for testing (#977)

* moved logic for creating conda environments for metplus base and py_embed base to a script so it can be called on a local machine to create these environments

* moved logic to update conda to docker file because update cannot be done on conda for a shared version

* updated instructions to include steps to create conda environments on a local machine

* Feature 963 quick search (#981)

* Per #963, testing syntax

* Per #963, testing syntax again after error

* Per #963, testing string substitution

* Per #963, trying dot dot slash

* Per #963, found a relative path solution with dot dot slash, modified one line only

* updating quick search from develop to working branch with dot dot slash

* fixing typo

* Per #963, removed replace directive since it is not being used

* Per #963, testing change to Note section for keywords

* Per #963, Testing return in note

* Per #963, removed note section under keywords and moved down the png name.

* Per #963, trying out various formatting options

* Per #963, trying out various formatting options

* Per #963, added additional keywords headers to get a better feel for what it would actually look like

* Added numbers to keywords for easier referencing

* Per #963, cleaned up examples and left with the formatting the team chose

* Per #963, try out adding a code block around a sphinx_gallery_thumbnail_path to see if it disappears because remove_config_comments was already set to True in the conf.py file, but this only removes configuration comments from code blocks, not from text blocks.

* Per #963, trying an additonal comment to eliminate sphinx_gallery_thumbnail_path

* Per #963, removing additonal comment to eliminate sphinx_gallery_thumbnail_path because it got rid of the thumbnail image

* Per #963, adding py to code-block to see if it eliminates sphinx_gallery_thumbnail_path

* Per #963, removing the code-block because it does not get rid of sphinx_gallery_thumbnail_path

* first attempt at note update without web links

* updating keywords area

* updating keywords area

* updating keywords area

* adding quick search link

* fixing quick search link

* updating keywords area

* fixing typo

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* fixing typo

* deleting empty spaces

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* fixing typo

* updating keywords area

* updating keywords area

* updating keywords area

* updating keywords area

* Changed ASCII2NC to ASCII2NCToolUseCase

* Modified list of keywords

* Fixed typo

Co-authored-by: Julie.Prestopnik <[email protected]>

* Feature 956 develop discussions (#988)

* Per 1833, changing met_help references to Discussions

* Per #1833, changed references to [email protected] to Discussions and updated a couple of other links.

* Per #956, Fixed typo

* Per #956, fixed section referring to Known Issues as suggested by John HG.

* Per #956, removed [email protected] reference. Checked to ensure author_email was not being used.

* feature 986 TCPairs valid time (#997)

* feature 986 TCPairs allow run all times when LOOP_ORDER = processes (#1013)

* Feature 1002 user script files (#1014)

* Update Blocking.py

Added some comments

* Update Blocking.py

* Added mpr output

* Added MPR output

* Updated documentation

* Fixed a path

* Updates to documentation

* call script to populate file list, output file list to output directory instead of under input base

* added env file so pytests can run easily on seneca

* improved logging readability

* moved functions up to parent class so they can be used by UserScript

* updated logic to match change to subset_input_files function return value

* in run_at_time function loop over custom list and get files for the current run time before running since this function is called only if LOOP_BY=times and does not call the function that handles this -- consider refactoring to move logic for CUSTOM_LOOP_LIST so that it is handled consistently across all wrappers instead of being handled inside each

* updated logic for UserScript to use the input dir/template variables to mimic logic in GridDiag to populate a list of files that are relevant for each run time of the use case

* always return True from get_all_files for UserScript because handling file lists is optional

* modified examples to call a script that checks environment variables and prints out the contents of file lists if they are set -- this better demonstrates how to use UserScript and how to get lists of files into a user's script, ci-run-diff

* don't loop to find files if time info is not set

* rerun use case that failed

* trigger other failing use cases to run

* changed name of config variable because name is now a reserved config variable

* skip use cases that are no longer failing

* Fixed a typo

* add skip times logic to function that finds all files to process

* added logic to put 'missing' for files that are not found for a given run time (for UserScript)

* added an extra lead time to example to demonstrate handling of missing files

* added logic to specify label for each input template file list, changed env var from METPLUS_<label> to METPLUS_FILELIST_<label>, changed user script example to find all keys that start with METPLUS_FILELIST_ to print

* added a label to demonstrate functionality

* added new config variables, ci-run-diff

* added documentation for new functionality for UserScript wrapper to find file paths

* Updated to use USER_SCRIPT text files

* Fixed typo

* Cleanup to .conf file

* Cleanup to UserScript_obsERA_obsOnly_Blocking.conf

* Updates to use the new file listing for UserScript

* Cleanup to old python programs

* Fixed a typo

* change branch for METplotpy to feature branch to test changes

* change METplotpy branch to develop since required change was merged into its develop branch

* changed use cases back to new = false so they don't run every workflow

Co-authored-by: Christina Kalb <[email protected]>

* Feature 615 gfdl tc tracking (#1020)

Co-authored-by: George McCabe <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: George McCabe <[email protected]>

* fixed incorrect length of overline

* error out if ouput data volumes fail to update

* don't fail if no volumes to build

* added error checking to script that updates docker data volumes that contain output truth data

* skip diff for binary index files created from GFDL tracker

* Feature 950 weather regime freq (#1024)

Co-authored-by: George McCabe <[email protected]>

* Feature 952 blocking files (#1023)

* Added output MPR file for Blocking

* Cleanup and edits to creating mpr output

* Fixed a typo

* Added mpr output

* Fixed a typo

* Updated to use environment vars

* Updates to blocking documentation

* Delete conf file that was accidentally checked in

* removed unused scripts

Co-authored-by: George McCabe <[email protected]>

* Feature 892 rmm omi drivers (#1028)

Co-authored-by: Christina Kalb <[email protected]>
Co-authored-by: Minna Win <[email protected]>
Co-authored-by: bikegeek <[email protected]>
Co-authored-by: Christina Kalb <[email protected]>
Co-authored-by: Hank Fisher <[email protected]>
Co-authored-by: George McCabe <[email protected]>

* Changes for 4.1.0-beta1 release (#1027)

* changed version for beta1 release

* added release notes for 4.1.0-beta1

* removed unnecessary arguments to run_metplus.py

* removed release notes item that is pushed to next beta

* added line breaks between sections

* added OMI and RMM use cases

* update version to dev 4.1.0-beta2

* support skip times in example wrapper

* Feature 759 fr met py (#1025)

Co-authored-by: George McCabe <[email protected]>

* updated list of use cases to run in tests to reflect use case that was removed

* remove log for copying files and modify log output for difference summary so it is easier to find

* bugfix 1021 develop climo mean/stdev field (#1039)

* fixed remove_quotes logic for handling config lists to only remove quotes around each value, not every quotation mark found -- changed logic for reading climo field to remove quotes around item to properly set dictionary items, ci-run-diff

* fixed unit tests to reflect actual values to set for climo field

* save script to update use case data directories on DTC web server

* move step to update version number in develop branch right after creating release to minimize time that development will be done with the incorrect version number

* removed step that is no longer needed after #963

* added step to set up next release data directory on DTC web server

* updated wording to be more clear

* Release Guide updates (#1041)

* added newline after each difference summary item for better readability

* use relative path for image

* added content from the GitHub wiki so I could remove the wiki pages

* feature 931 default wrapped MET config file (#1037)

* updated info for _CONFIG_FILE variables in glossary

* Feature 892 rmm omi tests (#1038)

Co-authored-by: Christina Kalb <[email protected]>
Co-authored-by: Minna Win <[email protected]>
Co-authored-by: bikegeek <[email protected]>
Co-authored-by: Christina Kalb <[email protected]>
Co-authored-by: Hank Fisher <[email protected]>

Co-authored-by: j-opatz <[email protected]>
Co-authored-by: jprestop <[email protected]>
Co-authored-by: John Halley Gotway <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: Dan Adriaansen <[email protected]>
Co-authored-by: Christina Kalb <[email protected]>
Co-authored-by: mrinalbiswas <[email protected]>
Co-authored-by: bikegeek <[email protected]>
Co-authored-by: Keith Searight <[email protected]>
Co-authored-by: Keith Searight <[email protected]>
Co-authored-by: Molly Smith <[email protected]>
Co-authored-by: Hank Fisher <[email protected]>
Co-authored-by: Hank Fisher <[email protected]>
Co-authored-by: MET Tools Test Account <[email protected]>
Co-authored-by: Lisa Goodrich <[email protected]>
Co-authored-by: Tatiana Burek <[email protected]>
Co-authored-by: Venita Hagerty <[email protected]>
Co-authored-by: Minna Win <[email protected]>
Co-authored-by: lisagoodrich <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: George McCabe <[email protected]>
Co-authored-by: Christina Kalb <[email protected]>
Co-authored-by: bikegeek <[email protected]>
  • Loading branch information
26 people authored Jul 29, 2021
1 parent fba7f7e commit b91158f
Show file tree
Hide file tree
Showing 48 changed files with 663 additions and 177 deletions.
1 change: 1 addition & 0 deletions .github/jobs/get_use_case_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def handle_automation_env(host_name, reqs, work_dir):
f'cd {METPLUS_DOCKER_LOC};'
f'{work_dir}/manage_externals/checkout_externals'
f' -e {work_dir}/.github/parm/Externals_metdatadb.cfg;'
f'{python_path} -m pip install {METPLUS_DOCKER_LOC}/../METdatadb;'
'cd -;'
)

Expand Down
1 change: 0 additions & 1 deletion .github/jobs/run_diff_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def copy_to_diff_dir(file_path, data_type):
if not os.path.exists(output_dir):
os.makedirs(output_dir)

print(f'Copying {file_path} to\n{output_path}')
try:
shutil.copyfile(file_path, output_path)
except OSError as err:
Expand Down
7 changes: 6 additions & 1 deletion .github/parm/use_case_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@
},
{
"category": "s2s",
"index_list": "6",
"index_list": "6-7",
"new": false
},
{
"category": "s2s",
"index_list": "8-9",
"new": false
},
{
Expand Down
3 changes: 2 additions & 1 deletion ci/util/diff_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ def compare_dir(dir_a, dir_b, debug=False, save_diff=False):
print(f"ERROR: File does not exist: {filepath_a}")
diff_files.append(('', filepath_b, 'file not found (new output)', ''))

print("\nSummary:\n")
print("\n\n**************************************************\nSummary:\n")
if diff_files:
print("\nERROR: Some differences were found")
for filepath_a, filepath_b, reason, diff_file in diff_files:
print(f"{reason}\n A:{filepath_a}\n B:{filepath_b}")
if diff_file:
print(f"Difference file: {diff_file}")
print()
else:
print("\nNo differences found in any files")

Expand Down
79 changes: 79 additions & 0 deletions docs/Contributors_Guide/coding_standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,82 @@ Coding Standards
docstrings <https://www.python.org/dev/peps/pep-0257/>`_, and
`Sphinx <http://www.sphinx-doc.org/en/master/>`_ for documentation
* **NOTE: Please do not use f-strings in the run_metplus.py file so that the Python version check can notify the user of the incorrect version. Using Python 3.5 or earlier will output the SyntaxError from the f-string instead of the useful error message.**

Python code analysis tools
--------------------------

Static:

pylint
^^^^^^

::
pip install pylint or conda install pylint

pylint.org

checks for code errors

pylint pep8 code-to-analyze will check for errors as well as PEP-8 style code

pyflakes
^^^^^^^^

::

pip install pyflakes or conda install pyflakes

parses code rather than importing code, therefore OK to use on modules with side-effects

checks for code errors

faster than pylint

https://pypi.python.org/pypi/pyflakes

flake8 is wrapper to pyflakes, performs PEP-8 style checking in addition to error checking
http://flake8.pycqa.org/en/latest/index.html#quickstart

vulture
^^^^^^^

::

checks for unused imports, variables, methods, classed ie "dead code"

pip install vulture or conda install vulture

https://pypi.python.org/pypi/vulture

Dynamic (run-time):


cpde-coverage analysis
^^^^^^^^^^^^^^^^^^^^^^

Useful when running unit tests to determine whether tests are executing all possible branches, loops, etc.

figleaf
^^^^^^^

http://darcs.idyll.org/~t/projects/figleaf/doc/
Checking for God objects and God methods:

(from Chapter 4 of "How to Make Mistakes in Python", Mike Pirnat)

::

find . -name "*.py" -exec wc -l {} \; | sort -g -r
for all Python source files, order by size
anything over 1000 lines is worth investigating (as general rule of thumb)

grep "^class " mybigmodule.py |wc -l
counts the number of classes defined in mybigmodule.py

grep "\sdef " mybigmodule.py |wc -l

counts the number of methods defined within a class or other function (ie at some level of indentation) in mybigmodule.py

try this if the above doesn't work: grep "def " mybigmodule.py |wc -l

A high ratio of methods to classes warrants investigation (what constitutes a high ratio- 10:1, 5:1???)
3 changes: 3 additions & 0 deletions docs/Contributors_Guide/github_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ that described in
where new or updated code is created on a 'feature' branch that is based on
the `NCAR/METplus GitHub 'develop' branch <https://github.com/dtcenter/METplus/tree/develop>`_.

From James McCreight (WRF-Hydro team) this is a good write-up on
`best practices for collaboration on GitHub <docs.google.com/document/d/1DxsViogPdA0uObHgNx4YFKd4ClC-m9UFcX0rO-ZJTY0/edit?pli=1#heading=h.g4dgc8a6erna>`_

The feature branch is named after the corresponding GitHub issue:

*feature_<Github Issue number>_<brief_description>*
Expand Down
2 changes: 1 addition & 1 deletion docs/Release_Guide/metplus_development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Create a new vX.Y.Z-betaN or vX.Y.Z-rcN development release from the develop bra
.. include:: release_steps/merge_release_issue.rst
.. include:: release_steps/create_release_on_github.rst
.. include:: release_steps/metplus/create_release_extra.rst
.. include:: release_steps/metplus/update_version_on_develop.rst
.. include:: release_steps/metplus/update_dtc_website.rst
.. include:: release_steps/finalize_release_on_github_development.rst
.. include:: release_steps/metplus/update_version_on_develop.rst
5 changes: 3 additions & 2 deletions docs/Release_Guide/metplus_official.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Create a new vX.Y.Z official release from the develop branch.
.. include:: release_steps/clone_project_repository.rst
.. include:: release_steps/checkout_develop_branch.rst
.. include:: release_steps/create_release_feature_branch.rst
.. include:: release_steps/metplus/update_version_official.rst
.. include:: release_steps/metplus/update_release_date.rst
.. include:: release_steps/update_release_notes_official.rst
.. include:: release_steps/rotate_authorship.rst
.. include:: release_steps/merge_release_issue.rst
.. include:: release_steps/create_release_branch.rst
.. include:: release_steps/metplus/create_release_reference_branch.rst
.. include:: release_steps/metplus/update_release_content.rst
.. include:: release_steps/push_release_branch.rst
.. include:: release_steps/create_release_on_github.rst
Expand All @@ -22,3 +22,4 @@ Create a new vX.Y.Z official release from the develop branch.
.. include:: release_steps/finalize_release_on_github_official.rst
.. include:: release_steps/metplus/update_version_on_develop.rst
.. include:: release_steps/update_docs_official.rst
.. include:: release_steps/metplus/update_web_server_data.rst
3 changes: 2 additions & 1 deletion docs/Release_Guide/release_steps/merge_release_issue.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Merge Release Issue
-------------------

* After updating the version number and release notes on a release feature branch, submit a pull request to merge those changes back into the source branch.
* After updating the release-specific content on a release feature branch,
submit a pull request to merge those changes back into the source branch.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Create Release Reference Branch
-------------------------------

* Create a branch from the develop branch for the reference branch for the
new official release and push it to GitHub. The branch name should match
the format main_vX.Y-ref where X.Y is the major/minor release number.

.. parsed-literal::
cd |projectRepo|
git checkout develop
git pull
git checkout -b main_vX.Y-ref
git push -u origin main_vX.Y-ref
Pushing this branch to GitHub should trigger the GitHub Actions automation
that runs all of the use cases and creates Docker data volumes with the output
data. These data will be used to verify that any bugfixes applied to the
main_vX.Y branch does not break any of existing logic.

Navigate to https://github.com/dtcenter/METplus/actions and verify that a
*Testing* workflow was triggered on the *main_vX.Y-ref* branch.

.. figure:: /Release_Guide/release_steps/metplus/metplus-automation-reference-data.png

* Wait until the entire workflow has run successfully. The final job entitled
"Create Output Docker Data Volumes" should create Docker data volumes for
each use case category on DockerHub (dtcenter/metplus-data-dev). The names
of these volumes start with *output-*.

* After the truth data volumes have been generated, create the main_vX.Y
branch off of the -ref branch.

::

git checkout -b main_vX.Y
git push -u origin main_vX.Y
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ Update Release Content
Update content that should go into the release version but remain unchanged
in the develop branch.

**Update the version number in the quick search links:**
Update the version number
^^^^^^^^^^^^^^^^^^^^^^^^^

* Open the docs/Users_Guide/quicksearch.rst file for editing.
* Replace the word "develop" in all of the links with "vX.Y.Z",
replacing the X.Y.Z with the version number.
For example, replace "develop" with "v4.0.0".
* Save and close the file.
Remove **-dev** from the version number:

**Update the version numbers in the manage externals files:**
* As of METplus 4.0.0, we are naming releases with X.Y.Z format even if Z is 0.
* As of METplus v4.0.0, the file containing the version number is located at
**metplus/VERSION** (in earlier releases, the file was located at
docs/version or doc/version).
* In the develop branch, the version should match the upcoming release
with -dev added to the end like X.Y.Z-betaN-dev, i.e. 4.0.0-beta1-dev
* Remove **-dev** from the version number so that it matches the release
you are creating.

Update the version numbers in the manage externals files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

build_components/Externals_stable.cfg

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Update Release Date
^^^^^^^^^^^^^^^^^^^

* The release date is stored in *metplus/RELEASE_DATE* in YYYYMMDD format.
* Change the value stored in this file to match the current date.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Update Version on Develop Branch
--------------------------------

Change metplus/VERSION value to the next release after this one with -dev added
to the end. Releases will loosely following these names, but are subject to
change:
Switch to the develop branch and change metplus/VERSION value to the
next release after this one with -dev added to the end.
Releases will loosely following these names, but are subject to change:

+-------------------+-----------------------+
| Release Version | New Develop Version |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Update DTC Web Server Data
--------------------------

Create Directory for Next Release
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On the DTC web server where the sample input data for use cases is hosted,
run the setup_next_release_data.py script for the next upcoming release
to set up the data directory for the next major/minor version development.
The script can be found in the METplus repository in internal_tests/use_cases.
See the comments in the script for more details.
Loading

0 comments on commit b91158f

Please sign in to comment.