Skip to content

Commit

Permalink
Rename digipipe to apipe
Browse files Browse the repository at this point in the history
  • Loading branch information
nesnoj committed Nov 7, 2023
1 parent ebe5582 commit d272388
Show file tree
Hide file tree
Showing 401 changed files with 263 additions and 433 deletions.
48 changes: 24 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,27 @@ dmypy.json
.idea

# Data files
digipipe/store/raw/*/data/*
!digipipe/store/raw/*/data/.gitkeep
!digipipe/store/raw/.TEMPLATE/data/*

digipipe/store/preprocessed/*/data/*
!digipipe/store/preprocessed/*/data/.gitkeep
!digipipe/store/preprocessed/.TEMPLATE/data/*

digipipe/store/datasets/*/data/*
!digipipe/store/datasets/*/data/.gitkeep
!digipipe/store/datasets/.TEMPLATE/data/*

digipipe/store/appdata/esys/*
digipipe/store/appdata/*/data/*
!digipipe/store/appdata/*/data/.gitkeep
!digipipe/store/appdata/datapackage/data/captions/.gitkeep
!digipipe/store/appdata/datapackage/data/geodata/.gitkeep
!digipipe/store/appdata/datapackage/data/scalars/.gitkeep
!digipipe/store/appdata/datapackage/data/settings/.gitkeep
!digipipe/store/appdata/datapackage/data/sequences/.gitkeep
!digipipe/store/appdata/*/.gitkeep

digipipe/store/temp/*
!digipipe/store/temp/.gitkeep
apipe/store/raw/*/data/*
!apipe/store/raw/*/data/.gitkeep
!apipe/store/raw/.TEMPLATE/data/*

apipe/store/preprocessed/*/data/*
!apipe/store/preprocessed/*/data/.gitkeep
!apipe/store/preprocessed/.TEMPLATE/data/*

apipe/store/datasets/*/data/*
!apipe/store/datasets/*/data/.gitkeep
!apipe/store/datasets/.TEMPLATE/data/*

apipe/store/appdata/esys/*
apipe/store/appdata/*/data/*
!apipe/store/appdata/*/data/.gitkeep
!apipe/store/appdata/datapackage/data/captions/.gitkeep
!apipe/store/appdata/datapackage/data/geodata/.gitkeep
!apipe/store/appdata/datapackage/data/scalars/.gitkeep
!apipe/store/appdata/datapackage/data/settings/.gitkeep
!apipe/store/appdata/datapackage/data/sequences/.gitkeep
!apipe/store/appdata/*/.gitkeep

apipe/store/temp/*
!apipe/store/temp/.gitkeep
153 changes: 0 additions & 153 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,156 +11,3 @@ and the versioning aim to respect [Semantic Versioning](http://semver.org/spec/v
### Changed

### Fixed

## [1.0.0] - 2023-11-07

### Added

- Setup initial structure and files
- Add first bunch of datasets for testing the data flow
- Modularize datasets
- Add first draft of RTD docs
- Add dataset: BNetzA MaStR
- Add Nominatim geocoder
- Add dataset: population
- Clean rule
- Datasets attribute captions
- Create list of region-specific datasets in the docs
- pyproject.toml and poetry.lock file have been added with the conversion to poetry
- Add pre-commit in order to check for errors and linting bugs before commits
- Add types-pyyaml package
- Add dataset: employees and companies
- Add dataset: demandregio electricity demand
- Add dataset: BMWK long-term scenarios
- Add rules to download raw data (zipped) from cloud, extract and copy to 'store/raw'
- Add module 'data_io', containing relevant helper functions (downloading, extracting, copying, cleaning)
- Create metadata
- Add script to generate dataset md files for documentation
- Add dataset: demand_heat_region
- Add dataset: heatpump_cop
- Add dataset: stala_st_energy
- Add dataset: eurostat_lau
- Add dataset: regstat_energy
- Add dataset: dwd_temperature
- Add dataset: ageb_energy_balance
- Add dataset: seenergies_peta5
- Add dataset: renewables.ninja_feedin
- Add dataset: renewable_feedin
- Add dataset: bnetza_mastr_correction_region and correct wrong units
- Integrate building of energy system for appdata in pipeline via dir *esys*
- Update store with dir structure for *esys* data
- Add creation of empty time series for the *esys*
- Add dataset: rpg_abw_regional_plan
- Add dataset: potentialarea_wind_region
- Add writing of default values to *esys* raw scalar data
- Add datasets: rli_pv_wfr and rli_pv_wfr_region
- Add module appdata to workflow
- Add dataset: geodata_infolayers
- Add dataset: potentialarea_pv_ground_region
- Add dataset: app datapackage
- Add dataset: potentialarea_pv_roof_region
- Add dataset: technology_data
- Add dataset: settings
- Calc panel settings from datasets
- Add dataset: osm (Germany)
- Add dataset: osm_buildings and add stats on ground areas
- Add mapping of costs and efficiencies from store/raw to store/datasets
- Add dataset: emissions
- Add captions to app datapackage (here: MaStR, heat, potentialarea_wind)
- Add mapping of time series data in datasets to empty time series according to
the mapping provided in map_ts.yml
- Add build configuration for readthedocs
- Add creation of stats of development over time for bnetza_mastr_wind_region,
bnetza_mastr_pv_ground_region, bnetza_mastr_pv_roof_region
- Add dataset: dbfz_biomass_heat_capacities
- Add the calculation of relative demand of biomass conversion technologies via
their relative capacities
- Add deletion of all data in store/datasets/esys_raw/data
- Add notes on OSM download and run resources
- Add nominal power per wind turbine for 2045
- Add technology data for batteries
- Add technology data for thermal storages
- Add definition of relevant regions (NUTS3) in global configuration file
- Add documentation of energy system of ABW

### Changed

- Move dataset docs from config to md files
- Retain mastr_id in MaStR datasets
- Fix loading of empty yml files
- Fix loading of global config when in workflow dir
- Integrate esys Snakefile in workflow Snakefile and update clean rule
- Fix shapely deprecation warning
- Fix ogr2ogr conversion with recent GDAL version (v3.6.2)
- Fix conda installation by removing python-gdal from environment.yml
- The package management in digipipe has been changed to poetry.
- The installation of a virtual environment is done only from the environment.yml file and via conda.
- Apply linters on repo among others: black, isort, check-json and end-of-file-fixer
- Update population with prognoses from demandregio dataset
- Fix C419 flake8 error
- Switch to mkdocs for documentation (Sphinx deleted)
- Normalize renewable feedin timeseries
- Fix instruction to obtain raw files
- Translate all dataset.md files to German
- Exchange *Test_scenario* with *2045_scenario* in *digipipe/esys/scenarios*
- Split each demand per sector in *esys*
- File .gitignore again includes ignoring of esys appdata
- pv_roof area stats: distinguish between all and non-historic buildings
- storage units: add region-wide values for spec. capacity and power for those
connected to PV roof units
- Add data on installed el. power to bmwk_long_term_scenarios
- Disaggregate PV state targets to region in potentialarea_pv_ground_region
- Adapt osm_filtered to ose osm dataset and extract building data
- Disaggregate PV state targets to region in potentialarea_pv_roof_region
- Changes were applied to the energy system. Among others RoR, small batteries
and biogas were added. A distinction was made between centralized and
decentralized CHPs
- Scenario 2045_scenario needs default_scalars.csv instead of scalars.csv
- By default set costs and efficiencies of esys are written to
default_scalars.csv instead of default_costs_efficiencies.csv
- Default variable_costs are passed with input_parameters for storages
- Pass time series instead of scalar with efficiency for central heat pump
- Fix wind+pv_ground default values in panel settings
- Set all default control values in panel settings
- Kick biogas shortage
- Rename dataset captions to app_captions
- Move app settings to datasets and include in app datapackage
- Adapt 2045_scenario.yml so that time series with values are used instead of
empty ts
- Suppress warning of loosing data in source and comment columns while
unstacking if they are empty
- Change max. installable PV roof capacity in panel settings
- Fix panel settings for large batteries
- Add additional captions to MaStR captions
- Use LTS version of OSM
- The unstacking of time series in esys was fixed so that warning is given if
there is at least one value in columns 'source' or 'comment'
- Minor fix applied reformatting with black
- Only use operating units from mastr for municipality stats and temporal
development
- Heat pump ASHP/GSHP split fixed
- Replace the relative demand of biomass with the relative demand of each
biomass conversion technology
- Fix clean rule
- Update raw datapackage URL
- Restrict snakemake version to v7.32.0
- Add central heat pump targets to slider
- Restrict heat pump sliders to not move under 50%
- Fix pv ground slider values to prevent app to alter SQ value from panel
settings
- Fix PV roof slider values
- Add HP share slider from-max values to prevent 100 % HP share
- Updated technology_data dataset.md and metadata
- Update metadate in store_raw
- Adapt existing dataset rules to use the global region definition (NUTS3)
- Update list of region-specific datasets

### Removed

- setup.py and requirements.txt files are omitted with the conversion to poetry
- sphinx from poetry environment
- Remove dataset: osm_forest
- Obsolete targets from rule all
- Merge dataset costs_efficiencies into technology_data
- Merge dataset costs_efficiencies into technology_data
- Remove values for redundant subsliders from app datapackage
File renamed without changes.
10 changes: 5 additions & 5 deletions digipipe/config/__init__.py → apipe/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import os
from pathlib import Path

from digipipe.scripts.config import read_config
from apipe.scripts.config import read_config


def locate_global_config() -> Path:
"""Returns path to global config file.
Raises error when executing the workflow not within `digipipe/` or
`digipipe/workflow/`.
Raises error when executing the workflow not within `apipe/` or
`apipe/workflow/`.
"""
config_dir = Path("config", "global.yml")
cwd = Path(os.getcwd())
if cwd.name == "digipipe":
if cwd.name == "apipe":
return (cwd / config_dir).resolve()
elif cwd.name == "workflow":
return (cwd.parent / config_dir).resolve()
else:
raise FileNotFoundError(
"Global config file not found, make sure you execute the workflow "
"in digipipe/ or digipipe/workflow/ ."
"in apipe/ or apipe/workflow/ ."
)


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion digipipe/esys/ESYS.md → apipe/esys/ESYS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Energy system in digiplan

The energy system in digipipe, the pipeline for digiplan, is created using
The energy system in apipe is created using
[oemof-B3](https://github.com/rl-institut/oemof-B3).

## Build the energy system
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from dynaconf import Dynaconf

from digipipe.scripts.config import read_config
from apipe.scripts.config import read_config

CONFIG_PATH = pathlib.Path(__file__).parent
ROOT_DIR = CONFIG_PATH.parent.parent
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8
r"""
This module contains helper functions for processing the data in digipipe, such
This module contains helper functions for processing the data in apipe, such
as loading, filtering, sorting, merging, aggregating and saving.
"""

Expand All @@ -12,8 +12,8 @@
import oemof.tabular.facades
import pandas as pd

from digipipe.esys.esys import schema
from digipipe.esys.esys.config import esys_conf
from apipe.esys.esys import schema
from apipe.esys.esys.config import esys_conf

logger = esys_conf.add_snake_logger("data_processing")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
from oemoflex import config as oemoflex_config
from oemoflex.model.datapackage import EnergyDataPackage

from digipipe.esys.esys.config import esys_conf
from digipipe.esys.esys.config.esys_conf import load_yaml
from digipipe.esys.esys.model import (
from apipe.esys.esys.config import esys_conf
from apipe.esys.esys.config.esys_conf import load_yaml
from apipe.esys.esys.model import (
bus_attrs_update,
component_attrs_update,
foreign_keys_update,
model_structures,
)
from digipipe.esys.esys.tools.data_processing import (
from apipe.esys.esys.tools.data_processing import (
expand_regions,
filter_df,
multi_load_b3_scalars,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import pandas as pd
from oemoflex.model.datapackage import EnergyDataPackage

from digipipe.esys.esys import model
from digipipe.esys.esys.config.esys_conf import load_yaml, settings
from digipipe.esys.esys.model import bus_attrs_update, model_structures
from digipipe.esys.esys.tools.data_processing import (
from apipe.esys.esys import model
from apipe.esys.esys.config.esys_conf import load_yaml, settings
from apipe.esys.esys.model import bus_attrs_update, model_structures
from apipe.esys.esys.tools.data_processing import (
HEADER_B3_SCAL,
format_header,
load_b3_scalars,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import pandas as pd
from oemoflex.model.model_structure import module_path

from digipipe.esys.esys import model
from digipipe.esys.esys.config.esys_conf import load_yaml, settings
from digipipe.esys.esys.model import model_structures
from digipipe.esys.esys.tools.data_processing import (
from apipe.esys.esys import model
from apipe.esys.esys.config.esys_conf import load_yaml, settings
from apipe.esys.esys.model import model_structures
from apipe.esys.esys.tools.data_processing import (
HEADER_B3_TS,
stack_timeseries,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
from oemof.tabular import datapackage # noqa
from oemof.tabular.facades import TYPEMAP

from digipipe.esys.esys.config import esys_conf
from digipipe.esys.esys.tools import data_processing as dp
from digipipe.esys.esys.tools.equate_flows import equate_flows_by_keyword
from digipipe.esys.esys.tools.timing import Timer
from apipe.esys.esys.config import esys_conf
from apipe.esys.esys.tools import data_processing as dp
from apipe.esys.esys.tools.equate_flows import equate_flows_by_keyword
from apipe.esys.esys.tools.timing import Timer

logger = logging.getLogger()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from oemoflex import config as oemoflex_config
from oemoflex.model.datapackage import ResultsDataPackage

from digipipe.esys.esys.config import esys_conf
from apipe.esys.esys.config import esys_conf

if __name__ == "__main__":

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

from oemof.tools.economics import annuity

from digipipe.esys.esys.config import esys_conf
from digipipe.esys.esys.tools.data_processing import (
from apipe.esys.esys.config import esys_conf
from apipe.esys.esys.tools.data_processing import (
ScalarProcessor,
load_b3_scalars,
save_df,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import os
import sys

from digipipe.esys.esys.config.esys_conf import add_snake_logger, settings
from digipipe.esys.esys.tools.data_processing import (
from apipe.esys.esys.config.esys_conf import add_snake_logger, settings
from apipe.esys.esys.tools.data_processing import (
load_b3_scalars,
multi_filter_df,
save_df,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import numpy as np
import pandas as pd

from digipipe.esys.esys.config.esys_conf import write_default_scalars
from digipipe.esys.esys.tools.data_processing import (
from apipe.esys.esys.config.esys_conf import write_default_scalars
from apipe.esys.esys.tools.data_processing import (
filter_df,
load_b3_scalars,
save_df,
Expand Down
Loading

0 comments on commit d272388

Please sign in to comment.