Flow.engine logo

IRTE Flow Engine

codecov

About

Engine for future IR Tech sport apps

Versioning

This project follows the flavor of semver used by pub. This has some key differences from the regular semver, see pub_semver.

Latest version

0.0.1

Changelog

Changes and fixes are documented in CHANGELOG.md.

Installation

Refer to this package as a dependency using the git URL, see Git packages.

Example

dependencies:
  irte_engine:
    git:
      url: git@bitbucket.org:ir-tech/flow.engine.git
      ref: v0.0.1

Development Guide

Package resolution

To use this repository for development, simply use the path to refer to the location of this package from another project (e.g. Sample App).

See Path packages

Commit Hooks

git_hooks is used to run commands at each hook during the git lifecycle and enforce certain rules. If any of the commands return a failure status or throw an error, the git commit is aborted.

Before your first commit please ensure the hooks are initialized in your environment by running.

flutter pub run git_hooks create bin/git_hooks.dart

Pre-commit

Code Fixes

Apply automated fixes to Dart source code.

The dart fix tool is used to look for and fix analysis issues that have associated automated fixes.

Formatting

Whitespace is formatted using the dart format commands.

Lint

Linting is performed with the dart analyze command. The rules for analysis are provided for by flutter_lints and any modifications can be found in the analyzer_options.yaml file.

Commit-msg

Commit Message

The commit message is validated against Convention Commit Format using the lintCommit function from conventional We need this to ensure a clean, auto generated changelog.

Syntax

type[(scope)?]: description

[body?]

[BREAKING CHANGE: reason?]
[Refs?]

Header

The first line of the commit message type[(scope)?]: description is called the header.
This line should not exceed 100 characters.

Type (required)

Must be one of the following (lower case only):

  • build: Changes that affect the build system or external dependencies (example scopes: pub)
  • ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • docs: Documentation only changes
  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • revert: If the commit reverts a previous commit, it should begin with revert: , followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>., where the hash is the SHA of the commit being reverted.
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • test: Adding missing tests or correcting existing tests The type can be one of the following. This is case sensitive and must be written in lower case.

build, ci, docs, feat, fix, perf, refactor, revert, style, test, chore

Scope (optional)

