Skip to content

Commit

Permalink
Merge pull request #58 from JGCRI/dev
Browse files Browse the repository at this point in the history
Prep for PyPi
  • Loading branch information
crvernon authored Aug 10, 2021
2 parents bb956d6 + 718a386 commit 2f48956
Show file tree
Hide file tree
Showing 8 changed files with 67,596 additions and 22 deletions.
147 changes: 147 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,150 @@ build
dist
xanthos.egg-info

# example script
xanthos/example.py

# example dir for docker
example/

# pycharm
.idea

# system files
.DS_store

# 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

# 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/
venv_2.7

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

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

# Pyre type checker
.pyre/

# exclude .nc files
*.nc

# exclude dirs
xanthos.egg-info/
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include xanthos/data/*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Xanthos is an open-source hydrologic model, written in Python, designed to quant

# Get Started with Xanthos
Set up Xanthos using the following steps:
1. Install Xanthos from GitHub using:
1. Install Xanthos from PyPi using:
```bash
python -m pip install git+https://github.com/JGCRI/xanthos.git
pip install xanthos
```
2. Download the example data using the following in a Python prompt:
```python
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
numpy>=1.11
scipy>=0.18
pandas>=0.19
numpy~=1.19.4
scipy>=1.6
pandas~=1.1.4
configobj>=5.0.6
joblib>=0.11
matplotlib>=1.3.1
joblib~=1.0.1
matplotlib~=3.4.2
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description_file = README.md
26 changes: 15 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ def readme():
return f.read()


def get_requirements():
with open('requirements.txt') as f:
return f.read().split()


setup(
name='xanthos',
version='2.4.0',
version='2.4.1',
packages=find_packages(),
url='https://github.com/jgcri/xanthos',
license='BSD 2-Clause',
author='Chris R. Vernon; Xinya Li',
url='https://github.com/JGCRI/xanthos',
license='BSD2-Simplified',
author='Chris R. Vernon',
author_email='chris.vernon@pnnl.gov',
description='A global hydrologic modeling framework for GCAM',
description='A global hydrologic modeling framework',
long_description=readme(),
install_requires=get_requirements(),
long_description_content_type="text/markdown",
install_requires=[
"numpy~=1.19.4",
"scipy>=1.6",
"pandas~=1.1.4",
"configobj>=5.0.6",
"joblib~=1.0.1",
"matplotlib~=3.4.2",
],
python_requires='>=3.6',
include_package_data=True
)
7 changes: 3 additions & 4 deletions xanthos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from xanthos.model import *
from xanthos.install_supplement import get_package_data

__all__ = ['get_package_data', 'run_model']
from .model import *
from .install_supplement import get_package_data
from .calibrate.calibrate_abcd import Calibrate
Loading

0 comments on commit 2f48956

Please sign in to comment.