aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
Commit message (Collapse)AuthorAgeFilesLines
* update front-page countsBryan Newbold2020-07-281-3/+3
|
* switch SERP stage coloring to brown uppercaseBryan Newbold2020-07-281-13/+11
| | | | To match fatcat-scholor, where this scheme has been successful.
* error handling: use 400 page with error passed instead of flash()Bryan Newbold2020-07-283-21/+23
|
* remove some spurious print statementsBryan Newbold2020-07-282-4/+1
|
* convert some API errors from abort() to raiseBryan Newbold2020-07-282-14/+14
|
* generic API error pageBryan Newbold2020-07-282-0/+50
| | | | | | | | | | This error handler and view page currently works much better than the "flash()" infrastructure built-in to flask, which uses cookies and mostly does not work with our views and layouts. Would like to gradually migrate almost all API errors in the web interface to just raising errors that get rendered on an error page, instead of calling `abort(ae.status)`.
* search: catch ES errors and display betterBryan Newbold2020-07-285-20/+46
|
* refactor search macros into new fileBryan Newbold2020-07-284-45/+72
|
* include container_id as a query boost termBryan Newbold2020-07-281-0/+1
|
* re-order search params to satisfy pylintBryan Newbold2020-07-241-6/+6
| | | | | | Moved all the request_cache=True param calls to just before ES request exectuation. The former ordering "just worked", but pylint didn't like it, and I suspose it was not as idiomatic as it should have been.
* small lint fixesBryan Newbold2020-07-241-2/+1
|
* finish backend refactoring of search codeBryan Newbold2020-07-241-133/+108
|
* refactor release and container searchBryan Newbold2020-07-245-131/+233
| | | | | | | | | | Based on fatcat-scholar refactoring. This doesn't include refactoring of stats, aggregates, or histograms yet, just the direct queries. Don't have any test coverage yet; intend to try elasticmock or figuring out how to ingest mock JSON results directly.
* web search: fix pylint errorBryan Newbold2020-07-241-2/+2
|
* WIP: refactoring search to use elasticsearch-dslBryan Newbold2020-07-242-153/+137
|
* simple lint (flake8) fixes over python codebaseBryan Newbold2020-07-232-2/+2
| | | | | | These should not have any behavior changes, though a number of exception catches are now more general, and there may be long-tail exceptions getting thrown in these statements.
* get mediawiki username creation working with spacesBryan Newbold2020-07-091-1/+2
|
* lint (flake8) web interface python filesBryan Newbold2020-07-017-26/+16
|
* make fulltext-only label clickableMartin Czygan2020-06-161-2/+2
|
* use ES 'best_url' in file download pagesBryan Newbold2020-06-042-2/+4
| | | | Similar to recent change for release download pages.
* re-use 'best pdf url' for release green buttonBryan Newbold2020-06-041-2/+2
| | | | | | | I thought this was the existing behavior, but it looks like we were just taking the first link from the first file. In the future may refactor this out even further.
* Merge branch 'martin-fix-container-empty-search' into 'master'Martin Czygan2020-04-291-0/+4
|\ | | | | | | | | search: assume * when q is not set or empty See merge request webgroup/fatcat!51
| * search: assume * when q is not set or emptyMartin Czygan2020-04-291-0/+4
| | | | | | | | An example would be a blank search from a container details page.
* | Merge branch 'bnewbold-search-tweaks' into 'master'bnewbold2020-04-273-92/+132
|\ \ | |/ |/| | | | | tweaks to search result pages See merge request webgroup/fatcat!50
| * web search: tweak release search result styleBryan Newbold2020-04-231-25/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | This is also back-ported from covid19.fatcat.wiki, though with some more tweaks on top. The changes are: - show original title if available (usually non-English) - move release_type label to title line suffix, and only show if not a "paper" - show publication status and withdrawl as text after the journal title, not as a label
| * web search: improve indentation, fix missing div tagsBryan Newbold2020-04-232-67/+81
| | | | | | | | These are back-ported fixes from covid19.fatcat.wiki
* | web: fix ident=None broken linksBryan Newbold2020-04-233-6/+10
|/ | | | | | On web interface views for revisions, we had a bunch of broken links because the ident is "None". This commit fixes these by removing the links.
* consistently use raw string prefix for regexBryan Newbold2020-04-171-1/+1
|
* web: small corrections to subtitle/original_nameBryan Newbold2020-03-282-2/+4
|
* Merge branch 'bnewbold-translation-view'Bryan Newbold2020-03-282-0/+7
|\
| * web: use more idiomatic type checkBryan Newbold2020-03-281-1/+1
| | | | | | | | Thanks to Martin for suggestion
| * web: display container original titlesBryan Newbold2020-03-261-0/+3
| |
| * web: copy extra.subtitle to subtitle for release viewBryan Newbold2020-03-261-0/+4
| | | | | | | | | | The release view will display subtitles, but it needs to be in the correct "location".
* | Merge pull request #53 from EdwardBetts/spellingbnewbold2020-03-273-3/+3
|\ \ | | | | | | Correct spelling mistakes
| * | Correct spelling mistakesEdward Betts2020-03-273-3/+3
| | |
* | | Merge branch 'bnewbold-400-bad-revisions' into 'master'Martin Czygan2020-03-261-2/+12
|\ \ \ | | | | | | | | | | | | | | | | catch ApiValueError in some generic API calls See merge request webgroup/fatcat!35
| * | | catch ApiValueError in some generic API callsBryan Newbold2020-03-251-2/+12
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is to handle bogus revision IDs in URLs, which were causing 500 errors not 400 errors. Eg: https://qa.fatcat.wiki/file/rev/5d5d5162-b676-4f0a-968f-e19dadeaf96e%2B2019-11-27%2B13:49:51%2B0%2B6 I have no idea where these URLs are actually coming from, but they should be 4xx not 5xx. Investigating made me realize there is a whole category of ApiValueError exceptions we were not catching and should have been.
* / | improve citeproc/CSL web interfaceBryan Newbold2020-03-252-3/+7
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This tries to show the citeproc (bibtext, MLA, CSL-JSON) options for more releases, and not show the links when they would break. The primary motivation here is to work around two exceptions being thrown in prod every day (according to sentry): KeyError: 'role' ValueError: CLS requries some surname (family name) I'm guessing these are mostly coming from crawlers following the citeproc links on release landing pages.
* | container lookup: link to issn portal searchMartin Czygan2020-03-181-4/+3
| | | | | | | | | | | | | | | | | | Example: https://fatcat.wiki/container/lookup?issnl=2007-1248 - the linked https://portal.issn.org/2007-1248 yields a "page not found", while search yields results: https://portal.issn.org/api/search?search[]=MUST=allissnbis=2007-1248
* | update front-page statsBryan Newbold2020-03-171-3/+3
|/
* Merge branch 'bnewbold-elastic-v03b'Bryan Newbold2020-02-261-2/+2
|\
| * new biblio-only general searchBryan Newbold2020-01-291-2/+2
| | | | | | | | The other fields are now "copy_to" the merged biblio field.
* | clarify shadow filter codeBryan Newbold2020-02-131-1/+1
| |
* | filter out shadows-only files in webfaceBryan Newbold2020-02-132-2/+7
|/
* increase kafka-pixy timeout to 25 secondsBryan Newbold2020-01-281-1/+1
|
* pagination: use correct endpoint in navigationMartin Czygan2020-01-182-6/+6
|
* datacite release links and metadata expansionBryan Newbold2019-12-202-9/+13
| | | | | | | Small ergonomic changes for datacite releases: - add a link to live/current datacite metadata (like we do for Crossref) - expand "extra" metadata fields under 'datacite' dict in metadata view
* spn: incluce link_source/link_source_id in ingest requestBryan Newbold2019-12-201-0/+2
|
* fix spn kafka topic env varBryan Newbold2019-12-131-1/+1
|
* update ingest request schemaBryan Newbold2019-12-132-8/+14
| | | | | This is mostly changing ingest_type from 'file' to 'pdf', and adding 'link_source'/'link_source_id', plus some small cleanups.