datalad / datalad-ria

Adds functionality for RIA stores to DataLad
http://datalad.org
Other
0 stars 1 forks source link

Stephan's attempt at figuring stuff out #54

Open jsheunis opened 1 year ago

jsheunis commented 1 year ago

Context

In an attempt to become skilled enough to eventually contribute usefully to this extension's codebase, I will try to figure out as much as I can from existing RIA code in core, as well as all the open issues in this current repo. I will document my findings here.

Sources

Let's start with what I could find as sources of information about RIA, including the codebase:

adswa commented 1 year ago

Code @ datalad/customremotes/ria_utils.py - perhaps this is still used as helper code elsewhere?

Yes, the functions in this file are heavily used, and most of the ria functionality relies on (some of) them.

jsheunis commented 12 months ago

Getting tests to run on a Mac

Noting the steps that I followed to get tests (at state: https://github.com/datalad/datalad-ria/commit/771feb6b0122da46f21abc37f65ad7b05901492d) to succeed locally.

1. Make sure SSH keys correctly set up for connecting to localhost

# 1. Check extisting ssh config, specifically the identity file
>> cat ~/.ssh/config

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

# 2. Add identity to ssh-agent
>> ssh-add -K ~/.ssh/id_ed25519

Identity added: /Users/jsheunis/.ssh/id_ed25519 (s.heunis@fz-juelich.de)

# 3. Add identify public key to authorized keys
>> cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys

# 4. set user/owner access permissions
>> chmod 700 ~/.ssh
>> chmod 600 ~/.ssh/authorized_keys

2. Start a local ssh server

3. Run tests

(after datalad-ria installation in a local virtual environment)

python -m pytest -s -vv datalad_ria/tests