Giter Club home page Giter Club logo

samvera.github.io's Introduction

samvera.github.io

Code: Build Status

Docs: Contribution Guidelines Apache 2.0 License

Community Support: Samvera Community Slack

What is samvera.github.io?

This project serves as the public website for version-controlled Samvera documentation (with a specific focus towards Hyrax).

Product Owner & Maintenance

samvera.github.io was a Core Component of the Samvera Community. Given a decline in available labor required for maintenance, this project no longer has a dedicated Product Owner. The documentation for what this means can be found here.

Product Owner

Vacant

Until a Product Owner has been identified, we ask that you please direct all requests for support, bug reports, and general questions to the #dev Channel on the Samvera Slack.

Help

The Samvera community is here to help. Please see our support guide.

How Does This Work?

We use a Jekyll-based custom theme for markup and display, and pages are published to http://samvera.github.io.

Adding or Editing Content

These are community documents, so we rely on the pull request model. If you'd like to contribute content:

To Test in Jekyll:

  • Run the jekyll server bundle exec jekyll serve
  • View the documentation in a browser at http://localhost:4000

Basic Front Matter

The front matter on each page controls how the page is built and functions.

Example front matter for page Best Practices -> Coding Styles

---
title: "Coding Style with RuboCop"
permalink: best-practices-coding-styles.html
folder: samvera/best_practices/
sidebar: home_sidebar
keywords: ["Best Practices", "Coding Styles", "Rubocop"]
tags: [development_resources]
version:
  id: 'hyrax_1.0-stable'
last_updated: March 30, 2017
---

Front Matter Options

  • title [String] (required) - The title displayed on the generated html page
  • permalink [text] (required) - The name of the generated html file that will be part of the url accessed by users
  • last_updated [text] (recommended) - Text version of updated date, to show in page footer.
  • keywords [Array] (recommended) - Used as titles in the generated browse_pages.html for browsing by keyword, and as keywords that get populated into the metadata for SEO
  • sidebar [text] (optional) - Default value is home_sidebar, and the only option at this point
  • version [hash] (optional) - Specifies the gem's name and version that this documentation page describes. See Versioning Information for details.
  • toc false (optional) - Prevents display of formatting-based table of contents on page. Default value of true displays the table of content.
  • tags [Array] (optional) - Automatically populate pages for each of the 4 major categories included on the main page. If you use a tag, you should also add a summary. Valid tags values:
    • getting_started
    • development_resources
    • production
    • community
  • summary [text] (optional) - Adds formatted summary text, prefaced by a vertical bar, at the top of a page. Also used as the excerpt text on the 4 category pages linked from the main page.
  • layout (optional) - values:
    • page (default value)
    • post - adds breadcrumbs to the top of the page linking to corresponding tags page (see valid tags front matter above)
    • deck - display as slideshow: see Touring the Design Patterns in Samvera
  • folder [text] (optional) - The location of this *.md file under the pages directory. Does not appear to have any functionality.

Notes on writing content

You can highlight content with the following...

<ul class='info'><li>This shows an info icon and provides the user additional information in a blue box.</li></ul>

info box (Example: code, webpage)

<ul class='warning'><li>This shows a warning icon and provides the user warning information in a red box.</li></ul>

warning box

<ul class='question'><li>This shows a question icon and provides the user with information in a yellow box indicating that there may be some uncertainty about a particular piece of information in the documentation.</li></ul>

question box

NOTE: You cannot use markdown in these boxes. For example, if you want a link, you will have to use an html anchor tag.

Browse pages

This site incudes a generated browse page. Each page's frontmatter keywords values are used to populate the browse by keyword page. The keywords should be written as titles, in upper and lower case, as they will be directly used as text on the page.

When changes are committed, the page needs to be regenerated and included with the committed changes. To build and save the revised browse_pages.html file:

  • Run command SAVE_GENERATED_FILES=1 bundle exec jekyll build

Be sure to include the generated file in your pull request.

