diff --git a/backend/MANIFEST.in b/backend/MANIFEST.in deleted file mode 100644 index e10fcc6..0000000 --- a/backend/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -include LICENSE.txt -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/docs/conf.py b/backend/docs/conf.py index 798bfce..446cb06 100644 --- a/backend/docs/conf.py +++ b/backend/docs/conf.py @@ -522,8 +522,8 @@ def on_init(app): # pylint: disable=unused-argument # If we are, assemble the path manually bin_path = os.path.abspath(os.path.join(sys.prefix, 'bin')) apidoc_path = os.path.join(bin_path, apidoc_path) - check_call([apidoc_path, '-o', docs_path, os.path.join(root_path, 'sample_plugin'), - os.path.join(root_path, 'sample_plugin/migrations')]) + check_call([apidoc_path, '-o', docs_path, os.path.join(root_path, 'src/sample_plugin'), + os.path.join(root_path, 'src/sample_plugin/migrations')]) def setup(app): diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 96d1c47..7b720df 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -6,7 +6,8 @@ build-backend = "setuptools.build_meta" name = "openedx-sample-plugin" description = "A sample backend plugin for the Open edX Platform" requires-python = ">=3.12" -license="Apache-2.0" +license = "Apache-2.0" +license-files = ["LICENSE*"] authors = [ {name = "Open edX Project", email = "oscm@openedx.org"}, ] @@ -91,12 +92,14 @@ dev = [ "edx-i18n-tools", ] +[tool.setuptools] +include-package-data = true + [tool.setuptools.dynamic] readme = {file = ["README.md"], content-type = "text/markdown" } [tool.setuptools.packages.find] -include = ["sample_plugin*"] -exclude = ["sample_plugin.tests*"] +where = ["src"] [tool.semantic_release] # We use SETUPTOOLS_SCM_PRETEND_VERSION to pull the version from python-semantic-release instead diff --git a/backend/sample_plugin/__init__.py b/backend/src/sample_plugin/__init__.py similarity index 100% rename from backend/sample_plugin/__init__.py rename to backend/src/sample_plugin/__init__.py diff --git a/backend/sample_plugin/apps.py b/backend/src/sample_plugin/apps.py similarity index 100% rename from backend/sample_plugin/apps.py rename to backend/src/sample_plugin/apps.py diff --git a/backend/sample_plugin/conf/locale/config.yaml b/backend/src/sample_plugin/conf/locale/config.yaml similarity index 100% rename from backend/sample_plugin/conf/locale/config.yaml rename to backend/src/sample_plugin/conf/locale/config.yaml diff --git a/backend/sample_plugin/migrations/0001_initial.py b/backend/src/sample_plugin/migrations/0001_initial.py similarity index 100% rename from backend/sample_plugin/migrations/0001_initial.py rename to backend/src/sample_plugin/migrations/0001_initial.py diff --git a/backend/sample_plugin/migrations/__init__.py b/backend/src/sample_plugin/migrations/__init__.py similarity index 100% rename from backend/sample_plugin/migrations/__init__.py rename to backend/src/sample_plugin/migrations/__init__.py diff --git a/backend/sample_plugin/models.py b/backend/src/sample_plugin/models.py similarity index 100% rename from backend/sample_plugin/models.py rename to backend/src/sample_plugin/models.py diff --git a/backend/sample_plugin/pipeline.py b/backend/src/sample_plugin/pipeline.py similarity index 100% rename from backend/sample_plugin/pipeline.py rename to backend/src/sample_plugin/pipeline.py diff --git a/backend/src/sample_plugin/py.typed b/backend/src/sample_plugin/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/backend/sample_plugin/serializers.py b/backend/src/sample_plugin/serializers.py similarity index 100% rename from backend/sample_plugin/serializers.py rename to backend/src/sample_plugin/serializers.py diff --git a/backend/sample_plugin/settings/common.py b/backend/src/sample_plugin/settings/common.py similarity index 100% rename from backend/sample_plugin/settings/common.py rename to backend/src/sample_plugin/settings/common.py diff --git a/backend/sample_plugin/settings/production.py b/backend/src/sample_plugin/settings/production.py similarity index 100% rename from backend/sample_plugin/settings/production.py rename to backend/src/sample_plugin/settings/production.py diff --git a/backend/sample_plugin/settings/test.py b/backend/src/sample_plugin/settings/test.py similarity index 100% rename from backend/sample_plugin/settings/test.py rename to backend/src/sample_plugin/settings/test.py diff --git a/backend/sample_plugin/signals.py b/backend/src/sample_plugin/signals.py similarity index 100% rename from backend/sample_plugin/signals.py rename to backend/src/sample_plugin/signals.py diff --git a/backend/sample_plugin/templates/sample_plugin/base.html b/backend/src/sample_plugin/templates/sample_plugin/base.html similarity index 100% rename from backend/sample_plugin/templates/sample_plugin/base.html rename to backend/src/sample_plugin/templates/sample_plugin/base.html diff --git a/backend/sample_plugin/urls.py b/backend/src/sample_plugin/urls.py similarity index 100% rename from backend/sample_plugin/urls.py rename to backend/src/sample_plugin/urls.py diff --git a/backend/sample_plugin/views.py b/backend/src/sample_plugin/views.py similarity index 100% rename from backend/sample_plugin/views.py rename to backend/src/sample_plugin/views.py diff --git a/backend/tox.ini b/backend/tox.ini index fc3361b..9523b16 100644 --- a/backend/tox.ini +++ b/backend/tox.ini @@ -76,11 +76,11 @@ allowlist_externals = touch commands = touch tests/__init__.py - pylint sample_plugin tests test_utils manage.py + pylint src/sample_plugin tests test_utils manage.py rm tests/__init__.py - pycodestyle sample_plugin tests manage.py - pydocstyle sample_plugin tests manage.py - isort --check-only --diff tests test_utils sample_plugin manage.py test_settings.py + pycodestyle src/sample_plugin tests manage.py + pydocstyle src/sample_plugin tests manage.py + isort --check-only --diff tests test_utils src/sample_plugin manage.py test_settings.py make selfcheck [testenv:pii_check] diff --git a/tutor/pyproject.toml b/tutor/pyproject.toml index 00e8877..2852ef6 100644 --- a/tutor/pyproject.toml +++ b/tutor/pyproject.toml @@ -7,6 +7,7 @@ name = "tutor-contrib-sample-plugin" description = "Tutor plugin for the Open edX Sample Plugin" requires-python = ">=3.11" license = "Apache-2.0" +license-files = ["LICENSE*"] authors = [ {name = "Open edX Project", email = "oscm@openedx.org"}, ]