Skip to content
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
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,17 @@ deploy:
secure: todo
on:
tags: true

notifications:
email: false
slack:
template:
- "%{repository_name}@%{branch} %{commit} : [%{build_number}] %{result} "
- "%{build_url}"
- "'%{commit_subject}' by %{author}"
- "%{elapsed_time} : %{duration}"
- "%{message}"
rooms:
secure: cMw16G5yS/zFg74NZnd/e0KeLlYvG2R1ZNM0JsGW7z+9gfCIBEGr/2aDLR/DPw4WejSpeCWVIS+rqmfYGKKRR4irRkCNxGJCYe/Tfmo9/ZNH9rXK0FM18jQyUx8y6pyMGW+u4f4UWf+hQXrbh5ucjOrCAeWIREIWlOVWo0L0/V8=
on_success: always
on_failure: always
10 changes: 5 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ clean:

.PHONY: apidoc
apidoc:
sphinx-apidoc -f -T --separate -o apidoc ../company
sphinx-apidoc -f -T --separate -o apidoc ../steenzout
ls apidoc/*.rst | xargs -I {} sed -i .bak '/:undoc-members:/d' {}
rm apidoc/*.bak
@echo "apidoc generation finished, look at the " \
Expand Down Expand Up @@ -99,9 +99,9 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/py_company_package.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/py_steenzout_primogen.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/py_company_package.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/py_steenzout_primogen.qhc"

.PHONY: applehelp
applehelp:
Expand All @@ -118,8 +118,8 @@ devhelp:
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/py_company_package"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/py_company_package"
@echo "# mkdir -p $$HOME/.local/share/devhelp/py_steenzout_primogen"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/py_steenzout_primogen"
@echo "# devhelp"

.PHONY: epub
Expand Down
112 changes: 61 additions & 51 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
# -*- coding: utf-8 -*-
#
# steenzout.primogen primogen documentation build configuration file.
# Copyright
#
# This file is execfile()d with the current directory set to its
# containing dir.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# Note that not all possible configuration values are present in this
# autogenerated file.
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""
Sphinx documentation build configuration 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 sys
import os

sys.path.insert(0, os.path.abspath('..'))


import semantic_version

from recommonmark.parser import CommonMarkParser

from steenzout.primogen import __version__

_version = semantic_version.Version(__version__)
_package = 'steenzout.primogen'
_version = semantic_version.Version('0.0.1')

# -- General configuration ------------------------------------------------

Expand All @@ -50,7 +60,6 @@
# 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:
#
Expand All @@ -71,9 +80,9 @@
master_doc = 'index'

# General information about the project.
project = u'steenzout.primogen'
copyright = u'2016, Pedro Salgado'
author = u'Pedro Salgado'
project = _package
author = 'Pedro Salgado'
copyright = ''

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand All @@ -82,7 +91,7 @@
# The short X.Y version.
version = u'%d.%d' % (_version.major, _version.minor)
# The full version, including alpha/beta/rc tags.
release = __version__
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -257,27 +266,28 @@
# html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'py_company_package'
htmlhelp_basename = u'py_%s' % _package.replace('.', '_')

# -- 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',
}
# 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',
# }
latex_elements = {}

# Grouping the document tree into LaTeX files.
# List of tuples (
Expand All @@ -289,10 +299,10 @@
# ).
latex_documents = [(
master_doc,
'py_company_package.tex',
u'steenzout.primogen documentation',
author,
'manual'
u'py_%s.tex' % _package.replace('.', '_'),
u'%s documentation' % _package,
'Pedro Salgado',
u'manual'
)]

# The name of an image file (relative to this directory) to place at the top of
Expand All @@ -319,7 +329,7 @@

# It false, will not define \strong, \code, itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
# sphinxs.
#
# latex_keep_old_macro_names = True

Expand All @@ -340,9 +350,9 @@
# ).
man_pages = [(
master_doc,
'py_company_package',
'steenzout.primogen documentation',
[author],
'py_%s' % _package.replace('.', '_'),
'%s documentation' % _package,
['Pedro Salgado'],
1
)]

Expand All @@ -365,12 +375,12 @@
# ).
texinfo_documents = [(
master_doc,
'py_company_package',
'steenzout.primogen documentation',
author,
'',
'steenzout.primogen documentation.',
'Miscellaneous'
u'py_%s' % _package.replace('.', '_'),
u'%s documentation' % _package,
'Pedro Salgado',
u'',
u'%s documentation.' % _package,
u'Miscellaneous'
)]

# Documents to append as an appendix to all manuals.
Expand Down
5 changes: 4 additions & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
steenzout.sphinx==1.0.4
recommonmark==0.4.0
semantic_version==2.6.0
sphinx_rtd_theme==0.1.9
steenzout.sphinx==1.0.14
82 changes: 1 addition & 81 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,82 +1,2 @@
# -*- coding: utf-8 -*-
"""
.. module:: steenzout.primogen.tests
:platform: Unix
:synopsis:

.. moduleauthor:: Your Name <email address>
"""

import os

import steenzout.primogen.config
import steenzout.primogen.logging

import logging

import unittest


LOGGING_CONFIG_FILE = '%s/tests/logging.conf' % os.curdir
PACKAGE_CONFIG_FILE = '%s/tests/primogen.cfg' % os.curdir


class Basic(object):
"""
Basic functionality to enhance test cases.
"""

def setup_configuration(self):
"""
Setup test configuration.
It will also load (once) the test configuration.
"""
logging.getLogger('%s.%s' % (__name__, 'Basic')).info('setup_configuration()')

steenzout.primogen.config.reset()
steenzout.primogen.config.load_configuration(PACKAGE_CONFIG_FILE)

self.configuration = steenzout.primogen.config.get()

def setup_logger(self):
"""
Setup test logger.
It will also load (once) the test logging configuration.
"""
logging.getLogger('%s.%s' % (__name__, 'Basic')).info('setup_logger()')

steenzout.primogen.logging.load_configuration(LOGGING_CONFIG_FILE)

self.logger = logging.getLogger('%s.%s' % (__name__, self.__class__.__name__))


class BaseTestCase(unittest.TestCase, Basic):
"""
Base test case.
"""

__slots__ = ('configuration', 'logger')

def __init__(self, methodName):
"""
Initializes a BaseTestCase instance.

:param methodName: the test method to be executed.
:type methodName: str
"""
super(BaseTestCase, self).__init__(methodName)

self.setup_logger()
self.setup_configuration()

def setUp(self):
"""
Setup test resources.
"""
self.logger.info('setUp()')

def tearDown(self):
"""
Tear down test resources.
"""
self.logger.info('tearDown()')
"""Tests for steenzout.primogen package."""
17 changes: 0 additions & 17 deletions tests/basic_test.py

This file was deleted.

Loading