Skip to content

Commit

Permalink
unused import changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ilaflott committed Aug 9, 2024
1 parent 4c57cf5 commit 054b059
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 46 deletions.
10 changes: 4 additions & 6 deletions fre/cmor/CMORmixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
'''
see README.md for CMORmixer.py usage
'''
import os, sys
import os
import time as tm
import numpy, json
import cmor
import netCDF4 as nc
import string
import json
from shutil import copyfile
#import shutil
import netCDF4 as nc
import click
import cmor


global nameOfset, GFDL_vars_file, CMIP_output, GFDL_real_vars_file
Expand Down
4 changes: 2 additions & 2 deletions fre/make/createCheckout.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/python3

from .gfdlfremake import varsfre, platformfre, yamlfre, checkout, targetfre
import click
import os
import logging
import sys
import click
from .gfdlfremake import varsfre, platformfre, yamlfre, checkout, targetfre

@click.command()
def checkout_create(yamlfile,platform,target,no_parallel_checkout,jobs,execute,verbose):
Expand Down
9 changes: 5 additions & 4 deletions fre/make/createCompile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/python3

from .gfdlfremake import varsfre, platformfre, yamlfre, targetfre, buildBaremetal
from multiprocessing.dummy import Pool
import logging
import os
import click
import sys
import logging
from multiprocessing.dummy import Pool

import click
from .gfdlfremake import varsfre, platformfre, yamlfre, targetfre, buildBaremetal

@click.command()
def compile_create(yamlfile,platform,target,jobs,parallel,execute,verbose):
Expand Down
4 changes: 2 additions & 2 deletions fre/make/createDocker.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/python3

from .gfdlfremake import varsfre, targetfre, makefilefre, platformfre, yamlfre, buildDocker
import click
import os
import sys
import click
from .gfdlfremake import varsfre, targetfre, makefilefre, platformfre, yamlfre, buildDocker

@click.command()
def dockerfile_create(yamlfile, platform, target, execute):
Expand Down
5 changes: 2 additions & 3 deletions fre/make/createMakefile.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/python3

from .gfdlfremake import makefilefre, varsfre, targetfre, yamlfre
import click
import os
import logging
import click
from .gfdlfremake import makefilefre, varsfre, targetfre, yamlfre

@click.command()
def makefile_create(yamlfile,platform,target):
Expand Down
8 changes: 4 additions & 4 deletions fre/make/runFremake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
## \author Bennett Chang
## \description Script for fremake is used to create and run a code checkout script and compile a model.

import click
import subprocess
import os
import yaml
import logging
from .gfdlfremake import targetfre, varsfre, yamlfre, checkout, makefilefre, buildDocker, buildBaremetal
from multiprocessing.dummy import Pool

import click

from .gfdlfremake import targetfre, varsfre, yamlfre, checkout, makefilefre, buildDocker, buildBaremetal


@click.command()
def fremake_run(yamlfile, platform, target, parallel, jobs, no_parallel_checkout, verbose):
Expand Down
3 changes: 1 addition & 2 deletions fre/pp/checkoutScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

import os
import sys
from pathlib import Path
import subprocess
from subprocess import PIPE
from subprocess import STDOUT
import click
import re
import click

#############################################

Expand Down
17 changes: 8 additions & 9 deletions fre/pp/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@

import sys
import os
import subprocess
from subprocess import PIPE, STDOUT
from subprocess import STDOUT
import click
import re
import time

#Add path to this file to the pythonpath for local imports
import_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(import_dir)
#import subprocess
#from subprocess import PIPE, STDOUT
#from subprocess import STDOUT
import click

# Import from the local packages
from checkoutScript import _checkoutTemplate
Expand All @@ -34,6 +29,10 @@
from run import _pp_run_subtool
from status import _status_subtool

#Add path to this file to the pythonpath for local imports
import_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(import_dir)

@click.command()
def runFre2pp(experiment, platform, target, config_file, branch):
'''
Expand Down
5 changes: 1 addition & 4 deletions fre/yamltools/data_table/is_valid_data_table_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@
* You should have received a copy of the GNU Lesser General Public
* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************
"""

""" Determine if a yaml data_table is valid.
Determine if a yaml data_table is valid.
Run `python3 is_valid_data_table_yaml.py -h` for more details
Author: Uriel Ramirez 05/27/2022
"""

import yaml
import sys
import click

def check_gridname(grid_name):
Expand Down
4 changes: 2 additions & 2 deletions fre/yamltools/diag_table/diag_table_to_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"""

import copy as cp
import click
from os import path
import click
import yaml
from .. import __version__, TableParseError
from .. import __version__#, TableParseError

def main():
#: parse user input
Expand Down
7 changes: 2 additions & 5 deletions fre/yamltools/diag_table/is_valid_diag_table_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@
* You should have received a copy of the GNU Lesser General Public
* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************
"""

""" Determine if a yaml diag_table is valid.
Determine if a yaml diag_table is valid.
Run `python3 is_valid_diag_table_yaml.py -h` for more details
Author: Uriel Ramirez 05/27/2022
"""

import yaml
import sys
import argparse
import yaml

parser = argparse.ArgumentParser(prog='is_valid_diag_table_yaml', \
description="Determine if a yaml diag_table is valid. \
Expand Down
5 changes: 2 additions & 3 deletions fre/yamltools/field_table/field_table_to_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
* You should have received a copy of the GNU Lesser General Public
* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
***********************************************************************
"""
""" Converts a legacy ascii field_table to a yaml field_table.
Converts a legacy ascii field_table to a yaml field_table.
Author: Eric Stofferahn 07/14/2022
"""

import re
import sys
from collections import OrderedDict
import click
import yaml
Expand Down

0 comments on commit 054b059

Please sign in to comment.