Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration test & minor fixes #731

Merged
merged 4 commits into from
Aug 3, 2023
Merged

Conversation

altafan
Copy link
Collaborator

@altafan altafan commented Aug 3, 2023

This contains changes for fixing the execution of the e2e on CI.

This also makes changes to the flags defined for market report and market strategy commands.

Before this, the operator should have specified the time range for market report with numeric values, while now more user-friendly flags are specified like --last-hour, --last-day, etc.
If not specified within the API request, the daemon now makes use of a default time frame that depends on the length of the time range instead of using always 1h which is ok only for time ranges in the order of few days.

This also adds a new flag --balanced to the market strategy command so that the operator must specify which strategy he wants for the current market. Before this, instead, only the --pluggbale flag was defined.

This also contains fixes to typos and polishes the docker-compose.yml file.

@what-the-diff
Copy link

what-the-diff bot commented Aug 3, 2023

PR Summary

  • Introduction of New Flag for Market Command
    The market command has been enhanced with a new flag --balanced to provide more sophisticated control. This modification primarily affects the code in cmd/tdex/market.go.

  • Expansion of Time Frame Flags for Market Report
    The marketReport command now has additional flags to filter the market's data based on various time scopes. You can now request reports for the last hour, day, month, three months, year, the year to date, or all time. This feature should allow for more detailed and adaptable market analysis.

  • Improvement of Data Validation in Various Functions
    Several functions have been enhanced to correctly handle and validate the new time frame parameters introduced by the new flags. This includes the marketUpdateStrategyAction, marketReportAction, GetMarketReport functions, and the getMarketReport function in the gRPC's operator.

  • Addition of Helper Functions at Core Application Level
    Two new helper functions: getDefaultTimeFrameForRange and splitTimeRange have been added. These assist with handling time frame related data.

  • Update of gRPC's Functionality to Handle New Time Frame Parameter
    Updates made in the gRPC layer to handle the newly introduced time frame parameter. This ensures its functioning remains consistent with the other applications.

  • Minor Environment Configuration Update
    For the Docker compose file, the TDEX_NETWORK environment variable is removed from the tdexd service.

@tiero
Copy link
Collaborator

tiero commented Aug 3, 2023

Have you validated these changes do not breaks the v2 of the dashaboard?

@altafan
Copy link
Collaborator Author

altafan commented Aug 3, 2023

These changes do not affect the APIs, rather, they affect only the tdex-cli client, beside adding a default timeframe for market report at app level. The last change might turn out useful for any client in general, but it's still allowed to set a custom frame for the given timerange.

@altafan altafan changed the title Minor fixes Fix integration test Aug 3, 2023
@altafan altafan changed the title Fix integration test Fix integration test & minor fixes Aug 3, 2023
@altafan altafan merged commit 77176bd into tdex-network:v1 Aug 3, 2023
3 checks passed
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.

2 participants