Scope is optional; multiple scopes are supported (current delimiter options: "/", "" and ",")`

Description (required)

A brief description of changes being committed.

Body (optional)

This consists of one or more lines of text preceeded by a new line. This can be used to provide further details of changes in the current commit.

Breaking change (optional)

Indicate a breaking change in a new line below the header by starting a line with BREAKING CHANGE:. This would then be followed by a brief desription of the breaking change on that line.

References (optional but encouraged)

One or more references can be included to link taks/issues with a commit.
This may follow one or more words indicating how the reference relates to the commit e.g. Solves #FLOW-12.

Examples

fix(audio-engine): pause playback 

A body describing this commit in more detail.

The body in this example is multi-line.

BREAKING CHANGE: This is a breaking change because of X Y Z.

Fixes #FLOW-1

More Examples

Post commit

Docs generation

dartdoc is used to create API reference documentation from the source code. For guidance on writing doc comments, see the documentation part of Effective Dart.

Pre-push

Tests

Run tests

flutter test

Unit-Test

The Unit tests will be checked. Any failing test will stop the commit.

CI Pipelines

CI pipelines are executed using Bitbucket pipelines. Current configuration can be found in bitbucket-pipelines.yml.

Operations

Code coverage

Code coverage is generated using the test command flutter test --coverage.
This will generate a file that is ignored by source control at coverage/lcov.info.
This step is done automatically by Bitbucket CI within the pipeline and results are sent to Codecov for analysis. This step is done for each Pull Request commit and for merges to the develop branch.
The current coverage can be viewed at the CodeCov Dashboard.

No current code coverage limit is set.

In the future, this may be set and required.

Ignore lines from coverage

// coverage:ignore-line to ignore one line.
// coverage:ignore-start and // coverage:ignore-end to ignore range of lines inclusive.
// coverage:ignore-file to ignore the whole file.

Release/Changelog generation

The changelog is automatically generated and updated based on the commit messages of the commits present within a release. Automatic changelog generation is produced using conventional. This will be done for pubspec.yaml

Important: Don't commit other changes while doing a release. Commit them separately. Important: Make sure your working directly is clean. Important: Follow SemVer

To make a release, you can simply use flutter run scripts/release.dart. This will use the nextVersion function of conventional to determine the next version for the release based on the commits since the previous release. Once the changes are made for the release then run git push --follow-tags origin master to push the changes to the repository

Libraries

adapter_factory
adapters
alias
analytics
analytics_bindings
analytics_controller
analytics_observer
api_endpoint.interface
api_rest_client
app
app_resumed_load_settings
app_started_log_event
app_state
app_state.bindings
app_state.enum
app_state_controller
apple.adapter
apple_auth_credentials.model
auth
auth.bindings
auth_adapter.enum
auth_adapter.interface
auth_authenticated_load_user.listener
auth_controller
auth_credentials.model
auth_payload.model
auth_rest_client
auth_social_payload.model
auth_status.enum
auth_token.model
auth_unauthenticated_remove_user.listener
auth_workflow_controller
authenticated_log_event
authenticated_set_authorization_header.listener
bearer_http_client
bg_geolocation
bg_geolocation_bindings
bg_geolocation_config
bg_geolocation_controller
bg_geolocation_gps_accuracy
bg_geolocation_list_extension
bg_geolocation_location_extension
bg_geolocation_stopwatch_extension
brick.g
clients
conversion_extensions
convert
countdown
countdown_controller
countdown_milestone
countdown_model
countdown_repeat
create_split_time
credentials.adapter
device
Settings and access to device functionality and sensors
device_information
device_information_bindings
device_information_controller
device_information_model
device_settings
Device Settings module
device_settings_bindings
device_settings_controller
device_settings_model
device_settings_storage
distance_matcher
distance_traveled
distance_traveled_trigger_notification
distinct_distance
duration_extensions
engine.bindings
engine.config
engine.modules
engine.version
engine_model.interface
engine_model_controller.interface
engine_notification
engine_notification_dispatcher
engine_notification_parameter
engine_notification_parameter_unit
engine_notification_type
ensure_trailing_slash
enums
error_response
event_listener.interface
events
extensions
facebook.adapter
full_km_value
full_name
gps_pipelines_listeners_models
gps_update_pipeline
gps_update_pipelines
identifiable.interface
interfaces
interfaces
irte_engine
Engine for future IR Tech sport apps
json
key_value_storage
language
language_bindings
language_controller
language_service
list_extensions
listeners
listeners
listeners
location_json
location_update
location_update_listener
location_update_to_distance_traveled
location_update_to_flow_item
location_update_to_run_result
matcher_interfaces
memory_storage
minor_plugin_event
model_controller
model_controller.interface
model_listener.interface
model_storage
models
models
models
models
models
name.interface
notification
notification_bindings
notification_dispatchers_service
notification_interfaces
notification_models
notification_queue_service
number_extensions
on_location_transform_to_update
operations
payload
pipeline_connection
pipeline_flow_item
pipeline_operation
pipeline_operation_registry
pipeline_processes
pipelines
pipelines_binding
pipelines_config
plugin_event
plugin_priority.enum
race_day
race_day_controller
race_day_events
rest
rest_client
rest_exceptions
run
run
run_bindings
run_controllers
run_file
run_file_endpoint_helper
run_file_upload_service
run_file_upload_status
run_init_clear_run_locations
run_init_create_run
run_init_start_location_updates
run_listeners
run_location
run_location_controller
run_location_extensions
run_location_odometer
run_models
run_odometer_controller
run_result
run_result_controller
run_services
run_started
run_started_trigger_notification
run_state
run_stopped_create_run_file
run_stopped_destroy_location_updates
run_stopped_finalize_run
run_stopped_stop_location_updates
run_workflow_controller
run_workflow_states
schema.g
settings
settings.bindings
settings_change_load_speech_pack
settings_controller
settings_model
settings_storage
settings_units
share
share_bindings
share_config
share_controller
simple_storage
speech
speech_condition
speech_condition_match
speech_condition_matcher
speech_condition_models
speech_condition_parameter
speech_condition_running_mode
speech_dispatch_controller
speech_listeners
speech_matcher_registry_controller
speech_matchers
speech_pack
speech_pack_bindings
speech_pack_controllers
speech_pack_download_controller
speech_pack_file_controller
speech_pack_listeners
speech_pack_model_controller
speech_pack_models
speech_pack_progress
speech_pack_states
speech_pack_status_storage
speech_pack_storage_controller
speech_pack_sync_controller
speech_pack_sync_endpoint_helper
speech_pack_workflow
speech_pack_workflow_controller
speech_package
speech_package_client
speech_package_controller
speech_package_status
speech_player_controller
split_time
split_time
split_time
split_time_bindings
split_time_cheat_calculator
split_time_endpoint_helper
split_time_pipeline
split_time_pipeline_json
split_time_position_type_enum
split_time_rule
storage
storage.bindings
successful_response
sync
sync_bindings
sync_config
sync_controller
sync_endpoint_helper
sync_generator_helper
sync_model
sync_model_controller
sync_model_state
sync_repository
sync_state
system_filter
to_json
unauthenticated_remove_auth_token.listener
unit_condition_matcher
upload_split_time
user
user
user.bindings
user_controller
user_management
user_sync_endpoint_helper
utils
value_condition_matcher
wallpaper_model
wallpaper_type_enum
workflow
workflow
workflow
workflow_container
workflow_controller.interface
workflow_interface_aliases
workflow_listener.interface