Skip to content

Commit 6209b25

Browse files
authored
Prepare 1.0 release. (#1)
* Tweak. * Install libxmlsec1-dev. * pip install upgrade. * Set coverage and pycodestyle targets. * Test federated module. * Test initial deploy. * Add badges.
1 parent ef17ddc commit 6209b25

File tree

4 files changed

+36
-8
lines changed

4 files changed

+36
-8
lines changed

.travis.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
language: python
22
python:
3-
- "3.6"
3+
- '3.6'
44
install:
5-
- pip install -e .[test]
5+
- git describe --tags > uw_saml2/VERSION
6+
- sudo apt-get update -qq
7+
- sudo apt-get install -qq libxmlsec1-dev
8+
- pip install -U -e .[test]
69
- pip install coveralls
710
script:
8-
- pycodestyle
9-
- pytest --cov
11+
- pycodestyle .
12+
- pytest --cov uw_saml2
1013
after_success:
1114
- coveralls
15+
deploy:
16+
skip_cleanup: true
17+
provider: pypi
18+
user: jeffrouw
19+
password:
20+
secure: YeS26sPPRJav+MPhFfcPmLc2kOR3ENpAob9wDKcDg9RCF5GbljjLPuGLmUrGnFCcYm3HzyKmyH8Tb8YE3ekXwb77hTYyuHpgdvL7J7aAWtnmEcXAMD8fUUQWjEB7gZaWq5bJlTejM4+1M9or1p9ll4N17YI+vrYDTSeISpMc9R2u5KhImbr5Yx37E8VvlltRiu3lyuqXTvngpuFSIFQsI2ReN4sPn9m1RVr68P1KelMuWBnd/fE7iRw+sGgLks2J2n8oli/ue+r3Y2CGb/mlg0L3QCHU6CDEZW9CdDz8e0VJLtNsO4fQX9LUcRdap77ixbhn+oAuARuqn4h9UkOdriwW0s6R9hbtwIcHmxuG7bGq2E8Q7B6hyFLp05peb4QIKf95meWJMt6brpngeMOHz4xoBwY2HTqfGS0tE0ItJlq8B/IlAxelSqlSBlegbHJXrpql063U0SCz2jyv37Bnw0x6uvCA3x4ym2lVqVMP8NyIeiLoZMJZmc4wmr0iWPugPLInyFDOvoJH+xovmD8bYhDQ0v5uDFfVNAHkXDxCVSZn18jBc1kUJZ5LOsZifXvhk8zBtl4+VOWcTXHRkqiLN82LQYrzj1aXyUPxLVuxIHlZtaKm9OfSf6zGV0I7/qYgIsNZqedFWHE9DjmJ3X6/99xlVU35lhKcYS6P20S6I5E=
21+
on:
22+
tags: true

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
# uw-saml
22

3+
[![Build Status](https://travis-ci.org/UWIT-IAM/uw-saml-python.svg?branch=master)](https://travis-ci.org/UWIT-IAM/uw-saml-python)
4+
[![Coverage Status](https://coveralls.io/repos/github/UWIT-IAM/uw-saml-python/badge.svg?branch=master)](https://coveralls.io/github/UWIT-IAM/uw-saml-python?branch=master)
5+
36
A UW-specific adapter to the
47
[python3-saml](https://github.com/onelogin/python3-saml) package. This package
58
was built to federate with other IdPs, but the default case is to use the UW
69
Identity Provider. It can be used against any framework. For a django-specific
710
package, also consider
811
[uw-django-saml2](https://github.com/uw-it-aca/uw-django-saml2).
912

10-
# Installation
13+
## Installation
1114

1215
```bash
1316
pip install uw-saml
1417
```
1518

16-
# Example login endpoint using flask
19+
## Example login endpoint using flask
1720

1821
In this example you've gone to
1922
[SP Registry](https://iam-tools.u.washington.edu/spreg) and registered an
@@ -48,7 +51,7 @@ def login():
4851
return 'Welcome ' + session['userid']
4952
```
5053

51-
# Considerations
54+
## Considerations
5255

5356
Give some consideration to session lifetime. The session in this example lives as a
5457
signed cookie. Ideally the cookie would expire at browser close, along with

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
VERSION = f.readlines()[-1].strip()
88

99
with open(os.path.join(BASE_DIR, 'README.md')) as f:
10-
LONG_DESCRIPTION = f.read()
10+
LONG_DESCRIPTION = f.read()
1111

1212
setup(name='uw-saml',
1313
version=VERSION,

tests/test_federated.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Just importing federated boosts our coverage."""
2+
from uw_saml2.idp import federated
3+
4+
5+
def test_cascadia_employee():
6+
id_attribute = 'urn:mace:washington.edu:dir:attribute-def:stu-validationID'
7+
assert federated.CascadiaEmployeeIdp.id_attribute == id_attribute
8+
9+
10+
def test_scca_dynamic_entity_id():
11+
entity_id = 'https://example.com'
12+
scca = federated.SccaIdp(entity_id)
13+
assert scca.entity_id == entity_id
14+
assert scca.sso_url == entity_id

0 commit comments

Comments
 (0)