Skip to content

Commit

Permalink
tidy up package
Browse files Browse the repository at this point in the history
  • Loading branch information
o3bvv committed Nov 25, 2016
1 parent b5e9bca commit 76a31bd
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 120 deletions.
3 changes: 1 addition & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[run]
source = il2fb.ds.config
source = il2fb/config/ds
omit =
*/tests/*
il2fb/ds/config/version.py

[report]
exclude_lines =
Expand Down
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
os:
- 'linux'
- 'osx'
- linux
sudo: false
language: python
python:
- '2.7'
- '3.4'
- '3.5'
install:
- pip install -r ./requirements/travis.txt
- pip install --upgrade --editable .
- pip install -r ./requirements/ci.txt
- pip install -e .
script:
- py.test --doctest-modules --verbose ./il2fb/ds/config ./tests --cov ./il2fb/ds/config ./tests
- py.test
after_success:
- codecov
- ocular --data-file ".coverage" --config-file ".coveragerc"
notifications:
- email: false
email: false
slack:
secure: v8pQer33B4u/OUQNrHmJyhJa5e7QHxgm9+X6u3K55yZtHwdM4IRyErJPD7xRw1Uoi1OEZ3oNlDfkh83DrczfLvPjvQIPWiRAkg8aYFSo8bUyNgVb+9cp5HijikUlmkiVRjsiQAKwZ24devK/iQEQcl355+XbUB3bsQyiXBP7BshV72+2XPuRft6dm+4rt/PUK54/2SREs16CihqZqtBp5LbEV8WqjScilIWT7zMbd7SRosuhxs1fzPem5+8JQ8NYlZwnz2KCAXHvjVmzsHRkIYhyi33ZP4uqGOZErZk+tYNKTgUs/2HwyQ1wv5eXMZLxfQMXrvQ/f5LjIcK6JO5YgsVDaLxgDOvmDbCt1TYs1XN5p7kAyzntxNHTe6+blOSwjfBzLGF+esV2N66ULIBs4JZw+HEVEcwPfSwcYL7CfoIKhl1MEzCfJR9fP7fH8u09hYooYtt1I1M9ag9IL3SZlEds3puaAXIQHclssu/45PUCgK0f2ZEcp3SAWbgMy6ZDB7T5Wgh4KLoUIdmCubs7XA/uAOvrJ+i5ci6YCUQLkKKV3GZymcxBG5MA5lzItXO6U9H170wsxFZzW9tk1hoPLOkb4jn5HvQgH69lutkBQYXMrpC+q8PDVJZuhAdn9KKouZlRw+X8Zcfl0zaz72pdys1hOPyvYg9pVPPduSmx0S0=
29 changes: 17 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
il2fb-ds-config
===============

Python library for working with settings of IL-2 FB Dedicated Server.
IL-2 FB DS Config
=================

|pypi_package| |pypi_downloads| |python_versions| |license|

|unix_build| |windows_build| |coverage_status|

|codeclimate| |codacy| |quality| |health| |requirements|
|code_issues| |codeclimate| |codacy| |quality| |health| |requirements|

Python library for working with settings of IL-2 FB Dedicated Server
(``confs.ini``).


.. |unix_build| image:: http://img.shields.io/travis/IL2HorusTeam/il2fb-ds-config.svg?style=flat&branch=master
:target: https://travis-ci.org/IL2HorusTeam/il2fb-ds-config
:alt: Build status of the master branch on Mac/Linux
:alt: Build status of the master branch on Linux

.. |windows_build| image:: https://ci.appveyor.com/api/projects/status/1nub4lcihi3e0968/branch/master?svg=true
:target: https://ci.appveyor.com/project/oblalex/il2fb-ds-config
:alt: Build status of the master branch on Windows
:target: https://ci.appveyor.com/project/oblalex/il2fb-ds-config
:alt: Build status of the master branch on Windows

.. |coverage_status| image:: https://codecov.io/github/IL2HorusTeam/il2fb-ds-config/coverage.svg?branch=master
:target: https://codecov.io/github/IL2HorusTeam/il2fb-ds-config?branch=master
Expand All @@ -27,8 +28,8 @@ Python library for working with settings of IL-2 FB Dedicated Server.
:alt: Code Climate

.. |codacy| image:: https://www.codacy.com/project/badge/6691993e3d5241ceb5341ec73c0aff70
:target: https://www.codacy.com/app/oblalex/il2fb-ds-config
:alt: Codacy Code Review
:target: https://www.codacy.com/app/oblalex/il2fb-ds-config
:alt: Codacy Code Review

.. |quality| image:: https://scrutinizer-ci.com/g/IL2HorusTeam/il2fb-ds-config/badges/quality-score.png?b=master&style=flat
:target: https://scrutinizer-ci.com/g/IL2HorusTeam/il2fb-ds-config/?branch=master
Expand All @@ -38,9 +39,13 @@ Python library for working with settings of IL-2 FB Dedicated Server.
:target: https://landscape.io/github/IL2HorusTeam/il2fb-ds-config/master
:alt: Code Health

.. |code_issues| image:: https://www.quantifiedcode.com/api/v1/project/4261ecf3af654c579839aeb7e99e4ee3/badge.svg
:target: https://www.quantifiedcode.com/app/project/4261ecf3af654c579839aeb7e99e4ee3
:alt: Code issues

.. |requirements| image:: https://requires.io/github/IL2HorusTeam/il2fb-ds-config/requirements.svg?branch=master
:target: https://requires.io/github/IL2HorusTeam/il2fb-ds-config/requirements/?branch=master
:alt: Requirements Status
:target: https://requires.io/github/IL2HorusTeam/il2fb-ds-config/requirements/?branch=master
:alt: Requirements Status

.. |pypi_package| image:: http://img.shields.io/pypi/v/il2fb-ds-config.svg?style=flat
:target: http://badge.fury.io/py/il2fb-ds-config/
Expand Down
8 changes: 5 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ environment:
- PYTHON: "C:/Python27-x64"
- PYTHON: "C:/Python34"
- PYTHON: "C:/Python34-x64"
- PYTHON: "C:/Python35"
- PYTHON: "C:/Python35-x64"
init:
- "ECHO %PYTHON%"
- ps: "ls C:/Python*"
install:
- ps: (new-object net.webclient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py', 'C:/get-pip.py')
- "%PYTHON%/python.exe C:/get-pip.py"
- "%PYTHON%/Scripts/pip.exe install -r ./requirements/travis.txt"
- "%PYTHON%/Scripts/pip.exe install --upgrade --editable ."
- "%PYTHON%/Scripts/pip.exe install -r ./requirements/ci.txt"
- "%PYTHON%/Scripts/pip.exe install -e ."
test_script:
- "%PYTHON%/Scripts/py.test --doctest-modules --verbose ./il2fb/ds/config ./tests --cov ./il2fb/ds/config ./tests"
- "%PYTHON%/Scripts/py.test"
2 changes: 1 addition & 1 deletion il2fb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# coding: utf-8

# this is a namespace package
try:
Expand Down
2 changes: 1 addition & 1 deletion il2fb/ds/__init__.py → il2fb/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# coding: utf-8

# this is a namespace package
try:
Expand Down
1 change: 1 addition & 0 deletions il2fb/config/ds/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# coding: utf-8
1 change: 0 additions & 1 deletion il2fb/ds/config/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions il2fb/ds/config/version.py

This file was deleted.

5 changes: 3 additions & 2 deletions requirements/travis.txt → requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-r dist.txt
-r test.txt

codecov
scrutinizer-ocular

-r test.txt
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bpython==0.13
bpython
tox
yolk

Expand Down
67 changes: 40 additions & 27 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# coding: utf-8

import os

Expand All @@ -7,27 +7,53 @@

__here__ = os.path.abspath(os.path.dirname(__file__))


def split_requirements(lines):
requirements, dependencies = [], []

for line in lines:
if line.startswith('-e'):
line = line.split(' ', 1)[1]
dependencies.append(line)
line = line.split('#egg=', 1)[1]

requirements.append(line)

return requirements, dependencies


with open(os.path.join(__here__, 'requirements', 'dist.txt')) as f:
REQUIREMENTS = [x.strip() for x in f]
REQUIREMENTS = [x for x in REQUIREMENTS if x and not x.startswith('#')]
REQUIREMENTS, DEPENDENCIES = split_requirements(REQUIREMENTS)

README = open(os.path.join(__here__, 'README.rst')).read()
REQUIREMENTS = [
i.strip()
for i in
open(os.path.join(__here__, 'requirements', 'dist.txt')).readlines()
]

# Get VERSION
version_file = os.path.join('il2fb', 'ds', 'config', 'version.py')
# Use exec for compabibility with Python 3
exec(open(version_file).read())

setup(
name='il2fb-ds-config',
version=globals()['VERSION'],
version='1.0.0.dev0',
description='Library for working with settings of IL-2 FB Dedicated Server',
long_description=README,
keywords=[
'il2', 'il-2', 'fb', 'forgotten battles', 'server', 'dedicated',
'config', 'settings',
],
license='LGPLv3',
url='https://github.com/IL2HorusTeam/il2fb-ds-config',
author='Alexander Oblovatniy',
author_email='[email protected]',
namespace_packages=[
'il2fb',
'il2fb.config',
],
packages=[
'il2fb.config.ds',
],
include_package_data=False,
zip_safe=False,
install_requires=REQUIREMENTS,
dependency_links=DEPENDENCIES,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
Expand All @@ -36,25 +62,12 @@
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries',
],
url='https://github.com/IL2HorusTeam/il2fb-ds-config',
author='Alexander Oblovatniy',
author_email='[email protected]',
license='LGPLv3',
packages=[
'il2fb.ds.config',
],
namespace_packages=[
'il2fb',
'il2fb.ds',
],
scripts=[
],
platforms=[
'any',
],
include_package_data=False,
install_requires=REQUIREMENTS,
zip_safe=False,
scripts=[
],
)
47 changes: 0 additions & 47 deletions tests/data/confs.ini

This file was deleted.

1 change: 0 additions & 1 deletion tests/test_package.py

This file was deleted.

18 changes: 10 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
# $ tox

[tox]
envlist = py27,py34
envlist = py27,py34,py35


[testenv]
changedir = tests
[pytest]
addopts =
-vv --capture=no --tb=native --ignore setup.py --doctest-modules
--cov-report term-missing --cov ./il2fb/config/ds
norecursedirs =
.git .tox requirements src

[testenv]
deps =
-rrequirements/dist.txt
-rrequirements/test.txt

commands =
py.test --verbose --capture=no --doctest-modules --basetemp={envtmpdir} {posargs}


[pytest]
addopts = --tb=native
pip install -e .
py.test --basetemp={envtmpdir} {posargs}

0 comments on commit 76a31bd

Please sign in to comment.