Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cms/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[pytest]
# Note: The first file of settings found is used, there is no combining, so
# this file is used for the tests in the cms tree, and setup.cfg is ignored.
# this file is used for the tests in the cms tree, and pyproject.toml is ignored.
# Details at https://docs.pytest.org/en/latest/reference/customize.html

DJANGO_SETTINGS_MODULE = cms.envs.test
Expand Down
2 changes: 1 addition & 1 deletion common/djangoapps/edxmako/README
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Mako: http://www.makotemplates.org/
How to install?
================================================================================

$ sudo python setup.py install
$ pip install .

2 changes: 1 addition & 1 deletion common/test/pytest.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[pytest]
# Note: The first file of settings found is used, there is no combining, so
# this file is used for the tests in the common/test tree, and setup.cfg is ignored.
# this file is used for the tests in the common/test tree, and pyproject.toml is ignored.
# Details at https://docs.pytest.org/en/latest/reference/customize.html

addopts = -p no:randomly --durations=20 --json-report --json-report-omit keywords streams collectors log traceback tests --json-report-file=none
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/extension_points.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ If you wish to customize aspects of the learner or educator experiences, you'll

Most python plugins are enabled using one of two methods:

1. A Python Entry point: the core Open edX platform provides a standard plugin loading mechanism in |edx_django_utils.plugins|_ which uses `stevedore`_ to find all installed python packages that declare a specific "entry point" in their setup.py file. See the ``entry_points`` defined in edx-platform's own ``setup.py`` for examples.
1. A Python Entry point: the core Open edX platform provides a standard plugin loading mechanism in |edx_django_utils.plugins|_ which uses `stevedore`_ to find all installed python packages that declare a specific "entry point" in their package configuration (typically ``pyproject.toml`` or ``setup.py``). See the ``entry_points`` defined in edx-platform's own ``pyproject.toml`` for examples.
2. A Django setting: Some plugins require modification of Django settings, which is typically done by editing ``/edx/etc/lms.yml`` (in Production) or ``edx-platform/lms/envs/private.py`` (on Devstack).

.. |edx_django_utils.plugins| replace:: ``edx_django_utils.plugins``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class AccessDeniedMessageFilterTransformer(BlockStructureTransformer):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "access_denied_message_filter"

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/course_blocks/transformers/hidden_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class HiddenContentTransformer(BlockStructureTransformer):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "hidden_content"

