Skip to content

Commit

Permalink
Align with master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Dec 7, 2023
1 parent 2348ed5 commit fb6b767
Show file tree
Hide file tree
Showing 99 changed files with 5,744 additions and 2,280 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ jobs:
- uses: actions/checkout@v2

- name: Install python version
uses: gabrielfalcao/pyenv-action@v7
uses: gabrielfalcao/pyenv-action@v13
with:
default: 3.9.0
default: 3.10.6
command: pip install -U pip # upgrade pip after installing python

- name: create environment
run: pyenv local 3.9.0 && python -mvenv .venv390
run: pyenv local 3.10.6 && python -mvenv .venv390

- name: Install dependencies
run: |
Expand All @@ -95,7 +95,7 @@ jobs:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.9", "3.10" ]
python-version: [ "3.10", "3.11" ]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10"]
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9", "3.10"]
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ include premise/data/utils/export/*.yml
include premise/data/utils/export/*.yaml
include premise/data/utils/report/*.yaml
include premise/data/utils/logging/*.yaml
include premise/data/utils/validation/*.yaml
include premise/iam_variables_mapping/*.yaml
include premise/iam_variables_mapping/*.xlsx
include premise/iam_variables_mapping/topologies/*.json
include premise/data/consequential/*.yaml
4 changes: 2 additions & 2 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
python:
- 3.9
- 3.10
- 3.10
- 3.11
4 changes: 2 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ requirements:
- bottleneck
- bw2data
- bw2io >=0.8.10
- constructive_geometries>=0.8.2
- constructive_geometries>=0.9.4
- cryptography
- datapackage
- numpy
Expand All @@ -34,7 +34,7 @@ requirements:
- requests
- schema
- sparse>=0.14.0
- wurst
- wurst>=0.4
- xarray

test:
Expand Down
2 changes: 1 addition & 1 deletion dev/test_premise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions docs/consequential.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Consequential modelling
The premise module allows users to import and adjust
the consequential system model of the ecoinvent database
v3.8 and 3.9, with a focus on electricity and fuel markets.
This work is based on a publication with a pre-print available
at https://chemrxiv.org/engage/chemrxiv/article-details/63ee10cdfcfb27a31fe227df
This work is based on a publication with available
at https://doi.org/10.1016/j.rser.2023.113830

Currently, the identification of marginal supplying
technologies is limited
Expand Down Expand Up @@ -156,4 +156,4 @@ If not, the following default arguments value are used:
ndb.update_electricity()
ndb.write_db_to_brightway()
ndb.write_db_to_brightway()
17 changes: 11 additions & 6 deletions docs/extract.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ The table below lists the names of the new activities (only high pressure datase
.. note::
This import will be removed in the future, as the original
ecoinvent dataset will be updated (i.e., v3.9).
This import does not occur when using ecoinvent v.3.9
as those dataset updates are already included.
Photovoltaic panels
*******************
Expand Down Expand Up @@ -617,8 +617,9 @@ The datasets introduced are listed in the table below.
================================================================== ===========
hydrogen refuelling station GLO
high pressure hydrogen storage tank GLO
distribution pipeline for hydrogen, dedicated hydrogen pipeline RER
transmission pipeline for hydrogen, dedicated hydrogen pipeline RER
pipeline, hydrogen, low pressure distribution network RER
compressor assembly for transmission hydrogen pipeline RER
pipeline, hydrogen, high pressure transmission network RER
zinc coating for hydrogen pipeline RER
hydrogenation of hydrogen RER
dehydrogenation of hydrogen RER
Expand Down Expand Up @@ -1651,8 +1652,8 @@ available in the library root folder: mappingFuels_.
hydrogen, biomass SE|Hydrogen|Biomass|w/o CCS hydrogen supply, from gasification of biomass, by
hydrogen, biomass, with CCS SE|Hydrogen|Biomass|w/ CCS hydrogen supply, from gasification of biomass by heatpipe reformer, with CCS
hydrogen, coal SE|Hydrogen|Coal|w/o CCS hydrogen supply, from coal gasification, by truck, as gaseous, over 500 km
hydrogen, nat. gas SE|Hydrogen|Gas|w/o CCS hydrogen supply, from SMR of nat. gas, by truck, as gaseous, over 500 km
hydrogen, nat. gas, with CCS SE|Hydrogen|Gas|w/ CCS hydrogen supply, from SMR of nat. gas, with CCS, by truck, as gaseous, over 500 km
hydrogen, from natural gas SE|Hydrogen|Gas|w/o CCS hydrogen supply, from SMR of from natural gas, by truck, as gaseous, over 500 km
hydrogen, from natural gas, with CCS SE|Hydrogen|Gas|w/ CCS hydrogen supply, from SMR of from natural gas, with CCS, by truck, as gaseous, over 500 km
biodiesel, oil SE|Liquids|Biomass|Biofuel|Biodiesel|w/o CCS Secondary Energy|Consumption|Liquids|Biomass|Biodiesel|Oilcrops|w/oCCS biodiesel production, via transesterification
biodiesel, oil, with CCS Secondary Energy|Consumption|Liquids|Biomass|Biodiesel|Oilcrops|w/CCS biodiesel production, via transesterification
bioethanol, wood SE|Liquids|Biomass|Cellulosic|w/o CCS Secondary Energy|Consumption|Liquids|Biomass|Ethanol|Woody|w/oCCS ethanol production, via fermentation, from forest
Expand Down Expand Up @@ -1688,6 +1689,10 @@ The production volumes considered for a given scenario can be consulted, like so
ndb.scenarios[0]["iam data"].production_volumes
To have an updated overview of the mapping concenring all sectors,
refer to this file: mapping_.
.. _mapping: https://github.com/polca/premise/blob/master/premise/iam_variables_mapping/mapping_overview.xlsx
Efficiencies
------------
Expand Down
8 changes: 7 additions & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Purpose
-------

*premise* enables the alignment of life cycle inventories within the ecoinvent_
3.6-3.9 database, using either a "cut-off" or "consequential"
3.6-3.9.1 database, using either a "cut-off" or "consequential"
system model, to match the output results of Integrated
Assessment Models (IAMs) such as REMIND_ or IMAGE_.
This allows for the creation of life cycle inventory databases
Expand Down Expand Up @@ -120,6 +120,12 @@ Examples notebook
`This notebook <https://github.com/polca/premise/blob/master/examples/examples.ipynb>`_ will show
you everything you need to know to use *premise*.

ScenarioLink plugin
*******************
There now exists a plugin for Activity Browser, called ScenarioLink, which allows you to
directly download IAM scenario-based premise databases from the browser, without the use of premise.
You can find it `here <https://github.com/polca/ScenarioLink>`_.


Main contributors
-----------------
Expand Down
17 changes: 4 additions & 13 deletions docs/mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ the list of geographical regions as LIST_xxx_REGIONS, with xxx
being the IAM model name, in the file iam_variables_mapping/constants.yaml.

Lastly, inform premise about the geographical definitions of
the IAM model you are using. These definitions are already
stored for REMIND and IMAGE, but not for new IAM models.
the IAM model you are using.
Create a .json file listing ISO 3166-1 alpha-2 country codes
and their corresponding IAM regions, as shown below.
and their corresponding IAM regions, as shown below, and store it under
premise/iam_variables_mapping/topologies, under the name: iamname-topology.json.

.. code-block:: json
{
Expand All @@ -61,16 +61,7 @@ and their corresponding IAM regions, as shown below.
"World": ["GLO", "RoW"]
}
Then, you need to add to the `constants.yaml` file the path
to this file:

.. code-block:: yaml
EXTRA_TOPOLOGY:
my_iam_name: filepath/to/the/geographical/definitions.json
In the long term, this information can be integrated
into premise so that it is not necessary to provide it manually.
Note that the IAM region names must be identical to the ones used in the IAM scenario files.

IAM scenario file
-----------------
Expand Down
Loading

0 comments on commit fb6b767

Please sign in to comment.