Git Product home page Git Product logo

docs-invenio-rdm's Introduction

About

InvenioRDM user documentation web site.

Running

$ mkvirtualenv docs-invenio-rdm
$ pip install -r requirements.txt
$ mkdocs serve
$ firefox http://127.0.0.1:8000

docs-invenio-rdm's People

Contributors

alejandromumo avatar avivace avatar chbrandt avatar chriz-uniba avatar daglueck avatar dfdan avatar effervescent-shot avatar fenekku avatar j4bbi avatar jennur avatar jrcastro2 avatar kpsherva avatar libremente avatar lnielsen avatar max-moser avatar mb-wali avatar monotasker avatar ntarocco avatar phette23 avatar pineirin avatar ppanero avatar psaiz avatar rekt-hard avatar samk13 avatar slint avatar tlgino avatar tmorrell avatar utnapischtim avatar wgresshoff avatar zzacharo avatar

Stargazers

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

docs-invenio-rdm's Issues

deployment: improvements

  • When adding the helm repo. Be more explicit. What are those parameters, what can the user change (naming wise) and what references something. E.g. What is helm-invenio/invenio?
  • The image that is needed needs to be published, this is not specified. Explain how to build it, and how to publish (e.g. GH registry)
  • Review language (e.g. charts vs chart) to align with helm site.

REST-API Create draft invalid json and creation error

Package version (if known):

invenio-cli, version 0.22.0

Describe the bug

A clear and concise description of what the bug is.

https://inveniordm.docs.cern.ch/reference/rest_api/#create-a-record-draft

JSON-code in "Request" is not valid (and after fixing, invenio-validation complains about missing fields).

Steps to Reproduce

  1. Go to: https://inveniordm.docs.cern.ch/reference/rest_api/#create-a-record-draft
  2. Take the JSON-code in "Request"
{
  "access": {
    "metadata": false,
    "files": false,
    "owned_by": [{"user": 1}],
    "access_right": "open"
  },
  "metadata": {
    "resource_type": { "type": "image", "subtype": "image-photo" },
    "title": "A Romans story",
    "publication_date": "2020-06-01",
    "creators": [
      "person_or_org": {
        "family_name": "Brown",
        "given_name": "Troy",
        "type": "personal"
      },
      {
        "person_or_org": {
          "family_name": "Collins",
          "given_name": "Thomas",
          "identifiers": [
            {"scheme": "orcid", "identifier": "0000-0002-1825-0097"}
          ],
          "name": "Collins, Thomas",
          "type": "personal"
        },
        "affiliations": [
          {
            "identifiers": [
              {"scheme": "ror", "identifier": "03yrm5c26"}
            ],
            "name": "Entity One"
          }
        ]
      }
    ]
  }
}

  1. Use a JSON-Validator
  2. Get error:
