From 06a4936febe7d317a204f2f81c369bf669038bd9 Mon Sep 17 00:00:00 2001 From: birgits Date: Mon, 2 Sep 2019 16:20:31 +0200 Subject: [PATCH 1/5] Set default values for database connection details to oep connection details --- egoio/tools/db.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/egoio/tools/db.py b/egoio/tools/db.py index f2299cc..f4f52a6 100644 --- a/egoio/tools/db.py +++ b/egoio/tools/db.py @@ -116,11 +116,14 @@ def get_connection_details(section): Used for configuration file parser language. """ print('Please enter your connection details:') - dialect = input('Enter input value for `dialect` (default: psycopg2): ') or 'psycopg2' + dialect = input('Enter input value for `dialect` (default: oedialect): ') \ + or 'oedialect' username = input('Enter value for `username`: ') - database = input('Enter value for `database`: ') - host = input('Enter value for `host`: ') - port = input('Enter value for `port` (default: 5432): ') or '5432' + database = input('Enter value for `database` (default: oedb): ') or 'oedb' + host = input( + 'Enter value for `host` (default: openenergy-platform.org): ') or \ + 'openenergy-platform.org' + port = input('Enter value for `port` (default: 80): ') or '80' cfg = cp.ConfigParser() cfg.add_section(section) From f2f826896b070db7be30e6c3249fcd1d310a7520 Mon Sep 17 00:00:00 2001 From: birgits Date: Mon, 2 Sep 2019 16:20:39 +0200 Subject: [PATCH 2/5] Add changes to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aeb46fb..8e815df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Here is a template for new release sections ### Added ### Changed +- set default values for database connection details to oep connection details ## [0.4.7] 2019-08-29 From daaf92acb8d8c47f46dd5a14048dbba07081af95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20Ple=C3=9Fmann?= Date: Tue, 9 Jun 2020 19:30:35 +0200 Subject: [PATCH 3/5] Replace data type Numeric by Float(53) --- egoio/db_tables/demand.py | 28 ++++++++++++++-------------- egoio/db_tables/grid.py | 32 ++++++++++++++++---------------- egoio/db_tables/supply.py | 8 ++++---- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/egoio/db_tables/demand.py b/egoio/db_tables/demand.py index 8b9d405..da1660d 100644 --- a/egoio/db_tables/demand.py +++ b/egoio/db_tables/demand.py @@ -27,7 +27,7 @@ class EgoDpLoadarea(Base): version = Column(Text, primary_key=True, nullable=False) id = Column(Integer, primary_key=True, nullable=False) subst_id = Column(Integer) - area_ha = Column(Numeric) + area_ha = Column(Float(53)) nuts = Column(String(5)) rs_0 = Column(String(12)) ags_0 = Column(String(12)) @@ -35,20 +35,20 @@ class EgoDpLoadarea(Base): un_id = Column(Integer) zensus_sum = Column(Integer) zensus_count = Column(Integer) - zensus_density = Column(Numeric) - ioer_sum = Column(Numeric) + zensus_density = Column(Float(53)) + ioer_sum = Column(Float(53)) ioer_count = Column(Integer) - ioer_density = Column(Numeric) - sector_area_residential = Column(Numeric) - sector_area_retail = Column(Numeric) - sector_area_industrial = Column(Numeric) - sector_area_agricultural = Column(Numeric) - sector_area_sum = Column(Numeric) - sector_share_residential = Column(Numeric) - sector_share_retail = Column(Numeric) - sector_share_industrial = Column(Numeric) - sector_share_agricultural = Column(Numeric) - sector_share_sum = Column(Numeric) + ioer_density = Column(Float(53)) + sector_area_residential = Column(Float(53)) + sector_area_retail = Column(Float(53)) + sector_area_industrial = Column(Float(53)) + sector_area_agricultural = Column(Float(53)) + sector_area_sum = Column(Float(53)) + sector_share_residential = Column(Float(53)) + sector_share_retail = Column(Float(53)) + sector_share_industrial = Column(Float(53)) + sector_share_agricultural = Column(Float(53)) + sector_share_sum = Column(Float(53)) sector_count_residential = Column(Integer) sector_count_retail = Column(Integer) sector_count_industrial = Column(Integer) diff --git a/egoio/db_tables/grid.py b/egoio/db_tables/grid.py index fac2567..8cacfca 100644 --- a/egoio/db_tables/grid.py +++ b/egoio/db_tables/grid.py @@ -231,21 +231,21 @@ class EgoDpMvGriddistrict(Base): gem_clean = Column(Integer) zensus_sum = Column(Integer) zensus_count = Column(Integer) - zensus_density = Column(Numeric) - population_density = Column(Numeric) + zensus_density = Column(Float(53)) + population_density = Column(Float(53)) la_count = Column(Integer) - area_ha = Column(Numeric) + area_ha = Column(Float(53)) la_area = Column(Numeric(10, 1)) free_area = Column(Numeric(10, 1)) area_share = Column(Numeric(4, 1)) - consumption = Column(Numeric) - consumption_per_area = Column(Numeric) + consumption = Column(Float(53)) + consumption_per_area = Column(Float(53)) dea_cnt = Column(Integer) - dea_capacity = Column(Numeric) + dea_capacity = Column(Float(53)) lv_dea_cnt = Column(Integer) - lv_dea_capacity = Column(Numeric) + lv_dea_capacity = Column(Float(53)) mv_dea_cnt = Column(Integer) - mv_dea_capacity = Column(Numeric) + mv_dea_capacity = Column(Float(53)) geom_type = Column(Text) geom = Column(Geometry('MULTIPOLYGON', 3035), index=True) @@ -303,21 +303,21 @@ class EgoDpMvGriddistrict(Base): Column('gem_clean', Integer), Column('zensus_sum', Integer), Column('zensus_count', Integer), - Column('zensus_density', Numeric), - Column('population_density', Numeric), + Column('zensus_density', Float(53)), + Column('population_density', Float(53)), Column('la_count', Integer), - Column('area_ha', Numeric), + Column('area_ha', Float(53)), Column('la_area', Numeric(10, 1)), Column('free_area', Numeric(10, 1)), Column('area_share', Numeric(4, 1)), - Column('consumption', Numeric), - Column('consumption_per_area', Numeric), + Column('consumption', Float(53)), + Column('consumption_per_area', Float(53)), Column('dea_cnt', Integer), - Column('dea_capacity', Numeric), + Column('dea_capacity', Float(53)), Column('lv_dea_cnt', Integer), - Column('lv_dea_capacity', Numeric), + Column('lv_dea_capacity', Float(53)), Column('mv_dea_cnt', Integer), - Column('mv_dea_capacity', Numeric), + Column('mv_dea_capacity', Float(53)), Column('geom_type', Text), Column('geom', Geometry('MULTIPOLYGON', 3035), index=True), schema='grid' diff --git a/egoio/db_tables/supply.py b/egoio/db_tables/supply.py index 791231c..18eedf5 100644 --- a/egoio/db_tables/supply.py +++ b/egoio/db_tables/supply.py @@ -477,15 +477,15 @@ class EgoDpResPowerplant(Base): Column('version', Text), Column('id', BigInteger), Column('start_up_date', DateTime), - Column('electrical_capacity', Numeric), + Column('electrical_capacity', Float(53)), Column('generation_type', Text), Column('generation_subtype', String), - Column('thermal_capacity', Numeric), + Column('thermal_capacity', Float(53)), Column('city', String), Column('postcode', String), Column('address', String), - Column('lon', Numeric), - Column('lat', Numeric), + Column('lon', Float(53)), + Column('lat', Float(53)), Column('gps_accuracy', String), Column('validation', String), Column('notification_reason', String), From 11bad40bb18a8e7c798898dbf3632dafcd48aa9a Mon Sep 17 00:00:00 2001 From: nesnoj Date: Sat, 29 May 2021 00:17:55 +0200 Subject: [PATCH 4/5] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9d3c526..c6f05bc 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ author='NEXT ENERGY, Reiner Lemoine Institut gGmbH, ZNES', author_email='ulf.p.mueller@hs-flensburg.de', description='ego input/output repository', - version='0.4.7', + version='0.4.8', url='https://github.com/openego/ego.io', packages=find_packages(), license='GNU Affero General Public License v3.0', From 5f43187cd9ac6ceecd15c39de96c06a2bd235484 Mon Sep 17 00:00:00 2001 From: nesnoj Date: Sat, 29 May 2021 00:18:08 +0200 Subject: [PATCH 5/5] update changelog --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e815df..d46ff44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,12 @@ Here is a template for new release sections ### Added ### Changed -- set default values for database connection details to oep connection details + +## [0.4.8] 2021-05-29 + +### Changed +- replace data type Numeric by Float(53) #86 +- set default values for database connection details to oep connection details #83 ## [0.4.7] 2019-08-29