Skip to content

Commit c3fbb6f

Browse files
authored
Merge pull request #11 from SimonRouet/python3_upstream
Migration to Python 3
2 parents 05a4e87 + f99d945 commit c3fbb6f

File tree

8 files changed

+52
-64
lines changed

8 files changed

+52
-64
lines changed

example/MORPHOFLOR/multi_simulations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import run_lgrass
1+
from example.MORPHOFLOR import run_lgrass
22
import multiprocessing as mp
33
import os
44
import pandas as pd

lgrass/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"""
1313

1414

15-
__version__ = '2.1'
15+
__version__ = '3.0'

lgrass/emergence_function.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

lgrass/flowering_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file contains all fonctions associated with flowering
2-
import parameters
2+
from lgrass import parameters
33

44

55
class FloweringFunctions:

lgrass/lgrass.lpy

Lines changed: 45 additions & 49 deletions
Large diffs are not rendered by default.

lgrass/meteo_ephem.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def import_meteo_data(meteo_path, sowing_date, site):
1818
meteo_data = daylength_series(meteo_data)
1919
return meteo_data
2020

21+
2122
def thermal_time_calculation(meteo_data, sowing_date):
2223
"""
2324
:param meteo_data: dataframe with 2 columns: date: format 'YYYY_mm_dd'

setup.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,9 @@
3333

3434
import lgrass
3535

36-
if sys.version_info < (2, 7):
37-
print('ERROR: lgrass requires at least Python 2.7 to run.')
38-
sys.exit(1)
39-
40-
if sys.version_info >= (3, 0):
41-
print('WARNING: lgrass has not been tested with Python 3.')
42-
4336
pkg_resources.require('numpy>=1.11.0', 'pandas>=0.18.0', 'OpenAlea.Lpy', 'OpenAlea.PlantGL', 'OpenAlea.Mtg')
4437

38+
4539
def read(fname):
4640
return open(os.path.join(os.path.dirname(__file__), fname)).read()
4741

test/test_lgrass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def test_run(overwrite_desired_data=False):
9494
compare_actual_to_desired(OUTPUTS_DIRPATH, output_organ_lengths, DESIRED_OUTPUT_ORGAN_LENGTHS_FILENAME, output_organ_lengths_file_path, overwrite_desired_data)
9595

9696
if overwrite_desired_data:
97-
print ("New desired files written")
97+
print("New desired files written")
9898
else:
99-
print ("Test passed successfully")
99+
print("Test passed successfully")
100100

101101
if __name__ == '__main__':
102102
test_run(overwrite_desired_data=False)

0 commit comments

Comments
 (0)