First, thanks for taking interest in contributing to this application ! This is highly appreciated ! 🤗
You will find here some guidelines to help you start contributing to aws-kinesis-consumer
.
To run the application, the machine needs to have the following being installed :
After all the requirements have been installed, the source code of aws-kinesis-consumer
can be downloaded and
initialised :
git checkout https://github.com/thinow/aws-kinesis-consumer.git
cd aws-kinesis-consumer
# install the dependencies of aws-kinesis-consumer
pipenv sync --dev
Congrats! From now on, you are able to run the tests and the application from your machine.
Run the following command. Here is an example of the expected output :
$ pipenv run invoke test
Starting aws-kinesis-consumer_kinesis_1 ... done
============================= test session starts ==============================
platform darwin -- Python 3.7.3, pytest-6.2.1, py-1.10.0, pluggy-0.13.1 -- /some/path
cachedir: .pytest_cache
rootdir: /some/path
plugins: snapshot-0.4.2, asyncio-0.14.0
collecting ... collected 46 items
tests/configuration/test_configuration_factory.py::test_help PASSED [ 2%]
tests/configuration/test_configuration_factory.py::test_version PASSED [ 4%]
[... many other tests ...]
============================== 46 passed in 0.64s ==============================
Stopping aws-kinesis-consumer_kinesis_1 ... done
Removing aws-kinesis-consumer_kinesis_1 ... done
Removing network aws-kinesis-consumer_default
This command will run all the tests on top of a docker container to simulate an AWS Kinesis Stream (
see docker-compose.yml
).
In order to see how the application behaves, the demo
command can help to produce dummy records, and also to
run aws-kinesis-consumer
to consume those dummy records from a mocked AWS Kinesis Stream running in a docker
container.
# first start the producer...
pipenv run invoke demo produce
In another terminal, run the following command to start consuming by using the source code of aws-kinesis-consumer
:
# ...then start the consumer
pipenv run invoke demo consume
All the following commands can be triggered using pipenv run invoke <COMMAND>
. See
the invoke project.
Command | Description |
---|---|
build |
Builds the application to all supported packages (e.g. pip, Docker). |
deploy |
Deploys the previously built packages to PyPi and DockerHub. This is usually done from Travis CI. |
assertnotodos |
Verifies if there is any missing todos in the code, otherwise fails the build in Travis CI. |
snapshots |
Updates the Pytest snapshots (see pytest-snapshot). |