Skip to content

Commit

Permalink
Release v3.2.0 (#626)
Browse files Browse the repository at this point in the history
* Allow PaginatedList to use metadata for pagination (#614)

* Update `PaginatedList`

Based on #605, `PaginatedList` could not process requests which return
pagination info in the response body. This update checks for `Link` headers
before checking the `meta` property in the response body.

* Update based on review

* Update pag list test with no header no next meta to run properly. Update changelog.

---------

Co-authored-by: Matthew Emond <me@ucf.edu>

* New Quizzes (#612)

* Begin adding coverage for New Quizzes (WIP)

* Finish New Quizzes endpoints

* Pin urllib3 to <2 for tests due to issue with requests-mock. jamielennox/requests-mock#228

* Course Create Discussion Attach Files #621 (#622)

* Fix issue where Course.create_discussion_topic doesn't accept attachment files

* Add file tests for create_discussion_topic

* Delete method for course and group pages (#624)

* method delete group and course pages, update tests

* format fix

* Add Caitlin to authors. Add contribution to changelog. Formwatting tweaks.

---------

Co-authored-by: Matthew Emond <me@ucf.edu>

* Remove Jesse as codeowner. Add Matthew Jones and Brian Bennett

* Add support for Python 3.11 (#625)

* markdown styling tweak to be in line with prettier's defaults

* Bump version to 3.2.0

---------

Co-authored-by: Brian <brian.bennett2@gmail.com>
Co-authored-by: Caitlin Fabian <89735646+Caitlin-Fabian@users.noreply.github.com>
  • Loading branch information
3 people committed May 25, 2023
1 parent edaf85f commit 524bfd7
Show file tree
Hide file tree
Showing 23 changed files with 746 additions and 237 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -1 +1 @@
* @Thetwam @jessemcbride
* @Thetwam @bennettscience @jonespm
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
20 changes: 11 additions & 9 deletions AUTHORS.md
@@ -1,14 +1,17 @@
Authors
=======
# Authors

Development Lead
----------------
## Original Authors

- Matthew Emond <me@ucf.edu> [@Thetwam](https://github.com/Thetwam)
- Jesse McBride <jm@ucf.edu> [@jessemcbride](https://github.com/jessemcbride)

Patches and Suggestions
-----------------------
## Maintainers

- Matthew Emond [@Thetwam](https://github.com/Thetwam) (Lead)
- Brian Bennett [@bennettscience](https://github.com/bennettscience)
- Matthew Jones [@jonespm](https://github.com/jonespm)

## Patches and Suggestions

- Abrahan Nevarez [@zenith110](https://github.com/zenith110)
- Adrian Goetz [@a-goetz](https://github.com/a-goetz)
Expand All @@ -24,10 +27,10 @@ Patches and Suggestions
- [@Birdmaaan4](https://github.com/Birdmaaan4)
- [@blepabyte](https://github.com/blepabyte)
- Bradford Lynch [@bradfordlynch](https://github.com/bradfordlynch)
- Brian Bennett [@bennettscience](https://github.com/bennettscience)
- Bruce Spang [@brucespang](https://github.com/brucespang)
- Catherine Abbruzzese [@cat0698](https://github.com/cat0698))
- Caitlin Fabian [@Caitlin-Fabian](https://github.com/Caitlin-Fabian)
- Cameron Cuff [@ctcuff](https://github.com/ctcuff)
- Catherine Abbruzzese [@cat0698](https://github.com/cat0698)
- Craig Thompson [@craigdsthompson](https://github.com/craigdsthompson)
- Dalton Durst [@UniversalSuperBox](https://github.com/UniversalSuperBox)
- Damian Sweeney [@damianfs](https://github.com/damianfs)
Expand Down Expand Up @@ -67,7 +70,6 @@ Patches and Suggestions
- Mark Lalor [@MarkLalor](https://github.com/MarkLalor)
- Markus [@elec3647](https://github.com/elec3647)
- Matthew Fedder [@matthewf-ucsd](https://github.com/matthewf-ucsd)
- Matthew Jones [@jonespm](https://github.com/jonespm)
- Michael Phelps [@nottheswimmer](https://github.com/nottheswimmer)
- Mike Nahmias [@Mike-Nahmias](https://github.com/Mike-Nahmias)
- Mike Suhan [@mikesuhan](https://github.com/mikesuhan)
Expand Down
143 changes: 80 additions & 63 deletions CHANGELOG.md
Expand Up @@ -2,35 +2,51 @@

## [Unreleased]

## [3.2.0] - 2023-05-25

### New Endpoint Coverage

- New Quizzes
- Delete Page in Groups (Thanks, [@Caitlin-Fabian](https://github.com/Caitlin-Fabian))

### General

- Added support for pagination with metadata when headers are missing (Thanks, [@bennettscience](https://github.com/bennettscience))
- Added support for Python 3.11

### Bugfixes

- Fixed an issue where `Course.create_discussion_topic` wouldn't accept attachment files.

## [3.1.0] - 2023-04-21

### New Endpoint Coverage

- Account Calendars (Thanks, [@dmols](https://github.com/dmols))
- List available account calendars
- Get a single account calendar
- Update a calendar's visibility
- Update many calendars' visibility
- List all account calendars
- List available account calendars
- Get a single account calendar
- Update a calendar's visibility
- Update many calendars' visibility
- List all account calendars
- Enrollments (Thanks, [@svanderwulp](https://github.com/svanderwulp))
- Accept Course Invitation
- Reject Course Invitation
- Accept Course Invitation
- Reject Course Invitation
- File (Thanks, [@bennettscience](https://github.com/bennettscience))
- Update File
- Update File
- JWTs (Thanks [@dmols](https://github.com/dmols))
- Create JWTs
- Refresh JWTs
- Create JWTs
- Refresh JWTs
- Moderation Grading (Moderation Set)
- List students selected for moderation
- Select students for moderation
- List students selected for moderation
- Select students for moderation
- Query Course Events (Thanks, [@dmols](https://github.com/dmols))
- Query by course
- Query by account
- Query by course
- Query by account
- Rubrics (Thanks, [@bennettscience](https://github.com/bennettscience))
- Create, Update, and Delete Rubric Assessments
- Create a Rubric Association
- Create, Update, and Delete Rubric Assessments
- Create a Rubric Association
- Users
- Terminate all user sessions (Thanks, [@lucas-salas](https://github.com/lucas-salas))
- Terminate all user sessions (Thanks, [@lucas-salas](https://github.com/lucas-salas))

### General

Expand Down Expand Up @@ -130,11 +146,11 @@

- Custom Gradebook Columns (Thanks,[@aileenpongnon](https://github.com/aileenpongnon))
- Files
- Resolve Path (Thanks,[@dsavransky](https://github.com/dsavransky))
- Resolve Path (Thanks,[@dsavransky](https://github.com/dsavransky))

### Bugfixes

- Fixed an issue where `Quiz.get_quiz_group` incorrectly set `course_id` to the quiz ID. (Thanks,[@hcolclou](https://github.com/hcolclou))
- Fixed an issue where `Quiz.get_quiz_group` incorrectly set `course_id` to the quiz ID. (Thanks,[@hcolclou](https://github.com/hcolclou))
- Fixed an issue where `Course.create_external_tool` didn't accept `client_id` (LTI 1.3 support).
- Fixed an issue where `Module.create_module_item` didn't (Thanks,[@aileenpongnon](https://github.com/aileenpongnon) and [@onomou](https://github.com/onomou))
- Fixed an issue where `Page.revert_to_revision` would incorrectly always set `group_id` to the page ID. Now correctly sets `group_id` or `course_id` appropriately.
Expand Down Expand Up @@ -170,9 +186,9 @@
### New Endpoint Coverage

- Enrollment Terms
- Get a Single Enrollment Term (Thanks, [@lcamacho](https://github.com/lcamacho))
- Get a Single Enrollment Term (Thanks, [@lcamacho](https://github.com/lcamacho))
- Files
- Resolve Path for Course (Thanks,[@dsavransky](https://github.com/dsavransky))
- Resolve Path for Course (Thanks,[@dsavransky](https://github.com/dsavransky))
- GraphQL (Thanks,[@jonespm](https://github.com/jonespm))
- Late Policy (Thanks, [@kennygperez](https://github.com/kennygperez))
- Quiz Assignment Overrides (Thanks, [@kennygperez](https://github.com/kennygperez))
Expand All @@ -185,11 +201,11 @@
### Deprecation Warnings

- :warning: **_This is the final release with support for Python 2.7_** :warning:
- [Python 2.7 is end-of-life as of January 2020](https://www.python.org/doc/sunset-python-2/)
- Future releases of CanvasAPI will *NOT* support any version of Python 2
- [Python 2.7 is end-of-life as of January 2020](https://www.python.org/doc/sunset-python-2/)
- Future releases of CanvasAPI will _NOT_ support any version of Python 2
- :warning: **_This is the final release with support for Python 3.4_** :warning:
- [Python 3.4 is end-of-life as of March 2019](https://www.python.org/downloads/release/python-3410/)
- Future releases of CanvasAPI will *NOT* support Python 3.4 or below
- [Python 3.4 is end-of-life as of March 2019](https://www.python.org/downloads/release/python-3410/)
- Future releases of CanvasAPI will _NOT_ support Python 3.4 or below
- This is the final deprecation warning for all methods marked as deprecated in this changelog or in our documentation. They will be removed in the next release.

### Bugfixes
Expand All @@ -208,7 +224,7 @@

- Assignment Extensions (Thanks, [@ljoks](https://github.com/ljoks))
- AssignmentGroup (Thanks, [@ctcuff](https://github.com/ctcuff))
- List Assignments
- List Assignments
- Authentications Log (Thanks, [@weining-li](https://github.com/weining-li))
- Brand Configs (Thanks, [@bennettscience](https://github.com/bennettscience))
- Comm Messages (Thanks, [@ljoks](https://github.com/ljoks))
Expand Down Expand Up @@ -242,30 +258,30 @@
### New Endpoint Coverage

- API Token scopes (Thanks, [@jrsilveti](https://github.com/jrsilveti))
- List scopes
- List scopes
- Account Notifications (Thanks, [@jrsilveti](https://github.com/jrsilveti))
- Show a global notification
- Update a global notification
- Show a global notification
- Update a global notification
- Account Reports (Thanks, [@jrsilveti](https://github.com/jrsilveti))
- Start a report
- Status of a report
- Delete a report
- Start a report
- Status of a report
- Delete a report
- Collaborations (Thanks, [@jrsilveti](https://github.com/jrsilveti))
- List collaborations
- List members of a collaboration
- List collaborations
- List members of a collaboration
- Feature Flags (Thanks, [@cat0698](https://github.com/cat0698))
- List features
- List enabled features
- Get feature flag
- Set feature flag
- Remove feature flag
- List features
- List enabled features
- Get feature flag
- Set feature flag
- Remove feature flag
- Rubric (Thanks, [@cat0698](https://github.com/cat0698))
- Create a single rubric
- Create a single rubric

### General

- Removed overzealous global enabling of `DeprecationWarning`. (Thanks, [@Screeeech](https://github.com/Screeeech))
- *Note:* `DeprecationWarnings` are disabled by default, so you may need to run your code with `python -Wd` to see them.
- _Note:_ `DeprecationWarnings` are disabled by default, so you may need to run your code with `python -Wd` to see them.

## [0.13.0] - 2019-07-08

Expand All @@ -278,14 +294,14 @@
- Outcome Import (Thanks, [@jrsilveti](https://github.com/jrsilveti))
- Peer Reviews (Thanks, [@vutoan1245](https://github.com/vutoan1245))
- Planner (Thanks, [@weining-li](https://github.com/weining-li))
- Planner
- Planner Notes
- Planner Overrides
- Planner
- Planner Notes
- Planner Overrides
- Polls (Thanks, [@Goff-Davis](https://github.com/Goff-Davis))
- Poll
- PollChoice
- PollSession
- PollSubmission
- Poll
- PollChoice
- PollSession
- PollSubmission
- Quiz Submission Questions (Thanks, [@bradfordlynch](https://github.com/bradfordlynch))

### General
Expand Down Expand Up @@ -391,12 +407,12 @@
### Deprecation Warnings

- :warning: **_Dropped support for Python 3.3_** :warning:
- [Python 3.3 is end-of-life as of September 2017](https://www.python.org/dev/peps/pep-0398/#lifespan)
- Should continue to function in 3.3, but compatibility cannot be guaranteed going forward.
- [Python 3.3 is end-of-life as of September 2017](https://www.python.org/dev/peps/pep-0398/#lifespan)
- Should continue to function in 3.3, but compatibility cannot be guaranteed going forward.
- Several methods in the `Course` and `Section` classes relating to assignments and submissions have been deprecated.
- Comparable methods have been implemented in the `Assignment` and `Submission` classes, as appropriate.
- The deprecated methods now include a warning in the documentation with reference to the replacement. Additionally, the deprecated methods will raise a `DeprecationWarning`.
- These methods will be removed in a future release.
- Comparable methods have been implemented in the `Assignment` and `Submission` classes, as appropriate.
- The deprecated methods now include a warning in the documentation with reference to the replacement. Additionally, the deprecated methods will raise a `DeprecationWarning`.
- These methods will be removed in a future release.
- `Course.list_sections()` has been deprecated. Use `Course.get_sections()` instead.

### Bugfixes
Expand Down Expand Up @@ -427,12 +443,12 @@
### New Endpoint Coverage

- Account
- Delete a sub account
- Delete a sub account
- Grading Standards (Thanks, [@JonGuilbe](https://github.com/JonGuilbe))
- Notification Preferences (Thanks, [@a-goetz](https://github.com/a-goetz))
- Update a preference
- Update preferences by category
- Update multiple preferences
- Update a preference
- Update preferences by category
- Update multiple preferences
- Outcomes (Thanks, [@a-goetz](https://github.com/a-goetz))
- Quiz Question Groups (Thanks, [@JonGuilbe](https://github.com/JonGuilbe))
- Rubric (Thanks, [@sigurdurb](https://github.com/sigurdurb))
Expand All @@ -443,8 +459,8 @@
- For many endpoints that accept an "object id", either a CanvasAPI Object or integer ID can now be passed. (Thanks, [@a-goetz](https://github.com/a-goetz))
- Added a requester cache that remembers the last 5 requests to Canvas. It can be accessed as the attribute `_cache` of the `requester object`. (e.g. `course._requester._cache`)
- Files can now be downloaded directly from the `File` object in one of two ways: (Thanks, [@DanBrink91](https://github.com/DanBrink91))
1. `get_contents` will directly return the contents of the file. (e.g. `file.get_contents()`)
2. `download` will download the file and save it to the provided path. (e.g. `file.download('example.txt')`)
1. `get_contents` will directly return the contents of the file. (e.g. `file.get_contents()`)
2. `download` will download the file and save it to the provided path. (e.g. `file.download('example.txt')`)
- Moved several methods exclusive to the API Key owner's user from the `User` class to a new class called `CurrentUser`. There is a new method in the `Canvas` class called `get_current_user` to access this object. (e.g. `canvas.get_current_user()`) (Thanks, [@DanBrink91](https://github.com/DanBrink91))

### Bugfixes
Expand Down Expand Up @@ -595,17 +611,18 @@ Huge thanks to [@liblit](https://github.com/liblit) for lots of issues, suggesti
- Added contribution guide
- Added Docker container for testing (e.g. with Jenkins)
- Split requirements files into three:
- dev_requirements.txt
- tests_requirements.txt
- requirements.txt
- dev_requirements.txt
- tests_requirements.txt
- requirements.txt

### Bugfixes

- Added some missing parameters
- Fixed some incorrectly defined parameters
- Fixed an issue where tests would fail due to an improperly configured requires block

[Unreleased]: https://github.com/ucfopen/canvasapi/compare/v3.1.0...develop
[Unreleased]: https://github.com/ucfopen/canvasapi/compare/v3.2.0...develop
[3.2.0]: https://github.com/ucfopen/canvasapi/compare/v3.1.0...v3.2.0
[3.1.0]: https://github.com/ucfopen/canvasapi/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/ucfopen/canvasapi/compare/v2.2.0...v3.0.0
[2.2.0]: https://github.com/ucfopen/canvasapi/compare/v2.1.0...v2.2.0
Expand Down
38 changes: 19 additions & 19 deletions README.md
Expand Up @@ -13,19 +13,19 @@ CanvasAPI is a Python library for accessing Instructure’s [Canvas LMS API](htt

## Table of Contents

* [CanvasAPI](#canvasapi)
* [Table of Contents](#table-of-contents)
* [Installation](#installation)
* [Documentation](#documentation)
* [Contributing](#contributing)
* [Quickstart](#quickstart)
* [Working with Canvas Objects](#working-with-canvas-objects)
* [Course objects](#course-objects)
* [User objects](#user-objects)
* [Paginated Lists](#paginated-lists)
* [Keyword arguments](#keyword-arguments)
* [CanvasAPI Projects](#canvasapi-projects)
* [Contact Us](#contact-us)
- [CanvasAPI](#canvasapi)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Quickstart](#quickstart)
- [Working with Canvas Objects](#working-with-canvas-objects)
- [Course objects](#course-objects)
- [User objects](#user-objects)
- [Paginated Lists](#paginated-lists)
- [Keyword arguments](#keyword-arguments)
- [CanvasAPI Projects](#canvasapi-projects)
- [Contact Us](#contact-us)

## Installation

Expand Down Expand Up @@ -156,12 +156,12 @@ For a more detailed description of how CanvasAPI handles more complex keyword ar

Since its initial release in June 2016, CanvasAPI has amassed over 100 [dependent repositories](https://github.com/ucfopen/canvasapi/network/dependents). Many of these include various tools used to enhance the Canvas experience for both instructors and students. Here are a few popular repositories that use CanvasAPI:

* [Canvas Grab](https://github.com/skyzh/canvas_grab)
* Canvas Grab is the most popular project using CanvasAPI. This tool, with one click, copies all files from Canvas LMS to local directory. CanvasAPI is used in this project to connect to a course and grab its files.
* [Clanvas](https://github.com/marklalor/clanvas)
* Clanvas is a command-line client for Canvas. It uses the already available bash commands plus some additional ones to interact with various features of Canvas from the commmand line.
* [CS221Bot](https://github.com/Person314159/cs221bot)
* CS221Bot is a Discord bot for the CPCS 221 course at University of British Columbia. CanvasAPI is used in this project to connect to and synchronize with a course and get its data, such as announcements, new assignments, and more.
- [Canvas Grab](https://github.com/skyzh/canvas_grab)
- Canvas Grab is the most popular project using CanvasAPI. This tool, with one click, copies all files from Canvas LMS to local directory. CanvasAPI is used in this project to connect to a course and grab its files.
- [Clanvas](https://github.com/marklalor/clanvas)
- Clanvas is a command-line client for Canvas. It uses the already available bash commands plus some additional ones to interact with various features of Canvas from the commmand line.
- [CS221Bot](https://github.com/Person314159/cs221bot)
- CS221Bot is a Discord bot for the CPCS 221 course at University of British Columbia. CanvasAPI is used in this project to connect to and synchronize with a course and get its data, such as announcements, new assignments, and more.

If you have a project that uses CanvasAPI that you'd like to promote, please contact us!

Expand Down
2 changes: 1 addition & 1 deletion canvasapi/__init__.py
Expand Up @@ -4,4 +4,4 @@

__all__ = ["Canvas"]

__version__ = "3.1.0"
__version__ = "3.2.0"

0 comments on commit 524bfd7

Please sign in to comment.