Skip to content

Commit 8793e11

Browse files
authored
Merge pull request #78 from fedora-modularity/devel
Merge devel and master
2 parents 150afae + edfbc7a commit 8793e11

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+869
-195
lines changed

.tito/packages/meta-test-family

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.6.1-1 ./

.tito/packages/modularity-testing-framework

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: python
2+
python:
3+
- "2.7"
4+
5+
sudo: required
6+
7+
services:
8+
- docker
9+
10+
before_install:
11+
- sudo apt-get -y install curl python-software-properties software-properties-common python-pip python-dev build-essential git make
12+
- sudo apt-get install -y libkrb5-dev
13+
- sudo pip install avocado-framework
14+
- pip install avocado-framework
15+
16+
install: sudo make install
17+
18+
script: sudo make travis
19+
20+
after_script: sudo cat ~/avocado/job-results/latest/job.log

CONTRIBUTING.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Contributing Guidelines
2+
3+
Thanks for interest in contributing to MTF.
4+
5+
The following is a set of guidelines for contributing to MTF. These are not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6+
7+
## How to contribute to MTF
8+
9+
### Reporting Bugs
10+
11+
Before creating bug reports, please check a [list of known issues](https://github.com/fedora-modularity/meta-test-family/issues) to see if the problem has already been reported.
12+
13+
If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/fedora-modularity/meta-test-family/issues/new). Be sure to include a **descriptive title, clear description and a package version** and please include **as many details as possible** to help maintainers reproduce the issue and resolve it faster. If possible, add a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.
14+
15+
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
16+
17+
### Suggesting Enhancements
18+
19+
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). When you are creating an enhancement issue, **use a clear and descriptive title** and **provide a clear description of the suggested enhancement** in as many details as possible.
20+
21+
### Submitting changes
22+
23+
To submit changes, please send a [GitHub Pull Request](https://github.com/fedora-modularity/meta-test-family/pull/new/devel). Before submitting a PR, please **read the [Styleguides](#styleguides)** to know more about coding conventions used in this project. Also we will appreciate if you **check your code with pylint and pyflakes**. Always **create a new branch for each pull request** to avoid intertwingling different features or fixes on the same branch. Always **do "git pull --rebase" and "git rebase"** vs "git pull" or "git merge".
24+
25+
> **Note:** We are aware of [current syntax and style code errors](https://github.com/fedora-modularity/meta-test-family/issues/21) and working on fixing them.
26+
27+
## Styleguides
28+
29+
### Git Commit Messages
30+
31+
* Use the present tense ("Add feature" not "Added feature")
32+
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
33+
* Limit the first line to 72 characters or less
34+
35+
```
36+
$ git commit -m "A brief summary of the commit
37+
>
38+
> A paragraph describing what changed and its impact."
39+
```
40+
41+
* Reference issues and pull requests liberally after the first line
42+
* When only changing documentation, include `[ci skip]` in the commit description
43+
* Consider ending the commit message with an applicable emoji:
44+
* :tada: `:tada:` initial commit
45+
* :bookmark: `:bookmark:` version tag
46+
* :construction: `:construction:` work in progress (WIP)
47+
* :package: `:package:` release
48+
* :art: `:art:` improvement of the format/structure of the code
49+
* :racehorse: `:racehorse:` performance improvement
50+
* :hatched_chick: `:hatched_chick:` new feature
51+
* :book: `:book:` docs update
52+
* :bug: `:bug:` bugfix
53+
* :pencil2: `:pencil2:` typo fix
54+
* :recycle: `:recycle:` remove code or files
55+
* :green_heart: `:green_heart:` CI build fix
56+
* :white_check_mark: `:white_check_mark:` add tests
57+
* :arrow_up: `:arrow_up:` dependencies upgrade
58+
* :arrow_down: `:arrow_down:` dependencies downgrade
59+
* :exclamation: `:exclamation:` important
60+
61+
### Codding guidelines
62+
63+
We don't think much of this should be too strange to readers familiar with contributing to Python projects, though it helps if we all get on the same page.
64+
65+
MTF project uses [Landscape tool](https://landscape.io/github/fedora-modularity/meta-test-family/49) to check every commit for errors.
66+
67+
[PEP 8](https://www.python.org/dev/peps/pep-0008/) is a great Python style guide, which we try to follow.
68+
69+
#### Licenses
70+
71+
* Every file should have a license header, including the copyright of the original author.
72+
73+
#### Python Imports
74+
75+
* To make it clear what is importing, imports should not be sprinkled throughout the code, but happen at the top of the file.
76+
77+
#### Comments
78+
79+
* Readability is one of the most important goals for this project
80+
* Comment any non-trivial code where someone might not know why you are doing something in a particular way
81+
* Though if something should be commented, that's often a sign someone should write a function
82+
* All new functions must have a basic docstring comment
83+
* Commenting above a line is preferable to commenting at the end of a line
84+
85+
#### Whitespace
86+
87+
* Four space indent is strictly required
88+
* Include meaningful whitespace between lines of code
89+
90+
#### Variables
91+
92+
* Use descriptive variable names instead of variables like 'x, y, a, b, foo'
93+
* MTF python code uses identifiers like 'ClassesLikeThis and variables_like_this
94+
95+
#### Classes
96+
97+
* It is desirable to see classes in their own files.
98+
* Classes should generally not cause side effects as soon as they are instantiated, move meaningful behavior to methods rather than constructors.
99+
100+
#### Functions and Methods
101+
102+
* In general, functions should not be 'too long' and should describe a meaningful amount of work
103+
* When code gets too nested, that's usually the sign the loop body could benefit from being a function
104+
* Parts of our existing code are not the best examples of this at times.
105+
* Functions should have names that describe what they do, along with docstrings
106+
* Functions should be named with_underscores
107+
* "Don't repeat yourself" is generally a good philosophy
108+
109+
#### Exceptions
110+
111+
* In the main body of the code, use typed exceptions where possible:
112+
113+
```
114+
# not this
115+
raise Exception("panic!")
116+
117+
# this
118+
from moduleframework.exceptions import SomeTypedException
119+
...
120+
raise SomeTypedException("panic!")
121+
```
122+
123+
* Similarly, exception checking should be fine grained:
124+
125+
```
126+
# not this
127+
try:
128+
foo()
129+
except:
130+
bar()
131+
132+
# but this
133+
try:
134+
foo()
135+
except SomeTypedException:
136+
bar()
137+
```
138+
139+
## Questions?
140+
141+
* Ask any question about how to use MTF in the [#fedora-modularity](https://webchat.freenode.net/?channels=fedora-modularity) chat channel on freenode IRC.
142+
143+
Thank you! :heart: :heart: :heart:
144+
145+
MTF Team

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ include Makefile
33
include LICENSE
44
include Vagrantfile
55
include README.md
6+
include CONTRIBUTING.md
67
recursive-include moduleframework *
78
recursive-include docs *
89
recursive-include examples *

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ PYTHONSITE=/usr/lib/python2.7/site-packages
55
all: install check
66

77
check:
8-
cd examples/testing-module; make
8+
make -C examples/testing-module check
9+
10+
travis:
11+
make -C examples/testing-module travis
912

1013
.PHONY: clean
1114

@@ -36,3 +39,4 @@ help:
3639
@echo " source create source tarball"
3740
@echo " check run examples/testing_module check target in Makefile"
3841
@echo " html create HTML documentation"
42+

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
1-
[![Code Health](https://landscape.io/github/fedora-modularity/meta-test-family/master/landscape.svg?style=flat)](https://landscape.io/github/fedora-modularity/meta-test-family/master)
1+
[![Code Health](https://landscape.io/github/fedora-modularity/meta-test-family/master/landscape.svg?style=flat)](https://landscape.io/github/fedora-modularity/meta-test-family/master) [![Build Status](https://travis-ci.org/fedora-modularity/meta-test-family.svg?branch=master)](https://travis-ci.org/fedora-modularity/meta-test-family)
2+
3+
# WELCOME TO MTF GITHUB
24

35
Meta test family (MTF) is a tool to test components of [a modular Fedora](https://docs.pagure.org/modularity/).
46

57
For more information, check out the documentation page:
68

79
http://meta-test-family.readthedocs.io/en/latest/
10+
11+
## QUESTIONS ? HELP ? IDEAS ?
12+
13+
Stop by the [#fedora-modularity](https://webchat.freenode.net/?channels=fedora-modularity) chat channel on freenode IRC.
14+
15+
## CONTRIBUTING ?
16+
17+
Please see the [contributing guidelines](https://github.com/fedora-modularity/meta-test-family/blob/devel/CONTRIBUTING.md) for information regarding the contribution process.
18+
19+
## BUG TO REPORT ?
20+
21+
First and foremost, also check the [contributing guidelines](https://github.com/fedora-modularity/meta-test-family/blob/devel/CONTRIBUTING.md).
22+
23+
You can report bugs or make enhancement requests at the [MTF GitHub issue page](https://github.com/fedora-modularity/meta-test-family/issues/new).
24+
25+
Also please make sure you are testing on the latest released version of MTF or the development branch.
26+
27+
Thanks!

docs/api/bashhelper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BASH Helper
22
===========
33

4-
.. automodule:: moduleframework.bashhelper
4+
.. automodule:: tools.bashhelper
55
:members:
66
:undoc-members:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@
254254
# (source start file, target name, title, author,
255255
# dir menu entry, description, category)
256256
texinfo_documents = [
257-
(master_doc, 'MetaTestFamily', u'MetaTestFamily Documentation',
257+
(master_doc, 'MetaTestfamily', u'Meta Test family Documentation',
258258
u'Petr Hracek@*Jan Scotka', 'MetaTestFamily', 'One line description of project.',
259259
'Miscellaneous'),
260260
]

docs/contributing.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
How to Contribute
2+
==================
3+
4+
If you are interested in contributing to MTF, the best way is to report a bug or propose a new feature that interests you and submit a patch for it. We use `GitHub Issues`_ for sharing bugs and feature ideas. The `MTF GitHub repository`_ should be forked into your personal GitHub account where all work will be done. Any changes should be submitted through the pull request process. For more information on how to contibute, please read our `Contributing Guidelines`_.
5+
6+
MTF is written in Python. While you do not need to be a Python expert to contribute, it would be advantageous to run through the `Python tutorial`_ if you are new to Python or programming in general.
7+
8+
Some knowledge of git and GitHub is useful as well. Documentation on both is available on the `GitHub help page`_ .
9+
10+
.. _GitHub Issues: https://github.com/fedora-modularity/meta-test-family/issues
11+
.. _MTF GitHub repository: https://github.com/fedora-modularity/meta-test-family/
12+
.. _Contributing Guidelines: https://github.com/fedora-modularity/meta-test-family/blob/devel/CONTRIBUTING.md
13+
.. _Python Tutorial: https://docs.python.org/2/tutorial/
14+
.. _GitHub help page: https://help.github.com/
15+
16+
Contribution Checklist
17+
^^^^^^^^^^^^^^^^^^^^^^
18+
19+
1. Make sure that you choose the appropriate upstream branch.
20+
21+
2. Check your code with pylint and pyflakes
22+
23+
3. Please ensure that your code follows our `style guide`_.
24+
25+
4. Please make sure that any new features are documented and that changes are
26+
reflected in existing docs.
27+
28+
5. Please squash your commits and use our `commit message guidelines`_.
29+
30+
6. Make a PR!
31+
32+
Thank you!
33+
34+
.. _style guide: https://github.com/fedora-modularity/meta-test-family/blob/devel/CONTRIBUTING.md#codding-guidelines
35+
.. _commit message guidelines: https://github.com/fedora-modularity/meta-test-family/blob/devel/CONTRIBUTING.md#git-commit-messages
36+
37+
.. seealso::
38+
39+
:doc:`user_guide/index`
40+
User Guide
41+
`webchat.freenode.net <https://webchat.freenode.net/?channels=fedora-modularity>`_
42+
Questions? Help? Ideas? Stop by the #fedora-modularity chat channel on freenode IRC.

0 commit comments

Comments
 (0)