Giter Site home page Giter Site logo

momomoses / bmrcportal-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johnjung/bmrcportal

0.0 0.0 0.0 1.45 MB

License: GNU General Public License v3.0

Python 13.58% CSS 5.03% HTML 9.47% XQuery 7.20% XSLT 14.90% JavaScript 48.82% SCSS 1.00%

bmrcportal-1's Introduction

Getting Started

Create a directory for this project and a Python 3 virtual environment, and activate the environment:

mkdir bmrcportal
cd bmrcportal
python3 -m venv venv
source venv/bin/activate

Install git if necessary and clone the repository:

brew install git
git clone https://github.com/johnjung/bmrcportal.git

Install required Python packages via pip:

cd bmrcportal
pip install -r requirements.txt

Using Flask

Configuration files are not included in the Git repository. Request one from another developer and place it at config/default.py.

If you're running the site on a development machine, you'll need to set up a tunnel for SSH connections. Run a command like the one below in a new console window:

ssh -D 9090 -q -C -N <cnetid>@staff.lib.uchicago.edu

To get started, set the FLASK_APP environmental variable and run the flask command to see what's available:

export FLASK_APP=bmrcportal
flask

Facets on the website are represented by collections in MarkLogic- you can browse MarkLogic collections directly with commands like the following:

flask browse-archives | python -m json.tool | less
flask browse-decades | python -m json.tool | less
flask browse-organizations | python -m json.tool | less
flask browse-people | python -m json.tool | less
flask browse-places | python -m json.tool | less
flask browse-topics | python -m json.tool | less

To run a local version of the site for testing, use the following command and open a web browser to localhost:5000:

flask run

Integration Tests

Result Pager

Search for "Gwendolyn Brooks" (without quotes.) As of August, 2021 this search returns 35 results. Clicking the page "2" link should take you to the next page of results. When you're on the final page, the "Next page" link should be deactivated.

Finding Aid View

A search for "jazz" should return 115 results, as of August, 2021. Clicking on the first result should display a finding aid.

"View All" Facet Overlay

Click the "view more" link in one of the sidebar facets, and then click "view all". The facet overlay should appear.

"View All" Facet Overlay Sorting

Facets should be sortable.

A New Search Clears Previous Results

If a user has a facet selected and executes a new search, the new search should clear the old facet away. Search for "Chicago". Click the "Jazz (38)" facet in the sidebar. Search for "John Cage". The "Jazz" facet should be gone.

Confirm Sort Interface Display

Confirm that the sort interface works correctly. The current selected sort should be displayed as a button, and the inactive sorts should displayed as text. On hover, the inactive sorts should be displayed as buttons. Confirm that this works the same on the "view all facet overlay", the browse display, and on the search display.

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.