Skip to content
Snippets Groups Projects
Commit cfe59b8e authored by Anton Joubert's avatar Anton Joubert
Browse files

Init repo from ska-python-skeleton template

parents
No related branches found
No related tags found
No related merge requests found
Showing with 1313 additions and 0 deletions
*.py[cod]
*.egg-info
*.eggs
.ipynb_checkpoints
build
dist
.cache
__pycache__
Pipfile.lock
htmlcov
.coverage
coverage.xml
.pytest_cache
*,cover
docs/_build
docs/apidocs
# ide
.idea
.eclipse
.vscode
# GitLab CI in conjunction with GitLab Runner can use Docker Engine to test and build any application.
# Docker, when used with GitLab CI, runs each job in a separate and isolated container using the predefined image that is set up in .gitlab-ci.yml.
# In this case we use the latest python docker image to build and test this project.
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
# cache is used to specify a list of files and directories which should be cached between jobs. You can only use paths that are within the project workspace.
# If cache is defined outside the scope of jobs, it means it is set globally and all jobs will use that definition
cache:
paths:
# before_script is used to define the command that should be run before all jobs, including deploy jobs, but after the restoration of artifacts.
# This can be an array or a multi-line string.
before_script:
- pip install pipenv
- pipenv install
stages:
- test
- linting
- deploy
# The YAML file defines a set of jobs with constraints stating when they should be run.
# You can specify an unlimited number of jobs which are defined as top-level elements with an arbitrary name and always
# have to contain at least the script clause.
# In this case we have only the test job which produces a coverage report and the unittest output (see setup.cfg), and
# the coverage xml report is moved to the reports directory while the html output is persisted for use by the pages
# job. TODO: possibly a candidate for refactor / renaming later on.
test:
stage: test
# tags:
# - docker-executor
script:
- pipenv run python setup.py test
- mv coverage.xml ./build/reports/code-coverage.xml
artifacts:
paths:
- ./build
- htmlcov
list_dependencies:
stage: test
script:
- pipenv graph >> pipenv_deps.txt
- dpkg -l >> system_deps.txt
- awk 'FNR>5 {print $2 ", " $3}' system_deps.txt >> system_deps.csv
- mkdir .public
- cp pipenv_deps.txt .public/
- cp system_deps.txt .public/
- cp system_deps.csv .public/
- mv .public public
artifacts:
paths:
- public
linting:
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
tags:
- docker-executor
stage: linting
script:
- make lint
when: always
artifacts:
paths:
- ./build
pages:
stage: deploy
tags:
- docker-executor
dependencies:
- test
script:
- ls -la
- mkdir .public
- cp -r htmlcov/* .public
- rm -rf htmlcov
- mv .public public
artifacts:
paths:
- public
expire_in: 30 days
create ci metrics:
stage: .post
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:latest
when: always
tags:
- docker-executor
script:
# Gitlab CI badges creation: START
- apt-get -y update
- apt-get install -y curl --no-install-recommends
- curl -s https://gitlab.com/ska-telescope/ci-metrics-utilities/raw/master/scripts/ci-badges-func.sh | sh
# Gitlab CI badges creation: END
artifacts:
paths:
- ./build
\ No newline at end of file
.pylintrc 0 → 100644
[MASTER]
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-whitelist=
# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=CVS
# Add files or directories matching the regex patterns to the blacklist. The
# regex matches against base names, not paths.
ignore-patterns=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use.
jobs=0
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=pylint_junit
# Pickle collected data for later comparisons.
persistent=yes
# Specify a configuration file.
#rcfile=
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then reenable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=C,
R,
W
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=unreachable,
duplicate-key,
unnecessary-semicolon,
global-variable-not-assigned,
unused-variable,
binary-op-exception,
bad-format-string,
anomalous-backslash-in-string,
bad-open-mode
[REPORTS]
# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
#msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=junit
# Tells whether to display a full report or only the messages.
reports=yes
# Activate the evaluation score.
score=yes
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style.
#class-attribute-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
ex,
Run,
_
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style.
#variable-rgx=
[SIMILARITIES]
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
# Ignore imports when computing similarities.
ignore-imports=no
# Minimum lines number of a similarity.
min-similarity-lines=4
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX
[TYPECHECK]
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
[LOGGING]
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored. Default to name
# with leading underscore.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000
# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package..
spelling-dict=
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words=no
[DESIGN]
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement.
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[CLASSES]
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=cls
[IMPORTS]
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=optparse,tkinter.tix
# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled).
ext-import-graph=
# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled).
import-graph=
# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception".
overgeneral-exceptions=Exception
###########
Change Log
###########
All notable changes to this project will be documented in this file.
This project adheres to `Semantic Versioning <http://semver.org/>`_.
[Unreleased]
************
Added
-----
* Empty Python project directory structure
LICENSE 0 → 100644
BSD License
Copyright (c) 2018, SKA Organisation
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of SKA Skeleton nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Makefile 0 → 100644
# Use bash shell with pipefail option enabled so that the return status of a
# piped command is the value of the last (rightmost) commnand to exit with a
# non-zero status. This lets us pipe output into tee but still exit on test
# failures.
SHELL = /bin/bash
.SHELLFLAGS = -o pipefail -c
all: test lint
# The following steps copy across useful output to this volume which can
# then be extracted to form the CI summary for the test procedure.
test:
python setup.py test | tee ./build/setup_py_test.stdout; \
mv coverage.xml ./build/reports/code-coverage.xml;
# The following steps copy across useful output to this volume which can
# then be extracted to form the CI summary for the test procedure.
lint:
# FIXME pylint needs to run twice since there is no way go gather the text and junit xml output at the same time
pip3 install pylint2junit; \
pylint --output-format=parseable ska_python_skeleton | tee ./build/code_analysis.stdout; \
pylint --output-format=pylint2junit.JunitReporter ska_python_skeleton > ./build/reports/linting.xml;
.PHONY: all test lint
Pipfile 0 → 100644
[[source]]
url = "https://nexus.engageska-portugal.pt/repository/pypi-proxy/simple"
verify_ssl = true
name = "nexus-proxy"
[[source]]
url = "https://nexus.engageska-portugal.pt/repository/pypi/simple"
verify_ssl = true
name = "nexus-hosted"
[packages]
docutils = "*"
MarkupSafe = "*"
Pygments = "*"
pylint = "*"
pylint-junit = "*"
pytest = "*"
pytest-cov = "*"
pytest-pylint = "*"
pytest-json-report = "*"
python-dotenv = ">=0.5.1"
Sphinx = "*"
sphinx_rtd_theme = "*"
sphinx-autobuild = "*"
sphinxcontrib-websupport = "*"
recommonmark = "*"
[dev-packages]
[requires]
python_version = "3"
SKA Python Skeleton Project
===========================
[![Documentation Status](https://readthedocs.org/projects/ska-python-skeleton/badge/?version=latest)](https://developer.skatelescope.org/projects/skeleton/en/latest/?badge=latest)
Briefly describe your project here
Requirements
------------
The system used for development needs to have Python 3 and `pip` installed.
Install
-------
**Always** use a virtual environment. [Pipenv](https://pipenv.readthedocs.io/en/latest/) is now Python's officially
recommended method and the one used by default in this repo.
Follow these steps at the project root:
First, ensure that `~/.local/bin` is in your `PATH` with:
```bash
> echo $PATH
```
In case `~/.local/bin` is not part of your `PATH` variable, under Linux add it with:
```bash
> export PATH=~/.local/bin:$PATH
```
or the equivalent in your particular OS.
Then proceed to install pipenv and the required environment packages:
```bash
> pip install pipenv # if you don't have pipenv already installed on your system
> pipenv install
> pipenv shell
```
You will now be inside a pipenv shell with your virtual environment ready.
Use `exit` to exit the pipenv environment.
Testing
-------
* Put tests into the `tests` folder
* Use [PyTest](https://pytest.org) as the testing framework
- Reference: [PyTest introduction](http://pythontesting.net/framework/pytest/pytest-introduction/)
* Run tests with `python setup.py test`
- Configure PyTest in `setup.py` and `setup.cfg`
* Running the test creates the `htmlcov` folder
- Inside this folder a rundown of the issues found will be accessible using the `index.html` file
* All the tests should pass before merging the code
Code analysis
-------------
* Use [Pylint](https://www.pylint.org) as the code analysis framework
* By default it uses the [PEP8 style guide](https://www.python.org/dev/peps/pep-0008/)
* Use the provided `code-analysis.sh` script in order to run the code analysis in the `module` and `tests`
* Code analysis should be run by calling `pylint ska_python_skeleton`. All pertaining options reside under the `.pylintrc` file.
* Code analysis should only raise document related warnings (i.e. `#FIXME` comments) before merging the code
Writing documentation
--------------------
* The documentation generator for this project is derived from SKA's [SKA Developer Portal repository](https://github.com/ska-telescope/developer.skatelescope.org)
* The documentation can be edited under `./docs/src`
* If you want to include only your README.md file, create a symbolic link inside the `./docs/src` directory if the existing one does not work:
```bash
$ cd docs/src
$ ln -s ../../README.md README.md
```
* In order to build the documentation for this specific project, execute the following under `./docs`:
```bash
$ make html
```
* The documentation can then be consulted by opening the file `./docs/build/html/index.html`
SHELL := /bin/bash
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = skeleton
SOURCEDIR = src
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
../../README.md
\ No newline at end of file
/*
Following SKA brand guidelines colors are defined as
SKA Sky Blue: rgb(0, 174, 239)
SKA Ocean Blue: rgb(0, 84, 164)
SKA Teal Blue: rgb(0, 104, 138)
SKA Burnt Sun: rgb(236, 134, 35)
SKA Earth Green: rgb(166, 206, 57)
*/
.wy-nav-side{
background-color: rgb(0, 84, 164);
color: white;
}
.wy-side-nav-search{
padding-top: 0px;
/*background-color: rgb(0, 174, 239);*/
background-color: rgb(0, 84, 164);
text-align: center;
}
.wy-menu-vertical p.caption{
color: rgb(236, 134, 35);
}
.wy-menu {
color: white;
}
.wy-menu-vertical a{
color: white;
}
.local-toc ul li a:hover {
background-color: rgb(0, 174, 239);
}
.wy-side-nav-search a{
padding-top: 0px;
}
.wy-side-nav-search a img.logo{
background-color: rgb(255, 255, 255);
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
padding-top: 40px;
}
.ska-logo, ska-logo:hover{
background-attachment: scroll;
background-clip: border-box;
background-color: rgb(255, 255, 255);
background-image: url("https://www.skatelescope.org/wp-content/themes/skatelescope.org-theme/img/img-logo3.png");
background-origin: padding-box;
background-position: 22px 35px;
background-position-x: 22px;
background-position-y: 35px;
background-repeat: no-repeat;
background-size: 153px 98px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
/*color: rgb(0, 86, 120);
float: left;
font-family: "Eurostile LT W01 Demi", sans-serif;
font-size: 44.8px;
font-weight: 400;
line-height: 60px;
list-style-image: none;
list-style-position: outside;
list-style-type: none;*/
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
width: 186px;
height: 135px;
}
docs/src/_static/img/favicon.ico

