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

Move files under internal_tests into internal/tests #1818

Merged
merged 5 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/run_tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if [[ "$INPUT_CATEGORIES" == pytests* ]]; then
.

echo Running Pytests
command="export METPLUS_PYTEST_HOST=docker; cd internal_tests/pytests;"
command="export METPLUS_PYTEST_HOST=docker; cd internal/tests/pytests;"
command+="status=0;"
for x in `cat $PYTESTS_GROUPS_FILEPATH`; do
marker="${x//_or_/ or }"
Expand Down
2 changes: 1 addition & 1 deletion .github/jobs/get_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
os.pardir))
sys.path.insert(0, METPLUS_TOP_DIR)

from internal_tests.use_cases.metplus_use_case_suite import METplusUseCaseSuite
from internal.tests.use_cases.metplus_use_case_suite import METplusUseCaseSuite

def main():
all_requirements = set()
Expand Down
2 changes: 1 addition & 1 deletion .github/jobs/get_use_case_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
os.pardir))
sys.path.insert(0, METPLUS_TOP_DIR)

from internal_tests.use_cases.metplus_use_case_suite import METplusUseCaseSuite
from internal.tests.use_cases.metplus_use_case_suite import METplusUseCaseSuite
from metplus.util.met_util import expand_int_string_to_list
from docker_utils import VERSION_EXT

Expand Down
4 changes: 2 additions & 2 deletions docs/Contributors_Guide/add_use_case.rst
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ will be used in the final pull request.
Add use case to the test suite
------------------------------

The *internal_tests/use_cases/all_use_cases.txt* file in the METplus
The *internal/tests/use_cases/all_use_cases.txt* file in the METplus
repository contains the list of all use cases.
Add the new use case to this file so it will be available in
the tests. See the :ref:`cg-ci-all-use-cases` section for details.
Expand Down Expand Up @@ -848,7 +848,7 @@ steps were unsuccessful in lowering memory usage, please take the following step
Utilize a Python memory profiler to identify as specifically as possible
where the script exceeds the memory limit.
- Add the use case to the :ref:`memory-intense-use-cases` list.
- In the *internal_tests/use_cases/all_use_cases.txt* file, ensure that the
- In the *internal/tests/use_cases/all_use_cases.txt* file, ensure that the
use case is listed as the lowest-listed use case in its respective category.
Change the number in front of the new use case to an 'X', preceded
by the ‘#’ character::
Expand Down
2 changes: 1 addition & 1 deletion docs/Contributors_Guide/continuous_integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ All Use Cases
^^^^^^^^^^^^^

All of the existing use cases are listed in **all_use_cases.txt**,
found in *internal_tests/use_cases*.
found in *internal/tests/use_cases*.

The file is organized by use case category. Each category starts
a line that following the format::
Expand Down
6 changes: 3 additions & 3 deletions docs/Contributors_Guide/testing.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Testing
=======

Test scripts are found in the GitHub repository in the internal_tests
Test scripts are found in the GitHub repository in the internal/tests
directory.

.. _cg-unit-tests:
Expand All @@ -13,15 +13,15 @@ Unit tests are run with pytest. They are found in the *pytests* directory.
Each tool has its own subdirectory containing its test files.

Unit tests can be run by running the 'pytest' command from the
internal_tests/pytests directory of the repository.
internal/tests/pytests directory of the repository.
The 'pytest' Python package must be available.
A report will be output showing which pytest categories failed.
When running on a new computer, a **minimum_pytest.<HOST>.sh**
file must be created to be able to run the script. This file contains
information about the local environment so that the tests can run.

All unit tests must include one of the custom markers listed in the
internal_tests/pytests/pytest.ini file. Some examples include:
internal/tests/pytests/pytest.ini file. Some examples include:

* util
* wrapper_a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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.
The script can be found in the METplus repository in internal/tests/use_cases.
The file should be found in the home directory of the met_test user on
the DTC web server host. It is linked to the file in the METplus repository.
Pull the latest changes from the develop branch before running the script::
Expand Down
4 changes: 2 additions & 2 deletions docs/Users_Guide/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ The METplus Wrappers source code contains the following directory structure::
build_components/
docs/
environment.yml
internal_tests/
internal/
manage_exernals/
metplus/
parm/
Expand All @@ -253,7 +253,7 @@ developer has Doxygen installed on the host.
The Doxygen documentation is useful to
contributors and is not necessary for METplus end-users.