Error: Parse error on line 13:
...     "person_or_org": {        "family_
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':'

Expected behavior

No validation error.

Additional context

Fixing the validation error

This validation error can be fixed by putting the first appearance of person_or_org into {}.

{
  "access": {
    "metadata": false,
    "files": false,
    "owned_by": [
      {
        "user": 1
      }
    ],
    "access_right": "open"
  },
  "metadata": {
    "resource_type": {
      "type": "image",
      "subtype": "image-photo"
    },
    "title": "A Romans story",
    "publication_date": "2020-06-01",
    "creators": [
      {
        "person_or_org": {
          "family_name": "Brown",
          "given_name": "Troy",
          "type": "personal"
        }
      },
      {
        "person_or_org": {
          "family_name": "Collins",
          "given_name": "Thomas",
          "identifiers": [
            {
              "scheme": "orcid",
              "identifier": "0000-0002-1825-0097"
            }
          ],
          "name": "Collins, Thomas",
          "type": "personal"
        },
        "affiliations": [
          {
            "identifiers": [
              {
                "scheme": "ror",
                "identifier": "03yrm5c26"
              }
            ],
            "name": "Entity One"
          }
        ]
      }
    ]
  }
}

Creation error

However, putting this in test.js and then trying to create the draft:

curl --oauth2-bearer <TOKEN> --insecure -H "Content-Type: application/json" -X POST --data '@test.js' https://127.0.0.1:5000/api/records

Gives us the following error message:

{"status": 400, "message": "A validation error occurred.", "errors": [{"field": "access", "messages": ["'record'"]}]}

A working js-file

Put the following code in working-test.js

{
  "metadata": {
    "title": "UNIBA-TITLE",
    "publisher": "UNIBA",
    "publication_date": "2321-03-24",
    "rights": [
      {
        "description": "UNIBA-API-draft-test.",
        "link": "https://creativecommons.org/licenses/by/4.0/legalcode",
        "title": "Creative Commons Attribution 4.0 International",
        "id": "cc-by-4.0"
      }
    ]
  },
  "access": {
    "record": "public",
    "embargo": {
      "reason": null,
      "until": null,
      "active": false
    },
    "files": "public",
    "owned_by": [
      {
        "user": 2
      }
    ]
  }
}
curl --oauth2-bearer <TOKEN> --insecure -H "Content-Type: application/json" -X POST --data '@working-test.js' https://127.0.0.1:5000/api/records

Returns a successful creation of a draft (with some missing required fields).

{"expires_at": "2021-03-24 11:34:35.977783", "links": {"files": "https://127.0.0.1:5000/api/records/aw7xv-fd194/draft/files", "self_html": "https://127.0.0.1:5000/uploads/aw7xv-fd194", "publish": "https://127.0.0.1:5000/api/records/aw7xv-fd194/draft/actions/publish", "self": "https://127.0.0.1:5000/api/records/aw7xv-fd194/draft"}, "revision_id": 2, "status": "draft", "updated": "2021-03-24 11:34:35.990164", "published": false, "conceptid": "2c4n0-5m451", "created": "2021-03-24 11:34:35.977759", "metadata": {"publisher": "UNIBA", "publication_date": "2321-03-24", "rights": [{"description": "UNIBA-API-draft-test.", "link": "https://creativecommons.org/licenses/by/4.0/legalcode", "title": "Creative Commons Attribution 4.0 International", "id": "cc-by-4.0"}], "title": "UNIBA-TITLE"}, "access": {"record": "public", "embargo": {"reason": null, "until": null, "active": false}, "files": "public", "owned_by": [{"user": 2}]}, "id": "aw7xv-fd194", "errors": [{"field": "metadata.resource_type", "messages": ["Missing data for required field."]}, {"field": "metadata.creators", "messages": ["Missing data for required field."]}]}

Feel free to adapt and fix the fields now containing UNIBA (exspecially in the rights-description). ;)

Document January release

  • update develop section with new API
  • update reference section with new API
  • update metadata reference section with new record structure

develop: document installing node using nvm as recommendation

Global installation of node is using as global node-modules a folder that it requires root access. As a result, when you install locally a react-module and you try to link it, it files due to permission errors!

Nvm is setting up properly the node executable and the global node-modules folder so no root is required.

json outpus are outdated

The datamodel shown in the run section of develop still shows the old datamodel. The GET is just confusing since visually it's a different JSON output. However POST operations will fail if copied.

Cannot import BibliographicRecordServiceConfig following 'Change the permissions' docu

Package version (if known):

invenio-cli, version 0.22.0

Describe the bug

A clear and concise description of what the bug is.

Following the instructions given here:
https://github.com/inveniosoftware/docs-invenio-rdm/blob/e9b1bcfe0b34594a4acbdc0a2add3c19d8db52fa/docs/develop/make_it_your_own.md#modify-inveniocfg

I get the following error:

ImportError: cannot import name 'BibliographicRecordServiceConfig' from 'invenio_rdm_records.services' (/home/chriz/rz/git/invenio/icli-0-22-0/venv/lib/python3.7/site-packages/invenio_rdm_records/services/__init__.py)

Steps to Reproduce

  1. Follow the steps here: https://inveniordm.docs.cern.ch/develop/ until you can run it (invenio-cli run).
  2. Then follow the steps here: https://inveniordm.docs.cern.ch/develop/make_it_your_own/#modify-inveniocfg - that is:
    • adjusting the invenio.cfg
    • rerun invenio-cli run
  3. See error
