Scribe-Data icon indicating copy to clipboard operation
Scribe-Data copied to clipboard

Scribe-Data pip to usable CLI deployment

Open andrewtavis opened this issue 1 year ago β€’ 14 comments
trafficstars

Terms

Description

This issue would investigate and do a deployment of Scribe-Data toPyPI such that when the package is installed it's directly accessible as a CLI. We'll use this issue first to do some research on how best to do this, and once it's done we can implement the decided on changes that need to be made :)

Contribution

@mhmohona will be working on this as a part of GSoC 2024 β˜€οΈ Please write in here so I can assign, and let us know how we can support with research and implementation!

andrewtavis avatar Jun 07 '24 21:06 andrewtavis

After pip, I want to work on conda package as well.

mhmohona avatar Jun 07 '24 23:06 mhmohona

I'll make an issue for that as well! We need to think about a unified way of deployment though, as we're talking four different directories now. Might be nice if we made an action for that that would use some secrets to do the deployments to each :)

andrewtavis avatar Jun 08 '24 07:06 andrewtavis

I think that this issue could potentially be done, @mhmohona, but we'll have to see post deployment if your change of...

    entry_points={
        "console_scripts": [
            "scribe-data=scribe_data.cli.main:main",
        ],
    }

... works after the next deployment :) Let's give this a check once we've released and we can then try to pip install and check if the CLI works! Hope so!

andrewtavis avatar Jun 22 '24 19:06 andrewtavis

I am going through the official documentation for submitting package for PyPI. For this they suggested to upload our package in Test PyPI first, and then in actual PyPI. Then let me upload it in Test PyPI first, and I will let know how things go.

mhmohona avatar Jul 03 '24 12:07 mhmohona

Hey @mhmohona πŸ‘‹ I think that ultimately we should have most of this done right now :) Scribe-Data already is on pip. The only question is whether the user will be able to use it directly after pip installing it :)

We didn't yet give you direction on next steps... Issues I'd suggest would be:

  • #150
  • #144
  • #125 (in case some of the functionality isn't working, or can we close this?)
  • And I'm realizing that we have #152 for deployment documentation, but we also need usability documentation
    • Should I make an issue for this and you could work on that too, seeing as how we're not using update_data.py anymore?

andrewtavis avatar Jul 03 '24 14:07 andrewtavis

As far as this issue is concerned, we'll basically just check to see if it works after the next release, and if it does we'll close this, and if not we'll go back to the drawing board 😊

andrewtavis avatar Jul 03 '24 14:07 andrewtavis

Great! Thank you.

Another thing is we should implement test for CLI, shouldn't we? Will you please guide me regarding it?

mhmohona avatar Jul 03 '24 15:07 mhmohona

Sure thing, we can definitely discuss this in the next sync! I'll make the issue to document the CLI :)

andrewtavis avatar Jul 03 '24 16:07 andrewtavis

#165 was made for the usage documentation, @mhmohona :)

andrewtavis avatar Jul 03 '24 16:07 andrewtavis

So I just checked for this part -

The only question is whether the user will be able to use it directly after pip installing it :)

no, it doesnt work. :( I mean the in a fresh device, after installing scribe-data, scribe-data list command doesnt work yet. Then there is still I need to work on.

mhmohona avatar Jul 03 '24 21:07 mhmohona

Hey @mhmohona πŸ‘‹ We haven't deployed the new changes yet, so it wouldn't work yet :) When you pip install Scribe-Data now you're getting the currently deployed version 3.3, which doesn't have any of the CLI changes. Once we document it a bit, we should be good to do a release and see if this works. Specifically as well, we need to document and do #165 before this one, as what it is that we put in the readme is what's going to be on the PyPI page for Scribe-Data until we release again - i.e. we can't edit the PyPI documentation itself, it can only be done during a release. We can of course do a patch release to fix some things on PyPI though 😊

andrewtavis avatar Jul 03 '24 21:07 andrewtavis

Oh alright. Got it. Thank you so much for explaining all the details. Just one more thing, when you are saying we haven't deployed it yet, do you mean it hasn't been deployed in Docker?

mhmohona avatar Jul 03 '24 21:07 mhmohona

I means it hasn't been deployed to PyPI :) We can even deploy together when the time comes, if you'd like to see how it works, but here are the steps I follow when I deploy Scribe-Data to PyPI:

# Change the version number inΒ setup.py and conf.py in the docs.
# So in this case we'd change it to 4.0.0.
# Run setup file again to build for deployment:
python setup.py bdist_wheel
# Run twine to upload, and indicate that we should only upload the most recent version:
twine upload --skip-existing dist/*
User name: __token__  # we actully enter __token__ to tell it we're using an upload token
Password: MY_API_KEY  # the API key I have for PyPI

Let me know if you have further questions! Would be happy to do the deployment in a sync or another call so you can see how it's done, if that would be of interest 😊

andrewtavis avatar Jul 03 '24 22:07 andrewtavis

That would be really great!

mhmohona avatar Jul 04 '24 03:07 mhmohona

Via feedback from @mhmohona, we're good to go here as the v4.0.0 release is working fine 😊 Thanks @mhmohona and all for the amazing work of getting us to this point! πŸš€

andrewtavis avatar Nov 28 '24 19:11 andrewtavis