caom2repo-1.6
توضیحات
CAOM-2.4 repo access and tools
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | caom2repo-1.6 |
| نام | caom2repo |
| نسخه کتابخانه | 1.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Canadian Astronomy Data Centre |
| ایمیل نویسنده | cadc@nrc-cnrc.gc.ca |
| آدرس صفحه اصلی | http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2 |
| آدرس اینترنتی | https://pypi.org/project/caom2repo/ |
| مجوز | AGPLv3 |
=========
Caom2Repo
=========
.. image:: https://img.shields.io/pypi/v/caom2repo.svg
:target: https://pypi.python.org/pypi/caom2repo
Client caom2-repo
=================
caom2Repo provides a client (caom2-repo) to perform CRUD (Create, Read, Update, Delete) on an observation in a collection in a repository.
Visitor Plugin
==============
The client also provides a visitor function which accepts a plugin. The visitor function iterates the observations of a collection and updates them according to the algorithm of the plugin function. The following is an example plugin to add a 'PREVIEW' Plane to an observation. More plugin examples can be found in caom2repo/tests/. ::
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from caom2.observation import Observation
from caom2.plane import Plane
class ObservationUpdater(object):
"""ObservationUpdater that adds a plane to the observation."""
def update(self, observation, **kwargs):
"""
Processes an observation and updates it
"""
assert isinstance(observation, Observation), (
"observation %s is not an Observation".format(observation))
observation.planes.add(Plane('PREVIEW'))
نیازمندی
| مقدار | نام |
|---|---|
| >=1.5.1 | cadcutils |
| >=2.6 | caom2 |
| - | pytest |
| >=2.5.1 | pytest-cov |
| >=3.4.1 | flake8 |
| ==1.0.2 | funcsigs |
| >=2.0.0 | mock |
| >=1.0.5 | xml-compare |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7, <4 | Python |
نحوه نصب
نصب پکیج whl caom2repo-1.6:
pip install caom2repo-1.6.whl
نصب پکیج tar.gz caom2repo-1.6:
pip install caom2repo-1.6.tar.gz