ImportError: cannot import name 'BibliographicRecordServiceConfig' from 'invenio_rdm_records.services' (/home/chriz/rz/git/invenio/icli-0-22-0/venv/lib/python3.7/site-packages/invenio_rdm_records/services/__init__.py)

Expected behavior

invenio-cli run goes through without errors and permissions are set as described.

Additional context

BibliographicRecordServiceConfig was recently renamend (and moved?). Possible fix:

from invenio_rdm_records.services import RDMRecordPermissionPolicy
from invenio_rdm_records.services.config import RDMRecordServiceConfig
from invenio_records_permissions.generators import SuperUser


class MyRecordPermissionPolicy(RDMRecordPermissionPolicy):
    can_create = [SuperUser()]


class MyBibliographicRecordServiceConfig(RDMRecordServiceConfig):
    permission_policy_cls = MyRecordPermissionPolicy


RDM_RECORDS_BIBLIOGRAPHIC_SERVICE_CONFIG = MyBibliographicRecordServiceConfig

I'm preparing a PR.

auth: test and document how to integrate Keycloak auth in an InvenioRDM instance

Testing

  • what Python config should go in invenio.cfg?
  • make sure the user profile is fetched after a login

Documentation

  • High level introduction to what it keycloak auth
  • Document what a sys admin configuring InvenioRDM would need to ask to the keycloak authentication responsibles to set it up correctly
  • Copy/paste the code to add in invenio.cfg

installation: write upgrade section

Document how to upgrade from v1 to v2

Random thoughs below:

  • Bump versions in Pipfile

    • Requires pipenv lock —pre & pipenv sync —pre
      • Containerize will automatically rebuild assets
      • install —pre wil also rebuild assets
  • invenio.cfg

    • Update configuration with new options
  • Upgrade Invenio-cli

  • Docker file:

    • Manually upgrade postgres
    • manuals upgrade elasticsearch
    • Celery worker command has to be upgraded
  • Records:

  • Upgrade to a new major version of InvenioRDM

    • Data changes - needs to be able to run a script in your current instance to see if you can upgrade?
  • Upgrade to a minor version.

    • Upgrade packages - pipenv check
    • Checking for code patchs?

creating a new record fails.

There is an extra comma , in the field identifiers.

   "identifiers": {
        "DOI": "10.9999/rdm.0",
    },

which results in an error:

{
  "message": "Failed to decode JSON object: Expecting property name enclosed in double quotes: line 15 column 5 (char 313)",
  "status": 400
}

REST-API Modify a draft's files options invalid json

Package version (if known):

invenio-cli, version 0.22.0

Describe the bug

A clear and concise description of what the bug is.

https://github.com/inveniosoftware/docs-invenio-rdm/blob/master/docs/reference/rest_api.md#modify-a-drafts-files-options

JSON-code in "Request" is not valid

Steps to Reproduce

  1. Go to https://inveniordm.docs.cern.ch/reference/rest_api/#modify-a-drafts-files-options
  2. Take the JSON-code in "Request"
{
  "enabled": true,
  "default_preview": "article.pdf",
}
  1. Use a JSON-Validator
  2. Get error:
Error: Parse error on line 3:
...ew": "article.pdf",}
----------------------^
Expecting 'STRING', got '}'

Expected behavior

No validation error.

Additional context

Removing the , after "article.pdf" fixes the issue.
I could do a PR, if desired.

Adjusting the record-landing-page fails

Package version (if known):
invenio-cli, version 0.22.0

Describe the bug / Steps to Reproduce

Following the instructions here:
https://inveniordm.docs.cern.ch/customize/styling/#change-the-record-landing-page
doesn't change the record-landing-page.

Expected behavior

The record landing page is adjusted.

Additional context

For me the issue is in the folder-path:

To override the record landing page, add the following folders and file in your templates/ folder: invenio_app_rdm/records/detail.html.

It works if I add the semantic-ui directory:

