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

Deploy to PyPi #6

Closed
tsalo opened this issue Dec 22, 2020 · 12 comments
Closed

Deploy to PyPi #6

tsalo opened this issue Dec 22, 2020 · 12 comments

Comments

@tsalo
Copy link
Member

tsalo commented Dec 22, 2020

We'll want to deploy to PyPi to make it easier to use this package in tedana and other tools.

@tsalo
Copy link
Member Author

tsalo commented Jan 8, 2021

I'm fine using auto or the deploy GitHub Action (which should operate similarly to how we currently have tedana set up), but if we go with auto then someone else will have to set it up.

@eurunuela
Copy link
Collaborator

I think the "tedana approach" is easier, but I could try to set up auto if you like it better.

@tsalo
Copy link
Member Author

tsalo commented Jan 11, 2021

Sounds good to me. We'll use a GitHub Action that mimics tedana's approach then. I want to hold off on actually making any releases until we're sure about not merging into sklearn or nilearn though.

@tsalo
Copy link
Member Author

tsalo commented Mar 15, 2021

Now that #36 has been merged, I think we can release. We will need to deploy the first release manually, I think, based on recent experience with rapidtide. I can do that this week if we're all happy with things.

@eurunuela
Copy link
Collaborator

I'm happy with things. I say we deploy. Wbu @notZaki ?

@notZaki
Copy link
Collaborator

notZaki commented Mar 15, 2021

Sounds good to me.

GPL might be an obstacle for this being useful for tedana, but that can be tackled later.

@tsalo
Copy link
Member Author

tsalo commented Mar 15, 2021

Awesome! I just noticed a couple of small things in the pyproject.toml file, so I'll try to clean up the distribution files in a final PR, and then we can release 0.0.1!

@tsalo
Copy link
Member Author

tsalo commented Mar 15, 2021

I'm getting an error with python -m build:

Traceback (most recent call last):
  File "/opt/miniconda3/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 280, in <module>
    main()
  File "/opt/miniconda3/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 263, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/opt/miniconda3/lib/python3.8/site-packages/pep517/in_process/_in_process.py", line 204, in build_wheel
    return _build_backend().build_wheel(wheel_directory, config_settings,
  File "/var/folders/ph/w3cbhj9n16s9bx4l7gq3dq6m0000gn/T/build-env-ek0k7r0e/lib/python3.8/site-packages/setuptools/build_meta.py", line 176, in build_wheel
    shutil.copytree('dist', wheel_directory)
  File "/opt/miniconda3/lib/python3.8/shutil.py", line 552, in copytree
    with os.scandir(src) as itr:
FileNotFoundError: [Errno 2] No such file or directory: 'dist'
Traceback (most recent call last):
  File "/opt/miniconda3/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/var/folders/ph/w3cbhj9n16s9bx4l7gq3dq6m0000gn/T/build-env-ek0k7r0e/bin/python', '/opt/miniconda3/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'build_wheel', '/var/folders/ph/w3cbhj9n16s9bx4l7gq3dq6m0000gn/T/tmpxbgdolqp']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/miniconda3/lib/python3.8/site-packages/build/__init__.py", line 309, in _call_backend
    raise BuildBackendException(exception)
build.BuildBackendException: Backend operation failed: CalledProcessError(1, ['/var/folders/ph/w3cbhj9n16s9bx4l7gq3dq6m0000gn/T/build-env-ek0k7r0e/bin/python', '/opt/miniconda3/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'build_wheel', '/var/folders/ph/w3cbhj9n16s9bx4l7gq3dq6m0000gn/T/tmpxbgdolqp'])

ERROR Backend operation failed: CalledProcessError(1, ['/var/folders/ph/w3cbhj9n16s9bx4l7gq3dq6m0000gn/T/build-env-ek0k7r0e/bin/python', '/opt/miniconda3/lib/python3.8/site-packages/pep517/in_process/_in_process.py', 'build_wheel', '/var/folders/ph/w3cbhj9n16s9bx4l7gq3dq6m0000gn/T/tmpxbgdolqp'])

@tsalo
Copy link
Member Author

tsalo commented Mar 15, 2021

Okay, wait a second... it looks like it deployed when I made the rc release! So yay! 🎉

But also the README doesn't render correctly on the website because it's MarkDown I guess. I know that came up somewhere recently but I can't remember where exactly.

EDIT: I want to add you both to the project on PyPi. Do you have PyPi usernames?

@notZaki
Copy link
Collaborator

notZaki commented Mar 15, 2021

I think adding long_description_content_type='text/markdown' into setup.py might fix the readme? That's what tedana has anyways.

EDIT: Just made a pypi account: notzaki

@eurunuela
Copy link
Collaborator

Thanks @tsalo ! I'm eurunuela on pypi. I'll have a look at the README tomorrow if you still haven't figured it out.

@tsalo
Copy link
Member Author

tsalo commented Mar 15, 2021

I'm eurunuela on pypi.

Thanks!

I'll have a look at the README tomorrow if you still haven't figured it out.

It's all good now. We also have 0.0.1, so I'm going to close this issue.

@tsalo tsalo closed this as completed Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants