Code Monkey home page Code Monkey logo

atla_digital_library's Introduction

Atla Digital Library

Atla staff use this repository as their digital library.


Table of Contents


Running the stack

Versions

  • Ruby 2.5.3
  • Rails 5.1.6
  • Hyrax 2.3.3

Important URL's

With Docker

We use docker compose in this repository, the main file is:

  • docker-compose.yml

Install Docker

Configure Dory

On OS X or Linux we recommend running Dory. It acts as a proxy allowing you to access domains locally such as hyku.test or tenant.hyku.test, making multitenant development more straightforward and prevents the need to bind ports locally. Be sure to adjust your ~/.dory.yml file to support the .test tld. You can still run in development via docker with out Dory. To do so, copy docker-compose.override-nodory.yml to docker-compose.override.yml before starting doing docker-compose up. You can then see the application at the loopback domain 'lvh.me:3000'.

gem install dory
dory up

Start the server

This project has a containerized development environment managed with with stack_car.

git clone [email protected]:scientist-softserv/atla_digital_library.git
cd atla_digital_library
docker compose pull
docker compose build
dory up
docker compose up

The app should now be available at http://atla.test.

Run migrations and seed the database

You should not need to do any of this manual setup due to the initialize_app step in the docker compose file that will run migrations and seed your database automatically, but in case you need to know how to do this manually you can:

docker compose exec web bash
bundle exec rails db:create db:schema:load db:migrate db:seed

Once these are done, you may need to stop and start the containers to ensure Delayed Job is picking up the database migration.

Stop the app and services

  • Press Ctrl + C in the terminal where you started your container with docker compose up
  • When that's done docker compose stop shuts down the running containers

RSpec

In a new tab/window:

docker compose exec web bash
rails spec

Troubleshooting

  • if you see the following error: mesg: ttyname failed: Inappropriate ioctl for device and a list of files that already exist, for example cp: cannot create regular file './public/uv/dist/lib/p-p4r1bdpj.system.entry.js': File exists

    • run yarn (in local shell, not inside container)
  • If you rails db:seed will not run, or you get the following bulkrax error when trying to edit an importer: Faraday::ConnectionFailed in Bulkrax::Importers::Edit

    • run docker compose restart fcrepo
  • If you are not able to run the seeds/not able to see the seeded importer, run:

    • rails hyrax:default_collection_types:create
    • rails hyrax:default_admin_set:create
    • rails db:seed

Statistics Not Updating

Statistics can be updated manually by running UpdateStatisticalDataJob.perform_later in the rails console.

Once run, the job will automatically schedule itself to run again in the future.

Backups

Backup Tools

We use the backup gem to perform our backups. It has a lot of built in tools for dealing with most of the stack and runs very dependably. An email is sent at the end of each daily backup. This is set as a cron job on the Tomcat server and configured via the ops/roles/notch8.backups role.

What is Backed Up

Hyrax

For Hyrax we backup the database that Hyrax uses directly (to store users and session info), along with the database that Fedora uses. We back up all config files and derivatives (to speed restoration). Code is already in Gitlab and thus does not need separate backup. The Solr indexes are not backed up currently as they can be regenerated and are large.

Backup Schedule

Currently backups are taken nightly. This can be scaled up or down easily by editing the cron jobs on the servers.

Restore Procedure

Backups are encrypted and stored in S3. To restore backups, first download the correct backup files from S3. At that point the backup needs to be decrypted as per instructions here. Password is found in the secure env files under backup_password. After the tar file is decrypted Postgresql restore is done via the psql command and uploaded files can be copied back in to place manually. At that point Fedora, Solr and Passenger can all be restarted.

atla_digital_library's People

Contributors

orangewolf avatar dewey4iv avatar ckarpinski avatar aprilrieger avatar labradford avatar summer-cook avatar dewey4notch8 avatar butlerjim avatar smcfarlane avatar alishaevn avatar jzgo avatar bkiahstroud avatar diembtran avatar atlait avatar deonfranklin avatar kirkkwang avatar busspatrick avatar

Watchers

Tim avatar Braydon Justice avatar Christine Peterson avatar Fay avatar

atla_digital_library's Issues

Home Visual Adjustments

  • 1. Home page - on just the home page we need to add the class "fullscreen-bg" to the html element (then either the styles are already there to make it look correct or we can add them - if you transferred the previous css they are already there)

Make Format (Digital) Uniform Capital Case

Make all items in Format (Digital) uniformly capital case when they are saved. This is actually about the facet names and not about the search directly.

Original Question

emailed list for this - Can we get it so that capital and lowercase work the same for searching - Example: Books and books not being two separate terms - is that a Sufia or Blacklight thing maybe? We already have examples of this happening - go here and facet by format (original)

From Email:
Capital / lowercase – I am now seeing that yes our issue is we have books and Book – both capitalization problem and plural. At some point when I had checked there were PDF and pdf both in as facets, but now I am not seeing it.

So I think for now it is just
Format (Digital) – I think Andy had mentioned the convention in digital libraries is to make these all caps – and maybe this is already taken care of from our media types request from before
Format (Original) – can we make these all lowercase
Type – if we can make these title case

Collection Show page updates

