Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Oct 19, 2023
2 parents e3d7168 + b9fe7c7 commit 8e4caa1
Show file tree
Hide file tree
Showing 158 changed files with 2,913 additions and 1,526 deletions.
43 changes: 41 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,45 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

\-

## [0.35.0] - 2023-10-19

### Added

- Outdated names task for CollectionObjects (compare to COL) [#2585]
- Unified project data download task [#1009], in part
- Download project as zipped TSV tables in Download [#1009]
- CSV generating endpoints `/api/v1/taxon_names.csv` and `/api/v1/otus.csv`
- Filter CollectionObject links to "Collection Summary" task [#3434]
- CollectionObject type facet
- Coordinate and collecting event sections in Browse OTUs

### Changed

- Download routes now name files as `.tsv`
- CollectingEvent allowable max records made smart [#3590]
- Added `extend[]=attribution` to `/images/123.json`

### Fixed

- TaxonNameClassification download
- TaxonName `descendants` facet always included self, it shouldn't have
- Without document facet
- Object cloning in OriginRelationship caused infinite loops [#3594]
- Quote handling in API autocomplete calls
- Organization name not displaying in attribution copyright _label_
- Manage Controlled vocabulary term: CVT list is not reloading after clone them from other project
- Not possible to delete asserted distribution once added in radial object [#3591]
- Manage controlled vocabulary: Delete button doesn't work [#3593]


[#2585]: https://github.com/SpeciesFileGroup/taxonworks/issues/2585
[#1009]: https://github.com/SpeciesFileGroup/taxonworks/issues/1009
[#3593]: https://github.com/SpeciesFileGroup/taxonworks/issues/3593
[#3594]: https://github.com/SpeciesFileGroup/taxonworks/issues/3594
[#3590]: https://github.com/SpeciesFileGroup/taxonworks/issues/3590
[#3434]: https://github.com/SpeciesFileGroup/taxonworks/issues/3434
[#3591]: https://github.com/SpeciesFileGroup/taxonworks/issues/3591

## [0.34.6] - 2023-10-06

### Added
Expand Down Expand Up @@ -42,7 +81,6 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv
- GeographicAreas not registering for some DWCA imports [#3575]
- New collecting event: georeference from verbatim button creates two identical georeferences [#3573]


[#3035]: https://github.com/SpeciesFileGroup/taxonworks/issues/3035
[#1355]: https://github.com/SpeciesFileGroup/taxonworks/issues/1355
[#3562]: https://github.com/SpeciesFileGroup/taxonworks/issues/3562
Expand Down Expand Up @@ -3941,7 +3979,8 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv
- Loosing input page numbers when switching tabs on New Taxon Name task

[#1532]: https://github.com/SpeciesFileGroup/taxonworks/issues/1532
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.6...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.35.0...development
[0.35.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.6...v0.35.0
[0.34.6]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.5...v0.34.6
[0.34.5]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.4...v0.34.5
[0.34.4]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.3...v0.34.4
Expand Down
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gem 'roo', '~> 2.8', '>= 2.8.3'
gem 'roo-xls', '~> 1.2'
gem 'net-smtp', '~> 0.3.1'
gem 'mail', '~> 2.8', '>= 2.8.1'
gem "matrix", "~> 0.4.2"
gem 'matrix', '~> 0.4.2'

# Geo

Expand Down Expand Up @@ -104,7 +104,7 @@ gem 'chartkick', '~> 4.0'
gem 'groupdate', '~> 5.2'
gem 'dropzonejs-rails', '~> 0.8.1'
gem 'kaminari', '~> 1.2.0'
gem "best_in_place", git: "https://github.com/mmotherwell/best_in_place"
gem 'best_in_place', git: 'https://github.com/mmotherwell/best_in_place'
gem 'redcarpet', '~> 3.4'
gem 'sassc-rails', '~> 2.1.0'
gem 'waxy', '~> 0.1.1'
Expand All @@ -123,6 +123,8 @@ gem 'dwc-archive', github: 'LocoDelAssembly/dwc-archive', branch: 'overhaul' # '
gem 'biodiversity', github: 'GlobalNamesArchitecture/biodiversity', branch: 'pipe_approach' # '~> 5.1', '>= 5.1.1'
gem 'ruby-units', '~> 2.3.0', require: 'ruby_units/namespaced'

gem 'colrapi', '~>0.1.1'

# Global Names
gem 'gnfinder', '~> 1.0'

Expand Down Expand Up @@ -189,7 +191,7 @@ end
group :test do
gem 'rspec', '~> 3.6'
gem 'codecov', '~> 0.6.0'
gem 'simplecov', :require => false
gem 'simplecov', require: false
gem 'capybara', '~> 3.18'
gem 'timecop', '~> 0.9.1'
gem 'webmock', '~> 3.8' # , '>= 3.6.2'
Expand Down
27 changes: 16 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ GEM
codecov (0.6.0)
simplecov (>= 0.15, < 0.22)
coderay (1.1.3)
colrapi (0.1.1)
faraday (~> 2.2)
faraday-follow_redirects (>= 0.1, < 0.4)
multi_json (~> 1.15)
concurrent-ruby (1.2.2)
crack (0.4.5)
rexml
Expand All @@ -217,7 +221,7 @@ GEM
debug_inspector (1.1.0)
delayed_job (4.1.11)
activesupport (>= 3.0, < 8.0)
delayed_job_active_record (4.1.7)
delayed_job_active_record (4.1.8)
activerecord (>= 3.0, < 8.0)
delayed_job (>= 3.0, < 5)
diff-lcs (1.5.0)
Expand All @@ -226,7 +230,7 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dropzonejs-rails (0.8.5)
rails (> 3.1)
dwc_agent (3.0.13.0)
dwc_agent (3.0.15.0)
namae (~> 1)
namecase (~> 2)
erubi (1.12.0)
Expand Down Expand Up @@ -320,7 +324,7 @@ GEM
parslet
logical_query_parser (0.3.2)
treetop (~> 1.6.8)
loofah (2.21.3)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
lumberjack (1.2.9)
Expand All @@ -345,7 +349,7 @@ GEM
namae (1.1.1)
namecase (2.0.0)
nenv (0.3.0)
net-imap (0.4.0)
net-imap (0.4.1)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -370,7 +374,7 @@ GEM
paperclip-meta (3.1.0)
paperclip (>= 5.0)
parallel (1.23.0)
parallel_tests (4.2.2)
parallel_tests (4.3.0)
parallel
parser (3.2.2.4)
ast (~> 2.4.1)
Expand Down Expand Up @@ -456,11 +460,11 @@ GEM
rdoc (6.3.3)
redcarpet (3.6.0)
redis (4.8.1)
regexp_parser (2.8.1)
regexp_parser (2.8.2)
request_store (1.5.1)
rack (>= 1.4)
require_all (3.0.0)
responders (3.1.0)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rest-client (2.1.0)
Expand Down Expand Up @@ -515,12 +519,12 @@ GEM
rspec-support (~> 3.10)
rspec-support (3.12.1)
rtesseract (3.1.3)
rubocop (1.56.4)
rubocop (1.57.1)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.3)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
Expand Down Expand Up @@ -568,7 +572,7 @@ GEM
rdoc (>= 5.0)
seedbank (0.5.0)
rake (>= 10.0)
selenium-webdriver (4.13.1)
selenium-webdriver (4.14.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down Expand Up @@ -655,7 +659,7 @@ GEM
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
wikidata-client (0.1.0.pre.rc1)
wikidata-client (0.1.0)
excon (~> 0.92)
faraday (~> 2.2)
faraday-excon (~> 2.1)
Expand Down Expand Up @@ -695,6 +699,7 @@ DEPENDENCIES
citeproc-ruby (~> 1.1.10)
closure_tree (~> 7.0)
codecov (~> 0.6.0)
colrapi (~> 0.1.1)
csl (~> 1.6.0)
csl-styles (~> 1.0.1.8)
daemons (~> 1.4.1)
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/alternate_values_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ def index
# !! This is project-only, it will be tricky to find all created at this point. We would have
# to reference all project members and link through created/modified on all community opbjects.
# These would show up throughout the Users project as well, confusing things across project.
@recent_objects = Queries::AlternateValue::Filter.new(params.merge(project_id: sessions_current_project_id))
@recent_objects = ::Queries::AlternateValue::Filter.new(params.merge(project_id: sessions_current_project_id))
.all
.order(updated_at: :desc).limit(10)
render '/shared/data/all/index'
}
format.json {
# !! You must merge project_id to handle community data exceptions. This is a contrast to other filter patterns
# where the project_id is scoped here.
@alternate_values = Queries::AlternateValue::Filter.new(
@alternate_values = ::Queries::AlternateValue::Filter.new(
params.merge(project_id: sessions_current_project_id)
)
.all.page(params[:page])
Expand Down Expand Up @@ -106,7 +106,7 @@ def autocomplete

# GET /alternate_values/download
def download
send_data Export::Download.generate_csv(AlternateValue.where(project_id: sessions_current_project_id)), type: 'text', filename: "alternate_values_#{DateTime.now}.csv"
send_data Export::Download.generate_csv(AlternateValue.where(project_id: sessions_current_project_id)), type: 'text', filename: "alternate_values_#{DateTime.now}.tsv"
end

# GET /alternate_values/:global_id/metadata
Expand Down
9 changes: 4 additions & 5 deletions app/controllers/asserted_distributions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def index
render '/shared/data/all/index'
}
format.json {
@asserted_distributions = Queries::AssertedDistribution::Filter.new(params)
@asserted_distributions = ::Queries::AssertedDistribution::Filter.new(params)
.all
.where(project_id: sessions_current_project_id)
.page(params[:page])
Expand All @@ -27,7 +27,6 @@ def index
# GET /asserted_distributions/1
# GET /asserted_distributions/1.json
def show
# @asserted_distribution = AssertedDistribution.find(params[:id])
end

# GET /asserted_distributions/new
Expand Down Expand Up @@ -90,7 +89,7 @@ def list
end

def autocomplete
@asserted_distributions = Queries::AssertedDistribution::Autocomplete.new(params.require(:term), project_id: sessions_current_project_id).autocomplete
@asserted_distributions = ::Queries::AssertedDistribution::Autocomplete.new(params.require(:term), project_id: sessions_current_project_id).autocomplete
end

# TODO: deprecate
Expand All @@ -107,7 +106,7 @@ def download
send_data(
Export::Download.generate_csv(AssertedDistribution.where(project_id: sessions_current_project_id)),
type: 'text',
filename: "asserted_distributions_#{DateTime.now}.csv")
filename: "asserted_distributions_#{DateTime.now}.tsv")
end

# GET /asserted_distributions/batch_load
Expand Down Expand Up @@ -149,7 +148,7 @@ def create_simple_batch_load
end

def api_index
@asserted_distributions = Queries::AssertedDistribution::Filter.new(params.merge!(api: true))
@asserted_distributions = ::Queries::AssertedDistribution::Filter.new(params.merge!(api: true))
.all
.where(project_id: sessions_current_project_id)
.includes(:citations, :otu, geographic_area: [:parent, :geographic_area_type], origin_citation: [:source])
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/attributions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class AttributionsController < ApplicationController
include DataControllerConfiguration::ProjectDataControllerConfiguration

before_action :set_attribution, only: [:show, :edit, :update, :destroy]
after_action -> { set_pagination_headers(:attributions) }, only: [:index, :api_index ], if: :json_request?

Expand All @@ -13,7 +13,7 @@ def index
render '/shared/data/all/index'
end
format.json {
@attributions = Queries::Attribution::Filter.new(params).all.where(project_id: sessions_current_project_id).
@attributions = ::Queries::Attribution::Filter.new(params).all.where(project_id: sessions_current_project_id).
page(params[:page]).per(params[:per] || 500)
}
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/citations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def autocomplete

# GET /citations/download
def download
send_data Export::Download.generate_csv(Citation.where(project_id: sessions_current_project_id)), type: 'text', filename: "citations_#{DateTime.now}.csv"
send_data Export::Download.generate_csv(Citation.where(project_id: sessions_current_project_id)), type: 'text', filename: "citations_#{DateTime.now}.tsv"
end

def api_index
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/collecting_events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def autocomplete_collecting_event_verbatim_locality
def download
send_data(Export::Download.generate_csv(CollectingEvent.where(project_id: sessions_current_project_id)),
type: 'text',
filename: "collecting_events_#{DateTime.now}.csv")
filename: "collecting_events_#{DateTime.now}.tsv")
end

# parse verbatim label, return date and coordinates
Expand Down
14 changes: 7 additions & 7 deletions app/controllers/collection_object_observations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ def search
def download
send_data(Export::Download.generate_csv(CollectionObjectObservation.where(project_id: sessions_current_project_id)),
type: 'text',
filename: "collection_object_observations_#{DateTime.now}.csv")
filename: "collection_object_observations_#{DateTime.now}.tsv")
end

private
# Use callbacks to share common setup or constraints between actions.
def set_collection_object_observation
@collection_object_observation = CollectionObjectObservation.where(project_id: sessions_current_project_id).find(params[:id])
end
def set_collection_object_observation
@collection_object_observation = CollectionObjectObservation.where(project_id: sessions_current_project_id).find(params[:id])
end

# Never trust parameters from the scary internet, only allow the white list through.
def collection_object_observation_params
params.require(:collection_object_observation).permit(:data)
end
def collection_object_observation_params
params.require(:collection_object_observation).permit(:data)
end
end
2 changes: 1 addition & 1 deletion app/controllers/collection_objects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def search

# GET /collection_objects/download
def download
send_data Export::Download.generate_csv(CollectionObject.where(project_id: sessions_current_project_id), header_converters: []), type: 'text', filename: "collection_objects_#{DateTime.now}.csv"
send_data Export::Download.generate_csv(CollectionObject.where(project_id: sessions_current_project_id), header_converters: []), type: 'text', filename: "collection_objects_#{DateTime.now}.tsv"
end

# GET collection_objects/batch_load
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/whitelist.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def whitelist_constantize(klass_name)
# if Rails.env.development?
# ApplicationEnumeration.data_models.inject({}){|hsh, k| hsh.merge!(k.name => k)}.fetch(klass_name)
# elsif Rails.env.production?
::DATA_MODELS.fetch(klass_name)
::DATA_MODELS.fetch(klass_name)
# else
# raise TaxonWorks::Error, 'whitelist attempted in unknown environment'
# end
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/confidences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def update
end
end

def confidence_object_update
def confidence_object_update
@confidence_object = confidence_object
if @confidence_object.update(confidences_params)
flash[:notice] = 'Successfully updated record.'
Expand Down Expand Up @@ -94,7 +94,7 @@ def search

# GET /confidences/download
def download
send_data Export::Download.generate_csv(Confidence.where(project_id: sessions_current_project_id)), type: 'text', filename: "confidences_#{DateTime.now}.csv"
send_data Export::Download.generate_csv(Confidence.where(project_id: sessions_current_project_id)), type: 'text', filename: "confidences_#{DateTime.now}.tsv"
end

def exists
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/contents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def download
send_data(
Export::Download.generate_csv(::Content.where(project_id: sessions_current_project_id)),
type: 'text',
filename: "contents_#{DateTime.now}.csv")
filename: "contents_#{DateTime.now}.tsv")
end

# GET /api/v1/content
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/controlled_vocabulary_terms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def download
send_data(
Export::Download.generate_csv(ControlledVocabularyTerm.where(project_id: sessions_current_project_id)),
type: 'text',
filename: "controlled_vocabulary_terms_#{DateTime.now}.csv")
filename: "controlled_vocabulary_terms_#{DateTime.now}.tsv")
end

# GET /controlled_vocabulary_terms/1/tagged_objects
Expand Down
Loading

0 comments on commit 8e4caa1

Please sign in to comment.