Skip to content

Commit

Permalink
Add python 3.12 release code (#1732)
Browse files Browse the repository at this point in the history
Co-authored-by: gj <17556281+gj@users.noreply.github.com>
  • Loading branch information
Kevin Kirsche and gj authored Dec 20, 2023
1 parent 041813a commit c277b53
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: '2.7'
working-directory: "languages/ruby"
if: steps.cache.outputs.cache-hit != 'true'
- name: Install yard
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: '2.7'
working-directory: "languages/ruby"
if: steps.cache.outputs.cache-hit != 'true'
- name: Install yard
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: '2.7'
working-directory: "languages/ruby"
- name: Install yard
run: gem install yard
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: '2.7'
working-directory: "languages/ruby"
- name: Install yard
run: gem install yard
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: '2.7'
working-directory: "languages/ruby"
- name: Set version env
id: version
Expand Down Expand Up @@ -531,7 +531,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -560,7 +560,7 @@ jobs:
runs-on: macos-11
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -625,14 +625,21 @@ jobs:
arch -arm64 ./venv311/bin/pip install oso==${{ steps.version.outputs.oso_version }} -f ../wheel
arch -arm64 ./venv311/bin/python test.py
working-directory: test
- name: "test python 3.12"
run: |
arch -arm64 /opt/homebrew/opt/python@3.12/bin/python3 -m venv venv312
arch -arm64 ./venv312/bin/pip install oso==${{ steps.version.outputs.oso_version }} -f ../wheel --no-deps --no-index
arch -arm64 ./venv312/bin/pip install oso==${{ steps.version.outputs.oso_version }} -f ../wheel
arch -arm64 ./venv312/bin/python test.py
working-directory: test

validate_python_windows:
name: Test python ${{ matrix.python-version }} on Windows
needs: [build_windows_wheels]
runs-on: windows-2019
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -661,7 +668,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand All @@ -682,7 +689,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-11, windows-2019]
ruby-version: [2.5, 2.6, 2.7, "3.0"]
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
steps:
- uses: actions/checkout@v2
- name: Set version env
Expand Down Expand Up @@ -794,11 +801,11 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: "3.7"
- name: Use Ruby 2.4
- name: Use Ruby 2.7
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: "2.4"
ruby-version: '2.7'
working-directory: "docs/examples/quickstart/ruby"
- name: Use Node.js 12
uses: actions/setup-node@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: '2.7'
working-directory: "languages/ruby"
- name: Lint Ruby code
working-directory: "languages/ruby"
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.4
ruby-version: '2.7'
working-directory: "languages/ruby"
- name: Test ruby
run: make ruby-test
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
- name: Install Ruby + gems
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.4
ruby-version: '2.7'
bundler-cache: true
- name: Use Node.js 18
uses: actions/setup-node@v3
Expand Down
4 changes: 4 additions & 0 deletions docs/spelling/allowed_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ DFA
Dexec
EMR
EOF
EOL
EndsWith
FFI
ForbiddenError
Expand Down Expand Up @@ -121,6 +122,7 @@ changelog
classpath
cmp
codebase
codebases
constructable
coroutine
customizations
Expand Down Expand Up @@ -148,6 +150,7 @@ favoriteAnimal
fieldName
filesystem
filterRelation
footguns
forbiddenerror
fromFieldName
fromTypeName
Expand Down Expand Up @@ -175,6 +178,7 @@ lastLogin
latencies
lhs
lifecycle
lifing
loadFile
loadStr
localhost
Expand Down
37 changes: 23 additions & 14 deletions languages/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GEM
arel (9.0.0)
ast (2.4.2)
backport (1.2.0)
benchmark (0.2.0)
benchmark (0.3.0)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.1.9)
Expand All @@ -30,13 +30,21 @@ GEM
ffi (1.15.4)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
maruku (0.7.3)
jaro_winkler (1.5.6)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
method_source (1.0.0)
mini_portile2 (2.4.0)
mini_portile2 (2.8.5)
minitest (5.14.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.15.5-x86_64-linux)
racc (~> 1.4)
parallel (1.20.1)
parser (2.7.2.0)
ast (~> 2.4.1)
Expand All @@ -46,6 +54,7 @@ GEM
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
racc (1.7.3)
rainbow (3.0.0)
rake (12.3.3)
regexp_parser (2.1.1)
Expand Down Expand Up @@ -77,28 +86,28 @@ GEM
rubocop-ast (0.8.0)
parser (>= 2.7.1.5)
ruby-progressbar (1.11.0)
solargraph (0.39.17)
solargraph (0.40.1)
backport (~> 1.1)
benchmark
bundler (>= 1.17.2)
e2mmap
jaro_winkler (~> 1.5)
maruku (~> 0.7, >= 0.7.3)
nokogiri (~> 1.9, >= 1.9.1)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.1)
parser (~> 2.3)
reverse_markdown (>= 1.0.5, < 3)
rubocop (~> 0.52)
rubocop (>= 0.52)
thor (~> 1.0)
tilt (~> 2.0)
yard (~> 0.9, >= 0.9.24)
sqlite3 (1.4.2)
thor (1.1.0)
thor (1.3.0)
thread_safe (0.3.6)
tilt (2.0.10)
tilt (2.3.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
unicode-display_width (1.8.0)
yard (0.9.26)
yard (0.9.34)

PLATFORMS
ruby
Expand All @@ -112,7 +121,7 @@ DEPENDENCIES
rake (~> 12.0)
rspec (~> 3.0)
rubocop (~> 0.89.1)
solargraph (~> 0.39.14)
solargraph (~> 0.40.0)
sqlite3
yard (~> 0.9.25)

Expand Down
9 changes: 7 additions & 2 deletions languages/ruby/oso-oso.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ Gem::Specification.new do |spec|
spec.authors = ['Oso Security, Inc.']
spec.email = ['support@osohq.com']
spec.licenses = ['Apache-2.0']
spec.summary = "We have deprecated the legacy Oso open source library. We have plans for the next open source release and we’re looking forward to getting feedback from the community leading up to that point (please reach out to us in the Slack #help channel). In the meantime, if you’re happy using the Oso open source library now, nothing needs to change – i.e., we are not end-of-lifing (EOL) the library and we’ll continue to provide support and critical bug fixes. More context: [here](https://www.osohq.com/docs/oss/getting-started/deprecation.html)."
spec.summary = 'We have deprecated the legacy Oso open source library. We have plans for the next open ' \
"source release and we're looking forward to getting feedback from the community leading up " \
'to that point (please reach out to us in the Slack #help channel). In the meantime, if ' \
"you're happy using the Oso open source library now, nothing needs to change – i.e., we are " \
"not end-of-lifing (EOL) the library and we'll continue to provide support and critical bug " \
'fixes. More context: [here](https://www.osohq.com/docs/oss/getting-started/deprecation.html).'
spec.homepage = 'https://www.osohq.com/'

spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
Expand Down Expand Up @@ -36,7 +41,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rake', '~> 12.0'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'rubocop', '~> 0.89.1'
spec.add_development_dependency 'solargraph', '~> 0.39.14'
spec.add_development_dependency 'solargraph', '~> 0.40.0'
spec.add_development_dependency 'sqlite3'
spec.add_development_dependency 'yard', '~> 0.9.25'
end

1 comment on commit c277b53

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: c277b53 Previous: 041813a Ratio
rust_get_attribute 29406 ns/iter (± 873) 28797 ns/iter (± 1250) 1.02
n_plus_one/100 1562608 ns/iter (± 32037) 1524706 ns/iter (± 32835) 1.02
n_plus_one/500 7571758 ns/iter (± 72293) 7349104 ns/iter (± 235003) 1.03
n_plus_one/1000 15061323 ns/iter (± 91592) 14598759 ns/iter (± 87912) 1.03
unify_once 621 ns/iter (± 1397) 635 ns/iter (± 307) 0.98
unify_twice 1733 ns/iter (± 21) 1733 ns/iter (± 486) 1
many_rules 38978 ns/iter (± 967) 38301 ns/iter (± 1005) 1.02
fib/5 346722 ns/iter (± 5193) 348911 ns/iter (± 5302) 0.99
prime/3 10379 ns/iter (± 401) 10313 ns/iter (± 409) 1.01
prime/23 10367 ns/iter (± 379) 10334 ns/iter (± 362) 1.00
prime/43 10366 ns/iter (± 361) 10322 ns/iter (± 381) 1.00
prime/83 10391 ns/iter (± 374) 10331 ns/iter (± 386) 1.01
prime/255 9239 ns/iter (± 362) 9286 ns/iter (± 390) 0.99
indexed/100 3493 ns/iter (± 373) 3439 ns/iter (± 380) 1.02
indexed/500 3973 ns/iter (± 871) 3985 ns/iter (± 1634) 1.00
indexed/1000 4471 ns/iter (± 223) 4475 ns/iter (± 198) 1.00
indexed/10000 9244 ns/iter (± 3193) 9060 ns/iter (± 1429) 1.02
not 4000 ns/iter (± 561) 4002 ns/iter (± 44) 1.00
double_not 8487 ns/iter (± 133) 8479 ns/iter (± 173) 1.00
De_Morgan_not 5425 ns/iter (± 103) 5442 ns/iter (± 95) 1.00
load_policy 694755 ns/iter (± 18800) 730294 ns/iter (± 12371) 0.95
partial_and/1 20723 ns/iter (± 581) 20763 ns/iter (± 610) 1.00
partial_and/5 68749 ns/iter (± 1856) 68760 ns/iter (± 1903) 1.00
partial_and/10 129729 ns/iter (± 3742) 129955 ns/iter (± 3318) 1.00
partial_and/20 269310 ns/iter (± 5335) 271196 ns/iter (± 6551) 0.99
partial_and/40 588626 ns/iter (± 8318) 591754 ns/iter (± 10615) 0.99
partial_and/80 1360072 ns/iter (± 15604) 1370391 ns/iter (± 9653) 0.99
partial_and/100 1815872 ns/iter (± 30070) 1831247 ns/iter (± 70852) 0.99
partial_rule_depth/1 62249 ns/iter (± 2270) 62778 ns/iter (± 2297) 0.99
partial_rule_depth/5 214951 ns/iter (± 5199) 215501 ns/iter (± 6280) 1.00
partial_rule_depth/10 483655 ns/iter (± 9403) 488255 ns/iter (± 8917) 0.99
partial_rule_depth/20 1378092 ns/iter (± 25656) 1387073 ns/iter (± 21797) 0.99
partial_rule_depth/40 4932050 ns/iter (± 46496) 4946441 ns/iter (± 39958) 1.00
partial_rule_depth/80 27431730 ns/iter (± 247395) 27815045 ns/iter (± 294394) 0.99
partial_rule_depth/100 49205424 ns/iter (± 588649) 49954396 ns/iter (± 652757) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.