Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Sep 26, 2023
2 parents f9e3391 + 120e0f9 commit 7464d16
Show file tree
Hide file tree
Showing 52 changed files with 858 additions and 579 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ jobs:
- name: Git checkout
uses: actions/checkout@v3

- name: Set up Ruby 3.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2

- name: Set up Ruby Bundler gems cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1
3.2.2
35 changes: 33 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,41 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

\-

## [0.34.5] - 2023-09-26

### Added

- Cached map item report (linked from Filter OTUs)
- Depictions list on Filter image

### Changed

- Calls to `/api/v1` have a new key/value signature
- Staged image metadata field format from JSON to JSONB [#3446]
- Updated Ruby gems

### Fixed

- Batch import BibTeX failing on empty entries
- Chronology stats report
- ImportAttribute facet not working on any predicate searches
- Taxon name/otus filter order bug
- Staged image queries failing when multiple facets used [#3556]
- Citations list is truncated in Radial Annotator [#3560]
- DwC attributes are now showing in Stepwise determinations task
- Quick taxon name only works for species [#3554]
- Filter Images: Change `per` doesn't update the table [#3566]

[#3554]: https://github.com/SpeciesFileGroup/taxonworks/issues/3554
[#3556]: https://github.com/SpeciesFileGroup/taxonworks/issues/3556
[#3560]: https://github.com/SpeciesFileGroup/taxonworks/issues/3560
[#3566]: https://github.com/SpeciesFileGroup/taxonworks/issues/3566

## [0.34.4] - 2023-09-15

### Added

- ImportAttribute facets to various filters
- ImportAttribute facets to various filters
- Project data curation issue tracking URL field (and to base API response) [#3550]
- Manual option to regenerate derivative images on Show Image
- API gallery endpoint `/depictions/gallery`
Expand Down Expand Up @@ -3863,7 +3893,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.4...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.5...development
[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
[0.34.3]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.2...v0.34.3
[0.34.2]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.34.1...v0.34.2
Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dropzonejs-rails (0.8.5)
rails (> 3.1)
dwc_agent (3.0.11.0)
dwc_agent (3.0.13.0)
namae (~> 1)
namecase (~> 2)
erubi (1.12.0)
Expand All @@ -245,7 +245,7 @@ GEM
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-net_http (3.0.2)
ffi (1.15.5)
ffi (1.16.2)
ffi-geos (2.4.0)
ffi (>= 1.0.0)
formatador (1.1.0)
Expand Down Expand Up @@ -394,7 +394,7 @@ GEM
method_source (~> 1.0)
psych (3.3.4)
public_suffix (5.0.3)
puma (6.3.1)
puma (6.4.0)
nio4r (~> 2.0)
racc (1.7.1)
rack (2.2.8)
Expand Down Expand Up @@ -524,21 +524,21 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.18.0)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.23.1)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-faker (1.1.0)
faker (>= 2.12.0)
rubocop (>= 0.82.0)
rubocop-performance (1.19.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.21.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.24.0)
rubocop-rspec (2.24.1)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
Expand All @@ -563,7 +563,7 @@ GEM
rdoc (>= 5.0)
seedbank (0.5.0)
rake (>= 10.0)
selenium-webdriver (4.12.0)
selenium-webdriver (4.13.1)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down Expand Up @@ -646,7 +646,7 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket (1.2.9)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -660,7 +660,7 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
zaru (0.3.0)
zeitwerk (2.6.11)
zeitwerk (2.6.12)
zip_tricks (5.6.0)

PLATFORMS
Expand Down Expand Up @@ -800,4 +800,4 @@ RUBY VERSION
ruby 3.2.1p31

BUNDLED WITH
2.4.19
2.4.10
33 changes: 15 additions & 18 deletions app/assets/stylesheets/base/headers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,25 @@
background-color: $color-header;
height: 60px;

#taxonworks {
.logo {
width: 160px;
height: 20px;
background-image: image-url('taxonworks-white.svg');
background-size: contain;
background-repeat: no-repeat;
background-position: left center;
padding: 0px;
text-decoration: none;
}
#taxonworks_logo {
width: 160px;
height: 20px;
background-image: image-url('taxonworks-white.svg');
background-size: contain;
background-repeat: no-repeat;
background-position: left center;
padding: 0px;
text-decoration: none;
}

#taxonworks_left {
flex-grow: 1;
line-height: $font_small;
}

a {
color: white;
text-decoration: none;
}
#taxonworks_left > a {
color: white;
text-decoration: none;
line-height: $font_small;
}

#taxonworks_version {
Expand All @@ -43,7 +41,7 @@
.horizontal_navbar {
a {
padding: 0px;
color: #FFF;
color: #fff;
}
li {
padding-left: $standard_padding;
Expand All @@ -69,4 +67,3 @@
padding-left: $standard_padding;
padding-right: $standard_padding;
}

28 changes: 13 additions & 15 deletions app/controllers/import_datasets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,20 @@ def destroy

def list
@import_datasets = ImportDataset.with_project_id(sessions_current_project_id).order(:id).page(params[:page])
end
end

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

# Only allow a list of trusted parameters through.
def import_dataset_params
params.require(:import_dataset).permit(
:source,
:description,
import_settings: [
:nomenclatural_code,
:row_type
])
end
def import_dataset_params
params.require(:import_dataset).permit(
:source,
:description,
import_settings: [
:nomenclatural_code,
:row_type
])
end
end
2 changes: 1 addition & 1 deletion app/controllers/otus_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def index
.page(params[:page])
.per(params[:per])
.eager_load(:taxon_name)
.order('taxon_names.cached, otus.name')
.order(:cached, 'otus.name')
}
end
end
Expand Down
10 changes: 10 additions & 0 deletions app/controllers/tasks/cached_maps/report_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Tasks::CachedMaps::ReportController < ApplicationController
include TaskControllerConfiguration

# GET
def items_by_otu
@otus = ::Queries::Otu::Filter.new(params).all.limit(10).page(params[:page]).per(params[:per])
@cached_map_items = CachedMapItem.where(otu: @otus).distinct.limit(500)
end

end
2 changes: 1 addition & 1 deletion app/helpers/taxon_names_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def taxon_names_per_year(totals)
end

def taxon_names_by_year_count(names)
t = names.select('EXTRACT(YEAR FROM cached_nomenclature_date) AS year, COUNT(*) AS count').group('year').inject({}){|hsh, r| hsh[r.year.to_i] = r.count; hsh}
t = names.select('EXTRACT(YEAR FROM taxon_names.cached_nomenclature_date) AS year, COUNT(*) AS count').group('year').inject({}){|hsh, r| hsh[r.year.to_i] = r.count; hsh}
t
end

Expand Down
12 changes: 12 additions & 0 deletions app/helpers/workbench/layout_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,16 @@ def sandbox_details_tag
end
end

def issue_tracker_tag
[
link_to(
'Issues',
'https://github.com/SpeciesFileGroup/taxonworks/issues',
target: '_blank',
data: { 'curation-issue-tracker': sessions_current_project&.data_curation_issue_tracker_url }
),
(content_tag('div','', id: 'curation-issue-tracker-container') if sessions_current_project&.data_curation_issue_tracker_url)
].join().html_safe
end

end
1 change: 1 addition & 0 deletions app/javascript/packs/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'leaflet/dist/leaflet.css'
import 'tippy.js/dist/tippy.css'

require('../vanilla/initializers/copyTable.js')
require('../vue/initializers/issue_tracker/main.js')

require('../vue/tasks/citations/otus/main.js')
require('../vue/tasks/content/editor/main.js')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default {
},
created() {
Citation.where({
Citation.all({
citation_object_id: this.metadata.object_id,
citation_object_type: this.metadata.object_type,
extend: EXTEND_PARAMS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,33 @@
</VBtn>
</div>
<TableList
:list="list"
:list="internalAttributes"
:header="['Name', 'Value', '']"
:attributes="['predicate_name', 'value']"
edit
target-citations="data_attributes"
@edit="setDataAttribute"
@delete="removeItem"
/>

<div
v-if="importList.length"
class="margin-medium-top"
>
<h3>Import attributes</h3>
<TableList
:list="importList"
:header="['Name', 'Value', '']"
:attributes="['import_predicate', 'value']"
:destroy="false"
/>
</div>
</div>
</template>

<script>
import { ControlledVocabularyTerm } from '@/routes/endpoints'
import { IMPORT_ATTRIBUTE } from '@/constants'
import { addToArray } from '@/helpers/arrays.js'
import CRUD from '../request/crud.js'
import AnnotatorExtend from '../components/annotatorExtend.js'
Expand All @@ -80,6 +96,14 @@ export default {
computed: {
validateFields() {
return this.predicate && this.value.length
},
importList() {
return this.list.filter((item) => item.base_class === IMPORT_ATTRIBUTE)
},
internalAttributes() {
return this.list.filter((item) => item.base_class !== IMPORT_ATTRIBUTE)
}
},
Expand All @@ -92,12 +116,10 @@ export default {
}
},
mounted() {
this.getList(`/controlled_vocabulary_terms.json?type[]=Predicate`).then(
(response) => {
this.all = response.body
}
)
created() {
ControlledVocabularyTerm.where({ type: ['Predicate'] }).then((response) => {
this.all = response.body
})
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ export const TASK_TAXON_NAME_STATS = {
label: 'Chronology stats',
link: '/tasks/taxon_names/stats/'
}

export const TASK_CACHED_MAP_ITEM = {
label: 'Cached map items',
link: '/tasks/cached_maps/report/items_by_otu'
}
9 changes: 7 additions & 2 deletions app/javascript/vue/components/radials/linker/links/Otu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import {
TASK_CACHED_MAP_ITEM,
} from '../constants/links'


export const Otu = {
all: [],
ids: []
all: [ TASK_CACHED_MAP_ITEM ],
ids: [ TASK_CACHED_MAP_ITEM ]
}
Loading

0 comments on commit 7464d16

Please sign in to comment.