Skip to content

DPL-274 - ONT - remove existing code #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/workflows/asset_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
cp config/database.yml.example config/database.yml
cp config/mailer.yml.example config/mailer.yml
cp config/bunny.yml.example config/bunny.yml
cp config/env_constants.yml.example config/env_constants.yml

- name: Compile Build
run: ./compile-build
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/automated_release_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
cp config/database.yml.example config/database.yml
cp config/mailer.yml.example config/mailer.yml
cp config/bunny.yml.example config/bunny.yml
cp config/env_constants.yml.example config/env_constants.yml

- name: Compile Build
run: ./compile-build
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
cp config/database.yml.example config/database.yml
cp config/mailer.yml.example config/mailer.yml
cp config/bunny.yml.example config/bunny.yml
cp config/env_constants.yml.example config/env_constants.yml
bundle exec rake db:reset
- name: Run tests
env:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
config/database.yml
config/mailer.yml
config/bunny.yml
config/env_constants.yml

release.tar.gz

Expand Down
23 changes: 10 additions & 13 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
require: rubocop-rails
inherit_from: .rubocop_todo.yml

require:
- rubocop-rails
- rubocop-rspec

AllCops:
NewCops: enable
Exclude:
- db/schema.rb
- db/seeds.rb
- db/migrate/*
# Travis installs gems in the vendor directory, which causes rubocop to try
# GitHub actions installs gems in the vendor directory, which causes rubocop to try
# and cop our gems. We don't want it to.
- vendor/**/*
- 'test/**/*'
- 'spec/**/*'
- 'config/routes.rb'
- 'config/initializers/secret_token.rb'
- 'config/initializers/backtrace_silencers.rb'
- 'config/environments/*'
- 'bin/*'
- 'config/application.rb'
- 'config/initializers/content_security_policy.rb'
# Exclude auto-generated GraphQL classes
- 'app/controllers/graphql_controller.rb'
- 'app/graphql/mutations/base_*'
- 'app/graphql/types/base_*'
- 'config/initializers/new_framework_defaults_7_0.rb'

# The cop is meant to enforce conventions regarding variables containing numbers
# However in 0.43.0 it is bugged. Both changed on master and disabled by default
Expand Down Expand Up @@ -49,6 +48,9 @@ Layout/LineLength:
Max: 100
Exclude:
- 'lib/tasks/*'
# TODO: I have tried to add this to rubocop todo but it is causing all sorts of issues
# The maximum line length is 157.
- 'spec/**/*'

Metrics/MethodLength:
Max: 12
Expand Down Expand Up @@ -117,11 +119,6 @@ Style/RedundantFetchBlock:
Style/CaseEquality:
Exclude:
- 'db/migrate/*'
- 'config/initializers/01_proc.rb'

Rails/SkipsModelValidations:
Exclude:
- 'app/models/ont/plate_with_samples_factory.rb'

Rails/EnvironmentVariableAccess:
AllowReads: true
142 changes: 142 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# I addded this as spec was not being rubocopped. Due to the size of the task this is best
# left until a later date.
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-05-05 13:28:31 UTC using RuboCop version 1.28.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# Configuration parameters: IgnoredMethods.
Lint/AmbiguousBlockAssociation:
Exclude:
- 'spec/pipelines/pipelines_spec.rb'
- 'spec/requests/v1/pacbio/libraries_spec.rb'

# Offense count: 1
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/factories/saphyr/runs.rb'

# Offense count: 2
Lint/ShadowingOuterLocalVariable:
Exclude:
- 'spec/requests/v1/pacbio/plates_spec.rb'

# Offense count: 6
Lint/UselessAssignment:
Exclude:
- 'spec/messages/message_spec.rb'
- 'spec/models/pacbio/run_spec.rb'
- 'spec/models/sample_spec.rb'
- 'spec/models/saphyr/run_spec.rb'
- 'spec/requests/v1/saphyr/runs_spec.rb'
- 'spec/support/tube_material.rb'

# Offense count: 1
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 32

# Offense count: 2
RSpec/AnyInstance:
Exclude:
- 'spec/models/pacbio/run_spec.rb'
- 'spec/support/read_only.rb'

# Offense count: 194
# Configuration parameters: Prefixes.
# Prefixes: when, with, without
RSpec/ContextWording:
Enabled: false

# Offense count: 71
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 52

# Offense count: 1
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
Exclude:
- 'spec/models/pacbio/well_pool.spec.rb'

# Offense count: 1
RSpec/IdenticalEqualityAssertion:
Exclude:
- 'spec/requests/v1/saphyr/chips_spec.rb'

# Offense count: 52
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
- 'spec/models/pacbio/library_factory_spec.rb'
- 'spec/requests/v1/pacbio/runs_spec.rb'
- 'spec/requests/v1/saphyr/runs_spec.rb'

# Offense count: 18
RSpec/LetSetup:
Exclude:
- 'spec/models/plate_spec.rb'
- 'spec/models/tube_spec.rb'
- 'spec/requests/v1/pacbio/libraries_spec.rb'
- 'spec/requests/v1/pacbio/pools_spec.rb'
- 'spec/requests/v1/pacbio/runs/plates_spec.rb'
- 'spec/requests/v1/pacbio/runs/wells_spec.rb'
- 'spec/requests/v1/pacbio/runs_spec.rb'
- 'spec/requests/v1/pacbio/tag_sets_spec.rb'
- 'spec/requests/v1/saphyr/libraries_spec.rb'
- 'spec/requests/v1/saphyr/runs_spec.rb'
- 'spec/support/tubes.rb'

# Offense count: 25
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
EnforcedStyle: receive

# Offense count: 148
RSpec/MultipleExpectations:
Max: 16

# Offense count: 68
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 14

# Offense count: 64
RSpec/NestedGroups:
Max: 6

# Offense count: 4
RSpec/RepeatedDescription:
Exclude:
- 'spec/models/sample_spec.rb'
- 'spec/pipelines/ont/message_spec.rb'

# Offense count: 2
RSpec/RepeatedExample:
Exclude:
- 'spec/models/sample_spec.rb'

# Offense count: 5
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Exclude:
- 'spec/messages/broker_spec.rb'

# Offense count: 2
Style/OpenStructUse:
Exclude:
- 'spec/messages/message_spec.rb'

# Offense count: 1
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
Exclude:
- 'spec/support/read_only.rb'
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ ruby '2.7.3'
gem 'bootsnap', '>= 1.1.0', require: false # Reduces boot times through caching
gem 'bunny'
gem 'exception_notification'
gem 'graphql'
gem 'graphql-client'
gem 'graphql-docs'
# 0.10.5 Results in MySQL syntax error on several tests when run against a MySQL
# There is a 'monkey patch' for this in config/intializers/jsonapi_resources:15-63
gem 'jsonapi-resources'
gem 'mysql2'
gem 'puma', '~> 4.3' # Use Puma as the app server
gem 'rack-cors' # Use Rack CORS for handling CORS, making cross-origin AJAX possible
gem 'rails', '~> 6.0.4.1'
gem 'rails', '~> 7.0.2.3'

group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
Expand All @@ -37,7 +34,8 @@ group :development, :test do
gem 'pry-rails'
gem 'rspec-rails'
gem 'rubocop', require: false
gem 'rubocop-rails'
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
gem 'shoulda-matchers'
gem 'sqlite3'
end
Loading