Skip to content

Single command with feature flags#9

Open
stefanooldeman wants to merge 16 commits intokpn:masterfrom
stefanooldeman:feature/cli-click
Open

Single command with feature flags#9
stefanooldeman wants to merge 16 commits intokpn:masterfrom
stefanooldeman:feature/cli-click

Conversation

@stefanooldeman
Copy link
Collaborator

@stefanooldeman stefanooldeman commented Jun 22, 2020

Resolve issue #3

This will prepare pyrandall API for async e2e runs. Meaning the default behavior becomes simulate and validate as consecutive steps (blocking) or asynchronous steps where pyrandall starts consuming first (validate if you will) and producing after (simulate).
This will allow pyrandall to accurately measure the latency of a streaming consumer since the overhead of starting a kafka consume is moved out of the validation.

Therefore the API is moving away from the "subcommand" pattern. Instead users can use flags --only-simulate and --only-validate when needed.

TODO:

  • Document the cli API extensively
  • Update semver with breaking change
  • Review for extensibility

* Refactored cli, using Click now.
* Depricated cli arg --dataflow
* Adds new features:
 - pyrandall simulate scenarios/file1 scenarios/file2.
   Also accepting linux pipes eg. `cat file1 | pyrandall simulate`
 - event and result files will be looked up not based on dataflow dir.
   But by convention relatively to the scenarios dir.
VERSION file is now added to package resources
motivation: requests user-agent keeps braking vcrpy fixtures
Added tests/unit/test_requests_http_useragent.py
this introduced side-effects in vcr config.
Thus refactored vcr import to a vcr fixture.
I evaluated github.com/kiwicom/pytest-recording
but the tests need cassette in as test argument
@stefanooldeman stefanooldeman changed the title WIP: Single command with feature flags Single command with feature flags Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant