Skip to content

Commit

Permalink
Adds Harvest table and APIs (#582)
Browse files Browse the repository at this point in the history
Fixes #539

Adds APIs, tables, and workflows that allow remote audio uploads.

Docs here: https://github.com/QutEcoacoustics/baw-server/wiki/Harvest-Workflows

The existing harvest system has been left in place until we can verify the new process is fully capable of replacing the old process.

Note: spec/helpers was moved to spec/support because helpers was part of a default filter in rspec-rails that applies support module for controller helper specs. This automatic loading of unassociated helpers caused multiple issues.
  • Loading branch information
atruskie authored May 27, 2022
1 parent bcd1cba commit 4efeef8
Show file tree
Hide file tree
Showing 261 changed files with 10,843 additions and 2,070 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ rspec_results.html

real_data
public/system/*
data
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@ provision/upload/config/id_*
# sometimes i mount large dirs here
/real_data/*

# where we simulate real data shared
data/

# health check flag
.ready
1 change: 1 addition & 0 deletions .rerun
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--dir 'lib'
--dir 'app'
--dir 'spec/fixtures'
--pattern '**/*.{rb,rake}'
--name "baw-workers"
Expand Down
1 change: 0 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
--color
--format documentation
-r turnip/rspec
--require rails_helper
31 changes: 19 additions & 12 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,23 @@ AllCops:
TargetRubyVersion: 3.1
NewCops: enable
# Bug in rubocop-rspec config merge: https://github.com/rubocop/rubocop-rspec/pull/1163
# RSpec:
# inherit_mode:
# override:
# - Merge
# Language:
# ExampleGroups:
# # rswag example group aliases
# - path
# - get
# - push
# - post
# - delete
RSpec:
Language:
ExampleGroups:
Regular:
# rswag example group aliases
- path
- get
- push
- post
- delete
- stepwise
Examples:
Regular:
# custom dsl for permissions tests
- the_users
- the_user
- step

# Customized options
Lint/DeprecatedOpenSSLConstant:
Expand Down Expand Up @@ -75,6 +80,8 @@ Metrics/BlockLength:
- factory
- path
- Async
- aasm
- stepwise
Metrics/MethodLength:
Max: 30
IgnoredMethods:
Expand Down
2 changes: 1 addition & 1 deletion .solargraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ reporters:
- update_errors
require_paths:
- spec/lib
- spec/helpers
- spec/support
- spec
- lib
formatter:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ RUN --mount=type=bind,source=./provision,target=/provision \
# https://github.com/moby/moby/issues/20437
&& mkdir -p /home/${app_user}/${app_name}/tmp \
&& chown -R 1000:1000 /home/${app_user} \
&& mkdir /data \
&& chown -R 1000:1000 /data \
&& (if [ "x${trimmed}" != "xtrue" ]; then /provision/dev_setup.sh ; fi)


Expand Down
11 changes: 5 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ group :server do
gem 'rails_same_site_cookie'

# bumping to latest RC because it has pre-compiled native binaries
gem 'nokogiri', '~> 1.11.0.rc3'
gem 'nokogiri', '~> 1.13.3'

# cms
gem 'comfortable_mexican_sofa', '~> 2.0.0'
Expand Down Expand Up @@ -129,7 +129,7 @@ group :server do
gem 'composite_primary_keys', COMPOSITE_PRIMARY_KEYS_VERSION

# allows for adding common table expressions to queries
gem "activerecord-cte"
gem 'activerecord-cte'

# MODELS
# -------------------------------------
Expand Down Expand Up @@ -252,7 +252,7 @@ group :development, :test do

# rspec helpers for rails
# allows factory generators to be used when in development group as well as test
gem 'rspec-rails'
gem 'rspec-rails', '~> 6.0.0.rc1'

# we're using falcon and these async primitives in web_server_helper for tests
gem 'async', git: 'https://github.com/socketry/async'
Expand All @@ -277,9 +277,8 @@ group :test do
gem 'timecop'
# better diffs
# 0.8.0 causes ifinite hangs during some specs (spec/requests/media/edge_cases_spec.rb)
gem 'super_diff', '0.7.0'
# for multi-step specs
gem 'turnip'
gem 'super_diff'

# for profiling
gem 'ruby-prof', '>= 0.17.0', require: false
gem 'shoulda-matchers', '~> 4', require: false
Expand Down
Loading

0 comments on commit 4efeef8

Please sign in to comment.