-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
143 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
.idea/ | ||
*.iml | ||
cover/ | ||
.coverage | ||
*.egg-info/ | ||
dist/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,58 @@ | ||
stages: | ||
- mirror | ||
- test | ||
- stats | ||
- release | ||
- docs | ||
|
||
github_mirror: | ||
stage: mirror | ||
tags: | ||
- github_namboy94_push | ||
script: | ||
- git checkout master && git pull | ||
- git push [email protected]:namboy94/xdcc-dl.git master -f | ||
- git checkout develop && git pull | ||
- git push [email protected]:namboy94/xdcc-dl.git develop -f | ||
|
||
stylecheck: | ||
stage: test | ||
tags: | ||
- python3 | ||
script: | ||
- python3 -m venv virtual && source virtual/bin/activate && pip install pycodestyle | ||
- pycodestyle . --exclude=virtual | ||
- python3 -m venv virtual && source virtual/bin/activate && pip install ci-scripts | ||
- python-codestyle-check | ||
|
||
run_unit_tests_with_coverage: | ||
unittest: | ||
stage: test | ||
tags: | ||
- python3 | ||
- progstats-live | ||
script: | ||
- python3 -m venv virtual && source virtual/bin/activate && pip install nose coverage | ||
- python3 setup.py nosetests -v --with-coverage --cover-package=xdcc_dl --cover-branches --cover-erase --cover-html --cover-inclusive | ||
- rsync -av cover/ /var/www/progstats.namibsun.net/data/coverage/xdcc-dl --delete-before | ||
- python3 -m venv virtual && source virtual/bin/activate && python setup.py install | ||
- python-unittest | ||
|
||
pypi_dist: | ||
release_upload: | ||
stage: release | ||
only: | ||
- master | ||
tags: | ||
- python3 | ||
script: | ||
- python3 -m venv virtual && source virtual/bin/activate && pip install twine wheel | ||
- echo "$PYPIRC" > ~/.pypirc | ||
- python3 setup.py bdist_wheel sdist | ||
- twine upload dist/* | ||
- python3 -m venv virtual && source virtual/bin/activate && python setup.py install | ||
- github-release-upload $(cat version) "$(changelog-reader)" | ||
- gitlab-release-upload $(cat version) "$(changelog-reader)" | ||
|
||
upload_release_to_github: | ||
pypi_upload: | ||
stage: release | ||
only: | ||
- master | ||
tags: | ||
- python3 | ||
script: | ||
- mkdir -p artifacts | ||
- git clone https://gitlab.namibsun.net/namboy94/ci-scripts.git | ||
- python3 ci-scripts/src/changelog-reader/changelog-reader.py -c CHANGELOG -d current_changelog | ||
- python3 ci-scripts/src/github-release-uploader/github-release-uploader.py namboy94 xdcc-dl $GITHUB_ACCESS_TOKEN | ||
$(python3 setup.py -V) current_changelog artifacts -b master | ||
- python3 -m venv virtual && source virtual/bin/activate && python setup.py install | ||
- pypi-upload | ||
|
||
upload_release_to_gitlab: | ||
stage: release | ||
only: | ||
- master | ||
gitstats: | ||
stage: stats | ||
tags: | ||
- python3 | ||
- gitstats | ||
script: | ||
- mkdir -p artifacts | ||
- git clone https://gitlab.namibsun.net/namboy94/ci-scripts.git | ||
- python3 ci-scripts/src/changelog-reader/changelog-reader.py -c CHANGELOG -d current_changelog | ||
- python3 ci-scripts/src/gitlab-release-uploader/gitlab-release-uploader.py namboy94 xdcc-dl $GITLAB_ACCESS_TOKEN | ||
$(python3 setup.py -V) current_changelog artifacts -b master -u https://gitlab.namibsun.net | ||
- python3 -m venv virtual && source virtual/bin/activate && python setup.py install | ||
- gitstats-gen | ||
|
||
generate_sphinx_documentation: | ||
stage: docs | ||
only: | ||
- master | ||
- develop | ||
docgen: | ||
stage: stats | ||
tags: | ||
- python3 | ||
- latex | ||
- progstats-live | ||
script: | ||
- python3 -m venv virtual && source virtual/bin/activate && pip install sphinx sphinx_rtd_theme | ||
- python3 setup.py install | ||
- cd doc | ||
- make buildsource | ||
- make latexpdf | ||
- make html | ||
- rsync -av build/latex/xdcc-dl.pdf /var/www/progstats.namibsun.net/data/doc_pdf/xdcc-dl.pdf --delete-before | ||
- rsync -av build/html/ /var/www/progstats.namibsun.net/data/doc_html/xdcc-dl --delete-before | ||
- python3 -m venv virtual && source virtual/bin/activate && python setup.py install | ||
- sphinx-docgen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Contributing to xdcc-dl | ||
# Contributing | ||
|
||
## Copyright and Management | ||
|
||
|
@@ -8,33 +8,11 @@ of this project and may steer the development process as he sees fit. | |
Contributions will be attributed to the author of said code and the copyright will | ||
remain the author's. | ||
|
||
## Coding guidelines | ||
|
||
**Testing** | ||
|
||
Due to the nature of this project, testing is rather complicated. Small unit | ||
tests for the offline components should be implemented, however the online | ||
components may prove to be too cumbersome to test. To test those, a complete | ||
server infrastructure would be required. | ||
|
||
**Style** | ||
|
||
We feel that a unified coding style is important, which is why we require a linter to | ||
be used. In this case **pycodestyle** is used. Code must pass `pycodestyle`'s tests. | ||
|
||
**Documentation** | ||
|
||
We use sphinx-autodoc to create automated documentation from docstring comments. As a result, all | ||
classes, methods and class/instance variables should be described using docstring comments. | ||
|
||
Hard to understand parts of code within a method should always be commented | ||
accordingly. | ||
|
||
## Contributing | ||
|
||
All active development is done on a [self-hosted Gitlab server](https://gitlab.namibsun.net). | ||
To contribute, send an email to [email protected] to create an account. Once you have an | ||
account, you may issue a merge or pull request. | ||
|
||
Using the Gitlab issue tracker is preferred, but the issues on Github are also | ||
taken into consideration. | ||
taken into consideration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env python3 | ||
"""LICENSE | ||
Copyright 2016 Hermann Krumrey | ||
This file is part of xdcc-dl. | ||
xdcc-dl is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
xdcc-dl is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with xdcc-dl. If not, see <http://www.gnu.org/licenses/>. | ||
LICENSE""" | ||
|
||
# noinspection PyPackageRequirements | ||
import sphinx_rtd_theme | ||
# noinspection PyPackageRequirements | ||
from sphinx.ext.autodoc import between | ||
|
||
# noinspection PyShadowingBuiltins | ||
copyright = '2016 Hermann Krumrey' | ||
author = 'Hermann Krumrey' | ||
project = 'xdcc-dl' | ||
|
||
extensions = ["sphinx.ext.autodoc"] | ||
master_doc = "index" | ||
|
||
with open("../../../version", "r") as version_file: | ||
version = version_file.read() | ||
release = version | ||
|
||
# HTML Theme Config | ||
html_theme = 'sphinx_rtd_theme' | ||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] | ||
|
||
|
||
def setup(app): | ||
""" | ||
Registers an autodoc between listener to ignore License texts | ||
:param app: The sphinx app | ||
:return: None | ||
""" | ||
app.connect('autodoc-process-docstring', | ||
between('^.*LICENSE.*$', exclude=True)) | ||
app.connect("autodoc-skip-member", | ||
lambda a, b, name, d, skipper, f: | ||
False if name == "__init__" else skipper) | ||
return app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.