1.37 KiB

docs/src/_static/img/logo.jpg

14.4 KiB

This diff is collapsed.
jQuery(function(){
var github_v3_endpoint = "https://api.github.com/orgs/ska-telescope/repos";
var list = $("#list-of-projects > ul");
if( list.length ){
list.empty();
$.getJSON(github_v3_endpoint, function(data){
$.each(data, function(key, val){
//console.log(val);
if(val["description"])
description = val["description"];
else
description = "";
item = "<li><a href=\"" +
val["html_url"] +
"\">" +
val["name"] +
"</a> " +
description +
"</li>";
$(item).appendTo(list);
}); //end each
}); //end getJSON
}else{ //if list not found
//console.log("list not found")
}
});
{% extends "!footer.html" %}
{% block extrafooter %}
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/">
<img alt="Creative Commons Licence"
style="border-width:0"
src="https://i.creativecommons.org/l/by/4.0/88x31.png" />
</a>
<br />
<span xmlns:dct="http://purl.org/dc/terms/"
property="dct:title">
SKA developer documentation
</span>
by
<a xmlns:cc="http://creativecommons.org/ns#"
href="developer.skatelscope.org"
property="cc:attributionName"
rel="cc:attributionURL">
SKA organisation
</a>
is licensed under a
<a rel="license"
href="http://creativecommons.org/licenses/by/4.0/">
Creative Commons Attribution 4.0 International License
</a>.
<br />Based on a work at
<a xmlns:dct="http://purl.org/dc/terms/"
href="https://github.com/ska-telescope/developer.skatelescope.org"
rel="dct:source">
github.com/ska-telescope/developer.skatelescope.org
</a>.
<br /><br />
This work is inspired by the
<a href="https://developer.lsst.io/">
LSST developer guide
</a> © Copyright 2016-2018 Association of Universities for Research in Astronomy, licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
<br /><br />
This work is inspired by the
<a href="https://www.apache.org/dev/">
Apache developer information
</a>
Copyright © 2018 The Apache Software Foundation, Licensed under the
<a rel="license" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
{% endblock %}
{% extends "!layout.html" %}
{#
{% block sidebartitle %}
#}
{# original content
{% if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{% else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{project }}
{% endif %}
{% if logo %}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" />
{% endif %}
</a>
{% if theme_display_version %}
{%- set nav_version = version %}
{% if READTHEDOCS and current_version %}
{%- set nav_version = current_version %}
{% endif %}
{% if nav_version %}
<div class="version">
{{ nav_version }}
</div>
{% endif %}
{% endif %}
{% include "searchbox.html" %}
end of original content #}
{#
<a href="{{pathto(master_doc)}}" class="ska-logo"></a>
{% include "searchbox.html" %}
{% endblock %}
#}
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# developer.skatelescope.org documentation build configuration file, created by
# sphinx-quickstart on Wed Dec 13 11:59:38 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
import sphinx_rtd_theme
def setup(app):
app.add_stylesheet('css/custom.css')
app.add_javascript('js/github.js')
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'recommonmark']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = ['.rst', '.md']
# source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'developer.skatelescope.org'
copyright = '2018, SKA Organization'
author = 'Marco Bartolini'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y.Z version.
version = '0.1.0'
# The full version, including alpha/beta/rc pre-release tags.
release = '0.1.0-beta'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'En-en'
# 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 = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- 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'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
#'logo_only' : False,
#'logo_only' : 'ska_logo.jpg',
#'logo' : 'ska_logo.jpg',
}
html_context = {
'favicon': 'img/favicon.ico',
'logo': 'img/logo.jpg',
'theme_logo_only' : True,
'display_github': True, # Integrate GitHub
'github_user': 'flyingfrog81', # Username
'github_repo': 'developer.skatelescope.org', # Repo name
'github_version': 'master', # Version
'conf_py_path': '/src/', # Path in the checkout to the docs root
}
# 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']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
#html_sidebars = {
# '**': [
# 'about.html',
# 'navigation.html',
# 'relations.html', # needs 'show_related': True theme option to display
# 'searchbox.html',
# 'donate.html',
# ]
#}
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'developerskatelescopeorgdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'developerskatelescopeorg.tex', 'developer.skatelescope.org Documentation',
'Marco Bartolini', 'manual'),
]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'developerskatelescopeorg', 'developer.skatelescope.org Documentation',
[author], 1)
]
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'developerskatelescopeorg', 'developer.skatelescope.org Documentation',
author, 'developerskatelescopeorg', 'One line description of project.',
'Miscellaneous'),
]
# -- Options for Epub output ----------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
.. skeleton documentation master file, created by
sphinx-quickstart on Thu May 17 15:17:35 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. HOME SECTION ==================================================
.. Hidden toctree to manage the sidebar navigation.
.. toctree::
:maxdepth: 2
:caption: Home
:hidden:
.. README =============================================================
.. This project most likely has it's own README. We include it here.
.. toctree::
:maxdepth: 2
:caption: Readme
README
.. COMMUNITY SECTION ==================================================
..
.. toctree::
:maxdepth: 2
:caption: Package-name
:hidden:
package/guide
Project-name documentation
==========================
These are all the packages, functions and scripts that form part of the project.
- :doc:`package/guide`
.. doctest-skip-all
.. _package-guide:
.. todo::
- Insert todo's here
**************************
Package-name documentation
**************************
This section describes requirements and guidelines.
Subtitle
========
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
.. Automatic API Documentation section. Generating the API from the docstrings. Modify / change the directory structure as you like
Public API Documentation
````````````````````````
Functions
---------
.. automodule:: ska_python_skeleton.ska_python_skeleton
:members:
Classes
-------
.. autoclass:: ska_python_skeleton.ska_python_skeleton.SKA
:noindex:
:members:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment