Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Nov 11, 2021
2 parents fbc063d + 1fd6a0d commit 8d889be
Show file tree
Hide file tree
Showing 80 changed files with 2,271 additions and 1,285 deletions.
126 changes: 126 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: Feature request
description: Open a new issue to describe and request a new feature.
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
A feature could be a function or output or user interface capability for example. Please describe what you would like to see or be able to do.
This issue outlines and proposes a new function, its role, target audience, scope, and brief design [TODO: link to example]. As a way to provide
transparency for what is being shown, a new function description should address the statement "*As an X I need Y to answer question Q for audience A*".
_Need help filling this out? Once you have your feature details in hand, contact us and we'll help step you through filling out this issue._
- type: markdown
attributes:
value: |
# Summary
_To understand what you want, as a way to organize and prioritize what we build, please provide a summary in the following form._
- type: input
id: summary_x
attributes:
label: Your role
description: Who are you, i.e. in what role are you presenting this feature request?
placeholder: Undergrad ecologist
validations:
required: true
- type: input
id: summary_y
attributes:
label: Your needs
description: What feature do you need to answer the questions that this feature addresses, a graph, table, map, text?
placeholder: A particular table of data and corresponding bar-graph
validations:
required: true
- type: input
id: summary_q
attributes:
label: Audience question
description: What is the question your _audience_ has that you seek to answer using this feature?
placeholder: What names were used for the species and its close relatives originally named Homo sapiens?
validations:
required: true
- type: input
id: summary_a
attributes:
label: Audience
description: Who is your audience? Consider what expertise the person has prior to their engagement with this feature.
placeholder: e.g. Undergraduate, kindergarden child, farmer, taxonomists, policy writer, journalist
validations:
required: true
- type: markdown
attributes:
value: |
# Details
- type: markdown
attributes:
value: |
## Interface
- type: input
id: interface_title
attributes:
label: Header
description: Suggested primary header (title of panel if present)
placeholder: Type species
validations:
required: false
- type: textarea
id: interface_napkin_sketch
attributes:
label: Napkin sketch
description: minimal visual description of feature, can add many iterations.
placeholder: Drag/drop your image here
validations:
required: false
- type: textarea
id: interface_wireframe
attributes:
label: Wireframe
description: mocked digital description of the feature, can include screenshots
placeholder: Drag/drop your image here
validations:
required: false
- type: textarea
id: interface_actions
attributes:
label: Actions
description: What can the user do with this feature that is "unique" to this part of the TaxonWorks software? mocked digital description of the feature, can include screenshots.
placeholder: Sort table by clicking column headers; filter to show records by year only.
validations:
required: false
- type: textarea
id: data
attributes:
label: Data
description: Features might have a corresponding data-object that is accessible to the end user (e.g. by download of CSV, via JSON, GeoJSO, DwC Archive, etc.). What does this look like?
placeholder: A CSV file with the DwC headers specificEpithet, family, and year
validations:
required: true
- type: textarea
id: citation
attributes:
label: Citation
description: What does any citation for the data look like for this section feature?
placeholder: Recommended. TODO, provide example styles.
validations:
required: false
- type: markdown
attributes:
value: |
## Technical details
_Largely completed by developers._
- type: textarea
id: technical_metadata
attributes:
label: Metadata
description: What does a citation to the data look like for this section related to this feature?
placeholder: |
* General data source (e.g. TaxonWorks, ALA, GBIF, CoL, Globi)
* API entry point or offline data-source?
* Suitable for offline?
* Suitable for print?
* GH pages deployable?
* Proximity map (What should be rendered close to this panel)
* Dependent panels (minimize/eliminate these if possible)? (Reference by issue.)
* Panel source code repository
validations:
required: false
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
uses: actions/cache@v2
with:
path: spec/fixtures/vcr_cassettes
key: ${{ runner.os }}-vcr-${{ steps.datetime.outputs.year_week }}-${{ matrix.worker }}
key: ${{ runner.os }}-vcr-rev3-${{ steps.datetime.outputs.year_week }}-${{ matrix.worker }}

- name: Install apt packages
run: |
Expand Down
51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,60 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

\-

## [0.21.2] - 2021-11-11

### Added
- Support for DwC terms on body of water depth [#2628]
- Filter Collection Objects by a specific Loan [#2632]

### Changed
- Updated ruby gems.

### Fixed
- Containerized specimens display catalog number in tag correctly [#2623]
- Improved CrossRef parsing for a new source [#997] [#2620]
- Container label shows catalog number for loan items [#1275]
- Determiners are not saved after lock the list in comprehensive form [#2626]
- Wrong rank for original combinations in DwC checklist importer [#2621]
- No longer exposing exception data for *failed* records (not to be confused with *errored*) in DwC importer.
- Smart selector is not working in Browse Annotations
- Biological associations in OTU radial [#2630]
- Fix citations on asserted distribution list in OTU radial [#2629]
- Subsequent combinations are not scoped [#2634]
- Missing scroll in alternate value annotator [#2635]
- Smart selectors are not refreshing in New source [#2636]
- Radial navigation doesn't work on source in New taxon name task [#2633]
- Determiner is not selectable on Grid Digitizer after "Create and new" [#2637]
- DwC Dashboard data version counts correct now [#2627]
- Common statuses are not displayed in New taxon name task [#2642]
- Nomenclature and OTU (biology) display the same thing on Browse OTU page [#2644]
- New combination task hangs editing a combination [#2646]

[#2623]: https://github.com/SpeciesFileGroup/taxonworks/issues/2623
[#2627]: https://github.com/SpeciesFileGroup/taxonworks/issues/2627
[#1275]: https://github.com/SpeciesFileGroup/taxonworks/issues/1275
[#2628]: https://github.com/SpeciesFileGroup/taxonworks/issues/2628
[#2626]: https://github.com/SpeciesFileGroup/taxonworks/issues/2626
[#2621]: https://github.com/SpeciesFileGroup/taxonworks/pull/2621
[#2629]: https://github.com/SpeciesFileGroup/taxonworks/issues/2629
[#2630]: https://github.com/SpeciesFileGroup/taxonworks/issues/2630
[#2633]: https://github.com/SpeciesFileGroup/taxonworks/issues/2633
[#2634]: https://github.com/SpeciesFileGroup/taxonworks/issues/2634
[#2635]: https://github.com/SpeciesFileGroup/taxonworks/issues/2635
[#2636]: https://github.com/SpeciesFileGroup/taxonworks/issues/2636
[#2637]: https://github.com/SpeciesFileGroup/taxonworks/issues/2637
[#2642]: https://github.com/SpeciesFileGroup/taxonworks/issues/2642
[#2644]: https://github.com/SpeciesFileGroup/taxonworks/issues/2644
[#2646]: https://github.com/SpeciesFileGroup/taxonworks/issues/2646

## [0.21.1] - 2021-11-05
### Fixed
- Citations in image viewer

## [0.21.0] - 2021-11-04
### Added
- Added new handling for plant name author_string.
- Added new `Combination` section to handle historical protonym combination.
- Add new task 'Object graph', visualize and navigate your Things via a force-directed-graph (network) [#2587]
- New combination editing, including support for multiple authors in plant names [#666] [#2407]
- Add new global identifier class for glbio repositories
Expand Down Expand Up @@ -1933,7 +1981,8 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

[#1532]: https://github.com/SpeciesFileGroup/taxonworks/issues/1532

[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.21.1...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.21.2...development
[0.21.2]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.21.1...v0.21.2
[0.21.1]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.21.0...v0.21.1
[0.21.0]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.20.1...v0.21.0
[0.20.1]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.20.0...v0.20.1
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ GEM
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
os (1.1.1)
os (1.1.4)
paper_trail (12.1.0)
activerecord (>= 5.2)
request_store (~> 1.1)
Expand All @@ -318,7 +318,7 @@ GEM
parser (3.0.2.0)
ast (~> 2.4.1)
parslet (2.0.0)
passenger (6.0.11)
passenger (6.0.12)
rack
rake (>= 0.8.1)
pdf-core (0.9.0)
Expand Down Expand Up @@ -413,7 +413,7 @@ GEM
rgeo (>= 1.0.0)
rgeo-geojson (2.1.1)
rgeo (>= 1.0.0)
rgeo-proj4 (3.1.0)
rgeo-proj4 (3.1.1)
rgeo (~> 2.0)
rmagick (4.2.3)
roo (2.8.3)
Expand Down Expand Up @@ -459,7 +459,7 @@ GEM
rubocop-ast (>= 1.12.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.12.0)
rubocop-ast (1.13.0)
parser (>= 3.0.1.1)
rubocop-faker (0.2.0)
rubocop (>= 0.74)
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/collection_objects/filter_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def collection_object_filter_params
is_type: [],
keyword_id_and: [],
keyword_id_or: [],
loan_id: [],
otu_ids: [],
preparation_type_id: []
# user_id: []
Expand Down Expand Up @@ -154,6 +155,7 @@ def collection_object_api_params
is_type: [],
keyword_id_and: [],
keyword_id_or: [],
loan_id: [],
otu_ids: [],
preparation_type_id: [],

Expand Down
17 changes: 17 additions & 0 deletions app/controllers/dwc_occurrences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ class DwcOccurrencesController < ApplicationController

before_action :set_object, only: [:status, :create]

after_action -> { set_pagination_headers(:dwc_occurrences) }, only: [:index], if: :json_request?

# .json only
def index
@dwc_occurrences = Queries::DwcOccurrence::Filter.new(filter_params).all.page(params[:page]).per(params[:per] || 1)
end

def metadata
@dwc_occurrences = DwcOccurrence.where(project_id: sessions_current_project_id)
end
Expand Down Expand Up @@ -41,6 +48,16 @@ def create

protected

def filter_params
params.permit(
:user_date_end,
:user_date_start,
dwc_occurrence_object_id: [],
dwc_occurrence_object_type: []
)
end


def set_object
@object = GlobalID::Locator.locate(params[:object_global_id])

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class <Model>Helper
# Return a label to be used in autocomplete dropdown lists
# May (usually) contain HTML.
# Note that HTML inputs do not support HTML, so you
# likely want to create <model_name>_label to go with this.
# likely want to create label_for_<model> to go with this.
# Typically used in ../views/../autocomplete.json
def <model_name>_autocomplete_tag(object)
end
Expand Down
37 changes: 18 additions & 19 deletions app/helpers/annotations_helper.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
# Helpers that wrap sets of annotations of different types.
module AnnotationsHelper
module AnnotationsHelper

# @return [String]
# Assumes the context is the object, not a multi-object summary
def annotations_summary_tag(object)
content_tag(:div, class: %w{item panel separate-bottom}) do
content_tag(:div, class: [:content]) do
content_tag(:div, class: ['information-panel']) do
content_tag(:h2, 'Annotations') +
content_tag(:div,
[citation_list_tag(object),
identifier_list_tag(object),
data_attribute_list_tag(object),
note_list_tag(object),
tag_list_tag(object),
alternate_values_list_tag(object),
confidence_list_tag(object),
attribution_list_tag(object)
].compact.join.html_safe, class: :annotations_summary_list, 'data-annotator-list-object-id' => object.id)

v = [citation_list_tag(object),
identifier_list_tag(object),
data_attribute_list_tag(object),
note_list_tag(object),
tag_list_tag(object),
alternate_values_list_tag(object),
confidence_list_tag(object),
attribution_list_tag(object)
].compact

tag.div(class: %w{item panel separate-bottom}) do
tag.div(class: [:content]) do
tag.div(class: ['information-panel']) do
tag.h2('Annotations') +
( v.count > 0 ? tag.div(v.join.html_safe, class: :annotations_summary_list, 'data-annotator-list-object-id' => object.id) : tag.em('None'))
end
end
end

# depictions
# confidences
# protocols

end

def annotations_exist(object)
return (object.has_citations? && object.citations.any?) ||
return (object.has_citations? && object.citations.any?) ||
(object.has_identifiers? && object.identifiers.any?) ||
(object.has_data_attributes? && object.data_attributes.any?) ||
(object.has_notes? && object.notes.any?) ||
Expand All @@ -49,7 +48,7 @@ def radial_annotator(object, pulse = false, showCount = false)
end

# @return [Array]
# of { ClassName => human name }
# of { ClassName => human name }
def klass_and_labels(klass_names)
klass_names.collect{|n| [n, n.tableize.humanize]}.to_h
end
Expand Down
27 changes: 27 additions & 0 deletions app/helpers/attributions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@ def attribution_tag(attribution)
a.compact.join('. ').html_safe
end

# @return [String, nil]
# no html in _label
# !! if _tag labels add HTML then they must be removed here
def label_for_attribution(attribution)
return nil if attribution.nil?

a = [
attribution_copyright_label(attribution),
attribution_creators_tag(attribution),
attribution_editors_tag(attribution),
attribution_owners_tag(attribution),
attribution.license,
]

a.compact.join('. ').html_safe
end

# @return [String, nil]
def attribution_copyright_label(attribution)
a = attribution.copyright_year
b = attribution.attribution_copyright_holders
return nil unless a or b.any?
s = '(c)'
s << [a, Utilities::Strings.authorship_sentence(b.collect{|c| c.name})].join(' ')
s
end

def attribution_copyright_tag(attribution)
a = attribution.copyright_year
b = attribution.attribution_copyright_holders
Expand Down
Loading

0 comments on commit 8d889be

Please sign in to comment.