Skip to content

Commit

Permalink
Merge pull request #11 from akrherz/reorg
Browse files Browse the repository at this point in the history
Reorg
  • Loading branch information
akrherz authored Oct 26, 2019
2 parents dc24ffa + d1e4509 commit 7f0b075
Show file tree
Hide file tree
Showing 18 changed files with 830 additions and 621 deletions.
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/build
/dist
/.project
/.pydevproject
/.pytest_cache
/MANIFEST
/.settings/
/.coverage
/pyIEM.egg-info/
/.pytest_cache/
/.vscode/
/docs/build
/.eggs
26 changes: 8 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
language: python
dist: bionic
env:
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.6
- PYTHON_VERSION=3.7

install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"

# Create the basic testing environment
# ------------------------------------
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls yes
- conda update -q conda
- . $HOME/miniconda/etc/profile.d/conda.sh
- conda create -n test-environment python=$PYTHON_VERSION
- conda activate test-environment
- conda install -q --file conda_requirements.txt
- pip install --upgrade -r pip_requirements.txt
- pip install coveralls
- git clone --depth 1 https://github.com/akrherz/ci_tooling.git .ci_tooling
- . .ci_tooling/miniconda.sh
- pip install codecov
- python -m pip install . --upgrade

script:
- coverage run --source=iembot setup.py test

after_success:
- coveralls
- pytest --cov=./
- codecov -e TRAVIS_PYTHON_VERSION
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ IEMBOT

[![Docs](https://readthedocs.org/projects/iembot/badge/?version=latest)](https://readthedocs.org/projects/iembot/)
[![Build Status](https://travis-ci.org/akrherz/iembot.svg)](https://travis-ci.org/akrherz/iembot)
[![Coverage Status](https://coveralls.io/repos/akrherz/iembot/badge.svg?branch=master&service=github)](https://coveralls.io/github/akrherz/iembot?branch=master)
[![Code Health](https://landscape.io/github/akrherz/iembot/master/landscape.svg?style=flat)](https://landscape.io/github/akrherz/iembot/master)

I am a XMPP client with limited bot capabilities. In general, I am a message
Expand Down
3 changes: 2 additions & 1 deletion conda_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
twisted>=18.4.0
pytest
pytest-cov
pytz
service_identity
# cython is a lame requirement from rabbit hole of cartopy
cython
cartopy
cartopy
2 changes: 0 additions & 2 deletions iembot/__init__.py

This file was deleted.

20 changes: 0 additions & 20 deletions iembot/tests/test_util.py

This file was deleted.

29 changes: 0 additions & 29 deletions iembot/tests/test_xml.py

This file was deleted.

24 changes: 24 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[metadata]
name = iembot
author = daryl herzmann
author_email = [email protected]
url = https://github.com/akrherz/iembot
keywords = meteorology
license = Apache
license-file = LICENSE
description = An XMPP Message Router, sort of.
description-file = README.md

[pep8]
ignore = W503

[options]
include_package_data = True
# Puzzling why this nomenclature is right.
package_dir =
= src
packages = find:
setup_requires = setuptools_scm

[options.packages.find]
where = src
32 changes: 3 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
from distutils.core import setup
from setuptools.command.test import test as TestCommand
import sys
import iembot
"""our setup file."""
from setuptools import setup


class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)


setup(
name='iembot',
version=iembot.__version__,
author='daryl herzmann',
author_email='[email protected]',
packages=['iembot', ],
package_data={'iembot': ['data/*', ]},
url='https://github.com/akrherz/iembot/',
license='Apache',
cmdclass={'test': PyTest},
description=('A hacky XMPP Bot'),
)
setup(use_scm_version={"version_scheme": "post-release"})
4 changes: 4 additions & 0 deletions src/iembot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""Placeholder."""
from ._version import get_version # noqa: E402

__version__ = get_version()
25 changes: 25 additions & 0 deletions src/iembot/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Tools for versioning."""


def get_version():
"""Get MetPy's version.
Either get it from package metadata, or get it using version control
information if a development install.
"""
try:
from setuptools_scm import get_version

return get_version(
root="..",
relative_to=__file__,
version_scheme="post-release",
local_scheme="dirty-tag",
)
except (ImportError, LookupError):
from pkg_resources import get_distribution

return get_distribution(__package__).version
Loading

0 comments on commit 7f0b075

Please sign in to comment.