The **internal_tests/** directory contains test scripts that are only
The **internal/** directory contains scripts that are only
relevant to METplus developers and contributors.

The **manage_externals/** directory contains scripts used to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# the following commands:
#
# git clone https://github.com/dtcenter/METplus
# METplus/internal_tests/scanning/sonarqube/run_nightly.sh name
# METplus/internal/scripts/sonarqube/run_nightly.sh name
#
# Usage: run_nightly.sh name
# where "name" specifies a branch, tag, or hash
Expand Down Expand Up @@ -39,7 +39,7 @@ SCRIPT_DIR=`dirname $0`
if [[ ${0:0:1} != "/" ]]; then SCRIPT_DIR=$(pwd)/${SCRIPT_DIR}; fi

# Define the development environment
ENV_FILE=${SCRIPT_DIR}/../environment/development.`hostname`
ENV_FILE=${SCRIPT_DIR}/environment/development.`hostname`
if [[ ! -e ${ENV_FILE} ]]; then
echo "$0: ERROR -> Development environment file missing: ${ENV_FILE}"
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# then run:
#
# git clone https://github.com/dtcenter/METplus
# METplus/internal_tests/scanning/sonarqube/run_sonarqube.sh name
# METplus/internal/scripts/sonarqube/run_sonarqube.sh name
#
# Usage: run_sonarqube.sh name
# Test the specified branched version of MET:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sonar.projectKey=org.sonarqube:METplus_NB
sonar.projectName=METplus Nightly Build
sonar.projectVersion=1.0

sonar.sources=docs,internal_tests,manage_externals,metplus,parm,produtil,ush
sonar.sources=docs,internal,manage_externals,metplus,parm,produtil,ush

# The build-wrapper output dir

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

# add METplus directory to path so the wrappers and utilities can be found
metplus_dir = str(Path(__file__).parents[2])
metplus_dir = str(Path(__file__).parents[3])
sys.path.insert(0, os.path.abspath(metplus_dir))

from metplus.util import config_metplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from metplus.wrappers.make_plots_wrapper import MakePlotsWrapper

METPLUS_BASE = os.getcwd().split('/internal_tests')[0]
METPLUS_BASE = os.getcwd().split('/internal')[0]


def make_plots_wrapper(metplus_config):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import pandas as pd


METPLUS_BASE = os.getcwd().split('/internal_tests')[0]
METPLUS_BASE = os.getcwd().split('/internal')[0]
sys.path.append(METPLUS_BASE+'/ush/plotting_scripts')
import plot_util
logger = logging.getLogger('~/metplus_pytest_plot_util.log')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def test_tcmpr_plotter_loop(metplus_config, config_overrides,
config.set('config', key, value)

test_data = os.path.join(config.getdir('METPLUS_BASE'),
'internal_tests',
'internal', 'tests',
'data',
'stat_data')

Expand Down Expand Up @@ -287,7 +287,7 @@ def test_tcmpr_plotter(metplus_config, config_overrides, expected_string):
config.set('config', key, value)

test_data = os.path.join(config.getdir('METPLUS_BASE'),
'internal_tests',
'internal', 'tests',
'data',
'stat_data')
if single_file:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ def test_get_threshold_via_regex(key, value):

@pytest.mark.parametrize(
'filename, ext', [
('internal_tests/data/zip/testfile.txt', '.gz'),
('internal_tests/data/zip/testfile2.txt', '.bz2'),
('internal_tests/data/zip/testfile3.txt', '.zip'),
('internal_tests/data/zip/testfile4.txt', ''),
('internal/tests/data/zip/testfile.txt', '.gz'),
('internal/tests/data/zip/testfile2.txt', '.bz2'),
('internal/tests/data/zip/testfile3.txt', '.zip'),
('internal/tests/data/zip/testfile4.txt', ''),
]
)
@pytest.mark.util
Expand Down Expand Up @@ -503,7 +503,7 @@ def test_subset_list(subset_definition, expected_result):
def test_get_storm_ids(metplus_config, filename, expected_result):
config = metplus_config()
filepath = os.path.join(config.getdir('METPLUS_BASE'),
'internal_tests',
'internal', 'tests',
'data',
'stat_data',
filename)
Expand Down Expand Up @@ -532,7 +532,7 @@ def test_get_storms(metplus_config, filename, expected_result):
storm_id_index = 4
config = metplus_config()
filepath = os.path.join(config.getdir('METPLUS_BASE'),
'internal_tests',
'internal', 'tests',
'data',
'stat_data',
filename)
Expand Down Expand Up @@ -561,7 +561,7 @@ def test_get_storms_mtd(metplus_config):
sort_column = 'OBJECT_CAT'
config = metplus_config()
filepath = os.path.join(config.getdir('METPLUS_BASE'),
'internal_tests',
'internal', 'tests',
'data',
'mtd',
'fake_mtd_2d.txt')
Expand Down
Loading