Versioning-information

The documentation on this site covers multiple gems and multiple versions of those gems. The recommended best practice is to specify the gem's name and version, including a link to the applicable branch in github. If there is documentation for multiple versions of the gem, then a selection list allows users to switch between versions.

Specifying gem name, version, and branch

Predefined version information

Common gems have version information encoded and can be referenced by id in front matter. The predefined version information is defined in _includes/version_info/

Example for Hyrax v1.0 stable:

version:
  id: 'hyrax_1.0-stable'
Custom version information

If the predefined version information does not exist. You can specify custom values in the front matter.

Example custom version information:

version:
  label: 'Hydra Role Management v0.2.2'
  branch:
    label: 'master'
    link: 'https://github.com/samvera/hydra-role-management'
Adding predefined version information for a gem version

It is good practice to add predefined version information, as this allows reuse and consistent encoding of gem names and versions.

Adding predefined version information is a two step process.

  1. Add the version information to a new version file in directory _includes/version_info/ naming the file with the gem and verion number (e.g. version_hyrax_1.0-stable.html). Include in the new file assignments for version_label, branch_label, and branch_link.

Example assignments for Hyrax v1.0:

{% assign version_label = 'Hyrax stable v1.0' %}
{% assign branch_label = '1.0-stable' %}
{% assign branch_link = 'https://github.com/samvera/hyrax/tree/1-0-stable' %}
  1. Add a new condition in _includes/versions.html that includes the predefined version information if its id is specified in front matter for a document. The condition in the case statement becomes the id that is used in front matter.

Example conditional include based on id:

{% case page.version.id %}
{% when 'hyrax_1.0-stable' %}
  {% include version_info/version_hyrax_1.0-stable.html %}
...
{% endcase %}

Selector for switching versions

Identifying multiple versions is done by specifying each version in front matter including its label and link. If the version is the active version that the current page is describing, then also include selected: 'true'. The multi-version information is repeated on every version's page for the documentation topic.

Example front matter for multiple versions:

version:
  versions:  
    - label: 'Hyrax 1.0'
      link:  'what-happens-deposit-1.0.html'
      selected: 'true'
    - label: 'Hyrax 2.0'
      link:  'what-happens-deposit-2.0.html'  

Our Theme

We use a Jekyll theme designed for documentation. We chose the Documentation Theme because of its excellent navigation and clear page layout, and for the ease of working in markdown.

Contributing

If you're working on PR for this project, create a feature branch off of main.

This repository follows the Samvera Community Code of Conduct and language recommendations. Please do not create a branch called master for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.

samvera.github.io's People

Contributors

afred avatar bess avatar botimer avatar brianmcbride avatar cjcolvar avatar dependabot[bot] avatar elrayle avatar escowles avatar geraldb avatar hackartisan avatar jcoyne avatar jenlindner avatar jeremyf avatar jlhardes avatar jmfrenzel avatar jrgriffiniii avatar julesies avatar laritakr avatar mark-dce avatar mbklein avatar mcritchlow avatar mjgiarlo avatar rjkati avatar rosy1280 avatar rudyonrails avatar sandbergja avatar scherztc avatar smithjp avatar tpendragon avatar wickr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samvera.github.io's Issues

Items for a new user should be for a new user

See this menu.

screen shot 2017-04-24 at 5 56 20 pm

As the original author of "Dive Deeper into Hyrax" and "Design Patterns in Hyrax," I'm going to say that these are not resources for new users. They could be stashed under development resources. But they probably ought to be just links to the original slideshows. In their present form, they are not suitable as text only resources, they were slides from a talk and are missing lots of context.

ksdogkdsopg

Descriptive summary of request

dfdsds
Include a detailed description of the documentation issue you are submitting. Include
the version of software (Sufia, Hyrax, Hyku, etc.) that you are working in.
asdsa

Existing Docudsmentation