Expand Down
8 changes: 4 additions & 4 deletions lms/djangoapps/course_blocks/transformers/library_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class ContentLibraryTransformer(FilteringTransformerMixin, BlockStructureTransfo
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "library_content"

Expand Down Expand Up @@ -197,8 +197,8 @@ class ContentLibraryOrderTransformer(BlockStructureTransformer):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "library_content_randomize"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def __init__(self, user):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "load_override_data"

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/course_blocks/transformers/split_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class SplitTestTransformer(FilteringTransformerMixin, BlockStructureTransformer)
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "split_test"

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/course_blocks/transformers/start_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class StartDateTransformer(FilteringTransformerMixin, BlockStructureTransformer)
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "start_date"

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/course_blocks/transformers/user_partitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class UserPartitionTransformer(BlockStructureTransformer):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "user_partitions"

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/course_blocks/transformers/visibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class VisibilityTransformer(FilteringTransformerMixin, BlockStructureTransformer
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "visibility"

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/courseware/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class OpenAssessmentDateTransformer(FilteringTransformerMixin, BlockStructureTra
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return 'open_assessment_transformer'

Expand Down
4 changes: 2 additions & 2 deletions lms/djangoapps/grades/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ class GradesTransformer(BlockStructureTransformer):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return 'grades'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

Registry. Transformers are registered using the platform's
PluginManager (e.g., Stevedore). This is currently done by updating
setup.py. Only registered transformers are called during the Collect
pyproject.toml. Only registered transformers are called during the Collect
Phase. And only registered transformers can be used during the
Transform phase. Exceptions to this rule are any nested transformers
that are contained within higher-order transformers - as long as the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def name(cls):
identify the transformer's cached data. So it should be unique
and not conflict with other transformers. Consider using the
same name that is used in the Transformer Registry. For example,
for Stevedore, it is specified in the setup.py file.
for Stevedore, it is specified in the package configuration (pyproject.toml).

Once the transformer is in use and its data is cached, do not
modify this name value without consideration of backward
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ check.
Course App Plugin Class
=======================
To be loaded as a Course App, you need to provide an entrypoint in ``setup.py``
To be loaded as a Course App, you need to provide an entrypoint in ``pyproject.toml``
with the namespace ``openedx.course_app``. The entry should point to a Python
class with the following basic structure:
.. code-block:: python
class CourseApp:
# The app id should match what is specified in the setup.py entrypoint
# The app id should match what is specified in the pyproject.toml entrypoint
app_id: str = 'wiki'
name: str = 'Wiki'
description: str = 'A short description of what the Wiki does.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_missing_partition(self):
class TestExtension(django.test.TestCase):
"""
Ensure that the scheme extension is correctly plugged in (via entry point
in setup.py)
in pyproject.toml)
"""

def test_get_scheme(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ Decision
We proposed to add the course live as a plugin with the following structure

Course Live App Plugin Class
-----------------------
----------------------------

The app will be loaded as a plugin and added to `setup.py` with the namespace
"openedx.course_app".
The app will be loaded as a plugin and added to ``pyproject.toml`` with the namespace
``openedx.course_app``.

.. code-block :: python
Expand Down
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/discussions/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class DiscussionsTopicLinkTransformer(BlockStructureTransformer):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "discussions_link"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_change_group_name(self):
class TestExtension(TestCase):
"""
Ensure that the scheme extension is correctly plugged in (via entry point
in setup.py)
in pyproject.toml)
"""

def test_get_scheme(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def setUpClass(cls):

def test_get_scheme(self):
"""
Ensure that the scheme extension is correctly plugged in (via entry point in setup.py)
Ensure that the scheme extension is correctly plugged in (via entry point in pyproject.toml)
"""
assert UserPartition.get_scheme('enrollment_track') == EnrollmentTrackPartitionScheme

Expand Down
2 changes: 1 addition & 1 deletion openedx/core/lib/xblock_pipeline/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(self, *args, **kwargs):

# xblock_resource_info holds (package_name, resources_dir) tuples. While
# it never happens in practice, the XBlock API does allow different
# XBlocks installed with the same setup.py to refer to their shared
# XBlocks installed from the same package to refer to their shared
# static assets using different prefixes.
xblock_resource_info = {
(xblock_resource_pkg(xblock_class), xblock_class.get_resources_dir())
Expand Down
4 changes: 2 additions & 2 deletions openedx/features/content_type_gating/block_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class ContentTypeGateTransformer(BlockStructureTransformer):
@classmethod
def name(cls):
"""
Unique identifier for the transformer's class;
same identifier used in setup.py.
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return "content_type_gate"

Expand Down
5 changes: 4 additions & 1 deletion openedx/features/effort_estimation/block_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class MissingEstimationData(Exception):

@classmethod
def name(cls):
"""Unique identifier for the transformer's class; same identifier used in setup.py."""
"""
Unique identifier for the transformer's class.
This must match the entry point name in the package configuration.
"""
return 'effort_estimation'

@classmethod
Expand Down
6 changes: 3 additions & 3 deletions openedx/tests/xblock_integration/test_external_xblocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class InvalidTestName(Exception):
'''
This means you have an entry point for a test that does not correspond
to a properly named test class. For example, if you cut-and-paste entry
points in `setup.py`, and forgot to repoint the class (so it points to
`DoneXBlock` instead of `TestDone`), or otherwise made an error, you
will see this exception.
points in your package configuration, and forgot to repoint the class
(so it points to `DoneXBlock` instead of `TestDone`), or otherwise made
an error, you will see this exception.
'''
pass # lint-amnesty, pylint: disable=unnecessary-pass

Expand Down
Loading
Loading