Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computer setup: proposed configure command does not include profile #4679

Closed
ltalirz opened this issue Jan 26, 2021 · 6 comments · Fixed by #5259
Closed

Computer setup: proposed configure command does not include profile #4679

ltalirz opened this issue Jan 26, 2021 · 6 comments · Fixed by #5259
Labels
good first issue Issues that should be relatively easy to fix also for beginning contributors topic/computers type/feature request status undecided
Milestone

Comments

@ltalirz
Copy link
Member

ltalirz commented Jan 26, 2021

Is your feature request related to a problem? Please describe

When configuring a new computer, the command proposes to configure the computer next

(aiida) ubuntu@qmobile:~$ verdi -p failed-mofs-2021-01-14 computer setup --config aiida-code-registry/daint.cscs.ch/multicore/computer-setup.yaml
Success: Computer<4> daint-mc created
Info: Note: before the computer can be used, it has to be configured with the command:
Info:   verdi computer configure ssh daint-mc

However, this command is only correct, if the computer is to be configured on the default AiiDA profile.

Describe the solution you'd like

In order to be able to just copy-paste this command, there should be a check on whether the setup command is being run on the default AiiDA profile, and the proposed command should provide the AiiDA profile parameter (if needed).

@ltalirz ltalirz added good first issue Issues that should be relatively easy to fix also for beginning contributors type/feature request status undecided labels Jan 26, 2021
@kenkirito
Copy link

can i work on this

@lkbhitesh07
Copy link

Hello @ltalirz , I would like to work, but while setting up the environment I'm getting this error, will you please help me out.
Thanks

Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/ht/opensource/aiida-core
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /home/ht/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp3op_m41n
       cwd: /home/ht/opensource/aiida-core
  Complete output (10 lines):
  Traceback (most recent call last):
    File "/home/ht/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/home/ht/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/ht/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 108, in get_requires_for_build_wheel
      backend = _build_backend()
    File "/home/ht/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 99, in _build_backend
      obj = getattr(obj, path_part)
  AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
  ----------------------------------------
WARNING: Discarding file:///home/ht/opensource/aiida-core. Command errored out with exit status 1: /usr/bin/python3 /home/ht/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp3op_m41n Check the logs for full command output.
ERROR: Command errored out with exit status 1: /usr/bin/python3 /home/ht/.local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp3op_m41n Check the logs for full command output.

@ltalirz
Copy link
Member Author

ltalirz commented Mar 4, 2021

Hey @lkbhitesh07
hm ... I think you've hit pypa/setuptools#1694 (comment)

Maybe try pypa/setuptools#1694 (comment)

I haven't heard of this in a while but we might want to have a look back at changing the pyproject.toml setup.

Also, for next time please consider opening a new issue in case you encounter problems like this (since it is not related to this particular thread).

Cheers!

@lkbhitesh07
Copy link

Hello @ltalirz, As far as I understand that we need to check the setup command, is it running on the default aiida profile or another profile but I'm confused on how to approach this particular issue, where should we look at to filter if we need default aiida profile or other.
Thanks

@ltalirz
Copy link
Member Author

ltalirz commented Mar 5, 2021

hey @lkbhitesh07 , I believe this is available from the "context", which is also passed to the "computer setup" command.
See e.g.

profile = ctx.params['profile'].name

@lkbhitesh07
Copy link

I'm trying to figure it out for past one hour that what's happening and how to fix it but unfortunately I'm not being able to do it, sorry for that. Incase @ltalirz you get some time will you please explain me what should I do as this codebase is totally new.
Thanks

unkcpz added a commit to unkcpz/aiida-core that referenced this issue Dec 9, 2021
Fixes aiidateam#4679

When setup computer for not the current profile by `-p <profile>`, the proposed message for
computer configure command does not contain this profile name, which lead to the copy
paste of the proposed message for configure commad not apply to the correct profile.
We read the profile name from ctx.obj and pass it to the proposed configere message.

- Some of unittests in test_computer.py are moved to pytest.
@sphuber sphuber added this to the v2.0.0 milestone Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that should be relatively easy to fix also for beginning contributors topic/computers type/feature request status undecided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants