RMI-PACTA / pactaCore

Tools to Calculate Climate Targets for Equity and Corporate Bond Portfolios
Other
0 stars 1 forks source link

Encrypt snapshots #69

Closed maurolepore closed 3 years ago

maurolepore commented 3 years ago

Compared to #68 this alternative PR allows sharing private snapshots between privileged developers. This is important to reproduce failing tests.

This PR encrypts snapshots (e.g.). It's an alternative to #68, which instead ignores them. Ignoring snapshots seems simpler but I think it has a major problem: It's not useful to reproduce failing regression tests except your own -- which largely defeats the purpose of snapshot tests.

Encryption seems more complex but git-crypt is actually easy to setup, and once done the workflow does not change at all:

After cloning a repository with encrypted files, unlock with:

git-crypt unlock /path/to/keyfile
maurolepore commented 3 years ago

The errors I see are caused by the encryption. Even though we skip all snapshot tests on CI, testthat still seems to try interpret the content of the snapshot and fails because instead of text if finds a an encrypted file. I need to figure this out.

maurolepore commented 3 years ago

Favour #70