Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit b02f98a

Browse files
author
Kevin Paul
authored
Merge pull request #104 from kmpaul/fixactions
Fix GitHub actions
2 parents 5bcf445 + cd08709 commit b02f98a

39 files changed

+1380
-2158
lines changed

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
with:
1818
python-version: '2.7'
1919
- run: pip install flake8==3.7.9 isort==4.3.21
20-
- run: flake8 source/
20+
- run: flake8
2121
- run: isort --recursive -w 100 --check-only

README.rst

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3895009.svg
22
:target: https://doi.org/10.5281/zenodo.3895009
33

4+
.. image:: https://codecov.io/gh/NCAR/PyConform/branch/master/graph/badge.svg
5+
:target: https://codecov.io/gh/NCAR/PyConform
6+
7+
.. image:: https://github.com/NCAR/PyConform/workflows/Tests/badge.svg
8+
:target: https://github.com/NCAR/PyConform/actions?query=workflow%3ATests
9+
10+
.. image:: https://github.com/NCAR/PyConform/workflows/Linting/badge.svg
11+
:target: https://github.com/NCAR/PyConform/actions?query=workflow%3ALinting
12+
413
PyConform
514
=========
615

@@ -81,9 +90,11 @@ Dependencies
8190
The PyConform package directly depends upon 4 main external packages:
8291

8392
* ASAPTools (>=0.6)
84-
* netCDF4-python
8593
* cf-units
8694
* dreqpy
95+
* netCDF4-python
96+
* ply
97+
* python-dateutil
8798

8899
These dependencies imply the dependencies:
89100

@@ -146,27 +157,3 @@ user installs, and therefore only needs to be added to the PYTHONPATH once.
146157
The documentation_ for PyConform is hosted on GitHub Pages.
147158

148159
.. _documentation: https://ncar.github.io/pyconform
149-
150-
151-
Before Using the PyConform Package
152-
----------------------------------
153-
154-
Before the PyConform package can be used, you must make sure that the
155-
site-packages directory containing the 'pyconform' source directory is in
156-
your PYTHONPATH. Depending on the PREFIX used during installation, this
157-
path should look like be::
158-
159-
$PREFIX/lib/python2.7/site-packages
160-
161-
depending on the version of Python that you
162-
are using to install the package.
163-
164-
To use the PyConform scripts (e.g., ...), you must add the
165-
script binary directory to your PATH. Depending on the PREFIX used during
166-
installation, this path will be::
167-
168-
$PREFIX/bin/
169-
170-
Once the script binary directory has been added to your PATH and the
171-
site-packages directory has been added to your PYTHONPATH, you may use the
172-
PyConform package without issue.

pyconform/cli/__init__.py

Whitespace-only changes.

pyconform/cli/iconform.py

Lines changed: 195 additions & 243 deletions
Large diffs are not rendered by default.

pyconform/cli/vardeps.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
from pyconform import parsing
1717

1818

19-
#=========================================================================
20-
# Command-line Interface
21-
#=========================================================================
2219
def cli(argv=None):
2320
desc = """This tool will analyze a definitions text file or a JSON standardization
2421
file and print out the variables needed for each defined output variable."""
@@ -38,9 +35,6 @@ def cli(argv=None):
3835
return parser.parse_args(argv)
3936

4037

41-
#=========================================================================
42-
# variable_search
43-
#=========================================================================
4438
def variable_search(obj, vars=None):
4539
if vars is None:
4640
vars = set()
@@ -57,9 +51,6 @@ def variable_search(obj, vars=None):
5751
return vars
5852

5953

60-
#=========================================================================
61-
# print_columnar
62-
#=========================================================================
6354
def print_columnar(x, textwidth=10000000, indent=0, header=''):
6455
hrstrp = '{} '.format(str(header).rstrip())
6556
if len(hrstrp) > indent:
@@ -75,9 +66,6 @@ def print_columnar(x, textwidth=10000000, indent=0, header=''):
7566
print '{}{}'.format(' ' * indent, ' '.join('{: <{Lmax}}'.format(r, Lmax=Lmax) for r in row))
7667

7768

78-
#=========================================================================
79-
# Main Script Function
80-
#=========================================================================
8169
def main(argv=None):
8270
args = cli(argv)
8371

@@ -138,8 +126,5 @@ def main(argv=None):
138126
print_columnar(sorted(alldeps), indent=3)
139127

140128

141-
#=========================================================================
142-
# Command-line Operation
143-
#=========================================================================
144129
if __name__ == '__main__':
145130
main()

pyconform/cli/xconform.py

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,22 @@
1111
LICENSE: See the LICENSE.rst file for details
1212
"""
1313

14-
from os.path import exists
14+
from argparse import ArgumentParser, ArgumentTypeError
15+
from collections import OrderedDict
1516
from glob import glob
17+
from imp import load_source
1618
from json import load as json_load
17-
from collections import OrderedDict
18-
from argparse import ArgumentParser, ArgumentTypeError
19+
from os.path import exists
1920
from warnings import simplefilter
20-
from datetime import datetime
21-
from imp import load_source
2221

23-
from asaptools.simplecomm import create_comm
2422
from asaptools.partition import Duplicate
23+
from asaptools.simplecomm import create_comm
2524

26-
from pyconform.datasets import InputDatasetDesc, OutputDatasetDesc
2725
from pyconform.dataflow import DataFlow
26+
from pyconform.datasets import InputDatasetDesc, OutputDatasetDesc
2827
from pyconform.flownodes import ValidationWarning
2928

3029

31-
#=========================================================================
32-
# chunk - Chunksize for a named dimension
33-
#=========================================================================
3430
def chunk(arg):
3531
try:
3632
name, size_str = arg.split(',')
@@ -40,9 +36,6 @@ def chunk(arg):
4036
raise ArgumentTypeError("Chunks must be formatted as 'name,size'")
4137

4238

43-
#=========================================================================
44-
# Command-line Interface
45-
#=========================================================================
4639
def cli(argv=None):
4740
desc = """This is the PyConform command-line tool. This scripts takes
4841
input from the command-line and a predefined output
@@ -84,9 +77,6 @@ def cli(argv=None):
8477
return parser.parse_args(argv)
8578

8679

87-
#=========================================================================
88-
# Main Script Function
89-
#=========================================================================
9080
def main(argv=None):
9181
args = cli(argv)
9282

@@ -165,8 +155,5 @@ def main(argv=None):
165155
deflate=args.deflate, debug=args.debug)
166156

167157

168-
#=========================================================================
169-
# Command-line Operation
170-
#=========================================================================
171158
if __name__ == '__main__':
172159
main()

0 commit comments

Comments
 (0)