Giter Club home page Giter Club logo

invenio-communities's Introduction

invenio-communities's People

Contributors

alejandromumo avatar alizeepace avatar anikachurilova avatar chiarabi avatar effervescent-shot avatar fenekku avatar frankois avatar glignos avatar greut avatar javierdelgadofernandez avatar jennur avatar jirikuncar avatar jrcastro2 avatar kpsherva avatar lnielsen avatar max-moser avatar mb-wali avatar mitsosf avatar ntarocco avatar pineirin avatar rekt-hard avatar samihiltunen avatar samk13 avatar sarahw91 avatar sharpattack avatar slint avatar tiborsimko avatar utnapischtim avatar yashlamba avatar zzacharo avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

invenio-communities's Issues

logos: add file size restriction

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.

records: UI views

  • Discuss and figure out the UI views in accordance with the previously defined use cases.
  • Create Mockups and solidify the basic functions of each page.

ui: community CRUD prototype

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.

  • Create form -/communities/new (React) (0.5d)
  • Settings page (with edit) -/communities/<comid>/settings (React) (0.5d)
  • Search -/communities/search (React) (0.5d)
  • Community index -/communities/ (Jinja) (1d)
  • Community item - /communities/<comid> (Jinja + React) (1d)

records: UI record integration

  • Community record search
  • Record inclusion requests
    • For the record creator:
      • On record landing page have a popup to allow adding/removing commuities
      • On the community page
        • "Do you want to upload a record in this community?"
        • "Do you want your record to be included in this community?"
      • List/search user records pending curation
    • For the community curator (/communities/<comid>/curate)
      • List/search records pending curation (Q: merge with "Community record search"?)
        • Accept/reject/comment buttons

travis: include PostgreSQL (and MySQL)

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"

Internal Server Error, if user registration is off

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.

tests: REST API

Initially REST API E2E-style tests to stabilize the request/response format

search: communities search by title with special characters causes problems

global: datamodel redesign

models.py

  • Since we're looking into having flexible metadata schemas for Communities (to allow e.g. plugins that introduce vocabularies), the existing table model wouldn't fit these requirements
  • Sub-classing RecordMetadata, would allow a separate place for storing community (meta)data
  • To keep track of community identifiers a PersistentIdentifier can be used

api.py

  • To use the new model, the Record.model_cls, would allow for a flexible API class

api: member management prototype

Members listing

  • Model
    • Storage
    • Metadata model (roles, ???)
  • API class
  • REST API - /api/communities/<comid>/members

Member invitation/request

  • Model
  • API class
  • REST API - /api/communities/<comid>/invitations

records: figure out use-cases

Extend and list the use case scenarios, preferably in a Markdown Document.

  • From the record owner’s PoV
  • From the community admin/curator’s PoV

core: API refactor

  • Use mixins from records and members programmatic APIs to dynamically configure the Community API class
  • Align methods with records API (as_dict, properties, etc.)

search: curation page is not properly filtered by community ID

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 }}"}.

core: UI polishing

  • Use Semantic-UI for all pages
    • Header
    • Forms
    • Search pages
  • Make sure all pages are properly linked between them
  • Put "Coming soon" links where needed

api: stabilise and document

  • check existing API functionality
  • add missing important API functionality
  • check API function signatures and parameters
  • enhance API docstrings (param, returns, raises, versionadded)
  • plug API functions to existing docs

email: special characters and URLs

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&#39;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:
(&#39;https://sandbox.zenodo.org/communities/tiborsimko-test-community/curate/&#39;,)

Note &#39; in the community name, and &#39; 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.

tests: simplify doctest execution

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).

records: JSONSchema and mapping.

Create a JSON Schema and mapping composed by useful metadata regarding the Community Record relationship e.g. messages/comments, users handling the requests etc.

api: case insensitive search

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.

api: create an Community.oaiset relationship

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 integration

Community records search

  • Model
  • API class
  • REST API - /api/records/?community=<comid> vs. /api/communities/<comid>/records

Record inclusion requests

  • Model
  • API class
  • REST API - /api/communities/<comid>/inclusion-requests/<irid>

ui: offer curation links for curators

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.

models: use UUID for community ID and move the current ID to a separate field

As discussed IRL with @lnielsen and during DR meeting.

Why:

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.

Who needs it:

  • Zenodo for reason 1
  • B2Share for reasons 1 and 2

ui: member management prototype

  • Members list - /communities/<comid>/members
    • Members table
    • Member invite modal (different for admin/user)
    • Invitations list modal
  • Member invitation - /communities/invitation?token=...
    • Accept/reject button

Add support for multiple curators

(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.

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.