Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Adam Mercer
Koji Packager
Commits
22cbaa4c
Verified
Commit
22cbaa4c
authored
May 15, 2019
by
Duncan Macleod
Committed by
Adam Mercer
May 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: added basic sphinx config
parent
371b48d3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
4 deletions
+170
-4
.gitignore
.gitignore
+4
-0
.gitlab-ci.yml
.gitlab-ci.yml
+24
-0
docs/cli.rst
docs/cli.rst
+8
-0
docs/conf.py
docs/conf.py
+94
-0
docs/index.rst
docs/index.rst
+36
-0
gwkoji/options.py
gwkoji/options.py
+4
-4
No files found.
.gitignore
View file @
22cbaa4c
...
...
@@ -14,3 +14,7 @@ __pycache__/
/.coverage
.pytest_cache/
MANIFEST
# docs
docs/gwkoji*.rst
docs/modules.rst
.gitlab-ci.yml
View file @
22cbaa4c
...
...
@@ -3,6 +3,7 @@ stages:
-
dist
-
build
-
test
-
deploy
variables
:
PIP_CACHE_DIR
:
"
${CI_PROJECT_DIR}/.cache/pip"
...
...
@@ -126,3 +127,26 @@ test:el7:
key
:
"
${CI_JOB_NAME}"
paths
:
-
.cache/yum
# -- docs -------------------
docs
:
stage
:
build
image
:
python:3.7
before_script
:
-
python -m pip install sphinx sphinx-argparse sphinx_rtd_theme
script
:
-
python -m sphinx -b html docs site -E
artifacts
:
paths
:
-
site
pages
:
stage
:
deploy
dependencies
:
-
docs
script
:
-
mv -v site public
artifacts
:
paths
:
-
public
docs/cli.rst
0 → 100644
View file @
22cbaa4c
########################################
gwkoji-packager command-line interface
########################################
.. argparse::
:module: gwkoji.options
:func: parser
:prog: gwkoji-packager
docs/conf.py
0 → 100644
View file @
22cbaa4c
# -*- coding: utf-8 -*-
#
# gwkoji documentation build configuration file
import
re
from
pathlib
import
Path
from
gwkoji
import
__version__
as
VERSION
extensions
=
[
'sphinx.ext.intersphinx'
,
'sphinx.ext.napoleon'
,
'sphinxarg.ext'
,
]
# templates_path = ['_templates']
source_suffix
=
'.rst'
master_doc
=
'index'
# General information about the project.
project
=
u
'gwkoji'
copyright
=
u
'2019, Adam Mercer'
author
=
u
'Adam Mercer'
# The short X.Y version.
version
=
re
.
split
(
r
'[\w-]'
,
VERSION
)[
0
]
# The full version, including alpha/beta/rc tags.
release
=
VERSION
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns
=
[
'_build'
,
'Thumbs.db'
,
'.DS_Store'
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style
=
'monokai'
# Intersphinx directory
intersphinx_mapping
=
{
'python'
:
(
'https://docs.python.org/'
,
None
),
'koji'
:
(
'https://docs.pagure.org/koji/'
,
None
),
}
# The reST default role (used for this markup: `text`) to use for all
# documents.
default_role
=
'obj'
# napoleon configuration
napoleon_use_rtype
=
False
# Don't inherit in automodapi
numpydoc_show_class_members
=
False
automodapi_inherited_members
=
False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme
=
'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# Output file base name for HTML help builder.
htmlhelp_basename
=
'gwkojidoc'
# -- apidoc ---------------------------------------------------------------
def
run_apidoc
(
_
):
"""Call sphinx-apidoc
"""
from
sphinx.ext.apidoc
import
main
as
apidoc_main
curdir
=
Path
(
__file__
).
parent
.
resolve
()
module
=
curdir
.
parent
/
"gwkoji"
apidoc_main
([
'--separate'
,
'--force'
,
'--output-dir'
,
str
(
curdir
),
str
(
module
),
str
(
module
/
"tests"
),
])
# -- setup --------------------------------------------------------------------
def
setup
(
app
):
app
.
connect
(
'builder-inited'
,
run_apidoc
)
docs/index.rst
0 → 100644
View file @
22cbaa4c
#################
GWKoji Packager
#################
============
Installation
============
Installation requires `python>=3.6`
.. code-block:: bash
$ python -m pip install git+https://git.ligo.org/adam-mercer/koji-packager.git
==================
User documentation
==================
.. toctree::
:maxdepth: 2
cli
==================
API documentaation
==================
.. include:: gwkoji.rst
==================
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
gwkoji/options.py
View file @
22cbaa4c
...
...
@@ -32,7 +32,7 @@ from . import __version__
DEFAULT_TARGET
=
'sandbox'
def
parse
_options
():
def
parse
r
():
# define option parser
parser
=
argparse
.
ArgumentParser
(
description
=
"Build RPMs using Koji"
)
parser
.
add_argument
(
...
...
@@ -102,8 +102,8 @@ def parse_options():
dest
=
'source_type'
,
help
=
"source is an RPM spec file"
)
return
parser
# parse options
args
=
parser
.
parse_args
()
return
args
def
parse_options
():
return
parser
().
parse_args
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment