Invenio module that adds support for communities.
This is an experimental developer preview release.
- Free software: MIT license
- Documentation: https://invenio-communities.readthedocs.io/
Invenio communities module.
Home Page: https://invenio-communities.readthedocs.io
License: MIT License
Invenio module that adds support for communities.
This is an experimental developer preview release.
Add restriction on the file-size of the uploaded logo (1.5 Mb).
This depends on invenio-files-rest
which should implement such feature, thus on the logo's part it's just a matter of intgrating with it during ObjectVersion
initialization.
Request
model to track member inclusion requests/api/communities<comid>/requests/members
The goal is to create a minimal functioning UI for the various CRUD operations that take place around a community, using the /api/communities
endpoints. Styling and general UX enhancements will be addressed in the next iteration.
/communities/new
(React) (0.5d)/communities/<comid>/settings
(React) (0.5d)/communities/search
(React) (0.5d)/communities/
(Jinja) (1d)/communities/<comid>
(Jinja + React) (1d)/communities/<comid>/curate
)
services:
- postgresql
env:
- REQUIREMENTS=lowest EXTRAS=all,sqlite SQLALCHEMY_DATABASE_URI="sqlite:///test.db"
- REQUIREMENTS=lowest EXTRAS=all,postgresql SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio"
- REQUIREMENTS=release EXTRAS=all,sqlite SQLALCHEMY_DATABASE_URI="sqlite:///test.db"
- REQUIREMENTS=release EXTRAS=all,postgresql SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio"
- REQUIREMENTS=devel EXTRAS=all,sqlite SQLALCHEMY_DATABASE_URI="sqlite:///test.db"
- REQUIREMENTS=devel EXTRAS=all,postgresql SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres@localhost:5432/invenio"
When accessing the communities page provided by invenio-communities there is an Internal Server Error if user registration is off ( SECURITY_REGISTERABLE=False
) and being logged out.
The reason can be found here. There is no registration endpoint, because registration is deactivated.
In the invenio-accounts module the problem is solved by adding a
{%- if security.registerable %}
# Sign-up button
{%- endif %}
block around the signup-button. (see here)
I could provide a pull request, if you wish to.
request.is_xhr
has been deprecated in werkzeug>=0.13
Initially REST API E2E-style tests to stabilize the request/response format
The search by title is not parsing unicode characters properly (and failing).
but adding extra character "ä" to the search yields not results:
models.py
RecordMetadata
, would allow a separate place for storing community (meta)dataPersistentIdentifier
can be usedapi.py
Record.model_cls
, would allow for a flexible API classMissing CERN special waiver.
And add deprecation warning
and release v1.0.0a20
/api/communities/<comid>/members
/api/communities/<comid>/invitations
Check MathJax
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:
Extend and list the use case scenarios, preferably in a Markdown Document.
Define API views to handle the previously defined use cases.
as_dict
, properties, etc.)The results on invenio_community.curation
endpoint should return the result set filtered by the provisional_community
key.
This is done through the parameter in angular app, namely <invenio-search search-hidden-params='{"provisional_community": "{{ community.id }}"}'>
. This, however, doesn't seem to work.
Exactly the same solution works for endpoint invenio_community.detail
, which filters the result by {"community": "{{ community.id }}"}
.
cc @lnielsen
Broken links
param
, returns
, raises
, versionadded
)I'm a curator of a community that has a quote in its name. When someone uploads a new record for that community, the alerting email reads:
A new upload requests to be added to your community (Tibor Simko's test community):
Record Title: World historical and predicted populations in percentage
Record Description: This is a test submission with a CSV file.
You can accept or reject this record in your community curation page:
('https://sandbox.zenodo.org/communities/tiborsimko-test-community/curate/',)
Note '
in the community name, and '
before/after URLs.
The former can be avoided, and for the latter I'd suggest to print the URL on an empty line without any enclosing brackets. Or at least use <...>
instead of (...)
as per RFC 1738 that many MUAs support.
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).
Create a JSON Schema and mapping composed by useful metadata regarding the Community Record relationship e.g. messages/comments, users handling the requests etc.
Communities filtering uses the regular case-sensitive like
clause in the search query. Using the case-insensitive ilike
is probably more appropriate in order to emulate Elasticsearch behavior.
As discussed here: #76 (comment)
It would be nice to set up an relationship between OAISet and Community instead of using a model property:
if COMMUNITIES_OAI_ENABLED:
from invenio_oaiserver.models import OAISet
Community.oaiset = db.relationship(
OAISet, primaryjoin=OAISet.spec==Community.oaiset_spec, viewonly=True)
/api/records/?community=<comid>
vs. /api/communities/<comid>/records
/api/communities/<comid>/inclusion-requests/<irid>
The model currently depends on bibupload:
It should be the last modules and then I can remove it from invenio with my PR inveniosoftware/invenio#3470
Can we find a way to remove this dependency?
When a curator lands on the community page, there is no link to the /communities/my-community/curate
facility. It would be useful to detect whether the person is a curator, and display useful links on the community page, notably the link to curate records, possibly with the number of pending requests.
As discussed IRL with @lnielsen and during DR meeting.
Reason 1:
Current design require that every reference needs to be updated when the community is renamed.
Reason 2
B2Share would like to use this module. It is quite probable that it will have to support the migration of a community from one server to another. In order to avoid conflicts it would be needed to have unique identifiers for Communities.
Reason 3
B2Share builds endpoints on top of the communities REST API endpoint. One of those endpoints is the communities' schemas /api/communities//schemas/.
If the community is renamed every record cannot validate anymore. We could update the current records but all the previous versions become hard to work with.
Reason to keep a user friendly id in a separate field:
Zenodo has an endpoint for each community. Thus it needs a unique human friendly name for each community.
Flask-WTF v0.14.2 doesn't remove the csrf_token
field from the Form.data
any more, making the Community creation view to fail here.
Possible solutions:
data.pop("csrf_token")
form.data
in function calls)form.populate_obj(c)
.Include the core functionality for the model manipulation in API classes.
/communities/<comid>/members
/communities/invitation?token=...
(Hope this is the right repo, I apprecciate a pointer if this is the wrong place to suggest this.)
It would be great if multiple people could administer a community/collection.
Figure out (Discuss) which are the fields needed to be present on a DB level in regard to the use case scenarios.
See Records-REST for details.
HTML link should also be included.
Should also be added in the HTTP Headers (https://tools.ietf.org/html/rfc5988)
proof-read (including inflections)
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.