Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 09 20:56

    debpaul on master

    changing TW Late Nite date to c… (compare)

  • Apr 09 20:04
    proceps labeled #2176
  • Apr 09 20:04
    proceps opened #2176
  • Apr 09 16:25
    jlpereira closed #2174
  • Apr 09 16:25

    jlpereira on development

    Fix #2174 (compare)

  • Apr 09 15:55

    LocoDelAssembly on staged-imports

    Freeze fields only AFTER record… (compare)

  • Apr 09 15:48
    LocoDelAssembly labeled #2175
  • Apr 09 15:48
    LocoDelAssembly opened #2175
  • Apr 09 15:22

    jlpereira on 1934_new_extract

    Added reset state (compare)

  • Apr 09 15:18

    jlpereira on 1934_new_extract

    Fix custom attributes component (compare)

  • Apr 09 15:01
    jlpereira opened #2174
  • Apr 09 15:01
    jlpereira assigned #2174
  • Apr 09 15:01
    jlpereira labeled #2174
  • Apr 09 14:46

    mjy on 1934_new_extract

    Fix protocol relationship conce… (compare)

  • Apr 09 14:20

    mjy on development

    geographic area method refactor… (compare)

  • Apr 09 03:04

    LocoDelAssembly on staged-imports-indexed-fields

    Add location of original DwC-A … Fixed origin relationship betwe… Fix #2170 and 3 more (compare)

  • Apr 09 00:22

    jrflood on collection_object_api_rev

    Revise treatment of collection … (compare)

  • Apr 08 21:04

    jlpereira on 1934_new_extract

    Added protocols (compare)

  • Apr 08 20:44

    LocoDelAssembly on staged-imports-indexed-fields

    Save space removing unneeded in… (compare)

  • Apr 08 16:17

    jlpereira on staged-imports

    Fix #2170 (compare)

Chandra Earl
@sunray1
Thanks for answering all my questions today and the walk through - appreciate all your help!
Matt
@mjy
Thanks for taking the time to engage and describe your needs, and very glad (for those who weren't there) that you got things running with Docker locally!
Hernán Lucas Pereira
@LocoDelAssembly
What is the correct procedure to make pairing_is_allowed to work when doing origin relationships?
sorry..,
What is the correct procedure to make pairing_is_allowed to work for all subclasses when doing origin relationships?
Matt
@mjy
See concerns/shared/origin_relationship.rb
!! You must redundantly provide STI subclasses and parent classes if you want to allow both.  Providing
   a superclass does *not* provide the subclasses.
I fought that for a while and decided to go explicit, and by subclass. Since there are limited possibilities so far it wasn't too bad. Are you hitting issues in Datasets?
Hernán Lucas Pereira
@LocoDelAssembly
Yes, it is now crashing, so was trying to add is_origin_for/originates_from on both ends (originally only is_origin_for Person.to_s at ImportDataset).
Matt
@mjy
do you also have the inverse in both?
is_origin_for
originates_from
you likley need
Person::Vetted?
and Person::Unvetted?
Hernán Lucas Pereira
@LocoDelAssembly
Yes, that is the problem now and added originates_from ImportDataset.to_s at Person::Unvetted
Matt
@mjy
(good idea with ImportDataset.to_s approach btw
We should update everything to be that way...
)
Hernán Lucas Pereira
@LocoDelAssembly
Guess I'll have to list all descendants? Would also require adding is_origin_for to all subclasses of ImportDataset?
Matt
@mjy
I believe so, yes.
How many subclasses do you have?
Hernán Lucas Pereira
@LocoDelAssembly
["ImportDataset::DarwinCore", "ImportDataset::DarwinCore::Occurrences", "ImportDataset::DarwinCore::Checklist", "ImportDataset::DarwinCore::Unknown"] (In reality only the ones in the middle would be associated with people)
Matt
@mjy
OK. Not too bad so far.
I think in this case it's good we have explict
To further define people can only come from some of those
and not all
Hernán Lucas Pereira
@LocoDelAssembly
Should I set is_origin_for for Person::Vetted? (I create always unvetted, but eventually them transition to vetted automatically, even when importing more rows without the user doing anything)
Matt
@mjy
No, don't.
The actuall class stored in the DB is the base class.
It's just a validation step on create IIRC
I.e. add it only if we make it possible in a UI.
Hernán Lucas Pereira
@LocoDelAssembly
 OriginRelationship.group(:old_object_type,:new_object_type).count
   (0.4ms)  SELECT COUNT(*) AS count_all, "origin_relationships"."old_object_type" AS origin_relationships_old_object_type, "origin_relationships"."new_object_type" AS origin_relationships_new_object_type FROM "origin_relationships" GROUP BY "origin_relationships"."old_object_type", "origin_relationships"."new_object_type"
 => {["ImportDataset", "Person"]=>399}
Alright, so Unvetted it is. Thanks @mjy
Hernán Lucas Pereira
@LocoDelAssembly
  originates_from(*
    [
      ImportDataset::DarwinCore::Checklist,
      ImportDataset::DarwinCore::Occurrences
    ].map(&:to_s)
  )
But perhaps I just change originates_from/is_origin_for method in development branch to call to_s on all elements, right? (Which should be fully compatible with existing code). Any downside?
Matt
@mjy
It does make a requirement that the model is loaded already.
So maybe we shouldn't.
Plus side- model must exist.
Downside- creates load constraints.
Matt
@mjy
@LocoDelAssembly @jlpereira do we need to update https://github.com/SpeciesFileGroup/install_taxonworks/blob/master/development/native/macos.md to reference mime-magic updates?
Hernán Lucas Pereira
@LocoDelAssembly
Guess will have to be, because migrating to ActiveStorage causes those untrackable problems of "has_one_attached method unknown" when it shouldn't at all...
BTW, is Xcode actually required? It is a VERY heavy download even after installing it I noticed that brew downloaded it again anyway (although command line tools only)
José Luis Pereira
@jlpereira
what you mean about the mime-magic?
Matt
@mjy
brew install shared-mime-info
José Luis Pereira
@jlpereira
I didnt have to do anything different to get it work
Matt
@mjy
@LocoDelAssembly I didn't know brew loaded xcode. If it does then we don't need it again, though I can't imagine a dev env without it to start.
Hernán Lucas Pereira
@LocoDelAssembly
Try bundle update && git checkout Gemfile.lock
Matt
@mjy
@jrflood that ^
Ah, but bundle update fails for him.
I don' thtink that will work.
Hernán Lucas Pereira
@LocoDelAssembly

Try bundle update && git checkout Gemfile.lock

If it fails then you need really need to install shared-mime-info otherwise will work and Gemfile.lock will be restored so updates are not pushed.