Skip to content

Conversation

@pomegranited
Copy link
Contributor

Creates pypi-publish.yml using the procedure recommended by edx-platform.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jul 20, 2023
@openedx-webhooks
Copy link

Thanks for the pull request, @pomegranited! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@pomegranited
Copy link
Contributor Author

pomegranited commented Jul 20, 2023

Hi @ormsbee CC @bradenmacdonald :)

Are we ready to push version 0.1.0 of this package to pypi? This is needed by openedx/edx-platform#32661

@pomegranited pomegranited requested a review from ormsbee July 20, 2023 00:23
@ormsbee
Copy link
Contributor

ormsbee commented Jul 20, 2023

@pomegranited: Before you do this, could you please remove the lines I added around supporting the COMPRESSED row format and test? It turns out that AWS Aurora does not support COMPRESSED in its MySQL implementation.

Table creation should default to DYNAMIC without that, which should be okay from the index size point of view. So just deleting it and the one line that calls it would be sufficient.

(I can also do this, but I wouldn't get around to it until tomorrow).

@pomegranited
Copy link
Contributor Author

Sure thing @ormsbee , I've merged #66

Anything else that we should fix before releasing this? Feel free to merge and watch the magic happen if we're ready :)

run: python setup.py sdist bdist_wheel

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just passing by :)

Nit: the master branch of this action has been sunset. We should use release/v1 instead. We could also update the checkout to v3 and setup-python to v4.

Side note: I personally like adding a Python package check to the CI to verify if the pypi-publish action will succeed (it can fail even due to bad formatting of the README or the changelog). You can do this by adding the following snippet to tox.ini:

[testenv:package]
deps =
    build
    twine
commands =
    python -m build
    twine check dist/*

Then, adding it to the CI is only a matter of adding package to the toxenv in .github/workflows/ci.yml.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brilliant @Agrendalath , thank you for your timely suggestions :) Addressed with acbb66f.

@bradenmacdonald
Copy link
Contributor

On a related note (non-blocking!), is there some Open edX policy of sticking with setup.py and all the separate tooling files instead of a consolidated pyproject.toml ? I'm starting to see warnings from pip when installing packages like this that haven't migrated to pyproject.toml.

@ormsbee
Copy link
Contributor

ormsbee commented Jul 20, 2023

@bradenmacdonald: I think it's less of a policy issue and more of a "that's what cookiecutter spits out and updating things isn't high on the priority list". @jmbowman would likely know if there were any plans in that area, but I don't think there would be any objections if we started using pyproject.toml?

@jmbowman
Copy link

Mainly we haven't gotten around to it yet (and aren't feeling a lot of pain around setup.py usage). There are a handful of repositories in both the edx and openedx orgs already using pyproject.toml, I'm totally up for a discovery ticket to figure out the best process to start switching things over. The one thing that might be at least a short term blocker is figuring out how to make OEP-18 work correctly without custom Python functions in setup.py.

@bradenmacdonald
Copy link
Contributor

I see, thanks for the info @ormsbee and @jmbowman

The one thing that might be at least a short term blocker is figuring out how to make OEP-18 work correctly without custom Python functions in setup.py.

While only the version field supports actual python code to compute its value, the dependencies field does allow you to load its value from a file which is in the requirements.txt format. Though it says something about not supporting comments, which may be an issue.

@pomegranited
Copy link
Contributor Author

Cool, thanks for your input here everyone!

I'm totally up for a discovery ticket to figure out the best process to start switching things over.

👍 to this -- happy to help trial the approach when you get a chance to plan one.

If there's nothing else that needs fixing here before we merge, do you want to do the honors @ormsbee ? 🚀

@pomegranited pomegranited merged commit 0b75bda into main Jul 24, 2023
@pomegranited pomegranited deleted the pypi branch July 24, 2023 03:21
@openedx-webhooks
Copy link

@pomegranited 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@pomegranited
Copy link
Contributor Author

pomegranited commented Jul 24, 2023

Hmm.. merged, but no package run: https://github.com/openedx/openedx-learning/actions/workflows/pypi-publish.yml
Maybe it only applies for PRs merged after this one?

@pomegranited
Copy link
Contributor Author

@Agrendalath Do you happen to know why merging this didn't publish a pypi package? Do I need to create a release or something? cf FAL-3410

@pomegranited
Copy link
Contributor Author

@Agrendalath Nevermind, I worked it out :) Just had to push a new tag, and it did it! https://pypi.org/project/openedx-learning/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants