diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47d6c47..a7d1b94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: id: release uses: python-semantic-release/python-semantic-release@v10.5.3 with: - github_token: ${{ secrets.AI_BADGES_GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} git_committer_name: "github-actions" git_committer_email: "github-actions@github.com" changelog: "false" diff --git a/CHANGELOG.rst b/CHANGELOG.rst deleted file mode 100644 index 8270e0f..0000000 --- a/CHANGELOG.rst +++ /dev/null @@ -1,17 +0,0 @@ -Change Log -########## - -.. - All enhancements and patches to openedx_ai_badges 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 -********** - -* diff --git a/README.rst b/README.rst index 31f404e..9167635 100644 --- a/README.rst +++ b/README.rst @@ -120,7 +120,7 @@ You must manually register the badges UI package in your MFE configuration (For dist: 'src', }, { - moduleName: '@openedx/openedx-ai-badges-ui', + moduleName: '@openedx/openedx-ai-badges', dir: path.resolve(__dirname, '../openedx-ai-badges/frontend'), dist: 'src', }, @@ -131,7 +131,7 @@ You must manually register the badges UI package in your MFE configuration (For .. code-block:: javascript - import '@openedx/openedx-ai-badges-ui'; + import '@openedx/openedx-ai-badges'; **2. Backend Development** diff --git a/backend/openedx_ai_badges/__init__.py b/backend/openedx_ai_badges/__init__.py index a3350b4..20b9e8a 100644 --- a/backend/openedx_ai_badges/__init__.py +++ b/backend/openedx_ai_badges/__init__.py @@ -1,5 +1,7 @@ """ -A experimental plugin for Open edX designed to explore AI extensibility. +A sample backend plugin for the Open edX Platform. """ -__version__ = "1.6.1" +from importlib.metadata import version as get_version + +__version__ = get_version(__package__) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d3bca02..0518939 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { - "name": "@openedx/openedx-ai-badges-ui", - "version": "1.1.0", + "name": "@openedx/openedx-ai-badges", + "version": "__semantically__released__", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@openedx/openedx-ai-badges-ui", - "version": "1.1.0", + "name": "@openedx/openedx-ai-badges", + "version": "__semantically__released__", "license": "Apache-2.0", "dependencies": { "prop-types": "^15.8.1", diff --git a/frontend/package.json b/frontend/package.json index a74df4e..ab4586d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { - "name": "@openedx/openedx-ai-badges-ui", - "version": "1.6.1", + "name": "@openedx/openedx-ai-badges", + "version": "__semantically__released__", "description": "AI Badges UI component for Open edX utilizing Frontend Plugin Framework", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/pyproject.toml b/pyproject.toml index 2929380..f156b42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,20 +49,22 @@ Issues = "https://github.com/openedx/openedx-ai-badges/issues" Changelog = "https://github.com/openedx/openedx-ai-badges/blob/main/CHANGELOG.rst" Community = "https://discuss.openedx.org" -# hatch-specific configuration -[tool.hatch.metadata.hooks.custom] -path = "tutor/.hatch_build.py" - [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" +[tool.hatch.version] +source = "vcs" + +[tool.hatch.version.raw-options] +version_scheme = "only-version" +local_scheme = "no-local-version" + [tool.hatch.build.targets.sdist] # Disable strict naming, otherwise twine is not able to detect name/version strict-naming = false include = [ "/tutor/openedx_ai_badges", - "/tutor/.hatch_build.py", "/backend", "/frontend" ] @@ -97,3 +99,4 @@ deps = commands = sphinx-build -b html -W --keep-going . _build/html """ + diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 97047af..0000000 --- a/setup.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[bumpversion] -current_version = 1.6.1 -commit = False -tag = False - -[bumpversion:file:backend/openedx_ai_badges/__init__.py] - -[bumpversion:file:frontend/package.json] - -[bumpversion:file:tutor/openedx_ai_badges/__about__.py] diff --git a/tutor/.hatch_build.py b/tutor/.hatch_build.py deleted file mode 100644 index c3b22c2..0000000 --- a/tutor/.hatch_build.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Build hook to read version from __about__.py -""" - -import os - -from hatchling.metadata.plugin.interface import MetadataHookInterface - - -class CustomMetadataHook(MetadataHookInterface): - """ - Custom hook to read version from __about__.py - """ - - def update(self, metadata: dict) -> None: - """ - Update the version metadata from __about__.py - """ - here = os.path.dirname(__file__) - about = {} - with open(os.path.join(here, "openedx_ai_badges", "__about__.py"), encoding="utf-8") as f: - exec(f.read(), about) # pylint: disable=exec-used - metadata["version"] = about["__version__"] diff --git a/tutor/openedx_ai_badges/__about__.py b/tutor/openedx_ai_badges/__about__.py deleted file mode 100644 index f49459c..0000000 --- a/tutor/openedx_ai_badges/__about__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "1.6.1" diff --git a/tutor/openedx_ai_badges/patches/mfe-env-config-runtime-definitions-authoring b/tutor/openedx_ai_badges/patches/mfe-env-config-runtime-definitions-authoring index 6cba301..87da1d9 100644 --- a/tutor/openedx_ai_badges/patches/mfe-env-config-runtime-definitions-authoring +++ b/tutor/openedx_ai_badges/patches/mfe-env-config-runtime-definitions-authoring @@ -1 +1 @@ -await import("@openedx/openedx-ai-badges-ui"); +await import("@openedx/openedx-ai-badges");