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

Scribe-Data pip to usable CLI deployment #149

Open
2 tasks done
andrewtavis opened this issue Jun 7, 2024 · 14 comments
Open
2 tasks done

Scribe-Data pip to usable CLI deployment #149

andrewtavis opened this issue Jun 7, 2024 · 14 comments
Assignees
Labels
feature New feature or request

Comments

@andrewtavis
Copy link
Member

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 andrewtavis added the feature New feature or request label Jun 7, 2024
@mhmohona
Copy link
Member

mhmohona commented Jun 7, 2024

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

@andrewtavis
Copy link
Member Author

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
Copy link
Member Author

andrewtavis commented Jun 22, 2024

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!

@mhmohona
Copy link
Member

mhmohona commented Jul 3, 2024

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.

@andrewtavis
Copy link
Member Author

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:

@andrewtavis
Copy link
Member Author

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 😊

@mhmohona
Copy link
Member

mhmohona commented Jul 3, 2024

Great! Thank you.

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

@andrewtavis
Copy link
Member Author

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

@andrewtavis
Copy link
Member Author

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

@mhmohona
Copy link
Member

mhmohona commented Jul 3, 2024

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.

@andrewtavis
Copy link
Member Author

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 😊

@mhmohona
Copy link
Member

mhmohona commented Jul 3, 2024

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?

@andrewtavis
Copy link
Member Author

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 😊

@mhmohona
Copy link
Member

mhmohona commented Jul 4, 2024

That would be really great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

2 participants