Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoDelAssembly committed Apr 30, 2024
2 parents 9f5ae90 + 7d26300 commit bc9e062
Show file tree
Hide file tree
Showing 10 changed files with 240 additions and 249 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
steps:

- name: Git checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build the Docker image
run: docker build -f Dockerfile.base . -t sfgrp/taxonworks-base

- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
20 changes: 16 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,27 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv

## [unreleased]

\-
## [0.40.6] - 2024-04-30

### Changed

- Updated Ruby gems

### Fixed

- Notes params not applied in Source filters (anywhere) [#3927]
- OTU autocomplete raises when no taxon names match
- CSD: Catalog number panel displays warning messages when the namespace is set

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

## [0.40.5] - 2024-04-25

### Added

- `/api/v1/taxon_name_relationships.csv` endpoint

### Changed
### Changed

- Dwca `otu_name` only includes Otu#name, never anything else.
- `api/v1/otus/autocomplete` now more acurately returns the label of the matching term, i.e. Combinations are supported in rendering [https://github.com/SpeciesFileGroup/taxonpages/issues/193]
Expand All @@ -29,7 +41,6 @@ This project <em>does not yet</em> adheres to [Semantic Versioning](https://semv
- Basic endemism task had a broken link out
- Prevent raise on bad polygon (LinearRing) Georeferences


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

## [0.40.4] - 2024-04-21
Expand Down Expand Up @@ -4550,7 +4561,8 @@ _Special thanks to Tom Klein for his amazing open-source contributions on this r
- 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.40.5...development
[unreleased]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.40.6...development
[0.40.6]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.40.5...v0.40.6
[0.40.5]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.40.4...v0.40.5
[0.40.4]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.40.3...v0.40.4
[0.40.3]: https://github.com/SpeciesFileGroup/taxonworks/compare/v0.40.2...v0.40.3
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ RUN sed -i 's/name="disk" value="1GiB"/name="disk" value="8GiB"/' /usr/local/etc
identify -list resource | grep Disk | grep 8GiB && magick -list format | grep "HEIC rw+" # Confirm HEIC support and that 8GB disk setting is active

# Workaround for https://github.com/phusion/passenger-docker/issues/393 / https://github.com/rvm/rvm/issues/5449
RUN sed -i 's/require/load/g' /usr/local/rvm/rubies/ruby-3.3.0/.irbrc
RUN sed -i 's/require/load/g' /usr/local/rvm/rubies/ruby-3.3.1/.irbrc
# Yes, no dot
RUN touch /root/irbrc && touch /home/app/irbrc
RUN touch /root/irbrc && touch /home/app/irbrc
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ GEM
concurrent-ruby (~> 1.0)
indefinite_article (0.2.5)
activesupport
jbuilder (2.11.5)
jbuilder (2.12.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jquery-rails (4.6.0)
Expand Down Expand Up @@ -380,9 +380,9 @@ GEM
paperclip-meta (3.1.0)
paperclip (>= 5.0)
parallel (1.24.0)
parallel_tests (4.7.0)
parallel_tests (4.7.1)
parallel
parser (3.3.0.5)
parser (3.3.1.0)
ast (~> 2.4.1)
racc
parslet (2.0.0)
Expand Down Expand Up @@ -526,7 +526,7 @@ GEM
rspec-support (~> 3.10)
rspec-support (3.13.1)
rtesseract (3.1.3)
rubocop (1.63.3)
rubocop (1.63.4)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand Down Expand Up @@ -581,7 +581,7 @@ GEM
rdoc (>= 5.0)
seedbank (0.5.0)
rake (>= 10.0)
selenium-webdriver (4.19.0)
selenium-webdriver (4.20.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</div>
</template>

<script>
<script setup>
import { GetterNames } from '../../store/getters/getters'
import { MutationNames } from '../../store/mutations/mutations.js'
import { Identifier } from '@/routes/endpoints'
Expand All @@ -111,134 +111,112 @@ import SmartSelector from '@/components/ui/SmartSelector.vue'
import SmartSelectorItem from '@/components/ui/SmartSelectorItem.vue'
import validateComponent from '../shared/validate.vue'
import validateIdentifier from '../../validations/namespace.js'
import incrementIdentifier from '../../helpers/incrementIdentifier.js'
import LockComponent from '@/components/ui/VLock/index.vue'
export default {
components: {
validateComponent,
LockComponent,
SmartSelector,
SmartSelectorItem
},
import { computed, ref, watch } from 'vue'
import { useStore } from 'vuex'
computed: {
collectionObject() {
return this.$store.getters[GetterNames.GetCollectionObject]
},
coId() {
return this.$store.getters[GetterNames.GetCollectionObject]?.id
},
identifiers() {
return this.$store.getters[GetterNames.GetIdentifiers]
},
locked: {
get() {
return this.$store.getters[GetterNames.GetLocked]
},
set(value) {
this.$store.commit([MutationNames.SetLocked, value])
}
},
settings: {
get() {
return this.$store.getters[GetterNames.GetSettings]
},
set(value) {
this.$store.commit(MutationNames.SetSettings, value)
}
},
identifier: {
get() {
return this.$store.getters[GetterNames.GetIdentifier]
},
set(value) {
return this.$store.commit(MutationNames.SetIdentifier, value)
}
},
checkValidation() {
return !validateIdentifier({
namespace_id: this.identifier.namespace_id,
identifier: this.identifier.identifier
})
},
namespaceSelected: {
get() {
return this.$store.getters[GetterNames.GetNamespaceSelected]
},
set(value) {
this.$store.commit(MutationNames.SetNamespaceSelected, value)
}
},
isCreatedIdentifierCurrent() {
return this.existingIdentifiers.find(
(item) => item.id === this.identifier.id
)
}
const DELAY = 1000
let saveRequest = undefined
const store = useStore()
const existingIdentifiers = ref([])
const coId = computed(() => store.getters[GetterNames.GetCollectionObject]?.id)
const identifiers = computed(() => store.getters[GetterNames.GetIdentifiers])
const locked = computed({
get() {
return store.getters[GetterNames.GetLocked]
},
set(value) {
store.commit([MutationNames.SetLocked, value])
}
})
data() {
return {
existingIdentifiers: [],
delay: 1000,
saveRequest: undefined
}
const settings = computed({
get() {
return store.getters[GetterNames.GetSettings]
},
set(value) {
store.commit(MutationNames.SetSettings, value)
}
})
watch: {
existingIdentifier(newVal) {
this.settings.saveIdentifier = !newVal
},
coId(newVal) {
if (newVal) {
this.checkIdentifier()
} else {
this.existingIdentifiers = []
}
}
const identifier = computed({
get() {
return store.getters[GetterNames.GetIdentifier]
},
set(value) {
store.commit(MutationNames.SetIdentifier, value)
}
})
const checkValidation = computed(
() =>
!validateIdentifier({
namespace_id: identifier.value.namespace_id,
identifier: identifier.value.identifier
})
)
const namespaceSelected = computed({
get() {
return store.getters[GetterNames.GetNamespaceSelected]
},
set(value) {
store.commit(MutationNames.SetNamespaceSelected, value)
}
})
const isCreatedIdentifierCurrent = computed(() =>
existingIdentifiers.value.find((item) => item.id === identifier.value.id)
)
watch(existingIdentifiers, (newVal) => {
settings.value.saveIdentifier = !newVal.length
})
methods: {
increment() {
this.identifier.identifier = incrementIdentifier(
this.identifier.identifier
)
},
checkIdentifier() {
if (this.saveRequest) {
clearTimeout(this.saveRequest)
}
if (this.identifier.identifier) {
this.saveRequest = setTimeout(() => {
Identifier.where({
type: IDENTIFIER_LOCAL_CATALOG_NUMBER,
namespace_id: this.identifier.namespace_id,
identifier: this.identifier.identifier
}).then((response) => {
this.existingIdentifiers = response.body
})
}, this.delay)
}
},
setNamespace(namespace) {
this.identifier.namespace_id = namespace.id
this.checkIdentifier()
},
unsetNamespace() {
this.identifier.namespace_id = undefined
this.namespaceSelected = undefined
watch(coId, () => {
existingIdentifiers.value = []
})
watch(
() => identifier.value.namespace_id,
(newVal) => {
if (!newVal) {
unsetNamespace()
}
}
)
function checkIdentifier() {
if (saveRequest) {
clearTimeout(saveRequest)
}
if (identifier.value.identifier) {
saveRequest = setTimeout(() => {
Identifier.where({
type: IDENTIFIER_LOCAL_CATALOG_NUMBER,
namespace_id: identifier.value.namespace_id,
identifier: identifier.value.identifier
}).then(({ body }) => {
existingIdentifiers.value = body
})
}, DELAY)
} else {
existingIdentifiers.value = []
}
}
function setNamespace(namespace) {
identifier.value.namespace_id = namespace.id
checkIdentifier()
}
function unsetNamespace() {
identifier.value.namespace_id = undefined
namespaceSelected.value = undefined
}
</script>
Expand Down
2 changes: 1 addition & 1 deletion lib/queries/otu/autocomplete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def autocomplete_taxon_name_extended
]
}

return nil if ids.empty?
return ::Otu.none if ids.empty?

ids.uniq!

Expand Down
1 change: 1 addition & 0 deletions lib/queries/source/filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def initialize(query_params)
set_attributes_params(params)
set_empty_params(params)
set_tags_params(params)
set_notes_params(params)
set_user_dates(params)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/taxonworks/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module TaxonWorks
VERSION = "0.40.5"
VERSION = "0.40.6"
end
Loading

0 comments on commit bc9e062

Please sign in to comment.