simple_flow 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/lib/simple_flow/version.rb +1 -1
  4. data/lib/simple_flow.rb +0 -17
  5. metadata +2 -68
  6. data/.envrc +0 -1
  7. data/.github/workflows/deploy-github-pages.yml +0 -52
  8. data/.rubocop.yml +0 -57
  9. data/COMMITS.md +0 -196
  10. data/Rakefile +0 -15
  11. data/benchmarks/parallel_vs_sequential.rb +0 -98
  12. data/benchmarks/pipeline_overhead.rb +0 -130
  13. data/docs/api/middleware.md +0 -468
  14. data/docs/api/parallel-step.md +0 -363
  15. data/docs/api/pipeline.md +0 -382
  16. data/docs/api/result.md +0 -375
  17. data/docs/concurrent/best-practices.md +0 -687
  18. data/docs/concurrent/introduction.md +0 -246
  19. data/docs/concurrent/parallel-steps.md +0 -418
  20. data/docs/concurrent/performance.md +0 -481
  21. data/docs/core-concepts/flow-control.md +0 -452
  22. data/docs/core-concepts/middleware.md +0 -389
  23. data/docs/core-concepts/overview.md +0 -219
  24. data/docs/core-concepts/pipeline.md +0 -315
  25. data/docs/core-concepts/result.md +0 -168
  26. data/docs/core-concepts/steps.md +0 -391
  27. data/docs/development/benchmarking.md +0 -443
  28. data/docs/development/contributing.md +0 -380
  29. data/docs/development/dagwood-concepts.md +0 -435
  30. data/docs/development/testing.md +0 -514
  31. data/docs/getting-started/examples.md +0 -197
  32. data/docs/getting-started/installation.md +0 -62
  33. data/docs/getting-started/quick-start.md +0 -218
  34. data/docs/guides/choosing-concurrency-model.md +0 -441
  35. data/docs/guides/complex-workflows.md +0 -440
  36. data/docs/guides/data-fetching.md +0 -478
  37. data/docs/guides/error-handling.md +0 -635
  38. data/docs/guides/file-processing.md +0 -505
  39. data/docs/guides/validation-patterns.md +0 -496
  40. data/docs/index.md +0 -169
  41. data/examples/.gitignore +0 -3
  42. data/examples/01_basic_pipeline.rb +0 -112
  43. data/examples/02_error_handling.rb +0 -178
  44. data/examples/03_middleware.rb +0 -186
  45. data/examples/04_parallel_automatic.rb +0 -221
  46. data/examples/05_parallel_explicit.rb +0 -279
  47. data/examples/06_real_world_ecommerce.rb +0 -288
  48. data/examples/07_real_world_etl.rb +0 -277
  49. data/examples/08_graph_visualization.rb +0 -246
  50. data/examples/09_pipeline_visualization.rb +0 -266
  51. data/examples/10_concurrency_control.rb +0 -235
  52. data/examples/11_sequential_dependencies.rb +0 -243
  53. data/examples/12_none_constant.rb +0 -161
  54. data/examples/README.md +0 -374
  55. data/examples/regression_test/01_basic_pipeline.txt +0 -38
  56. data/examples/regression_test/02_error_handling.txt +0 -92
  57. data/examples/regression_test/03_middleware.txt +0 -61
  58. data/examples/regression_test/04_parallel_automatic.txt +0 -86
  59. data/examples/regression_test/05_parallel_explicit.txt +0 -80
  60. data/examples/regression_test/06_real_world_ecommerce.txt +0 -53
  61. data/examples/regression_test/07_real_world_etl.txt +0 -58
  62. data/examples/regression_test/08_graph_visualization.txt +0 -429
  63. data/examples/regression_test/09_pipeline_visualization.txt +0 -305
  64. data/examples/regression_test/10_concurrency_control.txt +0 -96
  65. data/examples/regression_test/11_sequential_dependencies.txt +0 -86
  66. data/examples/regression_test/12_none_constant.txt +0 -64
  67. data/examples/regression_test.rb +0 -105
  68. data/mkdocs.yml +0 -146
  69. data/pipeline_graph.dot +0 -51
  70. data/pipeline_graph.html +0 -60
  71. data/pipeline_graph.mmd +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12863ce7c6fd18cebacbe7939132d797802a3340c6886446c79f8934f78a09c0
