Skip to content

Commit

Permalink
Merge branch 'master' into 'stable'
Browse files Browse the repository at this point in the history
Release Version 0.2



See merge request !44
  • Loading branch information
Thetwam committed Jan 4, 2017
2 parents 7d40814 + 4cab2f7 commit 7199ea1
Show file tree
Hide file tree
Showing 73 changed files with 4,779 additions and 1,139 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
PyCanvas Changelog
==================

Version 0.2
-----------

**New Endpoint Coverage**

- Groups
- Roles
- Page Revisions
- Sections
- Conversations

**General**

- Standardized `__str__` methods. They now (generally) follow the convention of the value of the single most relevant field followed by an ID in parentheses.
- Reworked how `requests_mock` is used in test suite.
- Nested dictionaries are now allowed as kwargs
- Split 401 into two exceptions: `InvalidAccessToken` if `'WWW-Authenticate'` header is present. Otherwise, `Unauthorized`.


**Bugfixes**

- Moved some incorrectly placed enrollment methods to the Enrollment class.
- Corrected `Process` class to `Progress`
- Minor text fixes.

Version 0.1.2
-------------

Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Below you'll find guidelines for contributing that will keep our codebase clean
### Bug Reports

#### Reporting bugs
Bug reports are awesome. Writing quality bug reports helps us identify issues and solve them even faster. You can submit bug reports directly to our [issue tracker](https://***REMOVED***/pycanvas/issues).
Bug reports are awesome. Writing quality bug reports helps us identify issues and solve them even faster. You can submit bug reports directly to our [issue tracker](https://example.com/changeme/pycanvas/issues).

Here are a few things worth mentioning when making a report:

Expand All @@ -34,11 +34,11 @@ Here are a few things worth mentioning when making a report:
### Resolving issues
We welcome pull requests for bug fixes and new features! Feel free to browse our open, unassigned issues and assign yourself to them. You can also filter by labels:

* [simple](https://***REMOVED***/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=simple) -- easier issues to start working on; great for getting familiar with the codebase.
* [api coverage](https://***REMOVED***/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=api+coverage) -- covering new endpoints or updating existing ones.
* [internal](https://***REMOVED***/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=internal) -- updates to the engine to improve performance.
* [major](https://***REMOVED***/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=major) -- difficult or major changes or additions that require familiarity with the library.
* [bug](https://***REMOVED***/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=bug) -- happy little code accidents.
* [simple](https://example.com/changeme/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=simple) -- easier issues to start working on; great for getting familiar with the codebase.
* [api coverage](https://example.com/changeme/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=api+coverage) -- covering new endpoints or updating existing ones.
* [internal](https://example.com/changeme/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=internal) -- updates to the engine to improve performance.
* [major](https://example.com/changeme/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=major) -- difficult or major changes or additions that require familiarity with the library.
* [bug](https://example.com/changeme/pycanvas/issues?scope=all&sort=id_desc&state=opened&utf8=%E2%9C%93&label_name%5B%5D=bug) -- happy little code accidents.


Once you've found an issue you're interested in tackling, take a look at our [first contribution tutorial](#making-your-first-contribution) for information on our pull request policy.
Expand All @@ -49,7 +49,7 @@ Once you've found an issue you're interested in tackling, take a look at our [fi

Now that you've selected an issue to work on, you'll need to set up an environment for writing code. We'll assume you already have pip, virtualenv, and git installed and are using a terminal. If not, please set those up before continuing.

1. Clone our repository by executing `git clone git@***REMOVED***/pycanvas.git`
1. Clone our repository by executing `git clone git@example.com:changeme/pycanvas.git`
2. Pull the latest commit from the **master** branch: `git pull origin master`
3. Create a new branch with the format **issue/[issue_number]-[issue-title]**: `git branch -b issue/1-test-issue-for-documentation`
4. Set up a new virtual environment ( `virtualenv env` ) and activate it (`source env/bin/activate`)
Expand Down Expand Up @@ -179,7 +179,7 @@ pycanvas/util.py 22 0 100%
TOTAL 629 0 100%
```

Certain statements can be omitted from the coverage report by adding `# pragma: no cover` but this should be used conservatively. If your tests pass and your coverage is at 100%, you're ready to [submit a pull request](https://***REMOVED***/pycanvas/merge_requests)!
Certain statements can be omitted from the coverage report by adding `# pragma: no cover` but this should be used conservatively. If your tests pass and your coverage is at 100%, you're ready to [submit a pull request](https://example.com/changeme/pycanvas/merge_requests)!

Be sure to include the issue number in the title with a pound sign in front of it (#123) so we know which issue the code is addressing. Point the branch at master and then submit it for review.

Expand Down
35 changes: 35 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
PyCanvas Deploy Procedures
==========================

Pre-Flight Checklist
--------------------

- On branch `master` and up-to-date
- All tests pass
- 100% coverage
- `CHANGELOG` is accurate

Packaging
---------

Update version number in `setup.py`.

Run `python setup.py sdist`. This should create a file in the `dist` directory called something like `pycanvas-0.0.0.tar.gz`.

Generate Documentation
----------------------

In the `docs` directory, run `make clean html`.

**TODO:** how to publish documentation.

Deploy
------

Commit the new files and the changes to `setup.py` and push.

Create a merge request from `master` to `stable`, and merge.

Tag the merge commit with the version number: `git tag -a v0.0.0 -m "Release version 0.0.0" abc1234`

Push the tag: `git push origin v0.0.0`
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PyCanvas is a Python package that allows for simple access to the Instructure Ca

## Installation
[internal only]
`pip install git+https://***REMOVED***/pycanvas.git@stable`
`pip install git+https://example.com/changeme/pycanvas.git@stable`

## Getting Started
The first thing to do is open a connection with Canvas. You will need to provide the URL for the API endpoint of your Canvas instance as well as a valid API key.
Expand Down
Binary file added dist/pycanvas-0.2.tar.gz
Binary file not shown.
11 changes: 10 additions & 1 deletion docs/account-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ Account
=======

.. autoclass:: pycanvas.account.Account
:members:
:members:

.. autoclass:: pycanvas.account.AccountNotification
:members:

.. autoclass:: pycanvas.account.AccountReport
:members:

.. autoclass:: pycanvas.account.Role
:members:
3 changes: 3 additions & 0 deletions docs/class-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ Class Reference
canvas-ref
account-ref
assignment-ref
conversation-ref
course-ref
external-tool-ref
group-ref
module-ref
page-ref
progress-ref
quiz-ref
section-ref
user-ref
6 changes: 6 additions & 0 deletions docs/conversation-ref.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
============
Conversation
============

.. autoclass:: pycanvas.conversation.Conversation
:members:
2 changes: 1 addition & 1 deletion docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Installing PyCanvas

[SoonTM] You will eventually be able to install with pip::

pip install git+ssh://git@***REMOVED***/pycanvas.git
pip install git+ssh://git@example.com:changeme/pycanvas.git

Usage
-----
Expand Down
6 changes: 6 additions & 0 deletions docs/group-ref.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
=====
Group
=====

.. autoclass:: pycanvas.group.Group
:members:
7 changes: 7 additions & 0 deletions docs/page-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ Page

.. autoclass:: pycanvas.page.Page
:members:


=============
Page Revision
=============
.. autoclass:: pycanvas.page.PageRevision
:members:
6 changes: 6 additions & 0 deletions docs/process-ref.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
============
Progress
============

.. autoclass:: pycanvas.progress.Progress
:members:
4 changes: 4 additions & 0 deletions pycanvas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# -*- coding: utf-8 -*-

__version__ = '0.2'

import exceptions
import canvas
import canvas_object
Expand Down
Loading

0 comments on commit 7199ea1

Please sign in to comment.