From f12d7cf94a60e88e4c06eae6b3e27697dc484451 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 5 Jan 2026 15:19:49 -0500 Subject: [PATCH 1/4] docs: Remove unnecessary docs. We generated a more comprehensive README.md which should also be what is presented on PyPI. And we don't need to keep a changelog in the repo. The releases on PyPI will server as the changelog and those are now automatically generated with python-semantic-release. --- backend/CHANGELOG.rst | 25 ------- backend/MANIFEST.in | 3 +- backend/README.rst | 145 ------------------------------------- backend/docs/changelog.rst | 1 - backend/docs/index.rst | 2 - backend/docs/readme.rst | 1 - backend/pyproject.toml | 2 +- backend/tox.ini | 2 +- 8 files changed, 3 insertions(+), 178 deletions(-) delete mode 100644 backend/CHANGELOG.rst delete mode 100644 backend/README.rst delete mode 100644 backend/docs/changelog.rst delete mode 100644 backend/docs/readme.rst diff --git a/backend/CHANGELOG.rst b/backend/CHANGELOG.rst deleted file mode 100644 index d14e52f..0000000 --- a/backend/CHANGELOG.rst +++ /dev/null @@ -1,25 +0,0 @@ -Change Log -########## - -.. - All enhancements and patches to sample_plugin will be documented - in this file. It adheres to the structure of https://keepachangelog.com/ , - but in reStructuredText instead of Markdown (for ease of incorporation into - Sphinx documentation and the PyPI description). - - This project adheres to Semantic Versioning (https://semver.org/). - -.. There should always be an "Unreleased" section for changes pending release. - -Unreleased -********** - -* - -0.1.0 – 2025-04-11 -********************************************** - -Added -===== - -* First release on PyPI. diff --git a/backend/MANIFEST.in b/backend/MANIFEST.in index c9ac4df..e10fcc6 100644 --- a/backend/MANIFEST.in +++ b/backend/MANIFEST.in @@ -1,6 +1,5 @@ -include CHANGELOG.rst include LICENSE.txt -include README.rst +include README.md include requirements/base.in include requirements/constraints.txt recursive-include sample_plugin *.html *.png *.gif *.js *.css *.jpg *.jpeg *.svg diff --git a/backend/README.rst b/backend/README.rst deleted file mode 100644 index c8515a6..0000000 --- a/backend/README.rst +++ /dev/null @@ -1,145 +0,0 @@ -sample_plugin -############# - -.. note:: - - This README was auto-generated. Maintainer: please review its contents and - update all relevant sections. Instructions to you are marked with - "PLACEHOLDER" or "TODO". Update or remove those sections, and remove this - note when you are done. - -|pypi-badge| |ci-badge| |codecov-badge| |doc-badge| |pyversions-badge| -|license-badge| |status-badge| - -Purpose -******* - -A sample backend plugin for the Open edX Platform - -TODO: The ``README.rst`` file should start with a brief description of the repository and its purpose. -It should be described in the context of other repositories under the ``openedx`` -organization. It should make clear where this fits into the overall Open edX -codebase and should be oriented towards people who are new to the Open edX -project. - -Getting Started with Development -******************************** - -Please see the Open edX documentation for `guidance on Python development`_ in this repo. - -.. _guidance on Python development: https://docs.openedx.org/en/latest/developers/how-tos/get-ready-for-python-dev.html - -Deploying -********* - -TODO: How can a new user go about deploying this component? Is it just a few -commands? Is there a larger how-to that should be linked here? - -PLACEHOLDER: For details on how to deploy this component, see the `deployment how-to`_. - -.. _deployment how-to: https://docs.openedx.org/projects/sample-plugin/how-tos/how-to-deploy-this-component.html - -Getting Help -************ - -Documentation -============= - -PLACEHOLDER: Start by going through `the documentation`_. If you need more help see below. - -.. _the documentation: https://docs.openedx.org/projects/sample-plugin - -(TODO: `Set up documentation `_) - -More Help -========= - -If you're having trouble, we have discussion forums at -https://discuss.openedx.org where you can connect with others in the -community. - -Our real-time conversations are on Slack. You can request a `Slack -invitation`_, then join our `community Slack workspace`_. - -For anything non-trivial, the best path is to open an issue in this -repository with as many details about the issue you are facing as you -can provide. - -https://github.com/openedx/sample-plugin/issues - -For more information about these options, see the `Getting Help `__ page. - -.. _Slack invitation: https://openedx.org/slack -.. _community Slack workspace: https://openedx.slack.com/ - -License -******* - -The code in this repository is licensed under the Apache Software License 2.0 unless -otherwise noted. - -Please see `LICENSE.txt `_ for details. - -Contributing -************ - -Contributions are very welcome. -Please read `How To Contribute `_ for details. - -This project is currently accepting all types of contributions, bug fixes, -security fixes, maintenance work, or new features. However, please make sure -to discuss your new feature idea with the maintainers before beginning development -to maximize the chances of your change being accepted. -You can start a conversation by creating a new issue on this repo summarizing -your idea. - -The Open edX Code of Conduct -**************************** - -All community members are expected to follow the `Open edX Code of Conduct`_. - -.. _Open edX Code of Conduct: https://openedx.org/code-of-conduct/ - -People -****** - -The assigned maintainers for this component and other project details may be -found in `Backstage`_. Backstage pulls this data from the ``catalog-info.yaml`` -file in this repo. - -.. _Backstage: https://backstage.openedx.org/catalog/default/component/sample-plugin - -Reporting Security Issues -************************* - -Please do not report security issues in public. Please email security@openedx.org. - -.. |pypi-badge| image:: https://img.shields.io/pypi/v/sample-plugin.svg - :target: https://pypi.python.org/pypi/sample-plugin/ - :alt: PyPI - -.. |ci-badge| image:: https://github.com/openedx/sample-plugin/actions/workflows/ci.yml/badge.svg?branch=main - :target: https://github.com/openedx/sample-plugin/actions/workflows/ci.yml - :alt: CI - -.. |codecov-badge| image:: https://codecov.io/github/openedx/sample-plugin/coverage.svg?branch=main - :target: https://codecov.io/github/openedx/sample-plugin?branch=main - :alt: Codecov - -.. |doc-badge| image:: https://readthedocs.org/projects/sample-plugin/badge/?version=latest - :target: https://docs.openedx.org/projects/sample-plugin - :alt: Documentation - -.. |pyversions-badge| image:: https://img.shields.io/pypi/pyversions/sample-plugin.svg - :target: https://pypi.python.org/pypi/sample-plugin/ - :alt: Supported Python versions - -.. |license-badge| image:: https://img.shields.io/github/license/openedx/sample-plugin.svg - :target: https://github.com/openedx/sample-plugin/blob/main/LICENSE.txt - :alt: License - -.. TODO: Choose one of the statuses below and remove the other status-badge lines. -.. |status-badge| image:: https://img.shields.io/badge/Status-Experimental-yellow -.. .. |status-badge| image:: https://img.shields.io/badge/Status-Maintained-brightgreen -.. .. |status-badge| image:: https://img.shields.io/badge/Status-Deprecated-orange -.. .. |status-badge| image:: https://img.shields.io/badge/Status-Unsupported-red diff --git a/backend/docs/changelog.rst b/backend/docs/changelog.rst deleted file mode 100644 index 565b052..0000000 --- a/backend/docs/changelog.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../CHANGELOG.rst diff --git a/backend/docs/index.rst b/backend/docs/index.rst index 33865c5..08858a7 100644 --- a/backend/docs/index.rst +++ b/backend/docs/index.rst @@ -13,7 +13,6 @@ Contents: .. toctree:: :maxdepth: 2 - readme getting_started quickstarts/index concepts/index @@ -21,7 +20,6 @@ Contents: testing internationalization modules - changelog decisions references/index diff --git a/backend/docs/readme.rst b/backend/docs/readme.rst deleted file mode 100644 index 72a3355..0000000 --- a/backend/docs/readme.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../README.rst diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 6c464ac..b0558ad 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -37,7 +37,7 @@ Homepage = "https://openedx.org/openedx/sample-plugin" Repository = "https://openedx.org/openedx/sample-plugin" [tool.setuptools.dynamic] -readme = {file = ["README.rst", "CHANGELOG.rst"]} +readme = {file = ["README.md"], content-type = "text/markdown" } dependencies = {file = "requirements/base.in"} [tool.setuptools.packages.find] diff --git a/backend/tox.ini b/backend/tox.ini index 8a4515c..4cb4051 100644 --- a/backend/tox.ini +++ b/backend/tox.ini @@ -55,7 +55,7 @@ allowlist_externals = deps = -r{toxinidir}/requirements/doc.txt commands = - doc8 --ignore-path docs/_build README.rst docs + doc8 --ignore-path docs/_build docs rm -f docs/sample_plugin.rst rm -f docs/modules.rst make -e -C docs clean From f0f0b191ff8aaba2261ac9fffe13f32d668ebfdb Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 5 Jan 2026 15:21:18 -0500 Subject: [PATCH 2/4] build: Remove legacy publishing workflow. This repo now uses python-semantic-release and so it doesn't need to publish on tags, this happens automatically in the `release.yml` workflow. --- .github/workflows/pypi-publish.yml | 31 ------------------------------ 1 file changed, 31 deletions(-) delete mode 100644 .github/workflows/pypi-publish.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml deleted file mode 100644 index 0228119..0000000 --- a/.github/workflows/pypi-publish.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Publish package to PyPi - -on: - release: - types: [published] - -jobs: - push: - runs-on: ubuntu-latest - defaults: - run: - working-directory: "./backend" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: setup python - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - - name: Install pip - run: pip install -r requirements/pip.txt - - - name: Build package - run: python setup.py sdist bdist_wheel - - - name: Publish to PyPi - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_UPLOAD_TOKEN }} From 191d07369de0a916aa3c9ec6d2abcd4b3772966f Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 5 Jan 2026 15:27:17 -0500 Subject: [PATCH 3/4] build: Tag new version on docs changes. --- backend/pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index b0558ad..8a7eab9 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -47,6 +47,11 @@ exclude = ["sample_plugin.tests*"] [tool.semantic_release] build_command = "pip install build && python -m build" +[tool.semantic_release.commit_parser_options] +# Because this repo is meant to be an example, docs changes are relevant +# feature changes and so should produces new releases. +minor_tags = ["feat", "docs"] + [tool.setuptools_scm] # The root for the gith repo is one directory up. root = ".." From e62570c68744d8a4d2c1c9b67ca6455185f957c6 Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 5 Jan 2026 15:50:00 -0500 Subject: [PATCH 4/4] build: Pass in the build version explicitly. This means we're using setuptools_scm in a very dumb and limited way but it does reduce boilerplate files/code in this repo and that project is fairly stable so I think it's fine. Ideally we either switch to a different build system in the future or the setuptools build interface allows for us to override the version number at build time. --- backend/pyproject.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 8a7eab9..fbd0d1e 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -45,7 +45,12 @@ include = ["sample_plugin*"] exclude = ["sample_plugin.tests*"] [tool.semantic_release] -build_command = "pip install build && python -m build" +# We use SETUPTOOLS_SCM_PRETEND_VERSION to pull the version from python-semantic-release instead +# of actually pulling it from version control because the build step happens before the repo gets +# tagged. Setuptools by default doesn't have any way of overriding the version number at build +# time without a setup.py file. This is a fine alternative that reduces the amount of boilerplate +# code and files we need in this repo. +build_command = "pip install build && SETUPTOOLS_SCM_PRETEND_VERSION=$NEW_VERSION python -m build" [tool.semantic_release.commit_parser_options] # Because this repo is meant to be an example, docs changes are relevant