Skip to content

Commit f4ac94d

Browse files
authored
Merge pull request #44 from JGCRI/bug/install
fix version mismatch in setup
2 parents 7e6ce57 + 45aa287 commit f4ac94d

File tree

9 files changed

+42
-41
lines changed

9 files changed

+42
-41
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,10 @@ jobs:
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install configobj==5.0.6
30-
pip install numpy==1.20.3
31-
pip install pandas==1.2.4
32-
pip install scipy==1.6.3
33-
pip install requests==2.25.1
34-
pip install xarray==0.20.2
35-
pip install git+https://github.com/JGCRI/gcamreader.git
29+
python -m pip install .
3630
3731
- name: Test and generate coverage report
3832
run: |
39-
pip install pytest
40-
pip install pytest-cov
33+
python -m pip install pytest
34+
python -m pip install pytest-cov
4135
pytest --cov=./ --cov-report=xml
42-
43-
- name: Upload coverage to Codecov
44-
uses: codecov/codecov-action@v1
45-
with:
46-
file: ./coverage.xml
47-
fail_ci_if_error: false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![build](https://github.com/JGCRI/demeter/actions/workflows/build.yml/badge.svg)](https://github.com/JGCRI/demeter/actions/workflows/build.yml)
22
[![DOI](https://zenodo.org/badge/101879773.svg)](https://zenodo.org/badge/latestdoi/101879773)
3-
[![codecov](https://codecov.io/gh/JGCRI/demeter/branch/master/graph/badge.svg?token=7K2g3PsFUG)](https://codecov.io/gh/JGCRI/demeter)
3+
44

55
# Demeter
66

demeter/__init__.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77
88
@author: Chris R. Vernon (PNNL); Yannick le Page (niquya@gmail.com)
99
"""
10-
from demeter.model import Model, run_model
11-
from demeter.install_supplement import get_package_data
10+
from .model import Model, run_model
11+
from .install_supplement import get_package_data
1212

13-
from demeter.preprocess_data import format_gcam_data, FormatGcamDataFrame
14-
15-
__author__ = "Chris R. Vernon (chris.vernon@pnnl.gov); Yannick le Page (niquya@gmail.com)"
16-
__version__ = '1.2.0'
17-
18-
__all__ = ['Model', 'format_gcam_data', 'run_model', 'get_package_data', 'FormatGcamDataFrame']
13+
from .preprocess_data import format_gcam_data, FormatGcamDataFrame
14+
from .post_process.demeter_plotter import LandCoverPlotter
15+
from .post_process.post_process_results import DataProcessor

demeter/_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "2.0.1"

demeter/install_supplement.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ class InstallSupplement:
1616
"""
1717

1818
# URL for DOI minted example data hosted on Zenodo
19-
DATA_VERSION_URLS = {'1.3.1': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
20-
'2.0.0': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1'}
19+
DATA_VERSION_URLS = {
20+
'1.3.1': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
21+
'2.0.0': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
22+
'2.0.1': 'https://zenodo.org/record/7240315/files/config_gcam_reference.zip?download=1',
23+
}
2124

2225
def __init__(self, example_data_directory):
2326

demeter/post_process/__init__.py

Whitespace-only changes.
File renamed without changes.

requirements.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
configobj~=5.0.6
2-
numpy~=1.20.3
3-
pandas~=1.2.4
4-
scipy~=1.6.3
5-
requests~=2.20.0
1+
configobj>=5.0.6
2+
numpy>=1.20.3
3+
pandas>=1.2.4
4+
scipy>=1.6.3
5+
requests>=2.20.0
66
gcamreader>=1.2.5
7+
xarray>=0.20.2
8+
netcdf4>=1.6.4
9+
matplotlib>=3.4.2

setup.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import re
12
from setuptools import setup, find_packages
23

34

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

910

11+
version = re.search(
12+
r"__version__ = ['\"]([^'\"]*)['\"]", open("demeter/_version.py").read(), re.M
13+
).group(1)
14+
15+
1016
setup(
1117
name='demeter',
12-
version='2.0.0',
13-
python_requires=">=3.7.1",
18+
version=version,
19+
python_requires=">=3.9",
1420
packages=find_packages(),
1521
url='https://github.com/JGCRI/demeter',
1622
license='BSD 2-Clause',
@@ -19,13 +25,16 @@ def readme():
1925
description='A land use land cover change disaggregation model',
2026
long_description=readme(),
2127
long_description_content_type="text/markdown",
22-
install_requires=['configobj>=5.0.6',
23-
'numpy >=1.20.3',
24-
'pandas >=1.2.4',
25-
'scipy >=1.6.3',
26-
'requests>=2.20.0',
27-
'gcamreader>=1.2.5',
28-
'xarray >= 0.20.2',
29-
'netcdf4>= 1.6.4'],
28+
install_requires=[
29+
'configobj>=5.0.6',
30+
'numpy>=1.20.3',
31+
'pandas>=1.2.4',
32+
'scipy>=1.6.3',
33+
'requests>=2.20.0',
34+
'gcamreader>=1.2.5',
35+
'xarray>=0.20.2',
36+
'netcdf4>=1.6.4',
37+
'matplotlib>=3.4.2',
38+
],
3039
include_package_data=True
3140
)

0 commit comments

Comments
 (0)