Collection page
http://34.218.236.99/collections/4x51hj03c?locale=en

  • we had removed the icons for User Collection, Public - I can do this with CSS

  • we removed Date Added and Visibility entirely from the table of items - Needs to be commented out in the code

  • previous version said “Items in this Collection” instead of Works(#) can we have the word works be Items in this Collection?

  • we did not have Is part of: [collection name] under the item titles in the list of items on the collection page - Needs to be commented out in the code

  • pager is missing its styles - I can do this with CSS

  • I think we had hidden last updated up under the collection name - I can do this with CSS

Rights Statements

Are going to make it so url goes in the field which then populates the text from another file so that if we need to update it it will happen right away rather than having to reindex
Also - bold the first part of the text (moved to: notch8/atla_digital_library#111)

I think what we need is an option to have the dropdown menu rights statement we choose on harvest do one of two things
Replace all,
Replace only on records missing dc:rights

  • Add new boolean to over-ride rights statements form records if checks
  • Add dc:rights to all OAI harvesters
  • Respect the override if selected, otherwise only use the override if checked
  • Leave rightst statement as manditory in harvester set up, as it will be the fall back if dc:rights is not found

Collection Top Layout

  1. the layout of that top area is a bit wonky looking but we do have that plan for a collection image to be added up there which may change it. i see there are new options for a banner or a tiny logo - not sure either is what we had in mind - This will possibly be a combo of adjusting the HTML output by the code and CSS

Work show Visual Adjustments

  • 1. On the work page there is an div with a   in it that is making a space above the title that could be removed, doesnt do anything i can see- need to find it in the code - it is right after the work-type-tag div (https://cl.ly/e47fa3afa64e)
  • 2. AND changing "Download" to "View" under all the thumbnails on the works pages THO if all it does is show a teeny tiny image it seems to me hiding this entirely would be a much more user friendly thing to do - agree? I like how the DPLA has a big "View Full Item" button under the image - I think that would be a good improvement to make clear how it works. But for now how about we just hide all the Download File, Download image etc ? (https://cl.ly/13eed6337ac7)
  • 3. "Rights Statement" I think maybe would be better to just have it as "Rights" like we had it - just thinking if we are going to include the Creative Commons licenses maybe just "Rights" is more inclusive of the varied info that may be there (https://cl.ly/09e93f52e9ae)

error when trying to edit CDRI Items

{{ONLY WHEN TRYING TO EDIT CDRI ITEMS - trying to edit any item from a list of “my works” that is in CDRI- it isn’t loading the edit page, I get this error:
"We are sorry but something went wrong"
HOWEVER - if i go to the items page and click edit it works.

ALSO - when i see that item in my list of “my works” it shows a cube icon like it is missing its image but when i go to the page for the item it does have an image

WHen i am logged in and on the tab for “My COllections” (or any other tab) and try to click on “My Highlights I get that same error - below shows the tabs

Maintenance - CDRI - video/audio issues - yes

Audio/ Video - http://dl.atla.com/concern/works/q811kj81z

There are still images in CDRI that are not showing up unless you are logged in as Andy - http://dl.atla.com/collections/z029p497s
}}

cleanup of jobs when updating a harvester

Currently, we schedule the next harvest at the end of a harvest. This creates a job in the future. There are two problems with this:

  • When a Harvester's interval is updated previously scheduled jobs aren't removed/edited/cleaned up
  • When a "Re-harvest All Data" is selected this schedules a new job at the end of the harvest and doesn't cleanup any previous jobs.

Language is not parsing correctly

  1. i see is Language is coming in as En as they have it in their metadata - is that off the table as a possible thing to normalize? or maybe it doesnt happen on ingest ? or maybe just having gotten to those bits yet.

I have a base url for a qualified DC content dm collection - let me know if you think I should go ahead and do a test on it using oai_dc or dc:terms or both to see what happens?

Collection show Visual Adjustments

  • 1. On the collection it shows an oai url for "location" it should instead say the contributing institution OH actually on the item page it also shows this for Contrib. Inst. in the metadata (https://cl.ly/9373ad479cb9)
  • 2. In combo with the last section of CSS i am going to send - to change the layout of the top of the collection page a little bit - I think it would be less cluttered looking if the description is stacked on top of the collection details box - so they both would need to be changed in the HTML to have 12 columns - so for the description it would be changing col-md-8 hyc-description to col-md-12 hyc-description and for collections details it is col-md-4 hyc-metadata changed to col-md-12 hyc-metadata (https://cl.ly/9ced4fbbdf4d)
  • 3. And then for the "Items in Collection" text side by side with the search - i think it works slightly better to make them 6columns each instead of 4 and 8 so they would use the class col-md-6 instead of col-sm-4 and col-sm-8 - if you can change that in the CSS (https://cl.ly/e56804be78c0)
  • 4. Not sure if now is the time but we did have on the list of TODOs to hide that identifier that shows on collection details since it is meaningless to users (https://cl.ly/698498cdf554)

Update static page content on `hyrax-upgrade`

Navbar / Pagination Visual Adjustments

  • 1. The nav on the current site has a background image - to get this on the new site the nav element needs the class "image-background" added... then im not sure why it has an overlay or transparency on it, could keep looking once its updated (https://cl.ly/b14624c2d732)
  • 2. PAGER CENTERED - one more to add, just figured out a way to get the pager in the center instead of left side - .hyc-bl-pager .pagination {display:inline-block;} in combo with changing the HTML class in the code from row record-padding col-md-9 pager to . row record-padding col-md-12 pager (https://cl.ly/73b4ba036c74)

Default Admin Set was suppose to be set to Default Admin not CDRI

Looks like the Admin Set has gone back to being CDRI as default. Can we have that put to Default so we dont have to choose every time? Also would be great if you could delete the unused admin sets Carl, New and Test - we dont seem to have any way to delete these that I can see

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.