fgreg closed pull request #1: SDAP-17: Required dependency for ningester
URL: https://github.com/apache/incubator-sdap-ningesterpy/pull/1
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.gitignore b/.gitignore
index 788c98f..cc74a02 100644
--- a/.gitignore
+++ b/.gitignore
@@ -112,7 +112,6 @@ venv.bak/
 [Ll]ib
 [Ll]ib64
 [Ll]ocal
-[Ss]cripts
 pyvenv.cfg
 pip-selfcheck.json
 ### JetBrains template
diff --git a/.idea/ningesterpy.iml b/.idea/ningesterpy.iml
index 2c9cf97..dcf2bcc 100644
--- a/.idea/ningesterpy.iml
+++ b/.idea/ningesterpy.iml
@@ -2,7 +2,7 @@
 <module type="PYTHON_MODULE" version="4">
   <component name="NewModuleRootManager">
     <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/ningesterpy" isTestSource="false" 
/>
+      <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..ae9eac8
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,130 @@
+Contributing to Apache SDAP 
+===========================
+
+Summary
+-------
+This document covers how to contribute to the SDAP project. SDAP uses github 
PRs to manage code contributions and project manages source code development 
through the [SDAP JIRA instance](https://issues.apache.org/jira/browse/SDAP). 
+These instructions assume you have a GitHub.com account, so if you don't have 
one you will have to create one. Your proposed code changes will be published 
to your own fork of the SDAP project and you will submit a Pull Request for 
your changes to be added.
+
+_Lets get started!!!_
+
+Bug fixes
+---------
+
+It's very important that we can easily track bug fix commits, so their hashes 
should remain the same in all branches. 
+Therefore, a pull request (PR) that fixes a bug, should be sent against a 
release branch. 
+This can be either the "current release" or the "previous release", depending 
on which ones are maintained. 
+Since the goal is a stable master, bug fixes should be "merged forward" to the 
next branch in order: "previous release" -> "current release" -> master (in 
other words: old to new)
+
+Developing new features
+-----------------------
+
+Development should be done in a feature branch, branched off of master. 
+Send a PR(steps below) to get it into master (2x LGTM applies). 
+PR will only be merged when master is open, will be held otherwise until 
master is open again. 
+No back porting / cherry-picking features to existing branches!
+
+Fork the code 
+-------------
+
+In your browser, navigate to: 
[https://github.com/apache?utf8=?&q=incubator-sdap&type=&language=](https://github.com/apache?utf8=?&q=incubator-sdap&type=&language=)
+
+Fork whichever repository you wish to contribute to by clicking on the 'Fork' 
button on the top right hand side. The fork will happen and you will be taken 
to your own fork of the repository.  Copy the Git repository URL by clicking on 
the clipboard next to the URL on the right hand side of the page under 
'**HTTPS** clone URL'.  You will paste this URL when doing the following `git 
clone` command.
+
+On your computer, follow these steps to setup a local repository for working 
on ACS:
+
+``` bash
+$ git clone https://github.com/YOUR_ACCOUNT/incubator-sdap-*.git
+$ cd incubator-sdap-*
+$ git remote add upstream https://github.com/apache/incubator-sdap-*.git
+$ git checkout master
+$ git fetch upstream
+$ git rebase upstream/master
+```
+N.B. make sure that you replace ```incubator-sdap-*``` with the actual project 
you wish to contribute to!!!
+
+Making changes
+--------------
+
+It is important that you create a new branch to make changes on and that you 
do not change the `master` branch (other than to rebase in changes from 
`upstream/master`).  In this example we will assume you will be making your 
changes to a branch called `SDAP-XXX`.  This `SDAP-XXX` is named after the 
issue you have created within the [SDAP JIRA 
instance](https://issues.apache.org/jira/browse/SDAP). Therefore `SDAP-XXX` 
will be created on your local repository and will be pushed to your forked 
repository on GitHub.  Once this branch is on your fork you will create a Pull 
Request for the changes to be added to the SDAP project.
+
+It is best practice to create a new branch each time you want to contribute to 
the project and only track the changes for that pull request in this branch.
+
+``` bash
+$ git checkout -b SDAP-XXX
+   (make your changes)
+$ git status
+$ git add .
+$ git commit -a -m "SDAP-XXX Descriptive title of SDAP-XXX"
+```
+
+> The `-b` specifies that you want to create a new branch called `SDAP-XXX`.  
You only specify `-b` the first time you checkout because you are creating a 
new branch.  Once the `SDAP-XXX` branch exists, you can later switch to it with 
only `git checkout SDAP-XXX`.
+> Note that the commit message comprises the JIRA issue number and title... 
this makes explicit reference between Github and JIRA for improved project 
management.
+
+
+Rebase `SDAP-XXX` to include updates from `upstream/master`
+------------------------------------------------------------
+
+It is important that you maintain an up-to-date `master` branch in your local 
repository.  This is done by rebasing in the code changes from 
`upstream/master` (the official SDAP project repository) into your local 
repository.  You will want to do this before you start working on a feature as 
well as right before you submit your changes as a pull request.  We recommend 
you do this process periodically while you work to make sure you are working 
off the most recent project code.
+
+This process will do the following:
+
+1. Checkout your local `master` branch
+2. Synchronize your local `master` branch with the `upstream/master` so you 
have all the latest changes from the project
+3. Rebase the latest project code into your `SDAP-XXX` branch so it is 
up-to-date with the upstream code
+
+``` bash
+$ git checkout master
+$ git fetch upstream
+$ git rebase upstream/master
+$ git checkout SDAP-XXX
+$ git rebase master
+```
+
+> Now your `SDAP-XXX` branch is up-to-date with all the code in 
`upstream/master`.
+
+
+Make a GitHub Pull Request to contribute your changes
+-----------------------------------------------------
+
+When you are happy with your changes and you are ready to contribute them, you 
will create a Pull Request on GitHub to do so. This is done by pushing your 
local changes to your forked repository (default remote name is `origin`) and 
then initiating a pull request on GitHub.
+
+Please include JIRA id, detailed information about the bug/feature, what all 
tests are executed, how the reviewer can test this feature etc. Incase of UI 
PRs, a screenshot is preferred.
+
+> **IMPORTANT:** Make sure you have rebased your `SDAP-XXX` branch to include 
the latest code from `upstream/master` _before_ you do this.
+
+``` bash
+$ git push origin master
+$ git push origin SDAP-XXX
+```
+
+Now that the `SDAP-XXX` branch has been pushed to your GitHub repository, you 
can initiate the pull request.  
+
+To initiate the pull request, do the following:
+
+1. In your browser, navigate to your forked repository: 
[https://github.com/YOUR_ACCOUNT?utf8=?&q=incubator-sdap&type=&language=](https://github.com/YOUR_ACCOUNT?utf8=?&q=incubator-sdap&type=&language=),
 make sure you actually navigate to the specific project you wish to make the 
PR from.
+2. Click the new button called '**Compare & pull request**' that showed up 
just above the main area in your forked repository
+3. Validate the pull request will be into the upstream `master` and will be 
from your `SDAP-XXX` branch
+4. Enter a detailed description of the work you have done and then click 
'**Send pull request**'
+
+If you are requested to make modifications to your proposed changes, make the 
changes locally on your `SDAP-XXX` branch, re-push the `SDAP-XXX` branch to 
your fork.  The existing pull request should automatically pick up the change 
and update accordingly.
+
+
+Cleaning up after a successful pull request
+-------------------------------------------
+
+Once the `SDAP-XXX` branch has been committed into the `upstream/master` 
branch, your local `SDAP-XXX` branch and the `origin/SDAP-XXX` branch are no 
longer needed.  If you want to make additional changes, restart the process 
with a new branch.
+
+> **IMPORTANT:** Make sure that your changes are in `upstream/master` before 
you delete your `SDAP-XXX` and `origin/SDAP-XXX` branches!
+
+You can delete these deprecated branches with the following:
+
+``` bash
+$ git checkout master
+$ git branch -D SDAP-XXX
+$ git push origin :SDAP-XXX
+```
+
+Release Principles
+------------------
+Coming soon
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 6089814..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# ningesterpy
-
-Python modules for processing of NEXUS tiles.
\ No newline at end of file
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..cac6d46
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,5 @@
+================
+ ningesterpy
+================
+
+Python modules for processing of NEXUS tiles.
\ No newline at end of file
diff --git a/conda-requirements.txt b/conda-requirements.txt
new file mode 100644
index 0000000..76b02be
--- /dev/null
+++ b/conda-requirements.txt
@@ -0,0 +1,3 @@
+scipy=0.18.1
+nco=4.7.1
+netcdf4=1.3.1
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index b96700c..69e023e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,12 +1,9 @@
-werkzeug=0.12.2
-flask=0.12.2
+werkzeug==0.12.2
+flask==0.12.2
 flask-accept==0.0.4
-nco==4.7.1
-netCDF4==1.3.1
-nexusproto===1.0.1-SNAPSHOT
+nexusproto===1.0.0-SNAPSHOT
 numpy==1.12.1
 protobuf==3.2.0
 pytz==2017.2
 PyYAML==3.12
-scipy==0.18.1
-six==1.10.0
+six==1.10.0
\ No newline at end of file
diff --git a/scripts/__init__.py b/scripts/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/convert_iceshelf.py b/scripts/convert_iceshelf.py
similarity index 100%
rename from tests/convert_iceshelf.py
rename to scripts/convert_iceshelf.py
diff --git a/tests/hd5splitter.py b/scripts/hd5splitter.py
similarity index 100%
rename from tests/hd5splitter.py
rename to scripts/hd5splitter.py
diff --git a/ningesterpy/__init__.py b/sdap/__init__.py
similarity index 95%
rename from ningesterpy/__init__.py
rename to sdap/__init__.py
index 50167e0..6acb5d1 100644
--- a/ningesterpy/__init__.py
+++ b/sdap/__init__.py
@@ -12,5 +12,3 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
-from ningesterpy import ningesterpy
\ No newline at end of file
diff --git a/ningesterpy/ningesterpy.py b/sdap/ningesterpy.py
similarity index 88%
rename from ningesterpy/ningesterpy.py
rename to sdap/ningesterpy.py
index e3f1d02..ff143ed 100644
--- a/ningesterpy/ningesterpy.py
+++ b/sdap/ningesterpy.py
@@ -15,18 +15,21 @@
 import logging
 import uuid
 
-from nexusproto import DataTile_pb2 as nexusproto
 from flask import Flask, request, jsonify, Response
 from flask.json import JSONEncoder
 from flask_accept import accept
 from google.protobuf import json_format
 from google.protobuf.json_format import ParseError
+from nexusproto import DataTile_pb2 as nexusproto
 from werkzeug.exceptions import HTTPException, BadRequest
 from werkzeug.exceptions import default_exceptions
 
-from processors.processorchain import ProcessorChain, ProcessorNotFound, 
MissingProcessorArguments
+from sdap.processors.processorchain import ProcessorChain, ProcessorNotFound, 
MissingProcessorArguments
+logging.basicConfig(format="%(asctime)s  %(levelname)s %(process)d --- 
[%(name)s.%(funcName)s:%(lineno)d] %(message)s",
+                    datefmt="%Y-%m-%d %H:%M:%S")
 
 applog = logging.getLogger(__name__)
+applog.setLevel(logging.INFO)
 app = Flask(__name__)
 
 
@@ -91,8 +94,11 @@ def handle_error(e):
 
 
 if __name__ == '__main__':
+    host = '127.0.0.1'
+    port = 5000
+    applog.info("Running app on %s:%d" % (host, port))
     app.register_error_handler(Exception, handle_error)
     for ex in default_exceptions:
         app.register_error_handler(ex, handle_error)
     app.json_encoder = ProtobufJSONEncoder
-    app.run()
+    app.run(host=host, port=port)
diff --git a/ningesterpy/processors/__init__.py b/sdap/processors/__init__.py
similarity index 75%
rename from ningesterpy/processors/__init__.py
rename to sdap/processors/__init__.py
index e837ce5..8f30cb8 100644
--- a/ningesterpy/processors/__init__.py
+++ b/sdap/processors/__init__.py
@@ -49,17 +49,17 @@ def process_nexus_tile(self, nexus_tile):
 
 # All installed processors need to be imported and added to the dict below
 
-from processors.callncpdq import CallNcpdq
-from processors.callncra import CallNcra
-from processors.computespeeddirfromuv import ComputeSpeedDirFromUV
-from processors.emptytilefilter import EmptyTileFilter
-from processors.kelvintocelsius import KelvinToCelsius
-from processors.normalizetimebeginningofmonth import 
NormalizeTimeBeginningOfMonth
-from processors.regrid1x1 import Regrid1x1
-from processors.subtract180longitude import Subtract180Longitude
-from processors.tilereadingprocessor import GridReadingProcessor, 
SwathReadingProcessor, TimeSeriesReadingProcessor
-from processors.tilesummarizingprocessor import TileSummarizingProcessor
-from processors.winddirspeedtouv import WindDirSpeedToUV
+from sdap.processors.callncpdq import CallNcpdq
+from sdap.processors.callncra import CallNcra
+from sdap.processors.computespeeddirfromuv import ComputeSpeedDirFromUV
+from sdap.processors.emptytilefilter import EmptyTileFilter
+from sdap.processors.kelvintocelsius import KelvinToCelsius
+from sdap.processors.normalizetimebeginningofmonth import 
NormalizeTimeBeginningOfMonth
+from sdap.processors.regrid1x1 import Regrid1x1
+from sdap.processors.subtract180longitude import Subtract180Longitude
+from sdap.processors.tilereadingprocessor import GridReadingProcessor, 
SwathReadingProcessor, TimeSeriesReadingProcessor
+from sdap.processors.tilesummarizingprocessor import TileSummarizingProcessor
+from sdap.processors.winddirspeedtouv import WindDirSpeedToUV
 
 INSTALLED_PROCESSORS = {
     "CallNcpdq": CallNcpdq,
diff --git a/ningesterpy/processors/callncpdq.py b/sdap/processors/callncpdq.py
similarity index 98%
rename from ningesterpy/processors/callncpdq.py
rename to sdap/processors/callncpdq.py
index 315a9c8..d8b02e8 100644
--- a/ningesterpy/processors/callncpdq.py
+++ b/sdap/processors/callncpdq.py
@@ -18,7 +18,7 @@
 import os
 from subprocess import call
 
-from processors import Processor
+from sdap.processors import Processor
 
 
 class CallNcpdq(Processor):
diff --git a/ningesterpy/processors/callncra.py b/sdap/processors/callncra.py
similarity index 98%
rename from ningesterpy/processors/callncra.py
rename to sdap/processors/callncra.py
index 4276995..51bacec 100644
--- a/ningesterpy/processors/callncra.py
+++ b/sdap/processors/callncra.py
@@ -20,7 +20,7 @@
 
 from netCDF4 import Dataset, num2date
 
-from processors import Processor
+from sdap.processors import Processor
 
 
 class CallNcra(Processor):
diff --git a/ningesterpy/processors/computespeeddirfromuv.py 
b/sdap/processors/computespeeddirfromuv.py
similarity index 98%
rename from ningesterpy/processors/computespeeddirfromuv.py
rename to sdap/processors/computespeeddirfromuv.py
index 57a3b78..a372aa1 100644
--- a/ningesterpy/processors/computespeeddirfromuv.py
+++ b/sdap/processors/computespeeddirfromuv.py
@@ -17,7 +17,7 @@
 import numpy
 from nexusproto.serialization import from_shaped_array, to_shaped_array
 
-from processors import NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 
 def calculate_speed_direction(wind_u, wind_v):
diff --git a/ningesterpy/processors/emptytilefilter.py 
b/sdap/processors/emptytilefilter.py
similarity index 97%
rename from ningesterpy/processors/emptytilefilter.py
rename to sdap/processors/emptytilefilter.py
index 976b8c3..5d8a7e3 100644
--- a/ningesterpy/processors/emptytilefilter.py
+++ b/sdap/processors/emptytilefilter.py
@@ -19,7 +19,7 @@
 import numpy
 from nexusproto.serialization import from_shaped_array
 
-from processors import NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 logger = logging.getLogger('emptytilefilter')
 
diff --git a/ningesterpy/processors/kelvintocelsius.py 
b/sdap/processors/kelvintocelsius.py
similarity index 96%
rename from ningesterpy/processors/kelvintocelsius.py
rename to sdap/processors/kelvintocelsius.py
index 5209798..27d1db3 100644
--- a/ningesterpy/processors/kelvintocelsius.py
+++ b/sdap/processors/kelvintocelsius.py
@@ -16,7 +16,7 @@
 
 from nexusproto.serialization import from_shaped_array, to_shaped_array
 
-from processors import NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 
 class KelvinToCelsius(NexusTileProcessor):
diff --git a/ningesterpy/processors/normalizetimebeginningofmonth.py 
b/sdap/processors/normalizetimebeginningofmonth.py
similarity index 96%
rename from ningesterpy/processors/normalizetimebeginningofmonth.py
rename to sdap/processors/normalizetimebeginningofmonth.py
index ef452ea..4cc0403 100644
--- a/ningesterpy/processors/normalizetimebeginningofmonth.py
+++ b/sdap/processors/normalizetimebeginningofmonth.py
@@ -17,7 +17,7 @@
 
 from pytz import timezone
 
-from processors import NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 EPOCH = timezone('UTC').localize(datetime.datetime(1970, 1, 1))
 
diff --git a/ningesterpy/processors/processorchain.py 
b/sdap/processors/processorchain.py
similarity index 94%
rename from ningesterpy/processors/processorchain.py
rename to sdap/processors/processorchain.py
index 55a3e19..6a68b04 100644
--- a/ningesterpy/processors/processorchain.py
+++ b/sdap/processors/processorchain.py
@@ -15,7 +15,7 @@
 
 import inspect
 
-import processors
+import sdap.processors
 
 
 class BadChainException(Exception):
@@ -39,7 +39,7 @@ def __init__(self, processor, missing_processor_args, *args):
         super().__init__(message, *args)
 
 
-class ProcessorChain(processors.Processor):
+class ProcessorChain(sdap.processors.Processor):
     def __init__(self, processor_list, *args, **kwargs):
         super().__init__(*args, **kwargs)
 
@@ -47,7 +47,7 @@ def __init__(self, processor_list, *args, **kwargs):
         # Attempt to construct the needed processors
         for processor in processor_list:
             try:
-                processor_constructor = 
processors.INSTALLED_PROCESSORS[processor['name']]
+                processor_constructor = 
sdap.processors.INSTALLED_PROCESSORS[processor['name']]
             except KeyError as e:
                 raise ProcessorNotFound(processor['name']) from e
 
diff --git a/ningesterpy/processors/regrid1x1.py b/sdap/processors/regrid1x1.py
similarity index 99%
rename from ningesterpy/processors/regrid1x1.py
rename to sdap/processors/regrid1x1.py
index 896f9f6..daf9921 100644
--- a/ningesterpy/processors/regrid1x1.py
+++ b/sdap/processors/regrid1x1.py
@@ -22,7 +22,7 @@
 from pytz import timezone
 from scipy import interpolate
 
-from processors import Processor
+from sdap.processors import Processor
 
 UTC = timezone('UTC')
 ISO_8601 = '%Y-%m-%dT%H:%M:%S%z'
diff --git a/ningesterpy/processors/subtract180longitude.py 
b/sdap/processors/subtract180longitude.py
similarity index 97%
rename from ningesterpy/processors/subtract180longitude.py
rename to sdap/processors/subtract180longitude.py
index 74ad846..3552115 100644
--- a/ningesterpy/processors/subtract180longitude.py
+++ b/sdap/processors/subtract180longitude.py
@@ -15,7 +15,7 @@
 
 from nexusproto.serialization import from_shaped_array, to_shaped_array
 
-from processors import NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 
 class Subtract180Longitude(NexusTileProcessor):
diff --git a/ningesterpy/processors/tilereadingprocessor.py 
b/sdap/processors/tilereadingprocessor.py
similarity index 99%
rename from ningesterpy/processors/tilereadingprocessor.py
rename to sdap/processors/tilereadingprocessor.py
index 7b26c14..cc3afef 100644
--- a/ningesterpy/processors/tilereadingprocessor.py
+++ b/sdap/processors/tilereadingprocessor.py
@@ -25,7 +25,7 @@
 from nexusproto.serialization import to_shaped_array, to_metadata
 from pytz import timezone
 
-from processors import Processor, NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 EPOCH = timezone('UTC').localize(datetime.datetime(1970, 1, 1))
 
diff --git a/ningesterpy/processors/tilesummarizingprocessor.py 
b/sdap/processors/tilesummarizingprocessor.py
similarity index 98%
rename from ningesterpy/processors/tilesummarizingprocessor.py
rename to sdap/processors/tilesummarizingprocessor.py
index b0a9028..afdf070 100644
--- a/ningesterpy/processors/tilesummarizingprocessor.py
+++ b/sdap/processors/tilesummarizingprocessor.py
@@ -17,7 +17,7 @@
 import numpy
 from nexusproto.serialization import from_shaped_array
 
-from processors import NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 
 class NoTimeException(Exception):
diff --git a/ningesterpy/processors/winddirspeedtouv.py 
b/sdap/processors/winddirspeedtouv.py
similarity index 98%
rename from ningesterpy/processors/winddirspeedtouv.py
rename to sdap/processors/winddirspeedtouv.py
index f5d3a82..96d2cb1 100644
--- a/ningesterpy/processors/winddirspeedtouv.py
+++ b/sdap/processors/winddirspeedtouv.py
@@ -20,7 +20,7 @@
 import numpy
 from nexusproto.serialization import from_shaped_array, to_shaped_array
 
-from processors import NexusTileProcessor
+from sdap.processors import NexusTileProcessor
 
 
 def enum(**enums):
diff --git a/setup.py b/setup.py
index fc16fbb..64a1fbc 100644
--- a/setup.py
+++ b/setup.py
@@ -14,20 +14,39 @@
 # limitations under the License.
 
 from setuptools import setup, find_packages
+from subprocess import check_call, CalledProcessError
 
-__version__ = '0.1'
+try:
+    check_call(['conda', 'info'], stdout=None, stderr=None)
+except CalledProcessError as e:
+    raise EnvironmentError("This module requires conda") from e
+
+try:
+    with open('conda-requirements.txt') as f:
+        conda_requirements = f.readlines()
+    check_call(['conda', 'install', '-y', *conda_requirements])
+except (CalledProcessError, IOError) as e:
+    raise EnvironmentError("Error installing conda packages") from e
+
+with open('requirements.txt') as f:
+    pip_requirements = f.readlines()
+
+__version__ = '1.0.0-SNAPSHOT'
 
 setup(
     name="ningesterpy",
     version=__version__,
     url="https://github.com/apache/incubator-sdap-ningesterpy";,
 
-    author="Frank Greguska",
+    author="[email protected]",
+    author_email="[email protected]",
 
     description="Python modules that can be used for NEXUS ingest.",
-    long_description=open('README.md').read(),
+    long_description=open('README.rst').read(),
+
+    install_requires=pip_requirements,
 
-    packages=find_packages(),
+    packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", 
"tests", "scripts"]),
     test_suite="tests",
     platforms='any',
 
diff --git a/tests/callncpdq_test.py b/tests/callncpdq_test.py
index 11af9ac..49c7bf6 100644
--- a/tests/callncpdq_test.py
+++ b/tests/callncpdq_test.py
@@ -19,7 +19,7 @@
 
 from netCDF4 import Dataset
 
-from processors import callncpdq
+from sdap.processors import callncpdq
 
 
 class TestMeasuresData(unittest.TestCase):
diff --git a/tests/computespeeddirfromuv_test.py 
b/tests/computespeeddirfromuv_test.py
index 16335bc..2b364e7 100644
--- a/tests/computespeeddirfromuv_test.py
+++ b/tests/computespeeddirfromuv_test.py
@@ -19,8 +19,8 @@
 import numpy as np
 from nexusproto.serialization import from_shaped_array
 
-import processors
-from processors.computespeeddirfromuv import calculate_speed_direction
+import sdap.processors
+from sdap.processors.computespeeddirfromuv import calculate_speed_direction
 
 
 class TestConversion(unittest.TestCase):
@@ -86,7 +86,7 @@ def test_speed(self):
 
 class TestCcmpData(unittest.TestCase):
     def setUp(self):
-        self.module = processors.ComputeSpeedDirFromUV('uwnd', 'vwnd')
+        self.module = sdap.processors.ComputeSpeedDirFromUV('uwnd', 'vwnd')
 
     def test_speed_dir_computation(self):
         test_file = path.join(path.dirname(__file__), 'dumped_nexustiles', 
'ccmp_nonempty_nexustile.bin')
diff --git a/tests/kelvintocelsius_test.py b/tests/kelvintocelsius_test.py
index 2d4cd83..267bba5 100644
--- a/tests/kelvintocelsius_test.py
+++ b/tests/kelvintocelsius_test.py
@@ -20,12 +20,12 @@
 import numpy as np
 from nexusproto.serialization import from_shaped_array
 
-import processors
+import sdap.processors
 
 
 class TestAvhrrData(unittest.TestCase):
     def setUp(self):
-        self.module = processors.KelvinToCelsius()
+        self.module = sdap.processors.KelvinToCelsius()
 
     def test_kelvin_to_celsius(self):
         test_file = path.join(path.dirname(__file__), 'dumped_nexustiles', 
'avhrr_nonempty_nexustile.bin')
diff --git a/tests/processorchain_test.py b/tests/processorchain_test.py
index 6b47a3e..7657ba6 100644
--- a/tests/processorchain_test.py
+++ b/tests/processorchain_test.py
@@ -18,7 +18,7 @@
 
 from nexusproto import DataTile_pb2 as nexusproto
 
-from processors.processorchain import ProcessorChain
+from sdap.processors.processorchain import ProcessorChain
 
 
 class TestRunChainMethod(unittest.TestCase):
diff --git a/tests/regrid1x1_test.py b/tests/regrid1x1_test.py
index e05713e..b7ee9fe 100644
--- a/tests/regrid1x1_test.py
+++ b/tests/regrid1x1_test.py
@@ -16,7 +16,7 @@
 import os
 import unittest
 
-import processors
+import sdap.processors
 
 
 def delete_file_if_exists(filename):
@@ -39,9 +39,9 @@ def tearDown(self):
         delete_file_if_exists(self.expected_output_path)
 
     def test_ssh_grid(self):
-        regridder = processors.Regrid1x1('SLA', 'Latitude', 'Longitude', 
'Time',
-                                         
variable_valid_range='SLA:-100.0:100.0:SLA_ERR:-5000:5000',
-                                         filename_prefix=self.prefix)
+        regridder = sdap.processors.Regrid1x1('SLA', 'Latitude', 'Longitude', 
'Time',
+                                              
variable_valid_range='SLA:-100.0:100.0:SLA_ERR:-5000:5000',
+                                              filename_prefix=self.prefix)
 
         results = list(regridder.process(self.test_file))
 
@@ -61,8 +61,8 @@ def tearDown(self):
 
     @unittest.skip
     def test_lwe_grid(self):
-        regridder = processors.Regrid1x1('lwe_thickness', 'lat', 'lon', 'tim',
-                                         filename_prefix=self.prefix)
+        regridder = sdap.processors.Regrid1x1('lwe_thickness', 'lat', 'lon', 
'tim',
+                                              filename_prefix=self.prefix)
 
         results = list(regridder.process(self.test_file))
 
@@ -82,8 +82,8 @@ def tearDown(self):
 
     @unittest.skip
     def test_height_raw(self):
-        regridder = processors.Regrid1x1('height_raw,height_filt,height_err', 
'lat', 'lon', 'tim',
-                                         filename_prefix=self.prefix)
+        regridder = 
sdap.processors.Regrid1x1('height_raw,height_filt,height_err', 'lat', 'lon', 
'tim',
+                                              filename_prefix=self.prefix)
 
         results = list(regridder.process(self.test_file))
 
diff --git a/tests/subtract180longitude_test.py 
b/tests/subtract180longitude_test.py
index b8794b6..81472cc 100644
--- a/tests/subtract180longitude_test.py
+++ b/tests/subtract180longitude_test.py
@@ -20,7 +20,7 @@
 import numpy as np
 from nexusproto.serialization import from_shaped_array
 
-import processors
+import sdap.processors
 
 
 class TestAscatbUData(unittest.TestCase):
@@ -34,7 +34,7 @@ def test_subtraction_longitudes_less_than_180(self):
         nexus_tile_before = nexusproto.NexusTile.FromString(nexustile_str)
         longitudes_before = 
from_shaped_array(nexus_tile_before.tile.swath_tile.longitude)
 
-        subtract = processors.Subtract180Longitude()
+        subtract = sdap.processors.Subtract180Longitude()
 
         results = list(subtract.process(nexustile_str))
 
@@ -54,7 +54,7 @@ def test_subtraction_longitudes_greater_than_180(self):
         nexus_tile_before = nexusproto.NexusTile.FromString(nexustile_str)
         longitudes_before = 
from_shaped_array(nexus_tile_before.tile.swath_tile.longitude)
 
-        subtract = processors.Subtract180Longitude()
+        subtract = sdap.processors.Subtract180Longitude()
 
         results = list(subtract.process(nexustile_str))
 
diff --git a/tests/tilereadingprocessor_test.py 
b/tests/tilereadingprocessor_test.py
index ad31442..2700073 100644
--- a/tests/tilereadingprocessor_test.py
+++ b/tests/tilereadingprocessor_test.py
@@ -20,12 +20,12 @@
 from nexusproto.serialization import from_shaped_array
 from nexusproto import DataTile_pb2 as nexusproto
 
-import processors
+import sdap.processors
 
 
 class TestReadMurData(unittest.TestCase):
     def setUp(self):
-        self.module = processors.GridReadingProcessor('analysed_sst', 'lat', 
'lon', time='time')
+        self.module = sdap.processors.GridReadingProcessor('analysed_sst', 
'lat', 'lon', time='time')
 
     def test_read_empty_mur(self):
         test_file = path.join(path.dirname(__file__), 'datafiles', 
'empty_mur.nc4')
@@ -82,7 +82,7 @@ class TestReadAscatbData(unittest.TestCase):
     def test_read_not_empty_ascatb(self):
         test_file = path.join(path.dirname(__file__), 'datafiles', 
'not_empty_ascatb.nc4')
 
-        swath_reader = processors.SwathReadingProcessor('wind_speed', 'lat', 
'lon', time='time')
+        swath_reader = sdap.processors.SwathReadingProcessor('wind_speed', 
'lat', 'lon', time='time')
 
         input_tile = nexusproto.NexusTile()
         tile_summary = nexusproto.TileSummary()
@@ -115,7 +115,7 @@ def test_read_not_empty_ascatb_meta(self):
 
         test_file = path.join(path.dirname(__file__), 'datafiles', 
'not_empty_ascatb.nc4')
 
-        swath_reader = processors.SwathReadingProcessor('wind_speed', 'lat', 
'lon', time='time', meta='wind_dir')
+        swath_reader = sdap.processors.SwathReadingProcessor('wind_speed', 
'lat', 'lon', time='time', meta='wind_dir')
 
         input_tile = nexusproto.NexusTile()
         tile_summary = nexusproto.TileSummary()
@@ -142,10 +142,10 @@ class TestReadSmapData(unittest.TestCase):
     def test_read_not_empty_smap(self):
         test_file = path.join(path.dirname(__file__), 'datafiles', 
'not_empty_smap.h5')
 
-        swath_reader = processors.SwathReadingProcessor('smap_sss', 'lat', 
'lon',
-                                                        time='row_time',
-                                                        
glblattr_day='REV_START_TIME',
-                                                        
glblattr_day_format='%Y-%jT%H:%M:%S.%f')
+        swath_reader = sdap.processors.SwathReadingProcessor('smap_sss', 
'lat', 'lon',
+                                                             time='row_time',
+                                                             
glblattr_day='REV_START_TIME',
+                                                             
glblattr_day_format='%Y-%jT%H:%M:%S.%f')
 
         input_tile = nexusproto.NexusTile()
         tile_summary = nexusproto.TileSummary()
@@ -187,7 +187,7 @@ class TestReadCcmpData(unittest.TestCase):
     def test_read_not_empty_ccmp(self):
         test_file = path.join(path.dirname(__file__), 'datafiles', 
'not_empty_ccmp.nc')
 
-        ccmp_reader = processors.GridReadingProcessor('uwnd', 'latitude', 
'longitude', time='time', meta='vwnd')
+        ccmp_reader = sdap.processors.GridReadingProcessor('uwnd', 'latitude', 
'longitude', time='time', meta='vwnd')
 
         input_tile = nexusproto.NexusTile()
         tile_summary = nexusproto.TileSummary()
@@ -228,7 +228,7 @@ class TestReadAvhrrData(unittest.TestCase):
     def test_read_not_empty_avhrr(self):
         test_file = path.join(path.dirname(__file__), 'datafiles', 
'not_empty_avhrr.nc4')
 
-        avhrr_reader = processors.GridReadingProcessor('analysed_sst', 'lat', 
'lon', time='time')
+        avhrr_reader = sdap.processors.GridReadingProcessor('analysed_sst', 
'lat', 'lon', time='time')
 
         input_tile = nexusproto.NexusTile()
         tile_summary = nexusproto.TileSummary()
@@ -270,7 +270,7 @@ class TestReadWSWMData(unittest.TestCase):
     def test_read_not_empty_wswm(self):
         test_file = path.join(path.dirname(__file__), 'datafiles', 
'not_empty_wswm.nc')
 
-        wswm_reader = processors.TimeSeriesReadingProcessor('Qout', 'lat', 
'lon', 'time')
+        wswm_reader = sdap.processors.TimeSeriesReadingProcessor('Qout', 
'lat', 'lon', 'time')
 
         input_tile = nexusproto.NexusTile()
         tile_summary = nexusproto.TileSummary()
diff --git a/tests/tilesumarizingprocessor_test.py 
b/tests/tilesumarizingprocessor_test.py
index 82b03c4..6461e75 100644
--- a/tests/tilesumarizingprocessor_test.py
+++ b/tests/tilesumarizingprocessor_test.py
@@ -16,7 +16,7 @@
 import unittest
 from os import path
 
-import processors
+import sdap.processors
 
 
 class TestSummarizeTile(unittest.TestCase):
@@ -26,7 +26,7 @@ def test_summarize_swath(self):
         with open(test_file, 'rb') as f:
             nexustile_str = f.read()
 
-        summarizer = processors.TileSummarizingProcessor()
+        summarizer = sdap.processors.TileSummarizingProcessor()
 
         results = list(summarizer.process(nexustile_str))
 
@@ -59,7 +59,7 @@ def test_summarize_grid(self):
         with open(test_file, 'rb') as f:
             nexustile_str = f.read()
 
-        summarizer = processors.TileSummarizingProcessor()
+        summarizer = sdap.processors.TileSummarizingProcessor()
 
         results = list(summarizer.process(nexustile_str))
 
diff --git a/tests/winddirspeedtouv_test.py b/tests/winddirspeedtouv_test.py
index c9b288e..ecc56fe 100644
--- a/tests/winddirspeedtouv_test.py
+++ b/tests/winddirspeedtouv_test.py
@@ -19,7 +19,7 @@
 import numpy as np
 from nexusproto.serialization import from_shaped_array
 
-import processors
+import sdap.processors
 
 
 class TestAscatbUData(unittest.TestCase):
@@ -30,7 +30,7 @@ def test_u_conversion(self):
         with open(test_file, 'rb') as f:
             nexustile_str = f.read()
 
-        converter = processors.WindDirSpeedToUV('U')
+        converter = sdap.processors.WindDirSpeedToUV('U')
 
         results = list(converter.process(nexustile_str))
 
@@ -67,7 +67,7 @@ def test_u_conversion(self):
         with open(test_file, 'rb') as f:
             nexustile_str = f.read()
 
-        converter = processors.WindDirSpeedToUV('V')
+        converter = sdap.processors.WindDirSpeedToUV('V')
 
         results = list(converter.process(nexustile_str))
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to