Skip to content

Commit

Permalink
Merge branch 'master' into feature/course-grades
Browse files Browse the repository at this point in the history
  • Loading branch information
angonz authored Feb 15, 2024
2 parents f719c7a + 30e6bdc commit 2e52e74
Show file tree
Hide file tree
Showing 37 changed files with 316 additions and 1,293 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
commit = True
tag = True
message = build: Version {new_version}
current_version = 0.0.3
current_version = 0.2.0

[bumpversion:file:CHANGELOG.rst]
search = Unreleased
Expand Down
12 changes: 0 additions & 12 deletions .coveragerc

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/ci.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/publish_pypi.yml

This file was deleted.

68 changes: 0 additions & 68 deletions .github/workflows/upgrade-python-requirements.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .pep8

This file was deleted.

15 changes: 15 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Change Log
##########

Version 0.2.0 (2024-02-15)
**********

* Remove unused github actions and tests.

Version 0.1.3 (2023-09-20)
**********************************************

* Fix: Fix error in logging unsuccessful responses

Version 0.1.0 (2023-09-19)
**********************************************

* Feat: Add account registration and registration validation API calls

Version 0.0.3 (2023-09-06)
**********************************************

Expand Down
4 changes: 1 addition & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
include LICENSE
include README.rst
include requirements/base.in
include requirements.txt
28 changes: 0 additions & 28 deletions Makefile

This file was deleted.

101 changes: 101 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,107 @@ dict in the form:
"auto_enroll":true
}
Account validation
~~~~~~~~~~~~~~~~~~

Validates the account registration form. Calls the `/api/user/v1/validation/registration` API endpoint.

Args:

* url: url of the LMS (base or site). If not specified, uses the base url of the session. Defaults to the LMS base.
* \*\*kwargs: dict with form parameters to validate. E.g.:

.. code-block::
{
email=<email>,
username=<username>,
name=<name>,
password=<password>,
honor_code=<honor_code>,
terms_of_service=<terms_of_service>,
}
Returns:
dict in the form:

.. code-block::
{
'validation_decisions': {
<field name>: <validation result, or empty if success>,
...
},
'username_suggestions': [<username suggestions * 3>]
}
Account registration
~~~~~~~~~~~~~~~~~~~~

Registers a new user account. Calls the `/api/user/v1/account/registration/` API endpoint.

Args:

* email: email to register
* username: username to register
* name: full name of the user
* password: password
* url: url of the LMS (base or site). If not specified, uses the base url of the session.
Defaults to the LMS base.

Additional default fields accepted:

* name: full name of the user
* level_of_education \*: one of:
* 'p': 'Doctorate'
* 'm': "Master's or professional degree"
* 'b': "Bachelor's degree"
* 'a': "Associate degree"
* 'hs': "Secondary/high school"
* 'jhs': "Junior secondary/junior high/middle school"
* 'el': "Elementary/primary school"
* 'none': "No formal education"
* 'other': "Other education"
* gender \*: can be 'm', 'f', or 'o'
* mailing_address *
* city *
* country: ISO3166-1 two letters country codes as used in django_countries.countries *
* goals *
* year_of_birth \*: numeric 4-digit year of birth
* honor_code \*: Bool. If mandatory and not set will not create the account.
* terms_of_service \*: Bool. If unset, will be set equally to honor_code
* marketing_emails_opt_in \*: Bool. If set, will add a is_marketable user attribute (see Student > User Attributes in Django admin)
* provider: Oauth2 provider information
* social_auth_provider: Oauth2 provider information

\* Can be set as hidden, optional or mandatory in REGISTRATION_EXTRA_FIELDS setting.


Returns:
Dict with the form:

- If successful:

.. code-block::
{
'success': True,
'redirect_url': <redirection url to finish the authorization and go to the dashboard>
}
- If error:

.. code-block::
{
<field name>: [
{'user_message': <error message>}
]
'error_code': <error code>,
'username_suggestions': [<username suggestions> * 3]
}
How to Contribute
-----------------

Expand Down
9 changes: 0 additions & 9 deletions codecov.yml

This file was deleted.

30 changes: 0 additions & 30 deletions docs/decisions/0001-record-architecture-decisions.rst

This file was deleted.

2 changes: 1 addition & 1 deletion openedx_rest_api_client/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.3'
__version__ = '0.2.0'
Loading

0 comments on commit 2e52e74

Please sign in to comment.