
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
openstudio_measure_tester
Advanced tools
The OpenStudio Measure Tester is a rubygem that exposes rake tasks for testing OpenStudio measures.
Add the following code to the Gemfile and Rakefile of a measure repo you desire to test.
Gemfile
source 'https://rubygems.org'
gem 'openstudio_measure_tester'
# or for release on Github
gem 'openstudio_measure_tester', github: 'NREL/openstudio_measure_tester_gem', branch: 'develop'
# or for local development
gem 'openstudio_measure_tester', path: '../<path-to-checkout>'
Rakefile
require 'openstudio_measure_tester/rake_task'
OpenStudioMeasureTester::RakeTask.new
Run bundle update
run bundle exec rake -T to see the new tests that are available.
In existing measure directory, run bundle exec rake openstudio:all
Minitest, Coverage, Rubocop, and OpenStudio Style will run. The last message that appears to the screen is the location of the dashboard.
Open ./test_results/dashboard/index.html to view measure testing dashboard.
```
Require the OpenStudio-measure-tester gem
require 'openstudio_measure_tester'
measures_dir = 'spec/test_measures/AddOverhangsByProjectionFactor'
# all measures (recursively) from measures_dir will be tested
runner = OpenStudioMeasureTester::Runner.new(measures_dir)
# base_dir is needed for coverage results as they are written to disk on the at_exit calls
base_dir = Dir.pwd
result = runner.run_all(base_dir)
puts result
# result will be 0 or 1, 0=success, 1=failure
runner.run_style(false)
runner.run_test(false, base_dir)
runner.run_rubocop(false)
Results will be saved into the run directory (measures_dir from above).
docker run -it -v $(pwd):/root/test -w '/root' ubuntu:18.04 bash
# within container
apt-get update && apt-get install -y curl
curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/docker/deployment/scripts/install_ruby.sh
curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/ci/travis/install_openstudio.sh
chmod +x install_ruby.sh
chmod +x install_openstudio.sh
./install_ruby.sh 2.5.5 28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c
./install_openstudio.sh 3.0.0 1c9617fa4e
export RUBYLIB=/usr/Ruby
cd /root/test
bundle update
bundle exec rake
/lib/openstudio_measure_tester/version.rbrake release from masterFAQs
Unknown package
We found that openstudio_measure_tester demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.