icli-0-23-0-dev/templates$ tree -a
.
├── .gitkeep
└── semantic-ui
    └── invenio_app_rdm
        └── records
            └── detail.html

I'm not sure whether this is an error in the documentation or the implementation. Since https://inveniordm.docs.cern.ch/customize/styling/#change-other-pages says explicitely to 'exclude' the semantic-ui-folder: Copy the filepath relative to templates/semantic-ui/ in invenio-app-rdm into your instance's templates/ folder.

Inconsistent Navigational Menus

See

image

Get

  • The top horizontal menu has Home Develop Extensions Deploy. It's missing Install Preview.
  • The left vertical menu has Home Install Preview. It's missing Develop Extensions Deploy.
  • The right vertical menu has Install Preview Develop Extensions Deploy (but it's the page menu so that's ok albeit confusing).

Expect

  • Top horizontal menu has submenus Home Install Preview Develop Extensions Deploy
  • Left vertical menu has pages part of current submenu
  • Right vertical menu has sections part of current page

auth: enable/disable login methods

Document and test:

  • how to enable or disable local login (login form, registration, confirm email, forgotten psw, user profile page)
  • how to enable or disable an external auth provider

extensions

How to add a custom extension process (as explained on the demo)

support different versions

Currently we only have "current" and "latest". We should be able to support "versioning" of those.

At the moment there are many issues open in mkdocs: mkdocs/mkdocs#193, mkdocs/mkdocs#614, etc.

There are two plugins available:

I successfully built one version, however when trying the second one I run into zayd62/mkdocs-versioning#32. Waiting for answers on it.

Clipboard copy only commands

Sometimes the clipboard-copy icon, copies the output as well which isn't intended. By separating the blocks of code, this can be fixed and only the command line commands are copied.

Document installation of DejaVu font (causing missing font for DOI Badge when not installed)

Package version (if known): 3.0 release

Describe the bug

I'm getting an error that seems to be related to a missing font, which impacts the DOI badge rendering.

Steps to Reproduce

  1. Clean install of 3.0 release on a Mac

  2. Activate DOI minting in invenio.cfg

  3. Go to a landing page

  4. See error:

    font = ImageFont.truetype("DejaVuSans", 11)
    File "/Users/tmorrell/.local/share/virtualenvs/inveniordm-caltechdata-test-l4e_NXA1/lib/python3.8/site-packages/PIL/ImageFont.py", line 853, in truetype
    return freetype(font)
    File "/Users/tmorrell/.local/share/virtualenvs/inveniordm-caltechdata-test-l4e_NXA1/lib/python3.8/site-packages/PIL/ImageFont.py", line 850, in freetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
    File "/Users/tmorrell/.local/share/virtualenvs/inveniordm-caltechdata-test-l4e_NXA1/lib/python3.8/site-packages/PIL/ImageFont.py", line 209, in init
    self.font = core.getfont(
    OSError: cannot open resource

Expected behavior

There should be documentation on how to install this font.

Screenshots (if applicable)

Screen Shot 2021-04-30 at 10 01 39 AM

Additional context

Documentation: Review inveniordm.docs.cern.ch for Nov 11 changes

IMPORTANT: Note that there is a PR with quite some work already done.

  • Home
  • Install
  • Preview
  • Develop
    • Getting started
    • Install locally
    • Run. --> Still missing to update the json dicts to the new data model done
    • Make it your own. --> Still missing to update json dicst done and testing the customizations
    • Edit a module --> NEW section to explain how to setup and develop CSS and React. Written, but not tested.
    • Troubleshooting
    • Cleanup
  • Extensions --> No need for update. Should we use the new module_install to install the extension?
  • Deploy
    • How to
    • OpenShift
    • K8
    • System components
    • Configuration
    • Build your image
    • Image registries
    • Benchmarking

pre-requisits

  • Python 3.6: Use Pyenv if needed
  • Docker-compose
  • Node
  • NPM
  • Clean docker containers (old ones for port collision)
  • Check that the user is in the docker group
  • Not use anaconda
  • Memory / CPU cores

Fix icon

Icon shows up squished like this:

inveniordm-docs-icon

It shouldn't look squished :)

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.