Skip to content
This repository was archived by the owner on Jun 24, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# .coveragerc to control coverage.py

[run]
branch = True

[paths]
source =
src/

[report]
omit =
*/python?.?/*
*/site-packages/nose/*
*/tests/*
*_pb2.py
*__init__.py

# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

# Don't complain following lines
.*__logger.*
pass
print
sys\.std.*write.*
12 changes: 12 additions & 0 deletions .landscape.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
doc-warnings: no
test-warnings: no
strictness: medium
max-line-length: 120
autodetect: no
requirements:
- requirements.txt
ignore-paths:
- bin/
ignore-patterns:
- ^.*\.(sh|md|in|txt|yml)$
- ^README$
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: python
python:
- 2.7
install:
- pip install -r requirements.txt
- pip install coveralls
script:
- PYTHONPATH=src coverage run setup.py test
after_success:
- coveralls
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include requirements.txt
include *.md
include *.sh
Empty file added README
Empty file.
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,51 @@
atmosphere-python
=================
# atmosphere-python-client

Installation
------------
[![Build Status](https://travis-ci.org/dice-cyfronet/atmosphere-python-client.svg?branch=master)](https://travis-ci.org/dice-cyfronet/atmosphere-python-client)
[![Code Health](https://landscape.io/github/dice-cyfronet/atmosphere-python-client/master/landscape.svg?style=flat)](https://landscape.io/github/dice-cyfronet/atmosphere-python-client/master)
[![Codacy Badge](https://www.codacy.com/project/badge/d90b929be42e4593a4ec6bfcc811cd44?style=flat)](https://www.codacy.com/public/pawel/atmosphere-python-client)
[![Coverage Status](https://coveralls.io/repos/dice-cyfronet/atmosphere-python-client/badge.svg)](https://coveralls.io/r/dice-cyfronet/atmosphere-python-client)

[![Supported Python versions](https://pypip.in/py_versions/atmosphere-python-client/badge.svg?style=flat)](https://pypi.python.org/pypi/atmosphere-python-client/)
[![Supported Python implementations](https://pypip.in/implementation/atmosphere-python-client/badge.svg?style=flat)](https://pypi.python.org/pypi/atmosphere-python-client/)
[![Latest Version](https://pypip.in/version/atmosphere-python-client/badge.svg?style=flat)](https://pypi.python.org/pypi/atmosphere-python-client/)

[![Development Status](https://pypip.in/status/atmosphere-python-client/badge.svg?style=flat)](https://pypi.python.org/pypi/atmosphere-python-client/)
[![License](https://pypip.in/license/atmosphere-python-client/badge.svg?style=flat)](https://pypi.python.org/pypi/atmosphere-python-client/)

[![Download format](https://pypip.in/format/atmosphere-python-client/badge.svg?style=flat)](https://pypi.python.org/pypi/atmosphere-python-client/)
[![Downloads](https://pypip.in/download/atmosphere-python-client/badge.svg?style=flat)](https://pypi.python.org/pypi/atmosphere-python-client/)

This library provides a wrapper of REST operation performed by [Atmosphere](https://github.com/dice-cyfronet/atmosphere).

## Installation

Download stable version and run command `python setup.py install`.

If you have installed `atmosphere-client-python`, if any problem occurs, run
`python setup.py clean` and/or `pip uninstall atmosphere-client-python`.

Test
----
## Examples

Copy file `config/main-example.ini` to `config/main.ini` and
`config/secure-example.ini` to `config/secure.ini`. Edit these files.
Execute `test/run-test.sh`. You do not need to install `atmosphere-client-python`.
You will find it in [`examples/`](examples/).

Usage
-----
## Usage

**Config**
### Config

To use *atmosphere* API you need to have `API_PRIVATE_TOKEN` or `API_MI_TICKET`.
Copy file `config/main-example.ini` to `config/main.ini` and
`config/secure-example.ini` to `config/secure.ini`. Edit these files.
You need to set it via config files, which are loaded via `config.add_config_ini()`.

Example of config files are in `config/.
Example of config files are in [`config/`](config/).

**Use in code**
### Use in code

import atmosphere.config
atmosphere.config.add_config_ini('path/to/main.ini', 'path/to/secure.ini', 'path/to/other.ini', ...)
from atmosphere.appliance.appliance_configuration_templates import get_all_app_config_temp
get_all_app_config_temp()

That's all!
That's all!
7 changes: 7 additions & 0 deletions clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

export __dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

set -x
rm -rf ${__dir}/*.egg-info/ ${__dir}/build/ ${__dir}/dist/
find ${__dir} -name *.pyc -exec rm {} \;
File renamed without changes.
File renamed without changes.
24 changes: 17 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,30 @@

setup(
name='atmosphere-python-client',
packages=['atmosphere', 'atmosphere.appliance', 'atmosphere.machine', 'atmosphere.mapping', 'atmosphere.property'],
package_dir={'atmosphere': '%s/src/atmosphere' % pwd,
'atmosphere.appliance': '%s/src/atmosphere/appliance' % pwd,
'atmosphere.machine': '%s/src/atmosphere/machine' % pwd,
'atmosphere.mapping': '%s/src/atmosphere/mapping' % pwd,
'atmosphere.property': '%s/src/atmosphere/property' % pwd},
packages=[
'atmosphere',
'atmosphere.appliance',
'atmosphere.machine',
'atmosphere.mapping',
'atmosphere.property'
],
package_dir={
'atmosphere': '%s/src/atmosphere' % pwd,
'atmosphere.appliance': '%s/src/atmosphere/appliance' % pwd,
'atmosphere.machine': '%s/src/atmosphere/machine' % pwd,
'atmosphere.mapping': '%s/src/atmosphere/mapping' % pwd,
'atmosphere.property': '%s/src/atmosphere/property' % pwd
},
install_requires=required,
version='1.0',
description='Atmosphere REST API client written in python',
author=u'Paweł Suder',
author_email='pawel@suder.info',
url='https://github.com/dice-cyfronet/atmosphere-python-client',
download_url='https://github.com/dice-cyfronet/atmosphere-python-client/archive/master.zip',
keywords=['atmosphere', 'atmosphere'],
keywords=[
'atmosphere'
],
classifiers=[
'Programming Language :: Python',
'Development Status :: 4 - Beta',
Expand Down
12 changes: 0 additions & 12 deletions test/run-test.sh

This file was deleted.