4
- data.tar.gz: ddd358392266d72151355167e200c910a50e13b2b589cd0edf01728015f88f0b
3
+ metadata.gz: bd0bd81d08df7f75395ab30c68637a6064c701db6ccd54f98afb05d18ebbf74d
4
+ data.tar.gz: c0e288adb2fba5d5101993813bf8df834fd68ee2bd7288c6c2645e3ea56b7225
5
5
  SHA512:
6
- metadata.gz: 73cbb04ea3780409d546f850a081493db5b4fcf310d54876600fee962b957408e290428fb11339940b71f27936033266ceee25e510e328dfa697a0ede9c1940e
7
- data.tar.gz: 311a03011902e4cc54e67e8e989d6711d029a71a49f1cd0c658e85a79416e95a694179223113bc80cbbd0c0b753e2011b9ac4bb1d0a54c94b5951c21c5deb24f
6
+ metadata.gz: 63462e59c19f7095caa8aa2d9de89eb784f32a2e16e80d13add543fed61add8ed264e3c5aead7af24a41df66a30c1f551c4572df81fb1a3964a9f694cb2965b6
7
+ data.tar.gz: 7f5b5ebdd51a20b770c760de90e15ff4ccebba22f99a6af27ff45c831b5da9f0decc7e03bf84b8a51db74af245b614fc561258c38ff1dae61cd7d3a2175e34fc
data/CHANGELOG.md CHANGED
@@ -1,4 +1,29 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2025-12-22
4
+
5
+ ### Breaking Changes
6
+ - Middleware API updated to `use_middleware` with `replace: nil` semantics
7
+
8
+ ### Added
9
+ - Sequential step dependencies support
10
+ - Direct pipeline visualization methods
11
+ - Dependency graph visualization with multiple output formats (DOT, PNG, SVG)
12
+ - SimpleCov for test coverage
13
+ - Rubocop for code style enforcement
14
+ - Benchmark-IPS for performance testing
15
+ - Timecop dependency for deterministic tests
16
+ - GitHub Pages deployment configuration
17
+ - Conventional Commits specification
18
+
19
+ ### Changed
20
+ - Improved CI workflow configuration
21
+ - Enhanced test task
22
+
23
+ ### Documentation
24
+ - Added sequential dependencies and execution modes sections to README
25
+ - Added example for sequential step dependencies
26
+ - Documentation site improvements
27
+
3
28
  ## [0.1.0] - 2025-11-15
4
29
  - First published release of the Ruby gem simple_flow
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimpleFlow
4
- VERSION = "0.1.0"
4
+ VERSION = '0.2.0'
5
5
  end
data/lib/simple_flow.rb CHANGED
@@ -22,20 +22,3 @@ require_relative 'simple_flow/pipeline'
22
22
 
23
23
  module SimpleFlow
24
24
  end
25
-
26
- __END__
27
-
28
- require_relative './simple_flow'
29
-
30
- # Usage example
31
- pipeline = SimpleFlow::Pipeline.new do
32
- use_middleware SimpleFlow::MiddleWare::Instrumentation, api_key: '1234'
33
- use_middleware SimpleFlow::MiddleWare::Logging
34
- step ->(result) { puts "Processing: #{result.value}"; result }
35
- step ->(result) { result.continue(result.value + 1) }
36
- end
37
-
38
- initial_result = SimpleFlow::Result.new(0)
39
- result = pipeline.call(initial_result)
40
- puts "Final Result: #{result.value}"
41
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
@@ -19,71 +19,9 @@ executables: []
19
19
  extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
