Commit 2c5a63db authored by Rob Carleski's avatar Rob Carleski 🇮🇸
Browse files

git git git

parents
__pycache__
*.pyc
venv
.eggs
*.egg-info
VERSION
## 1.0.0 (2019-02-07)
- Initial stable release.
Copyright (c) 2019 Regents of The University of Michigan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
include CHANGELOG.md
include COPYING
include VERSION
include tests/data/*
include version.sh
# CSAM (Collaboration Services Account Manager)
Collab Admin Kit is a package of python scripts for performing various adminstrative actions
in the University of Michigan collaboration space.
## Setting up your environment
CSAM requires Python 3.
For development, we recommend using a virtualenv.
* Run `init.sh` to set up the virtualenv.
* When you want to hack on CSAM, source env-setup.sh
(`. env-setup.sh`) to set up the necessary environment variables.
## Testing
Tests can be run with `python setup.py test`.
CSAM uses the [pytest](https://pytest.org/) testing framework, so
tests can also be run directly with the command `pytest`.
#!/usr/bin/env python
from __future__ import (absolute_import, division, print_function)
import json
import os
import requests
ICON_MAP = {
'sensu': 'https://cdn-images-1.medium.com/1*qC5lFfMvQd_zci2MBXZZpg.png',
'ansible': 'https://www.ansible.com/favicon.ico',
}
def handler(event, context):
print(json.dumps(event))
#!/bin/bash
cd $(readlink -fn $(dirname "$BASH_SOURCE"))
if which virtualenv; then
[[ -d venv/bin ]] || virtualenv -p python3 venv
. venv/bin/activate
pip install -U pip setuptools
pip install -U -r requirements.txt
else
echo "Automated environment setup requires virtualenv."
fi
[aliases]
test=pytest
[tool:pytest]
addopts=-v --pep8
pep8maxlinelength=160
import os
from subprocess import check_output
from setuptools import setup, find_packages
version = check_output([
'bash',
os.path.join(os.path.dirname(__file__), 'version.sh')
]).decode(encoding='utf-8')
with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
long_description = f.read()
test_deps = [
'kadmin',
'mcommunity @ git+https://gitlab.umich.edu/carleski/python-mcommunity.git',
'pytest',
'pytest-pep8',
'pyyaml',
'requests'
]
setup(
name='umich_csam',
version=version,
description='Collaboration Services Account Manager',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://gitlab.umich.edu/carleski/umich-csam.git',
author='Rob Carleski',
author_email='carleski@umich.edu',
license='MIT',
python_requires='>=3',
install_requires=[
'kadmin',
'mcommunity @ git+https://gitlab.umich.edu/carleski/python-mcommunity.git',
'requests',
'pyyaml'
],
setup_requires=[
'pytest-runner',
],
tests_require=test_deps,
extras_require={
'test': test_deps,
},
zip_safe=False
)
#!/bin/bash
if [ -d .git ]; then
git describe --tags | perl -pe 'chomp; s/-/./; s/-.*//; s/^v//' | tee VERSION
elif [ -s VERSION ]; then
cat VERSION
else
echo -n UNKNOWN
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment