Skip to content

Commit f336bd3

Browse files
committed
Add iro-matrix plugin with core components and workflows
Introduced the `iro-matrix` plugin, providing foundational matrix and vector operations, including addition, subtraction, multiplication, and inversion, along with utility behaviors like serialization, mapping, and error handling. Added supporting files such as Gemfile, workflows, tests, and CI configurations. This establishes matrix and vector computation capabilities within the Iro library ecosystem and lays the groundwork for advanced mathematical modeling. Resolves foundational ticket for `iro-matrix` implementation.
1 parent e963ce2 commit f336bd3

27 files changed

+766
-0
lines changed

Gemfile.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ PATH
55
iro-runtime (~> 0.1)
66
iro-support (~> 0.1)
77

8+
PATH
9+
remote: iro-matrix-rb
10+
specs:
11+
iro-matrix (0.1.0)
12+
iro-runtime (~> 0.1)
13+
814
PATH
915
remote: iro-model-rb
1016
specs:
@@ -119,6 +125,7 @@ PLATFORMS
119125
DEPENDENCIES
120126
github-markup
121127
iro-core!
128+
iro-matrix!
122129
iro-model!
123130
iro-runtime!
124131
iro-space!

iro-gems.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
iro-core:
22
path: iro-core-rb
33
repo: git@github.com:iro-lib/iro-core-rb.git
4+
iro-matrix:
5+
path: iro-matrix-rb
6+
repo: git@github.com:iro-lib/iro-matrix-rb.git
47
iro-model:
58
path: iro-model-rb
69
repo: git@github.com:iro-lib/iro-model-rb.git
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
labels:
9+
- dependabot
10+
- dependencies
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Setup project
18+
uses: actions/checkout@v4
19+
- name: Setup ruby
20+
uses: ruby/setup-ruby@v1
21+
with:
22+
bundler-cache: true
23+
ruby-version: 3.2
24+
- name: Lint ruby
25+
run: bundle exec rubocop
26+
27+
test:
28+
name: Test (ruby ${{ matrix.ruby_version }})
29+
env:
30+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Setup project
34+
uses: actions/checkout@v4
35+
- name: Setup ruby
36+
uses: ruby/setup-ruby@v1
37+
with:
38+
bundler-cache: true
39+
ruby-version: ${{ matrix.ruby_version }}
40+
- name: Run RSpec
41+
run: bundle exec rspec
42+
- name: Report Coverage
43+
if: env.CODACY_PROJECT_TOKEN != ''
44+
shell: bash
45+
run: bash <(curl -Ls https://coverage.codacy.com/get.sh)
46+
strategy:
47+
matrix:
48+
ruby_version:
49+
- 3.2
50+
- 3.3
51+
- 3.4
52+
53+
package:
54+
name: Package
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Setup project
58+
uses: actions/checkout@v4
59+
- name: Setup ruby
60+
uses: ruby/setup-ruby@v1
61+
with:
62+
bundler-cache: true
63+
ruby-version: 3.2
64+
- name: Package gem
65+
run: bin/build

iro-matrix-rb/.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
*.gem
2+
*.rbc
3+
/.config
4+
/coverage/
5+
/InstalledFiles
6+
/logs/
7+
/pkg/
8+
/spec/reports/
9+
/spec/examples.txt
10+
/test/tmp/
11+
/test/version_tmp/
12+
/tmp/
13+
14+
# Used by dotenv library to load environment variables.
15+
# .env
16+
17+
# Ignore Byebug command history file.
18+
.byebug_history
19+
20+
## Documentation cache and generated files:
21+
/.yardoc/
22+
/_yardoc/
23+
/doc/
24+
/rdoc/
25+
26+
## Environment normalization:
27+
/.bundle/
28+
/vendor/bundle
29+
/lib/bundler/man/
30+
31+
# for a library or gem, you might want to ignore these files since the code is
32+
# intended to run in multiple environments; otherwise, check them in:
33+
Gemfile.lock
34+
# .ruby-version
35+
# .ruby-gemset
36+
37+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
38+
.rvmrc
39+
40+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
41+
.rubocop-https?--*

iro-matrix-rb/.rspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--require spec_helper
2+
--format documentation
3+
--order rand
4+
--color

iro-matrix-rb/.rubocop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
inherit_from:
2+
# TODO: change this to a remote url
3+
- ../.rubocop.yml
4+
5+
Naming/FileName:
6+
Exclude:
7+
- lib/iro-matrix.rb

iro-matrix-rb/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.2.8

iro-matrix-rb/.yardopts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
lib/**/*.rb
2+
--title Iro::Matrix
3+
--readme README.md
4+
--no-private
5+
--protected
6+
--markup markdown
7+
--markup-provider redcarpet
8+
--embed-mixins
9+
--files LICENSE

iro-matrix-rb/Gemfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# frozen_string_literal: true
2+
3+
require 'yaml'
4+
5+
source 'https://rubygems.org'
6+
gemspec
7+
8+
ruby '~> 3.2'
9+
10+
group :iro do
11+
YAML.load_file(File.expand_path('iro-gems.yml', File.dirname(__FILE__)))&.each_pair do |gem_name, config|
12+
gem gem_name, path: config['path'] if Dir.exist?(config['path'])
13+
end
14+
end
15+
16+
group :doc do
17+
gem 'github-markup', require: false
18+
gem 'redcarpet', require: false
19+
gem 'webrick', require: false
20+
gem 'yard', require: false
21+
gem 'yard-sitemap', require: false
22+
end
23+
24+
group :lint do
25+
gem 'rubocop', require: false
26+
gem 'rubocop-ordered_methods', require: false
27+
gem 'rubocop-performance', require: false
28+
gem 'rubocop-rspec', require: false
29+
gem 'rubocop-thread_safety', require: false
30+
gem 'rubocop-yard', require: false
31+
end
32+
33+
group :test do
34+
gem 'rspec', require: false
35+
gem 'simplecov', require: false
36+
gem 'simplecov-lcov', require: false
37+
end

0 commit comments

Comments
 (0)