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

2211 refactor cw #3

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 140 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,140 @@
__pycache__
*~
#*#
.DS_Store
# project-specific
.vscode
.DS*
._.DS*
*.zip
*.png

# hide data and output plots for the time being
data/GIS
plots

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from setuptools import setup, find_packages

setup(
name='uafgi',
version='0.0.1',
url='https://github.com/pism/uafgi',
author='Elizabeth Fischer',
author_email='[email protected]',
description='Some tools for internal use in in research at UAF/GI',
packages=find_packages(),
python_requires='>=3.8',
)
104 changes: 104 additions & 0 deletions tests/test_imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
from __future__ import print_function
from cdo import Cdo
# from gdal import ogr, osr DEPRECATED
from osgeo import ogr, osr, gdal
from getpass import getpass
from numpy import ndarray, asarray
from osgeo import gdal
from osgeo import ogr, gdal
from osgeo import ogr, osr
from osgeo import osr
from osgeo import osr, ogr, gdal
from setuptools import setup, find_packages
from uafgi import checksum, giutil
from uafgi import earthdata
from uafgi import ioutil
## from uafgi.functional import * DEPRECATED; also, a *-import: NOT PYTHONIC
from uafgi.util import functional
from uafgi.util import cdoutil, ncutil, functional, gdalutil, ogrutil
from uafgi.util import functional, cfutil, gdalutil
from uafgi.util import functional, ogrutil, cfutil, ncutil, gisutil
from uafgi.util import gdalutil, osrutil, pdutil
from uafgi.util import gicollections
from uafgi.util import gicollections, giutil
from uafgi.util import gisutil
from uafgi.util import ioutil
from uafgi.util import ioutil, gicollections
from uafgi.util import ncutil, giutil
from uafgi.util import pathutil, gicollections
from uafgi.util import shputil
from uafgi.util.checksum import hashup
from urllib.error import HTTPError, URLError
from urllib.parse import urlparse
from urllib.request import urlopen, Request, build_opener, HTTPCookieProcessor
# from urllib2 import urlopen, Request, HTTPError, URLError, build_opener, HTTPCookieProcessor -
# DEPRECATED in Python3. Use urllib. See https://stackoverflow.com/questions/2792650/import-error-no-module-name-urllib2
from urllib import HTTPError, URLError, build_opener, HTTPCookieProcessor, urlopen
# from urlparse import urlparse - DEPRECATED in Python3. Use urlparse
from urllib import urlparse
import argparse
import base64
import bisect
import cartopy.crs
import cartopy.geodesic
import cf_units
import collections
import collections, re
import collections.abc
import contextlib
import copy
import datetime
# import dggs.data <-- only used for WRF, not our ERA5 environment
import dill
import doctest
import filecmp
import functools
import getopt
import glob
import hashlib
import importlib
import inspect
import itertools
import json
import json, subprocess
import math
import matplotlib
import matplotlib.cm
import matplotlib.colors
import matplotlib.font_manager
import matplotlib.pyplot as plt
import netCDF4
import netCDF4, cf_units
import netrc
import numpy as np
import operator
import os
import os, pickle
import os, stat
import os.path
import pandas as pd
import pathlib
import pickle
import pyproj
import pytest
import re
import requests
import scipy.interpolate
import scipy.stats
import shapefile
import shapely
import shapely.geometry
import shapely.ops
import shutil
import signal
import ssl
import string
import struct
import subprocess
import sys
import tempfile
import time
import types
# import uafgi.indexing <-- this does not exist
import weakref
import xml.etree.ElementTree as ET
Empty file added uafgi/__init__.py
Empty file.
Empty file added uafgi/util/__init__.py
Empty file.