ME-ICA / mapca

A Python implementation of the moving average principal components analysis methods from GIFT
GNU General Public License v2.0
6 stars 8 forks source link

Deploy to PyPi #6

Closed tsalo closed 3 years ago

tsalo commented 3 years ago

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

tsalo commented 3 years ago

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 commented 3 years ago

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

tsalo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

notZaki commented 3 years ago

Sounds good to me.

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

tsalo commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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.