Skip to content

Commit

Permalink
sphinx documentation, initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cav71 committed Feb 15, 2016
1 parent d4336dc commit 383f586
Show file tree
Hide file tree
Showing 8 changed files with 560 additions and 0 deletions.
Empty file added docs/_static/.keepme
Empty file.
10 changes: 10 additions & 0 deletions docs/api/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
osc
===

These are the packages in the osc package.

.. toctree::
:maxdepth: 4

osc.core
osc.util
20 changes: 20 additions & 0 deletions docs/api/osc.core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. py:module:: osc.core
core
====

This is the osc core module.

basic structures
----------------

.. autoclass:: File
:members:


.. autoclass:: Serviceinfo
:members:


.. autoclass:: Linkinfo
:members:
78 changes: 78 additions & 0 deletions docs/api/osc.util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
osc.util package
================

Submodules
----------

osc.util.ar module
------------------

.. automodule:: osc.util.ar
:members:
:undoc-members:
:show-inheritance:

osc.util.archquery module
-------------------------

.. automodule:: osc.util.archquery
:members:
:undoc-members:
:show-inheritance:

osc.util.cpio module
--------------------

.. automodule:: osc.util.cpio
:members:
:undoc-members:
:show-inheritance:

osc.util.debquery module
------------------------

.. automodule:: osc.util.debquery
:members:
:undoc-members:
:show-inheritance:

osc.util.packagequery module
----------------------------

.. automodule:: osc.util.packagequery
:members:
:undoc-members:
:show-inheritance:

osc.util.repodata module
------------------------

.. automodule:: osc.util.repodata
:members:
:undoc-members:
:show-inheritance:

osc.util.rpmquery module
------------------------

.. automodule:: osc.util.rpmquery
:members:
:undoc-members:
:show-inheritance:

osc.util.safewriter module
--------------------------

.. automodule:: osc.util.safewriter
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: osc.util
:members:
:undoc-members:
:show-inheritance:
96 changes: 96 additions & 0 deletions docs/api/tutorial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Tutorial
========

This is a tutorial on how to use the osc python api.

Key to the |obs| are (remote):

#. A **project**
#. A project has associated multiple **repositories** (linux distributions)
#. Multiple **packages** in a project will hold the builds against the difefrent **repositories**


A user will deal with local checkout of a project in a **working copy**: this is similar to the
subversion checkout model.


Initial config setup
--------------------

Osc the library requires an initial setup:

>>> import osc.conf
>>> osc.conf.get_config()

This will read all the external config files (eg. ~/.oscrc) and the internal configuration
values.


Acquiring the apiurl
--------------------

All the osc operation will use a **apiurl** to lookup for things like passwords, username and other parameters
while performing operations:

>>> apiurl = osc.conf.config['apiurl']


Operations on a remote build server
-----------------------------------

osc is similar to subversion, it has a remote server and a local (checkout) **working** directory.
First we'll go through the remote operation on a server **NOT** requiring a checkout.
Operations are contained in the osc.core module:

>>> import osc.core


List all the projects and packages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This will show all the projects on the remote |obs|:

>>> for prj in osc.core.meta_get_project_list(apiurl, deleted=False):
print prj


A project has **repositories** associated with it (eg. linux distributions):

>>> prj = 'home:cavallo71:opt-python-interpreters'
>>> for repo in osc.core.get_repos_of_project(apiurl, prj):
print repo


A project contains packages and to list them all:

>>> prj = 'home:cavallo71:opt-python-interpreters'
>>> for pkg in osc.core.meta_get_packagelist(apiurl, prj):
print pkg


Add a package to an existing project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Operations in a checked out **working copy**
--------------------------------------------



Create your first project: the hello project
--------------------------------------------

.. todo:: add he description on how to init a project


Adding your firs package to the project hello: the world package
----------------------------------------------------------------

.. todo:: add he description on how to add a package



Setting the build architectures
-------------------------------


Loading

0 comments on commit 383f586

Please sign in to comment.