Skip to content
Open

1.4.3 #216

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config/database_credentials.yml
config/certificates
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ output/
# codecarbon
.codecarbon.config
emissions.csv
powermetrics_log.txt

# development folder
development/

# MTLS certificates
config/certificates/ca.crt
config/certificates/user_cert.crt
config/certificates/user_private_key.key
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
=========
Changelog
=========
v1.4.3 (**.**.2025)
===================

Feature
-------

- Added stagger_logging functionality to logtables.
- Allow condition for experimenter.get_table() and experimenter.get_logtable()

Fix
===

- Fix bug, where the logtable_name was not overwritten by `table_name` updates in the `PyExperimenter` class.

v1.4.2 (12.06.2024)
===================
Expand Down
5 changes: 5 additions & 0 deletions config/example_database_credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ CREDENTIALS:
Connection:
Standard:
server: example.mysqlserver.com
use_ssl: some_boolean_value
ssl_params:
ca: config/certificates/ca.crt
cert: config/certificates/user_cert.crt
key: config/certificates/user_private_key.key
Ssh:
server: example.sshmysqlserver.com (address from ssh server)
address: example.sslserver.com
Expand Down
558 changes: 272 additions & 286 deletions docs/source/examples/example_logtables.ipynb

Large diffs are not rendered by default.

24 changes: 23 additions & 1 deletion docs/source/usage/database_credential_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,29 @@ Below is an example of a database credential file, that connects to a server wit
Standard:
server: example.mysqlserver.com

However, for security reasons, databases might only be accessible from a specific IP address. In these cases, one can use an ssh jumphost. This means that ``PyExperimenter`` will first connect to the ssh server
We additionally also support utilizing encrypted connections with (m)tls. To that end, the following parameters can be added to the ``Standard`` section of the database credential file
- ``use_ssl``: a boolean value indicating whether to use ssl
- ``ssl_params``: a dictionary containing the following keys:
- ``ca``: the path to the ca certificate (optional, needed if the database server uses a custom ca certificate not trusted by the client)
- ``cert``: the path to the user certificate (optional, needed in case of client authentication with mtls)
- ``key``: the path to the user private key (optional, needed in case of client authentication with mtls)

.. code-block:: yaml

CREDENTIALS:
Database:
user: example_user
password: example_password
Connection:
Standard:
server: example.mysqlserver.com
use_ssl: some_boolean_value
ssl_params:
ca: config/certificates/ca.crt
cert: config/certificates/user_cert.crt
key: config/certificates/user_private_key.key

Alternatively, for security reasons, databases might only be accessible from a specific IP address. In these cases, one can use an ssh jumphost. This means that ``PyExperimenter`` will first connect to the ssh server
that has access to the database and then connect to the database server from there. This is done by adding an additional ``Ssh`` section to the database credential file, and can be activated either by a ``PyExperimenter`` keyword argument or in the :ref:`experimenter configuration file <experiment_configuration_file>`.
The following example shows how to connect to a database server using an SSH server with the address ``ssh_hostname`` and the port ``optional_ssh_port``.

Expand Down
Loading
Loading