NLeSC / python-template

Netherlands eScience Center Python Template
https://research-software-directory.org/software/nlesc-python-template
Apache License 2.0
164 stars 74 forks source link

Fixes authentication confusion #325

Closed apalha closed 1 year ago

apalha commented 1 year ago

Sets the default authentication to ssh. The user is informed of this choice and provides information on how to use other forms of authentication.

Description See above.

Related issues:

Instructions to review the pull request

Create a python-template-test repo on GitHub (will be overwritten if existing)

cd $(mktemp -d --tmpdir py-tmpl-XXXXXX)
cookiecutter -c <pr-branch> https://github.com/<pr-user>/python-template
# Fill with python-template-test info
cd python-template-test
git init
git add --all
git commit -m "First commit"
git remote add origin https://github.com/<you>/python-template-test
git push -u origin main -f
python -m venv env
source env/bin/activate
python -m pip install --upgrade pip setuptools
python -m pip install '.[dev,publishing]'
egpbos commented 1 year ago

I approved the changes, but retriggered the GH Actions workflows, because three of them failed (Windows runs), let's see if they were intermittent failures. Did you check the failures @apalha? Were they related to this PR or something pre-existing?

bvreede commented 1 year ago

I checked the links manually and they seem to work. Don't know why they fail but I've seen that before with this particular workflow...

bvreede commented 1 year ago

Ah, I see it: the links are forwarding, so they work when clicked, but the workflow doesn't catch that.

I did miss that there were some tests failing 😬 don't know about that. It's Windows with Python 3.7 and up:

Edited:

It's an assertion error with this line (57-58) in test_project.py

    pip_output = run([f'{bin_dir}pip3', 'install', '--editable', '.[dev]'], result.project)
    assert pip_output.returncode == 0

This is the error message (as far as I can detect):

ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\~arkupsafe\\_speedups.cp37-win_amd64.pyd'
Consider using the `--user` option or check the permissions.

I propose moving this to a new issue and dealing with it separately.

egpbos commented 1 year ago

@bvreede thanks for looking into that! Indeed deserves its own issue.

egpbos commented 1 year ago

@bvreede do you want to make the issue, or should I?

bvreede commented 1 year ago

See #326 :)

egpbos commented 1 year ago

Thanks!

apalha commented 1 year ago

Just saw this now. Yes, I saw the errors and they were triggered by older links. I see that you already noticed that. Thanks!