If you are submitting an issue related to existing documentation, include an "Existing Documentation" section
with link(s) to the document in question and describe what is incorrect. If possible, offer suggested
changes.

Expected Document

If you were unable to find relevant documentation for your issue and are submitting a request for new documentation,
include a general summary in "Expected Document".

Related work

If available, include a link to the software issue or PR in "Related Work".

Tags

When possible, please tag your issue with the provided labels:

  • Change to Documentation
  • Documentation Request (for new documentation)
  • Question (when submitting a general question)

Add a new layout!

Background: The current theme is pretty basic. We need one that can handle much more content, and looks pretty.

Done when:

refine top four category names and descriptions

work-in-progress:

New? Start here.
Get up and running, debugging, core concepts, submitting PRs

Coding Hyrax
How to do all the things, best practices, tutorials, architecture

Production
Hardware considerations, deployment, AWS hosting

Community
Contributing, conferences, interest groups, working groups

Versioning of Documentation for Changes in New Releases

Do we want to allow users to access documentation for past releases? Such that adopters of earlier releases continue to have access to the appropriate documentation.

As an example, for the Customize Metadata tutorial (PR #36), the tutorial has a parent directory (customize-metadata) and a subdirectory for the Hyrax version (customize-metadata/hyrax-1.0). The actual files of the tutorial are Inside the hyrax-1.0 directory.

I wasn't sure if putting the release directory at the tutorial level vs. putting it at the highest directory level is most appropriate.

Highest level:

This would allow a user to switch to a release and have a side menu that is specific to that release with only documentation for that release. This may result in some documentation being copied for a major release that is exactly the same as the previous release documentation.

At the tutorial level:

It seems like some of our documentation will change with major (hyrax-1) or minor (hyrax-1.0) releases and some may be more stable. Also, some may be Hyrax specific, some may be PCDM specific, some may be specific to lower components of the stack.

Thoughts?

Lesson about search builders

Blacklight generates app/models/search_builder.rb into your application. It defaults to including Blacklight::Solr::SearchBuilderBehavior which are functions to allow blacklight to talk to solr (vs another search engine). Hydra generates include Hydra::AccessControlsEnforcement for filtering
searches by access (groups & users). Finally Hyrax generates include Hyrax::SearchFilters which overrides the hydra filters and allows users with the admin role to see all documents.

Hyrax then sets the blacklight_config.config.search_builder_class = Hyrax::CatalogSearchBuilder in the catalog controller. This enables the public search to not show works that are suppressed (in workflow) and to find a work if an attached file matches the search query.

Hyrax::CatalogSearchBuilder inherits from Hyrax::SearchBuilder
https://github.com/projecthydra-labs/hyrax/blob/master/app/search_builders/hyrax/catalog_search_builder.rb (This class should be removed because it's basically the same as ::SearchBuilder)

Hyrax::SearchBuilder inherits from Blacklight::SearchBuilder
https://github.com/projecthydra-labs/hyrax/blob/master/app/search_builders/hyrax/search_builder.rb

Blacklight::SearchBuilder is a plain old Ruby object
https://github.com/projectblacklight/blacklight/blob/v6.8.0/lib/blacklight/search_builder.rb

touring_design_patterns/#slide-48 Question

I don't have an existing AddToCollectionActor defined in my app, should I?

$ ls app/actors/curation_concerns/actors/
book_actor.rb
$ ls `bundle show curation_concerns`/app/actors/curation_concerns/actors/
abstract_actor.rb           apply_order_actor.rb            embargo_actor.rb               lease_actor.rb
actor_stack.rb              assign_representative_actor.rb  file_actor.rb                  root_actor.rb
add_to_collection_actor.rb  attach_files_actor.rb           file_set_actor.rb
add_to_work_actor.rb        base_actor.rb                   interpret_visibility_actor.rb

Maybe make it clearer you're looking at a file from the gem directory since everything else has been within cc-sample?

Customizing Metadata links should go to branch 1-0-stable

Descriptive summary of request

The Customizing Metadata tutorial says it is for Hyrax version 1.0, but at least some, if not all, links to files go to the master branch. They should link to the code in the 1-0-stable branch.

Existing Documentation

Picking one page at random:

There are probably incorrect links in all the files.

Related

  • Add copy of this documentation for Hyrax 2.0 which can point to master for now, but eventually will point to 2-0-stable.

Copy DuraSpace's How to Ask to for Help content to here

Descriptive summary of request

Include a detailed description of the documentation issue you are submitting. Include
the version of software (Sufia, Hyrax, Hyku, etc.) that you are working in.

Existing Documentation

If you are submitting an issue related to existing documentation, include an "Existing Documentation" section
with link(s) to the document in question and describe what is incorrect. If possible, offer suggested
changes.

Expected Document

If you were unable to find relevant documentation for your issue and are submitting a request for new documentation,
include a general summary in "Expected Document".

Related work

If available, include a link to the software issue or PR in "Related Work".

Tags

When possible, please tag your issue with the provided labels:

  • Change to Documentation
  • Documentation Request (for new documentation)
  • Question (when submitting a general question)

Fix gem deployment issues

Hi @elrayle, the build failed in production with the gem in place. Would you like to tackle making it work there? It didn't generate useful error messages ("build failed"), and I put in a ticket to Github support about it. It's possible adding Travis would give us the verbosity we need to solve it.

touring_design_patterns/#slide-29 - hard return

The slide viewer puts a hard return in the line:

$ cp `bundle show curation_concerns`/app/views/curation_concerns/base/_attribute_rows.html.erb
app/views/curation_concerns/books/

Probably nothing to fix, but just be aware that some people (like me) might get an error when they try to cut and paste:

vagrant@camper:~/cc-sample$ cp `bundle show curation_concerns`/app/views/curation_concerns/base/_attribute_rows.html.erb

cp: missing destination file operand after ‘/home/vagrant/.rvm/gems/ruby-2.3.1/gems/curation_concerns-1.6.1/app/views/curation_concerns/base/_attribute_rows.html.erb’
Try 'cp --help' for more information.

vagrant@camper:~/cc-sample$ app/views/curation_concerns/books/

Document various kinds of roles

We need to have a page that compares and contrasts the various usages of the overloaded term 'roles'.

  • workflow roles
  • admin set participants
  • role manager roles

How do these relate to other features (e.g. workflows, admin sets, abilities control, etc.)?

Workflows & Mediated Deposit

Group-Sourced Content: Workflows & Mediated Deposit

Issue goal:

To complete documentation re: Workflows by answering these questions in the Q&A workflow section.

Current Questions

  • How do I set up an app to use a given workflow by default?
  • How do I diagram and configure a new workflow?
  • How do I test that all of this is working correctly?

Feedback Needed

Do you have additional questions regarding workflows & mediated deposit?

  • Add your question below.

Do you have experience in any area regarding workflows?

  • Write your information in a comment below, or tell us a bit about what you know and you will be contacted to compile your info into a documentation page.

Lesson about Groups

By default Hydra ships with a YAML based group management system. Typically this is only used when learning Hydra and you might replace it with something such as https://github.com/projecthydra/hydra-role-management , https://github.com/RolifyCommunity/rolify or https://github.com/projecthydra-labs/hydra-ldap.

To change the groups in the default YAML implementation, you want to edit config/role_map.yml. That file should look something like this:

development:
  archivist:
    - [email protected]

test:
  archivist:
    - [email protected]
    - [email protected]
    - [email protected]
  admin_policy_object_editor:
    - [email protected]
  donor:
    - [email protected]
    - [email protected]
  researcher:
    - [email protected]
    - [email protected]
  patron:
    - [email protected]
    - [email protected]

production:
  # Add roles for users here.

If we want to add ourselves as to the admin group we could make this change:

development:
  admin:
    - [email protected]

We can change the groups implementation (default is RoleMapper) by setting

User.groups_service = MyCustomService

The original implementation of that class is here: https://github.com/projecthydra/hydra-head/blob/master/hydra-access-controls/lib/hydra/role_mapper_behavior.rb

touring_design_patterns/#slide-51 - NameError in CurationConcerns::BooksController#create

After I restart the rails server and try to create a new book, I get the error below. Did I miss copying something or get a namespace wrong somewhere?

NameError in CurationConcerns::BooksController#create
uninitialized constant CurationConcerns::Actors::ActorFactory::MetadataEnrichmentActor

Extracted source (around line #5):

class CurationConcerns::Actors::ActorFactory
  def self.stack_actors(curation_concern)
    [MetadataEnrichmentActor,
     AddToCollectionActor,
     AddToWorkActor,
     AssignRepresentativeActor,

Add "Predicate Decision Tree" document to developer resources section

Descriptive summary of request

We need a page here about choosing predicates, how to do it, what the options are, what might guide your choices.

Existing Documentation

There is this document, that could be formatted as a jekyll page pretty much as it is:
https://docs.google.com/document/d/1oMvVlGuBwD5U1251oxNmTZn7WgkNTj6tF-k1hOYjnac/edit

Tags

tag: Metadata

When possible, please tag your issue with the provided labels:

  • Change to Documentation
  • Documentation Request (for new documentation)
  • Question (when submitting a general question)

Lesson about the Ability class and admin access.

Hydra uses cancancan to do authorization of many actions: https://github.com/CanCanCommunity/cancancan#1-define-abilities

Cancancan generates app/models/ability.rb into your application and then Hydra's generator and later Hyrax's generator each adds a couple of lines so that the class looks like this:

class Ability
  include Hydra::Ability

  include Hyrax::Ability
  self.ability_logic += [:everyone_can_create_curation_concerns]

  # Define any customized permissions here.
  def custom_permissions
    # Limits deleting objects to a the admin user
    #
    # if current_user.admin?
    #   can [:destroy], ActiveFedora::Base
    # end

    # Limits creating new objects to a specific group
    #
    # if user_groups.include? 'special_group'
    #   can [:create], ActiveFedora::Base
    # end
  end
end

You don't need to make any changes to this class as the included behavior provides all that you need to get started. However, if you are integrating an group system other than the default (See Hydra::RoleMapper), then you may want to change who has the admin role.

You can do this by overriding the admin? method on the Ability class like this:

    def admin?
      user_groups.include? 'librarians'
    end

Add Hydra Camp's Overview doc here

Descriptive summary of request

This is a good and concise overview of the pieces of the stack, it would be great to have a page containing this in the new dev section.

Existing Documentation

https://github.com/RepoCamp/ahc/wiki/Hyrax-Introduction

Tags

When possible, please tag your issue with the provided labels:

  • Change to Documentation
  • Documentation Request (for new documentation)
  • Question (when submitting a general question)

Outline default metadata properties

Descriptive summary of request

Something I'm often trying to verify, and get asked frequently is the default set of metadata properties that are available when a work type is generated.

Existing Documentation

Most of the fields are added here:
https://github.com/projecthydra-labs/hyrax/blob/1186607726f465cb1c30566caeb39b539481d1ec/app/models/concerns/hyrax/basic_metadata.rb

but some are added earlier and I'm having trouble identifying where. We should have an official document so that crawling around in the code isn't required to identify the fields.

Expected Document

A table like presented something like below would be great:

Property | Predicate | from
id
head
tail
depositor
title
date_uploaded
date_modified
state
proxy_depositor
on_behalf_of
arkivo_checksum
owner
label|ActiveFedora::RDF::Fcrepo::Model.downloadFilename|Hyrax::BasicMetadata
relative_path
import_url
part_of
resource_type
creator
contributor
description
keyword
license
rights_statement
publisher
date_created
subject
language
identifier
based_near
related_url
bibliographic_citation
source

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.