Skip to content

Commit

Permalink
Update develop-ref after #2280 (#2286)
Browse files Browse the repository at this point in the history
Co-authored-by: cristianastan2 <cstan@gmu.edu>
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
Co-authored-by: bikegeek <minnawin@ucar.edu>
Co-authored-by: Lisa Goodrich <lisag@ucar.edu>
Co-authored-by: Julie Prestopnik <jpresto@seneca.rap.ucar.edu>
Co-authored-by: George McCabe <23407799+georgemccabe@users.noreply.github.com>
Co-authored-by: Hank Fisher <fisherh@ucar.edu>
Co-authored-by: Dan Adriaansen <dadriaan@ucar.edu>
Co-authored-by: johnhg <johnhg@ucar.edu>
Co-authored-by: jprestop <jpresto@ucar.edu>
Co-authored-by: Tracy Hertneky <hertneky@seneca.rap.ucar.edu>
Co-authored-by: Giovanni Rosa <giovanni.rosa@unimol.it>
Co-authored-by: j-opatz <59586397+j-opatz@users.noreply.github.com>
Co-authored-by: Mrinal Biswas <biswas@seneca.rap.ucar.edu>
Co-authored-by: j-opatz <jopatz@ucar.edu>
Co-authored-by: Daniel Adriaansen <dadriaan@ucar.edu>
Co-authored-by: Jonathan Vigh <jvigh@ucar.edu>
Co-authored-by: root <root@localhost>
Co-authored-by: bikegeek <3753118+bikegeek@users.noreply.github.com>
Co-authored-by: Will Mayfield <59745143+willmayfield@users.noreply.github.com>
Co-authored-by: lisagoodrich <33230218+lisagoodrich@users.noreply.github.com>
Co-authored-by: metplus-bot <97135045+metplus-bot@users.noreply.github.com>
Co-authored-by: Tracy Hertneky <39317287+hertneky@users.noreply.github.com>
Co-authored-by: Giovanni Rosa <g.rosa1@studenti.unimol.it>
Co-authored-by: mrinalbiswas <biswas@ucar.edu>
Co-authored-by: Christina Kalb <kalb@ucar.edu>
Co-authored-by: jason-english <73247785+jason-english@users.noreply.github.com>
Co-authored-by: John Sharples <41682323+John-Sharples@users.noreply.github.com>
fix release (#1790)
fix GitHub Actions warnings (#1864)
fix #1884 develop PCPCombine {custom} in subtract method (#1887)
fix #1939 develop - failure reading obs when zipped file also exists (#1941)
Closes #1986
fix develop Fix broken documentation links (#2004)
fix #2026 develop StatAnalysis looping (#2028)
fix priority of obs_window config variables so that wrapper-specific version is preferred over generic OBS_WINDOW_BEGIN/END (#2062)
fix #2070 var list numeric order (#2072)
fix #2087 develop docs_pdf (#2091)
fix #2096/#2098 develop - fix skip if output exists and do not error if no commands were run (#2099)
Fix for Dockerfile smell DL4000 (#2112)
fix #2082 develop regrid.convert/censor_thresh/censor_val (#2140)
fix #2082 main_v5.0 regrid.convert/censor_thresh/censor_val (#2101)
fix #2137 develop PointStat -obs_valid_beg/end (#2141)
fix failured introduced by urllib3 (see urllib3/urllib3#2168)
fix #2161 develop PCPCombine additional field arguments in -subtract mode (#2162)
fix #2168 develop - StatAnalysis time shift (#2169)
fix releases. (#2183)
fix #2189 develop - spaces in complex thresholds (#2191)
fix #2179 develop TCPairs fix -diag argument (#2187)
fixes (#2200)
fix diff tests (#2217)
fix automated tests (#2237)
fix #2235 rename multivar_itensity to multivar_intensity_flag (#2236)
fix #2241 Create directory containing -out_stat file (#2242)
fix #2245 use unique run ID to name logger instance (#2247)
fix #2244 develop fix diff tests (#2254)
fixture to set pytest tmpdir (#2261)
fix #1853 develop - PointStat don't require mask variables to be set (#2262)
fix #2279 develop - buoy station file from 2022 (#2280)
  • Loading branch information
github-actions[bot] committed Aug 2, 2023
1 parent 9225f15 commit af49567
Show file tree
Hide file tree
Showing 52 changed files with 1,258 additions and 726 deletions.
11 changes: 7 additions & 4 deletions .github/jobs/docker_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ elif [ "${EXTERNAL_TRIGGER}" == "true" ]; then
MET_TAG=${MET_TAG}-lite
fi

# if MET_FORCE_TAG variable is set and not empty, use that version instead
if [ ! -z "$MET_FORCE_TAG" ]; then
MET_TAG=$MET_FORCE_TAG
MET_DOCKER_REPO=met
# if SET_MET_IMAGE variable is set and not empty, use that version instead
# format is <REPO>:<TAG> where the repo used is dtcenter/<REPO> and
# the tag used is <TAG>, e.g. met:11.1.0 uses dtcenter/met:11.1.0
if [ ! -z "$SET_MET_IMAGE" ]; then
force_info=(${SET_MET_IMAGE//:/ })
MET_DOCKER_REPO=${force_info[0]}
MET_TAG=${force_info[1]}
fi

echo Using MET_DOCKER_REPO=$MET_DOCKER_REPO
Expand Down
2 changes: 1 addition & 1 deletion .github/parm/Externals_metdataio_stable.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local_path = ../METdataio
protocol = git
required = True
repo_url = https://github.com/dtcenter/METdataio
branch = main_v2.0
branch = main_v2.1

[externals_description]
schema_version = 1.0.0
4 changes: 2 additions & 2 deletions .github/parm/Externals_metplotcalcpy_stable.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ local_path = ../METcalcpy
protocol = git
required = True
repo_url = https://github.com/dtcenter/METcalcpy
branch = main_v2.0
branch = main_v2.1

[METplotpy]
local_path = ../METplotpy
protocol = git
required = True
repo_url = https://github.com/dtcenter/METplotpy
branch = main_v2.0
branch = main_v2.1

[externals_description]
schema_version = 1.0.0
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ See the [METplus Workflow](https://metplus.readthedocs.io/en/latest/Contributors
Select: **Reviewer(s)**
Select: **Organization** level software support **Project** or **Repository** level development cycle **Project**
Select: **Milestone** as the version that will include these changes
- [ ] After submitting the PR, select **Development** issue with the original issue number.
- [ ] fter submitting the PR, select the :gear: icon in the **Development** section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
- [ ] After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
- [ ] Close the linked issue and delete your feature or bugfix branch from GitHub.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
EXTERNAL_TRIGGER: ${{ needs.job_control.outputs.external_trigger }}
#MET_FORCE_TAG: 11.0.0
#SET_MET_IMAGE: met:11.0.0

update_data_volumes:
name: Docker Setup - Update Data Volumes
Expand Down
10 changes: 5 additions & 5 deletions build_components/Externals_stable.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@ local_path = ../MET
protocol = git
required = True
repo_url = https://github.com/dtcenter/MET
tag = v11.0.0
tag = v11.1.0

[METviewer]
local_path = ../METviewer
protocol = git
required = True
repo_url = https://github.com/dtcenter/METviewer
tag = v5.0.0
tag = v5.1.0

[METplotpy]
local_path = ../METplotpy
protocol = git
required = True
repo_url = https://github.com/dtcenter/METplotpy
tag = v2.0.0
tag = v2.1.0

[METcalcpy]
local_path = ../METcalcpy
protocol = git
required = True
repo_url = https://github.com/dtcenter/METcalcpy
tag = v2.0.0
tag = v2.1.0

[METdataio]
local_path = ../METdataio
protocol = git
required = True
repo_url = https://github.com/dtcenter/METdataio
tag = v2.0.0
tag = v2.1.0


[externals_description]
Expand Down
35 changes: 27 additions & 8 deletions docs/Contributors_Guide/add_use_case.rst
Original file line number Diff line number Diff line change
Expand Up @@ -630,14 +630,19 @@ Add volume_mount_directories file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Copy the volume_mount_directories file from the develop directory into the
branch directory. Update the entry for the new tarball if the mounting point
has changed (unlikely) or add a new entry if adding a new sample data
tarfile. The format of this file generally follows
<category>:model_applications/<category>, i.e.
climate:model_applications/climate::
branch directory::

cp ${METPLUS_DATA_TARFILE_DIR}/develop/volume_mount_directories ${METPLUS_DATA_TARFILE_DIR}/${METPLUS_FEATURE_BRANCH}

**IF YOU ARE ADDING A NEW USE CASE TO AN EXISTING CATEGORY, SKIP TO THE NEXT STEP.**

If you are adding a new use case category, add a new entry to the volume mount
directories file for the new category.
Add the new entry in alphabetical order so it is easier for others to review.
The format of this file follows
**<category>**:model_applications/**<category>**, e.g.
**climate**:model_applications/**climate**.

Log out of DTC Web Server
^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -983,7 +988,11 @@ copy the feature file into the upcoming METplus version directory and the develo
Copy data from the feature directory into the next version directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Copy files
""""""""""

**Make sure the paths are correct before copying.**
Paths may need to be adjusted.

**ONLY RUN THE COMMAND THAT IS APPROPRIATE TO THE USE CASE. READ CAREFULLY!**

Expand Down Expand Up @@ -1013,6 +1022,9 @@ After verifying the directories are correct, copy the files::

cp -r $from_directory $to_directory/

Handle existing tarfile in vX.Y
"""""""""""""""""""""""""""""""

List the tarfile for the use case category in the next release version directory::

cd ${METPLUS_DATA_TARFILE_DIR}/v${METPLUS_VERSION}
Expand All @@ -1033,14 +1045,21 @@ another METplus
version**, then simply remove the tarfile link::

unlink sample_data-${METPLUS_USE_CASE_CATEGORY}.tgz

Remove old data (if applicable).

**OR**

**CONDITION 3: IF the sample data tarfile for the category does not exist**
(because it is a new use case category), continue to the next step.

Remove old data (if applicable)
"""""""""""""""""""""""""""""""

If the pull request notes mention an old directory path that should be removed,
please remove that directory. Be careful not to remove any files that are
still needed.

Create the new sample data tarfile.
Create the new sample data tarfile
""""""""""""""""""""""""""""""""""

**ONLY RUN THE COMMAND THAT IS APPROPRIATE TO THE USE CASE. READ CAREFULLY!**

Expand Down
108 changes: 1 addition & 107 deletions docs/Contributors_Guide/coding_standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,116 +4,10 @@
Coding Standards
****************



* Python code style outlined in `PEP8 <https://pep8.org>`_
* Python section of the `NCEP Coding Standards <ftp://ftp.library.noaa.gov/noaa_documents.lib/NWS/NCEP/NCEP_office_notes/NCEP_office_note_492.pdf>`_
* `NCO WCOSS Implementation Standards <https://www.nco.ncep.noaa.gov/idsb/implementation_standards/>`_ for
directory structure and script naming conventions
* `Doxygen <http://www.doxygen.nl/>`_, `Python
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 Tools
------------

pylint
^^^^^^

`pylint <https://pylint.pycqa.org/en/latest/intro.html>`_ is a tool that checks
for errors in Python code, tries to enforce a coding standard and looks for code
smells.

To `install pylint <https://pylint.pycqa.org/en/latest/user_guide/installation.html>`_
the following can be run:

.. code-block:: ini
pip install pylint
or

.. code-block:: ini
conda install pylint
To check for errors as well as PEP-8 style code, run:

.. code-block:: ini
pylint pep8 <code-to-analyze>
replacing <code-to-analyze> with the name of the file to analyze.


pyflakes
^^^^^^^^

`pyflakes <https://pypi.org/project/pyflakes/>`_ is a simple program which
checks Python source files for errors. Pyflakes analyzes programs and
detects various errors. It works by parsing the source file, not importing
it, so it is safe to use on modules with side effects. It’s also much faster.


To install pyflakes the following can be run:

.. code-block:: ini
pip install pyflakes
or

.. code-block:: ini
conda install pyflakes
`flake8 <http://flake8.pycqa.org/en/latest/index.html#quickstart>`_ is wrapper
to pyflakes, performs PEP-8 style checking in addition to error checking.

vulture
^^^^^^^

`vulture <https://pypi.org/project/vulture/>`_ finds unused code in Python
programs and is useful for cleaning up and finding errors in large code bases.
It checks for unused imports, variables, methods, and classes.

To install vulture the following can be run:

.. code-block:: ini
pip install vulture
or

.. code-block:: ini
conda install vulture
Dynamic (run-time) Tools
------------------------

Code Coverage Analysis
^^^^^^^^^^^^^^^^^^^^^^

Code coverage analysis tools are useful when running unit tests to determine
whether tests are executing all possible branches, loops, etc.

**Examples:**

`Coverage.py <https://coverage.readthedocs.io/>`_: A free tool for
monitoring the coverage of your Python apps, monitoring every bit of your code
to find what was executed and what was not.

`pytest-cov <https://pypi.org/project/pytest-cov/>`_: A free language plug-in
to produce a coverage report of your app.

`figleaf <https://ctb.github.io/figleaf/doc/>`_: A code coverage analysis
tool intended to be to be a minimal replacement of 'coverage.py' that supports
more configurable coverage gathering and reporting.
Python code analysis tools like **pylint** can be used to check for errors and violations of PEP8 standards.
Loading

0 comments on commit af49567

Please sign in to comment.