Jinja utilities for Invenio.
Further documentation is available on https://invenio-formatter.readthedocs.io/
Invenio module for formatting the bibliographic records.
Home Page: https://invenio-formatter.readthedocs.io
License: MIT License
Jinja utilities for Invenio.
Further documentation is available on https://invenio-formatter.readthedocs.io/
docs/requirements.txt
should exist (EXAMPLE)python repocheck.py ~/src/invenio-foobar ~/src/fresh/invenio-foobar
CONTRIBUTING.rst
, .gitignore
, babel.ini
, ...)README.rst
, RELEASE_NOTES.rst
, ...)setupy.py
, .travis.yml
,tests/conftest.py
,...)setup.py
and requirements-devel.txt
flask_cli
nor should it instantiate FlaskCLI
extension.====
, -----
) matching the length of the section/chapter title?**kwargs
should document potential arguments and mention if they are passed to another function/method which provides documentation for them.MANIFEST.txt
include *.py
.editorconfig:known_third_party
should match 1-to-1 all devel requirements in requirements-devel.txt
(orders of modules should also match) (.editorconfig and requirements-devel.txt)setup.py
:
'Development Status :: 4 - Beta'
The following cookiecutter change:
inveniosoftware/cookiecutter-invenio-module#98
should be propagated to this Invenio module.
Namely, in run-tests.sh
, the sphinx for doctests is invoked after pytest run:
$ tail -3 ./\{\{\ cookiecutter.project_shortname\ \}\}/run-tests.sh
sphinx-build -qnNW docs docs/_build/html && python setup.py test && sphinx-build -qnNW -b doctest docs docs/_build/doctest
This sometimes led to problems on Travis CI with the second sphinx-build run due
to "disappearing" dependencies after the example application was tested.
A solution that worked for invenio-marc21 (see
inveniosoftware/invenio-marc21#49 (comment))
and that was integrated in cookiecutter (see
inveniosoftware/cookiecutter-invenio-module#98) was to
run doctest execution in pytest, removing the second sphinx-build
invocation.
This both solved Travis CI build failures and simplified test suite execution.
Note that this change may necessitate to amend the code tests etc so that things
would be executed with the Flask application context (see
inveniosoftware/invenio-marc21@09e98fc).
Follow-up of discussion from inveniosoftware/invenio-records-ui#6.
(closes inveniosoftware/invenio-records-ui#6)
Package version (if known): 1.1.3
The INSTALL.rst
file and requirements.txt
file reference an installation option called "badges", but there is no such option defined in setup.cfg
. For example, here's a line from INSTALL.rst
:
pip install invenio-formatter[badges]
The above will fail because extra feature "badges" is undefined.
The instructions and requirements.txt file should probably not reference badges
, or else an option for badges
needs to be added to setup.cfg
.
This is part of a Travis badge SVG response headers:
$ curl https://travis-ci.org/zenodo/zenodo.svg\?branch\=master -L -I
HTTP/1.1 200 OK
Date: Mon, 28 Nov 2016 13:11:36 GMT
Content-Type: image/svg+xml
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Type, Cache-Control, Expires, Etag, Last-Modified
Vary: Accept,Accept-Encoding
Cache-Control: no-cache
Etag: "a9e445ad2237440326816952c70dba79"
Pragma: no-cache
Expires: Mon, 28 Nov 2016 13:11:36 GMT
Content-Disposition: inline; filename="failing.svg"
Last-Modified: Thu, 24 Nov 2016 15:27:27 GMT
X-Content-Digest: 922c9cc746e8bc766b6acfed45d83e014df8a13e
Age: 0
X-Rack-Cache: miss, store
...
...while this is from an invenio-formatter
badge:
$ curl https://zenodo.org/badge/6365411.svg -L -I
HTTP/1.1 200 OK
Date: Mon, 28 Nov 2016 13:06:05 GMT
Content-Type: image/svg+xml
...
In badge responses we should include headers such as Cache-Control
, Etag
, Pragma
, Expires
, Last-Modified
so they are correctly not cached.
Access-Control-Allow-*
headers (aka CORS headers) should be investigated as well (or at least documented).
(Original issue from Zenodo: zenodo/zenodo#912)
Add utilities to work with dates/times in EDTF format: http://www.loc.gov/standards/datetime/pre-submission.html
Some prior work in:
The package contains examples/app.py
example application, but there is no test
for it in tests/test_example_app.py
. It should be added. See existing examples:
https://travis-ci.org/github/inveniosoftware/invenio-formatter/jobs/664497132#L311
$ requirements-builder --level=min setup.py > .travis-lowest-requirements.txt
Traceback (most recent call last):
File "/home/travis/virtualenv/python2.7.15/bin/requirements-builder", line 8, in <module>
sys.exit(cli())
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/requirements_builder/cli.py", line 69, in cli
output.writelines(lines)
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/click/_compat.py", line 88, in writelines
for line in lines:
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/requirements_builder/cli.py", line 66, in <genexpr>
'{0}\n'.format(req)
File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/requirements_builder/requirements_builder.py", line 108, in iter_requirements
exec(setup_fp.read(), g)
File "<string>", line 0
SyntaxError: encoding declaration in Unicode string
The command "requirements-builder --level=min setup.py > .travis-lowest-requirements.txt" failed and exited with 1 during .
|| echo ':('
from .travis.yml
param
, returns
, raises
, versionadded
)The generate_badge_* functions in context_processors/badges/badges.py accept a (background) color parameter, but this parameter is not currenty passed by the blueprint - thus it is not easily possible to customize badge colours.
Generating a DOI button in a template like this:
<img id="record-doi-badge" data-target="[data-modal='{{ id_doi }}']"
src="{{ url_for('invenio_formatter_badges.badge', title='DOI', color='#fcb425', value=id_doi.identifier, ext='svg') }}" alt="{{ id_doi.identifier }}" />
Generates a useable URL:
https://muya.soas.hasdai.org/badge/DOI/10.5281/zenodo.8359113.svg?color=%23fcb425
However since the parameter is not in the blueprint, the background colour remains the default blue specified in the generator functions.
I am happy to fix the view to accept this optional parameter, unless someone has a better approach?
Package version (if known): v1.1.0
A clear and concise description of what the bug is.
OS which does not have font DejaVuSans
the Doi badge svg is not created.
invenio-cli containers start --lock --build --setup
landingpage
possible solutions:
DejaVuSans
package to base image(https://github.com/inveniosoftware/docker-invenio)This plugin is not maintained anymore and is not compatible with jquery >1.9
A pull request fixing this issue has been created in 2013 but it has never been accepted (kbwood/bookmark#3).
This plugin currently throws the exception Uncaught TypeError: Cannot read property 'mozilla' of undefined
in chrome because $.browser
has been removed (http://api.jquery.com/jquery.browser/)
datetime.strftime
in this line fails for publication dates before 1900-01-01. The arrow
or some other method should be used to format the date as proposed in this SO thread.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.