Skip to content

Commit

Permalink
Merge pull request #44 from JGCRI/bug/install
Browse files Browse the repository at this point in the history
fix version mismatch in setup
  • Loading branch information
crvernon authored May 30, 2024
2 parents 7e6ce57 + 45aa287 commit f4ac94d
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 41 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install configobj==5.0.6
pip install numpy==1.20.3
pip install pandas==1.2.4
pip install scipy==1.6.3
pip install requests==2.25.1
pip install xarray==0.20.2
pip install git+https://github.com/JGCRI/gcamreader.git
python -m pip install .
- name: Test and generate coverage report
run: |
pip install pytest
pip install pytest-cov
python -m pip install pytest
python -m pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: false
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![build](https://github.com/JGCRI/demeter/actions/workflows/build.yml/badge.svg)](https://github.com/JGCRI/demeter/actions/workflows/build.yml)
[![DOI](https://zenodo.org/badge/101879773.svg)](https://zenodo.org/badge/latestdoi/101879773)
[![codecov](https://codecov.io/gh/JGCRI/demeter/branch/master/graph/badge.svg?token=7K2g3PsFUG)](https://codecov.io/gh/JGCRI/demeter)


# Demeter

Expand Down
13 changes: 5 additions & 8 deletions demeter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
@author: Chris R. Vernon (PNNL); Yannick le Page (niquya@gmail.com)
"""
from demeter.model import Model, run_model
from demeter.install_supplement import get_package_data
from .model import Model, run_model
from .install_supplement import get_package_data

from demeter.preprocess_data import format_gcam_data, FormatGcamDataFrame

__author__ = "Chris R. Vernon (chris.vernon@pnnl.gov); Yannick le Page (niquya@gmail.com)"
__version__ = '1.2.0'

__all__ = ['Model', 'format_gcam_data', 'run_model', 'get_package_data', 'FormatGcamDataFrame']
from .preprocess_data import format_gcam_data, FormatGcamDataFrame
from .post_process.demeter_plotter import LandCoverPlotter
from .post_process.post_process_results import DataProcessor
1 change: 1 addition & 0 deletions demeter/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "2.0.1"
7 changes: 5 additions & 2 deletions demeter/install_supplement.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ class InstallSupplement:
"""

# URL for DOI minted example data hosted on Zenodo
DATA_VERSION_URLS = {'1.3.1': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
'2.0.0': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1'}
DATA_VERSION_URLS = {
'1.3.1': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
'2.0.0': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
'2.0.1': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
}

def __init__(self, example_data_directory):

Expand Down
Empty file.
13 changes: 8 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
configobj~=5.0.6
numpy~=1.20.3
pandas~=1.2.4
scipy~=1.6.3
requests~=2.20.0
configobj>=5.0.6
numpy>=1.20.3
pandas>=1.2.4
scipy>=1.6.3
requests>=2.20.0
gcamreader>=1.2.5
xarray>=0.20.2
netcdf4>=1.6.4
matplotlib>=3.4.2
29 changes: 19 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
from setuptools import setup, find_packages


Expand All @@ -7,10 +8,15 @@ def readme():
return f.read()


version = re.search(
r"__version__ = ['\"]([^'\"]*)['\"]", open("demeter/_version.py").read(), re.M
).group(1)


setup(
name='demeter',
version='2.0.0',
python_requires=">=3.7.1",
version=version,
python_requires=">=3.9",
packages=find_packages(),
url='https://github.com/JGCRI/demeter',
license='BSD 2-Clause',
Expand All @@ -19,13 +25,16 @@ def readme():
description='A land use land cover change disaggregation model',
long_description=readme(),
long_description_content_type="text/markdown",
install_requires=['configobj>=5.0.6',
'numpy >=1.20.3',
'pandas >=1.2.4',
'scipy >=1.6.3',
'requests>=2.20.0',
'gcamreader>=1.2.5',
'xarray >= 0.20.2',
'netcdf4>= 1.6.4'],
install_requires=[
'configobj>=5.0.6',
'numpy>=1.20.3',
'pandas>=1.2.4',
'scipy>=1.6.3',
'requests>=2.20.0',
'gcamreader>=1.2.5',
'xarray>=0.20.2',
'netcdf4>=1.6.4',
'matplotlib>=3.4.2',
],
include_package_data=True
)

0 comments on commit f4ac94d

Please sign in to comment.