Skip to content

Commit

Permalink
package re-structure
Browse files Browse the repository at this point in the history
  • Loading branch information
timothy-mugayi committed Nov 16, 2019
1 parent fde25c6 commit 1b38674
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install:
- pip install codecov

script:
- pytest -s --cov=sqs_client
- pytest -s --cov=pysqs_extended_client

after_success:
- codecov # submit coverage
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing

pysqs-extended-client uses GitHub to manage reviews of pull requests.

* If you have a trivial fix or improvement, go ahead and create a pull request,
addressing (with `@...`) the maintainer of this repository (see
[MAINTAINERS](https://github.com/timothymugayi/boto3-sqs-extended-client-lib/graphs/contributors)).

* If you plan to do something more involved, first discuss your ideas on
[by creating an issue]. This will avoid unnecessary work and surely give you and
us a good deal of inspiration.

## Testing

Submitted changes should pass the current tests, and be covered by new test
cases when adding functionality.

* Run the tests locally using [tox] which executes the full suite on all
supported Python versions installed.

* Each pull request is gated using [Travis CI] with the results linked on the
github page. This must pass before the change can land, note pushing a new
change will trigger a retest.

## Style

* Code style should follow [PEP 8] generally, and can be checked by running:
``tox -e flake8``.

* Import statements can be automatically formatted using [isort].

[isort]: https://pypi.org/project/isort/
[PEP 8]: https://www.python.org/dev/peps/pep-0008/
[tox]: https://tox.readthedocs.io/en/latest/
[Travis CI]: https://docs.travis-ci.com/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ The **Amazon SQS Extended Client Library for Python has been modelled after the
```
import base64
from sqs_client.SQSClientExtended import SQSClientExtended
from pysqs_extended_client.SQSClientExtended import SQSClientExtended
# from string import ascii_letters, digits
# from random import choice
from sqs_client.config import (AWS_SQS_QUEUE_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION)
from pysqs_extended_client.config import (AWS_SQS_QUEUE_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION)
if __name__ == '__main__':
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions pysqs_extended_client/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__title__ = "pysqs_client_extended"
__version__ = "0.0.1"
File renamed without changes.
27 changes: 21 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
import os
import re

from io import open as io_open
from setuptools import setup, find_packages, Command


with open("README.md", "r") as fh:
long_description = fh.read()


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


def readall(*args):
with io_open(os.path.join(base_path, *args), encoding="utf-8") as fp:
return fp.read()


metadata = dict(
re.findall(r"""__([a-z]+)__ = "([^"]+)""", readall("pysqs_extended_client", "__init__.py"))
)


# What packages are required for this module to be executed?
try:
with open(os.path.join(base_path, "requirements.txt"), encoding="utf-8") as f:
Expand All @@ -20,17 +32,20 @@
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
os.system("rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info")


setup(
name="boto3-sqs-extended-client",
version="0.0.1",
name="pysqs-extended-client",
version=metadata["version"],
author="timothy.mugayi",
author_email="[email protected]",
description="Amazon SQS Extended Client Library for Python for sending large payloads that exceed sqs limitations via S3",
Expand Down Expand Up @@ -58,8 +73,8 @@ def run(self):
],
zip_safe=True,
install_requires=required_packages,
keywords='Amazon SQS Extended Client Library for Python',
keywords = ['SQS client python', 'SQS client', 'sqs extended client', 'aws sqs client', 'boto sqs client', 'large message sqs', 'sqs s3', 'sqs'],
cmdclass={
'clean': CleanCommand,
}
)
)
2 changes: 0 additions & 2 deletions sqs_client/__init__.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import pytest
import base64

from sqs_client.SQSClientExtended import SQSClientExtended
from pysqs_extended_client.SQSClientExtended import SQSClientExtended

# from string import ascii_letters, digits
# from random import choice

from sqs_client.config import (AWS_SQS_QUEUE_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION)
from pysqs_extended_client.config import (AWS_SQS_QUEUE_URL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION)

try:
FileNotFoundError
Expand Down

0 comments on commit 1b38674

Please sign in to comment.