You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/install-adv.rst
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,37 @@ If you want to use :meth:`.visualize` or run the test suite, the Graphviz progra
137
137
If you install MESSAGEix :ref:`using conda <using-conda>`, Graphviz is installed automatically via `its conda-forge package`_.
138
138
For other methods of installation (such as :program:`pip`) see the `Graphviz download page`_ for downloads and instructions for your system.
139
139
140
+
.. _install-postgres:
141
+
142
+
PostgreSQL (optional)
143
+
---------------------
144
+
145
+
The new ixmp4 package is `only feature-complete <https://github.com/iiasa/ixmp4/pull/190>`__ when using `PostgreSQL <https://www.postgresql.org/>`__.
146
+
If you want to work on such a database locally, you need to get an instance running locally.
147
+
This is explained `in ixmp4 <https://github.com/iiasa/ixmp4/blob/main/DEVELOPING.md#running-tests-with-postgresql>`__, but here are the most important points:
148
+
149
+
- The easiest way to do that is by using `docker <https://www.docker.com/>`__, so make sure it is installed on your system or follow `their instructions <https://docs.docker.com/engine/install/>`__.
150
+
- Get the latest version of the official PostgreSQL image by running in your terminal::
151
+
152
+
docker pull postgres
153
+
154
+
- Finally, run the container using::
155
+
156
+
docker run -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=ixmp-test -p 5432:5432 -d postgres
157
+
158
+
.. note::
159
+
The values for `POSTGRES_PASSWORD` and `POSTGRES_DB` are chosen to set up a database instance that is found by :mod:`ixmp`'s default configuration.
160
+
You are free to choose different values here, but will have to adapt the configuration, too, in that case.
161
+
162
+
.. tip::
163
+
ixmp4 provides `a docker compose file <https://github.com/iiasa/ixmp4/blob/main/tests/docker-compose.yml>`__ that lets you achieve the above in a single command (once everything is installed).
164
+
If you install ixmp4 from source, you have the file on your system and can use it straight away.
165
+
Alternatively, you can copy the contents of this file to a location of your choosing.
166
+
To use it, run this in your terminal (with the appropriate path to the file)::
0 commit comments