- - ".envrc"
23
- - ".github/workflows/deploy-github-pages.yml"
24
- - ".rubocop.yml"
25
22
  - CHANGELOG.md
26
- - COMMITS.md
27
23
  - LICENSE
28
24
  - README.md
29
- - Rakefile
30
- - benchmarks/parallel_vs_sequential.rb
31
- - benchmarks/pipeline_overhead.rb
32
- - docs/api/middleware.md
33
- - docs/api/parallel-step.md
34
- - docs/api/pipeline.md
35
- - docs/api/result.md
36
- - docs/concurrent/best-practices.md
37
- - docs/concurrent/introduction.md
38
- - docs/concurrent/parallel-steps.md
39
- - docs/concurrent/performance.md
40
- - docs/core-concepts/flow-control.md
41
- - docs/core-concepts/middleware.md
42
- - docs/core-concepts/overview.md
43
- - docs/core-concepts/pipeline.md
44
- - docs/core-concepts/result.md
45
- - docs/core-concepts/steps.md
46
- - docs/development/benchmarking.md
47
- - docs/development/contributing.md
48
- - docs/development/dagwood-concepts.md
49
- - docs/development/testing.md
50
- - docs/getting-started/examples.md
51
- - docs/getting-started/installation.md
52
- - docs/getting-started/quick-start.md
53
- - docs/guides/choosing-concurrency-model.md
54
- - docs/guides/complex-workflows.md
55
- - docs/guides/data-fetching.md
56
- - docs/guides/error-handling.md
57
- - docs/guides/file-processing.md
58
- - docs/guides/validation-patterns.md
59
- - docs/index.md
60
- - examples/.gitignore
61
- - examples/01_basic_pipeline.rb
62
- - examples/02_error_handling.rb
63
- - examples/03_middleware.rb
64
- - examples/04_parallel_automatic.rb
65
- - examples/05_parallel_explicit.rb
66
- - examples/06_real_world_ecommerce.rb
67
- - examples/07_real_world_etl.rb
68
- - examples/08_graph_visualization.rb
69
- - examples/09_pipeline_visualization.rb
70
- - examples/10_concurrency_control.rb
71
- - examples/11_sequential_dependencies.rb
72
- - examples/12_none_constant.rb
73
- - examples/README.md
74
- - examples/regression_test.rb
75
- - examples/regression_test/01_basic_pipeline.txt
76
- - examples/regression_test/02_error_handling.txt
77
- - examples/regression_test/03_middleware.txt
78
- - examples/regression_test/04_parallel_automatic.txt
79
- - examples/regression_test/05_parallel_explicit.txt
80
- - examples/regression_test/06_real_world_ecommerce.txt
81
- - examples/regression_test/07_real_world_etl.txt
82
- - examples/regression_test/08_graph_visualization.txt
83
- - examples/regression_test/09_pipeline_visualization.txt
84
- - examples/regression_test/10_concurrency_control.txt
85
- - examples/regression_test/11_sequential_dependencies.txt
86
- - examples/regression_test/12_none_constant.txt
87
25
  - lib/simple_flow.rb
88
26
  - lib/simple_flow/dependency_graph.rb
89
27
  - lib/simple_flow/dependency_graph_visualizer.rb
@@ -93,10 +31,6 @@ files:
93
31
  - lib/simple_flow/result.rb
94
32
  - lib/simple_flow/step_tracker.rb
95
33
  - lib/simple_flow/version.rb
96
- - mkdocs.yml
97
- - pipeline_graph.dot
98
- - pipeline_graph.html
99
- - pipeline_graph.mmd
100
34
  homepage: https://github.com/MadBomber/simple_flow
101
35
  licenses:
102
36
  - MIT
@@ -120,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
54
  - !ruby/object:Gem::Version
121
55
  version: '0'
122
56
  requirements: []
123
- rubygems_version: 3.7.2
57
+ rubygems_version: 4.0.2
124
58
  specification_version: 4
