Skip to content

Commit 8cdbd9f

Browse files
committed
package customization.
1 parent 3c8c184 commit 8cdbd9f

17 files changed

+27
-184
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ script:
3434
- tox
3535

3636
after_success:
37-
- pylint steenzout
37+
- pylint ansiblebit
3838
- pip install coveralls
3939
- coveralls
4040

4141
deploy:
4242
provider: pypi
43-
user: steenzout
43+
user: ansiblebit
4444
password:
4545
secure: todo
4646
on:

MANIFEST.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ include tox.ini
88

99
recursive-include tests *.py
1010

11-
recursive-exclude steenzout *.pyc
12-
recursive-exclude steenzout *.pyo
11+
recursive-exclude ansiblebit *.pyc
12+
recursive-exclude ansiblebit *.pyo

README.md

+6-129
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,8 @@
1-
# steenzout.primogen
1+
# ansiblebit.lib
22

3-
[![Build Status](https://travis-ci.org/steenzout/python-primogen.svg?branch=master)](https://travis-ci.org/steenzout/python-primogen)
4-
[![Code Health](https://landscape.io/github/steenzout/python-primogen/master/landscape.svg?style=flat)](https://landscape.io/github/steenzout/python-primogen/master)
5-
[![Coverage Status](https://coveralls.io/repos/github/steenzout/python-primogen/badge.svg?branch=master)](https://coveralls.io/r/steenzout/python-primogen)
6-
[![Requirements Status](https://requires.io/github/steenzout/python-primogen/requirements.svg?branch=master)](https://requires.io/github/steenzout/python-primogen/requirements/?branch=master)
3+
[![Build Status](https://travis-ci.org/ansiblebit/python-lib.svg?branch=master)](https://travis-ci.org/ansiblebit/python-lib)
4+
[![Code Health](https://landscape.io/github/ansiblebit/python-lib/master/landscape.svg?style=flat)](https://landscape.io/github/ansiblebit/python-lib/master)
5+
[![Coverage Status](https://coveralls.io/repos/github/ansiblebit/python-lib/badge.svg?branch=master)](https://coveralls.io/r/ansiblebit/python-lib)
6+
[![Requirements Status](https://requires.io/github/ansiblebit/python-lib/requirements.svg?branch=master)](https://requires.io/github/ansiblebit/python-lib/requirements/?branch=master)
77

8-
This repository's goal is to be a starting point for Python projects.
9-
10-
It uses:
11-
12-
- [git](http://git-scm.com) for version control
13-
- [pip](http://www.pip-installer.org/en/latest/) to manage Python packages
14-
- [tox](http://tox.readthedocs.org/en/latest/) for automation and setup development environments
15-
- [Sphinx](http://sphinx-doc.org) for documentation
16-
17-
18-
company
19-
-------
20-
21-
This is the directory which will hold your files.
22-
23-
Rename "company" with your company's name or product.
24-
25-
In this empty project the company package is a namespace package,
26-
meaning it was defined in another repository.
27-
28-
You may not need to do this but it's here to make an example of how to define namespace packages,
29-
what to add on the __init__.py file and in the setup.py file.
30-
31-
32-
docs
33-
----
34-
35-
Directory where you'll store the [Sphinx](http://sphinx-doc.org) configuration files and
36-
where the documentation will be generated.
37-
38-
39-
.gitignore
40-
----------
41-
42-
File where you specify which files [Git](http://en.wikipedia.org/wiki/Git_(software)) should ignore.
43-
44-
A generic file has been provided.
45-
46-
You can use [gitignore.io](http://www.gitignore.io) to
47-
produce other files that will better suit your development environment.
48-
49-
For more information, you can check "[git-scm.com : gitignore](http://git-scm.com/docs/gitignore)".
50-
51-
52-
LICENSE
53-
-------
54-
55-
The Apache 2 license.
56-
57-
Feel free to replace for another license that will be more suitable to the purpose of your project.
58-
59-
60-
pytest.ini
61-
----------
62-
63-
The [pytest](https://pytest.org/latest/index.html) configuration file.
64-
65-
You can read
66-
"[pytest : Changing standard (Python) test discovery](https://pytest.org/latest/example/pythoncollection.html)"
67-
for more information on how to use this file to customize [pytest](https://pytest.org/latest/index.html)'s behavior.
68-
69-
70-
README.md
71-
---------
72-
73-
This file.
74-
75-
Check "[here](http://daringfireball.net/projects/markdown/syntax)" for help
76-
with [Markdown](http://daringfireball.net/projects/markdown/) syntax.
77-
78-
79-
requirements.txt
80-
----------------
81-
82-
On this file you specify the list of packages the project depends.
83-
84-
Read "[pip : Requirement Files](http://www.pip-installer.org/en/latest/user_guide.html#requirements-files)"
85-
to understand how you can properly use this file to define your project's dependencies.
86-
87-
88-
setup.py
89-
--------
90-
91-
The setup script whre you'll describe the project / product, authors, maintainers and
92-
information on how to distribute it.
93-
94-
Read "[Python : 2. Writing the Setup Script](http://docs.python.org/2/distutils/setupscript.html)",
95-
for more information.
96-
97-
98-
tests
99-
-----
100-
101-
The directory where you should add your unit tests.
102-
103-
104-
test-requirements.txt
105-
---------------------
106-
107-
On this file you specify the list of packages the project needs to run its tests.
108-
109-
An example of the possible contents of this file has been provided.
110-
111-
Read "[pip : Requirement Files](http://www.pip-installer.org/en/latest/user_guide.html#requirements-files)"
112-
to understand how you can properly use this file to define your project's test dependencies.
113-
114-
115-
tox.ini
116-
-------
117-
118-
The [tox](http://tox.readthedocs.org/en/latest/) configuration file.
119-
120-
It contains basic information about your project and test environments.
121-
122-
I recommend [installling tox](http://tox.readthedocs.org/en/latest/install.html) and
123-
use it to run your tests and generate the documentation.
124-
125-
```
126-
# run the tests
127-
$ tox
128-
129-
# generate the documentation
130-
$ tox -e docs
131-
```
8+
Python library to support Ansible roles.

steenzout/__init__.py ansiblebit/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2016 Pedro Salgado
3+
# Copyright 2018 ansiblebit
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616
#
17-
"""steenzout namespace package."""
17+
"""ansiblebit namespace package."""
1818

1919
try:
2020
__import__('pkg_resources').declare_namespace(__name__)

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright
3+
# Copyright
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -37,7 +37,7 @@
3737
from recommonmark.parser import CommonMarkParser
3838

3939

40-
_package = 'steenzout.primogen'
40+
_package = 'ansiblebit.lib'
4141
_version = semantic_version.Version('0.0.1')
4242

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

requirements.txt

-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
#package==version
2-
#-e git+ssh://github.com/steenzout/example.git@TAG#egg=example

setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77

88
from setuptools import find_packages, setup
99

10-
exec(open('steenzout/primogen/metadata.py').read())
10+
exec(open('ansiblebit/lib/metadata.py').read())
1111

1212

1313
def requirements(requirements_file):
14-
"""Return primogen mentioned in the given file.
14+
"""Return lib mentioned in the given file.
1515
1616
Args:
1717
requirements_file (str): path to the requirements file to be parsed.
1818
1919
Returns:
20-
(list): 3rd-party primogen dependencies contained in the file.
20+
(list): 3rd-party lib dependencies contained in the file.
2121
"""
2222
return [
2323
str(pkg.req) for pkg in parse_requirements(
@@ -33,7 +33,7 @@ def requirements(requirements_file):
3333
maintainer=__maintainer__,
3434
maintainer_email=__maintainer_email__,
3535
url=__url__,
36-
namespace_packages=('steenzout',),
36+
namespace_packages=('ansiblebit',),
3737
packages=find_packages(exclude=('*.tests', '*.tests.*', 'tests.*', 'tests')),
3838
install_requires=requirements('requirements.txt'),
3939
tests_require=requirements('requirements-test.txt'))

steenzout/primogen/__init__.py

-14
This file was deleted.

steenzout/primogen/metadata.py

-18
This file was deleted.

tests/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
"""Tests for steenzout.primogen package."""
2+
"""Tests for ansiblebit.lib package."""

tests/ansiblebit.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[ansiblebit.lib]

tests/integration/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
"""Integration tests for steenzout.primogen package."""
2+
"""Integration tests for ansiblebit.lib package."""

tests/steenzout.cfg

-1
This file was deleted.

tests/unit/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
"""Unit tests for steenzout.primogen package."""
2+
"""Unit tests for ansiblebit.lib package."""

tests/unit/metadata_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
"""Unit tests for the metadata module."""
33

4-
from steenzout.primogen import metadata
4+
from ansiblebit.lib import metadata
55

66

77
def test_attributes():

tests/unit/package_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: utf-8 -*-
22
"""Unit tests for the package module."""
33

4-
import steenzout.primogen
4+
import ansiblebit.lib
55

66

77
def test_version():
88
"""Test version() function."""
9-
assert steenzout.primogen.version() == steenzout.primogen.__version__
9+
assert ansiblebit.lib.version() == ansiblebit.lib.__version__

tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ passenv = ANSIBLE_ASK_SUDO_PASS HOME LANG LC_ALL
2121
commands =
2222
py.test -q --basetemp={envtmpdir} --confcutdir=.. -n 1 \
2323
--junitxml=tests/junit.xml \
24-
--cov-report xml --cov steenzout.primogen \
24+
--cov-report xml --cov ansiblebit.lib \
2525
--cov-report=html \
2626
--cov-report term-missing \
2727
--pep8 \
@@ -41,7 +41,7 @@ changedir = docs
4141
deps = -rrequirements-docs.txt
4242

4343
commands =
44-
steenzout-sphinx-generate steenzout steenzout.primogen .
44+
steenzout-sphinx-generate ansiblebit ansiblebit.lib .
4545
make dummy
4646
make apidoc
4747
make coverage

0 commit comments

Comments
 (0)