Skip to content

Commit

Permalink
Merge 1136303 into 50b641c
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien Délèze committed Apr 17, 2020
2 parents 50b641c + 1136303 commit 1763edf
Show file tree
Hide file tree
Showing 37 changed files with 1,802 additions and 1,653 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ target/
# MAC
.DS_Store

# Generated JSON schema
# Generated JSON schemas
sonar/modules/documents/jsonschemas/documents/document-v1.0.0.json
sonar/modules/deposits/jsonschemas/deposits/deposit-v1.0.0.json

# Celery
celerybeat-schedule
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# Check manifest will not automatically add these two files:

exclude sonar/modules/documents/jsonschemas/documents/document-v1.0.0.json
exclude sonar/modules/deposits/jsonschemas/deposits/deposit-v1.0.0.json

include *.html
include *.inv
Expand Down
3 changes: 2 additions & 1 deletion scripts/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ pipenv run invenio webpack buildall
mkdir -p ${static_folder}/sonar-ui
cp -R ${assets_folder}/node_modules/@rero/sonar-ui/dist/sonar/* ${static_folder}/sonar-ui

# Compile json schema
# Compile JSON schemas
pipenv run invenio utils compile-json ./sonar/modules/documents/jsonschemas/documents/document-v1.0.0_src.json -o ./sonar/modules/documents/jsonschemas/documents/document-v1.0.0.json
pipenv run invenio utils compile-json ./sonar/modules/deposits/jsonschemas/deposits/deposit-v1.0.0_src.json -o ./sonar/modules/deposits/jsonschemas/deposits/deposit-v1.0.0.json
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
'documents = sonar.modules.documents.jsonschemas',
'institutions = sonar.modules.institutions.jsonschemas',
'users = sonar.modules.users.jsonschemas',
'deposits = sonar.modules.deposits.jsonschemas'
'deposits = sonar.modules.deposits.jsonschemas',
'common = sonar.common.jsonschemas'
],
'invenio_search.mappings': [
'documents = sonar.modules.documents.mappings',
Expand Down
18 changes: 18 additions & 0 deletions sonar/common/jsonschemas/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
#
# Swiss Open Access Repository
# Copyright (C) 2019 RERO
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

"""Common JSON schemas."""
89 changes: 89 additions & 0 deletions sonar/common/jsonschemas/classification-v1.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"title": "Classification",
"type": "string",
"enum": [
"004",
"02",
"1",
"159.9",
"159.953",
"16",
"2",
"294/299",
"3",
"31",
"32",
"33",
"34",
"35",
"36",
"37",
"370",
"376",
"378.6",
"39",
"51",
"519.2",
"52",
"524.8",
"53",
"54",
"543",
"548",
"549",
"55",
"55/56",
"551",
"556",
"56",
"57",
"57/59",
"574",
"58",
"59",
"6",
"60",
"61",
"613.2",
"614.253.5",
"615.8",
"615.84",
"615",
"616-083",
"616.31",
"616",
"620.1",
"620.9",
"621.01",
"621.3",
"621.38",
"621.39",
"621.762",
"621",
"63",
"65",
"66",
"663",
"664",
"681",
"7.071",
"7",
"71",
"72",
"73/77",
"75",
"77",
"78",
"796",
"81",
"81\u00b428",
"82",
"902",
"903",
"91",
"929.5",
"93/94",
"931",
"94"
]
}
Loading

0 comments on commit 1763edf

Please sign in to comment.