125
59
  summary: A lightweight, modular Ruby framework for building composable data processing
126
60
  pipelines
data/.envrc DELETED
@@ -1 +0,0 @@
1
- export RR=`pwd`
@@ -1,52 +0,0 @@
1
- name: Deploy Documentation to GitHub Pages
2
- on:
3
- push:
4
- branches:
5
- - main
6
- - develop
7
- paths:
8
- - "docs/**"
9
- - "mkdocs.yml"
10
- - ".github/workflows/deploy-github-pages.yml"
11
- workflow_dispatch:
12
-
13
- permissions:
14
- contents: write
15
- pages: write
16
- id-token: write
17
-
18
- jobs:
19
- deploy:
20
- runs-on: ubuntu-latest
21
- steps:
22
- - name: Checkout code
23
- uses: actions/checkout@v4
24
- with:
25
- fetch-depth: 0
26
-
27
- - name: Setup Python
28
- uses: actions/setup-python@v5
29
- with:
30
- python-version: 3.x
31
-
32
- - name: Install dependencies
33
- run: |
34
- pip install mkdocs
35
- pip install mkdocs-material
36
- pip install mkdocs-macros-plugin
37
- pip install mike
38
-
39
- - name: Configure Git
40
- run: |
41
- git config --local user.email "action@github.com"
42
- git config --local user.name "GitHub Action"
43
-
44
- - name: Deploy to GitHub Pages
45
- run: |
46
- if [ "${{ github.ref }}" = "refs/heads/main" ]; then
47
- echo "Deploying from main branch"
48
- mkdocs gh-deploy --force --clean
49
- else
50
- echo "Deploying from develop branch"
51
- mkdocs gh-deploy --force --clean
52
- fi
data/.rubocop.yml DELETED
@@ -1,57 +0,0 @@
1
- require:
2
- - rubocop-minitest
3
- - rubocop-performance
4
-
5
- AllCops:
6
- TargetRubyVersion: 2.7
7
- NewCops: enable
8
- SuggestExtensions: false
9
- Exclude:
10
- - 'vendor/**/*'
11
- - 'bin/**/*'
12
- - 'tmp/**/*'
13
- - 'node_modules/**/*'
14
-
15
- # Metrics
16
- Metrics/MethodLength:
17
- Max: 20
18
- Exclude:
19
- - 'test/**/*'
20
-
21
- Metrics/BlockLength:
22
- Exclude:
23
- - 'test/**/*'
24
- - 'simple_flow.gemspec'
25
-
26
- Metrics/ClassLength:
27
- Max: 150
28
-
29
- Metrics/AbcSize:
30
- Max: 20
31
-
32
- # Layout
33
- Layout/LineLength:
34
- Max: 120
35
- AllowedPatterns: ['\A#']
36
-
37
- # Style
38
- Style/Documentation:
39
- Enabled: false
40
-
41
- Style/FrozenStringLiteralComment:
42
- Enabled: true
43
- EnforcedStyle: always
44
-
45
- Style/StringLiterals:
46
- EnforcedStyle: single_quotes
47
-
48
- Style/HashSyntax:
49
- EnforcedStyle: ruby19
50
-
51
- # Minitest
52
- Minitest/MultipleAssertions:
53
- Max: 10
54
-
55
- # Performance
56
- Performance/CollectionLiteralInLoop:
57
- Enabled: true
data/COMMITS.md DELETED
@@ -1,196 +0,0 @@
1
- ---
2
- url: https://www.conventionalcommits.org/en/v1.0.0/
3
- title: Conventional Commits
4
- description: A specification for adding human and machine readable meaning to commit messages
5
- access_date: 2025-07-31T20:51:29.000Z
6
- current_date: 2025-07-31T20:51:29.601Z
7
- ---
8
-
9
- # Conventional Commits
10
-
11
- A specification for adding human and machine readable meaning to commit messages
12
-
13
- Quick Summary Full Specification Contribute
14
-
15
- # Conventional Commits 1.0.0
16
-
17
- ## Summary
18
-
19
- The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.
20
-
21
- The commit message should be structured as follows:
22
-
23
- ---
24
-
25
- ```
26
- <type>[optional scope]: <description>
27
-
28
- [optional body]
29
-
30
- [optional footer(s)]
31
-
32
- ```
33
-
34
- ---
35
-
36
- The commit contains the following structural elements, to communicate intent to the consumers of your library:
37
-
38
- 1. **fix:** a commit of the _type_ `fix` patches a bug in your codebase (this correlates with `PATCH` in Semantic Versioning).
39
- 2. **feat:** a commit of the _type_ `feat` introduces a new feature to the codebase (this correlates with `MINOR` in Semantic Versioning).
40
- 3. **BREAKING CHANGE:** a commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with `MAJOR` in Semantic Versioning). A BREAKING CHANGE can be part of commits of any _type_.
41
- 4. _types_ other than `fix:` and `feat:` are allowed, for example @commitlint/config-conventional (based on the Angular convention) recommends `build:`, `chore:`,`ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others.
42
- 5. _footers_ other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to git trailer format.
43
-
44
- Additional types are not mandated by the Conventional Commits specification, and have no implicit effect in Semantic Versioning (unless they include a BREAKING CHANGE). A scope may be provided to a commit’s type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.
45
-
46
- ## Examples
47
-
48
- ### Commit message with description and breaking change footer
49
-
50
- ```
51
- feat: allow provided config object to extend other configs
52
-
53
- BREAKING CHANGE: `extends` key in config file is now used for extending other config files
54
-
55
- ```
56
-
57
- ### Commit message with `!` to draw attention to breaking change
58
-
59
- ```
60
- feat!: send an email to the customer when a product is shipped
61
-
62
- ```
63
-
64
- ### Commit message with scope and `!` to draw attention to breaking change
65
-
66
- ```
67
- feat(api)!: send an email to the customer when a product is shipped
68
-
69
- ```
70
-
71
- ### Commit message with both `!` and BREAKING CHANGE footer
72
-
73
- ```
74
- chore!: drop support for Node 6
75
-
76
- BREAKING CHANGE: use JavaScript features not available in Node 6.
77
-
78
- ```
79
-
80
- ### Commit message with no body
81
-
82
- ```
83
- docs: correct spelling of CHANGELOG
84
-
85
- ```
86
-
87
- ### Commit message with scope
88
-
89
- ```
90
- feat(lang): add Polish language
91
-
92
- ```
93
-
94
- ### Commit message with multi-paragraph body and multiple footers
95
-
96
- ```
97
- fix: prevent racing of requests
98
-
99
- Introduce a request id and a reference to latest request. Dismiss
100
- incoming responses other than from latest request.
101
-
102
- Remove timeouts which were used to mitigate the racing issue but are
103
- obsolete now.
104
-
105
- Reviewed-by: Z
106
- Refs: #123
107
-
108
- ```
109
-
110
- ## Specification
111
-
112
- The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
113
-
114
- 1. Commits MUST be prefixed with a type, which consists of a noun, `feat`, `fix`, etc., followed by the OPTIONAL scope, OPTIONAL `!`, and REQUIRED terminal colon and space.
115
- 2. The type `feat` MUST be used when a commit adds a new feature to your application or library.
116
- 3. The type `fix` MUST be used when a commit represents a bug fix for your application.
117
- 4. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., `fix(parser):`
118
- 5. A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., _fix: array parsing issue when multiple spaces were contained in string_.
119
- 6. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
120
- 7. A commit body is free-form and MAY consist of any number of newline separated paragraphs.
121
- 8. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a `:<space>` or `<space>#` separator, followed by a string value (this is inspired by the git trailer convention).
122
- 9. A footer’s token MUST use `-` in place of whitespace characters, e.g., `Acked-by` (this helps differentiate the footer section from a multi-paragraph body). An exception is made for `BREAKING CHANGE`, which MAY also be used as a token.
123
- 10. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
124
- 11. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer.
125
- 12. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g.,_BREAKING CHANGE: environment variables now take precedence over config files_.
126
- 13. If included in the type/scope prefix, breaking changes MUST be indicated by a`!` immediately before the `:`. If `!` is used, `BREAKING CHANGE:` MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change.
127
- 14. Types other than `feat` and `fix` MAY be used in your commit messages, e.g., _docs: update ref docs._
128
- 15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
129
- 16. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.
130
-
131
- ## Why Use Conventional Commits
132
-
133
- * Automatically generating CHANGELOGs.
134
- * Automatically determining a semantic version bump (based on the types of commits landed).
135
- * Communicating the nature of changes to teammates, the public, and other stakeholders.
136
- * Triggering build and publish processes.
137
- * Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.
138
-
139
- ## FAQ
140
-
141
- ### How should I deal with commit messages in the initial development phase?
142
-
143
- We recommend that you proceed as if you’ve already released the product. Typically _somebody_, even if it’s your fellow software developers, is using your software. They’ll want to know what’s fixed, what breaks etc.
144
-
145
- ### Are the types in the commit title uppercase or lowercase?
146
-
147
- Any casing may be used, but it’s best to be consistent.
148
-
149
- ### What do I do if the commit conforms to more than one of the commit types?
150
-
151
- Go back and make multiple commits whenever possible. Part of the benefit of Conventional Commits is its ability to drive us to make more organized commits and PRs.
152
-
153
- ### Doesn’t this discourage rapid development and fast iteration?
154
-
155
- It discourages moving fast in a disorganized way. It helps you be able to move fast long term across multiple projects with varied contributors.
156
-
157
- ### Might Conventional Commits lead developers to limit the type of commits they make because they’ll be thinking in the types provided?
158
-
159
- Conventional Commits encourages us to make more of certain types of commits such as fixes. Other than that, the flexibility of Conventional Commits allows your team to come up with their own types and change those types over time.
160
-
161
- ### How does this relate to SemVer?
162
-
163
- `fix` type commits should be translated to `PATCH` releases. `feat` type commits should be translated to `MINOR` releases. Commits with `BREAKING CHANGE` in the commits, regardless of type, should be translated to `MAJOR` releases.
164
-
165
- ### How should I version my extensions to the Conventional Commits Specification, e.g. `@jameswomack/conventional-commit-spec`?
166
-
167
- We recommend using SemVer to release your own extensions to this specification (and encourage you to make these extensions!)
168
-
169
- ### What do I do if I accidentally use the wrong commit type?
170
-
171
- #### When you used a type that’s of the spec but not the correct type, e.g. `fix` instead of `feat`
172
-
173
- Prior to merging or releasing the mistake, we recommend using `git rebase -i` to edit the commit history. After release, the cleanup will be different according to what tools and processes you use.
174
-
175
- #### When you used a type _not_ of the spec, e.g. `feet` instead of `feat`
176
-
177
- In a worst case scenario, it’s not the end of the world if a commit lands that does not meet the Conventional Commits specification. It simply means that commit will be missed by tools that are based on the spec.
178
-
179
- ### Do all my contributors need to use the Conventional Commits specification?
180
-
181
- No! If you use a squash based workflow on Git lead maintainers can clean up the commit messages as they’re merged—adding no workload to casual committers. A common workflow for this is to have your git system automatically squash commits from a pull request and present a form for the lead maintainer to enter the proper git commit message for the merge.
182
-
183
- ### How does Conventional Commits handle revert commits?
184
-
185
- Reverting code can be complicated: are you reverting multiple commits? if you revert a feature, should the next release instead be a patch?
186
-
187
- Conventional Commits does not make an explicit effort to define revert behavior. Instead we leave it to tooling authors to use the flexibility of _types_ and _footers_ to develop their logic for handling reverts.
188
-
189
- One recommendation is to use the `revert` type, and a footer that references the commit SHAs that are being reverted:
190
-
191
- ```
192
- revert: let us never again speak of the noodle incident
193
-
194
- Refs: 676104e, a215868
195
-
196
- ```
data/Rakefile DELETED
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rake/testtask"
5
-
6
- Rake::TestTask.new(:test) do |t|
7
- t.libs << "test"
8
- t.libs << "lib"
9
- t.test_files = FileList["test/**/*_test.rb"]
10
- t.verbose = true
11
- # Load test_helper before any tests run to ensure SimpleCov starts first
12
- t.ruby_opts << "-rtest_helper"
13
- end
14
-
15
- task default: :test
@@ -1,98 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'benchmark/ips'
6
- require_relative '../lib/simple_flow'
7
-
8
- puts '=' * 80
9
- puts 'SimpleFlow Performance Benchmarks: Parallel vs Sequential Execution'
10
- puts '=' * 80
11
- puts
12
-
13
- # Simulate I/O operations with different delays
14
- def io_operation(delay = 0.01)
15
- sleep delay
16
- :completed
17
- end
18
-
19
- # Define steps that perform I/O operations
20
- step1 = ->(result) { io_operation(0.01); result.continue(result.value + 1) }
21
- step2 = ->(result) { io_operation(0.01); result.continue(result.value + 1) }
22
- step3 = ->(result) { io_operation(0.01); result.continue(result.value + 1) }
23
- step4 = ->(result) { io_operation(0.01); result.continue(result.value + 1) }
24
-
25
- # Sequential pipeline
26
- sequential_pipeline = SimpleFlow::Pipeline.new do
27
- step step1
28
- step step2
29
- step step3
30
- step step4
31
- end
32
-
33
- # Parallel pipeline
34
- parallel_pipeline = SimpleFlow::Pipeline.new do
35
- parallel do
36
- step step1
37
- step step2
38
- step step3
39
- step step4
40
- end
41
- end
42
-
43
- puts "Benchmark: 4 I/O operations (0.01s each)"
44
- puts "Expected sequential time: ~0.04s"
45
- puts "Expected parallel time: ~0.01s"
46
- puts
47
-
48
- Benchmark.ips do |x|
49
- x.config(time: 5, warmup: 2)
50
-
51
- x.report('sequential') do
52
- sequential_pipeline.call(SimpleFlow::Result.new(0))
53
- end
54
-
55
- x.report('parallel') do
56
- parallel_pipeline.call(SimpleFlow::Result.new(0))
57
- end
58
-
59
- x.compare!
60
- end
61
-
62
- puts "\n" + '=' * 80
63
- puts
64
-
65
- # Benchmark with varying number of parallel steps
66
- puts 'Benchmark: Scaling with different numbers of parallel steps'
67
- puts '=' * 80
68
- puts
69
-
70
- [2, 4, 8, 16].each do |count|
71
- steps = Array.new(count) { ->(r) { io_operation(0.005); r.continue(r.value) } }
72
-
73
- seq_pipeline = SimpleFlow::Pipeline.new
74
- steps.each { |s| seq_pipeline.step(s) }
75
-
76
- par_pipeline = SimpleFlow::Pipeline.new do
77
- parallel do
78
- steps.each { |s| step(s) }
79
- end
80
- end
81
-
82
- seq_time = Benchmark.realtime do
83
- seq_pipeline.call(SimpleFlow::Result.new(nil))
84
- end
85
-
86
- par_time = Benchmark.realtime do
87
- par_pipeline.call(SimpleFlow::Result.new(nil))
88
- end
89
-
90
- speedup = seq_time / par_time
91
-
92
- puts "\n#{count} steps (0.005s each):"
93
- puts " Sequential: #{(seq_time * 1000).round(2)}ms"
94
- puts " Parallel: #{(par_time * 1000).round(2)}ms"
95
- puts " Speedup: #{speedup.round(2)}x"
96
- end
97
-
98
- puts "\n" + '=' * 80