forked from inveniosoftware/invenio-vocabularies
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8747a52
Showing
41 changed files
with
1,863 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.git | ||
*.gitignore | ||
|
||
*.mo | ||
*.pyc | ||
*.swp | ||
*.swo | ||
*.~ | ||
|
||
.dockerignore | ||
Dockerfile | ||
docker-compose.yml | ||
docker-compose-dev.yml | ||
|
||
Procfile* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2020 CERN. | ||
# | ||
# Invenio-Vocabularies is free software; you can redistribute it and/or | ||
# modify it under the terms of the MIT License; see LICENSE file for more | ||
# details. | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
# Python files | ||
[*.py] | ||
indent_size = 4 | ||
# isort plugin configuration | ||
known_first_party = invenio_vocabularies | ||
multi_line_output = 2 | ||
default_section = THIRDPARTY | ||
skip = .eggs | ||
|
||
# RST files (used by sphinx) | ||
[*.rst] | ||
indent_size = 4 | ||
|
||
# CSS, HTML, JS, JSON, YML | ||
[*.{css,html,js,json,yml}] | ||
indent_size = 2 | ||
|
||
# Matches the exact files either package.json or .travis.yml | ||
[{package.json,.travis.yml}] | ||
indent_size = 2 | ||
|
||
# Dockerfile | ||
[Dockerfile] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build-n-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
- name: Build package | ||
run: | | ||
python setup.py compile_catalog sdist bdist_wheel | ||
- name: pypi-publish | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
|
||
password: ${{ secrets.pypi_token }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: master | ||
pull_request: | ||
branches: master | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '0 3 * * 6' | ||
workflow_dispatch: | ||
inputs: | ||
reason: | ||
description: 'Reason' | ||
required: false | ||
default: 'Manual trigger' | ||
|
||
jobs: | ||
Tests: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
# You can add more combinations e.g. dev requirements or MySQL by adding | ||
# a new item to this list. Add its corresponding definition below. | ||
# EXTRAS and REQUIREMENTS_LEVEL are always needed. | ||
services: [release, lowest, devel] | ||
include: | ||
- services: release | ||
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://invenio:invenio@localhost:5432/invenio" | ||
POSTGRESQL_VERSION: POSTGRESQL_12_LATEST | ||
ES_VERSION: "ES_7_LATEST" | ||
EXTRAS: "all,postgresql,elasticsearch7" | ||
REQUIREMENTS_LEVEL: "pypi" | ||
- services: lowest | ||
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://invenio:invenio@localhost:5432/invenio" | ||
POSTGRESQL_VERSION: POSTGRESQL_9_LATEST | ||
ES_VERSION: "ES_6_LATEST" | ||
EXTRAS: "all,postgresql,elasticsearch6" | ||
REQUIREMENTS_LEVEL: "min" | ||
- services: devel | ||
SQLALCHEMY_DATABASE_URI: "postgresql+psycopg2://invenio:invenio@localhost:5432/invenio" | ||
POSTGRESQL_VERSION: POSTGRESQL_12_LATEST | ||
ES_VERSION: "ES_7_LATEST" | ||
EXTRAS: "all,postgresql,elasticsearch7" | ||
REQUIREMENTS_LEVEL: "dev" | ||
|
||
env: | ||
SQLALCHEMY_DATABASE_URI: ${{matrix.SQLALCHEMY_DATABASE_URI}} | ||
POSTGRESQL_VERSION: ${{matrix.POSTGRESQL_VERSION}} | ||
ES_VERSION: ${{matrix.ES_VERSION}} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Generate dependencies | ||
if: ${{ matrix.REQUIREMENTS_LEVEL != 'dev' }} | ||
run: | | ||
python -m pip install --upgrade pip setuptools py wheel requirements-builder | ||
requirements-builder -e ${{ matrix.EXTRAS }} --level=${{ matrix.REQUIREMENTS_LEVEL }} setup.py > .${{ matrix.REQUIREMENTS_LEVEL }}-${{ matrix.python-version }}-requirements.txt | ||
- name: Generate dependencies devel | ||
if: ${{ matrix.REQUIREMENTS_LEVEL == 'dev' }} | ||
run: | | ||
python -m pip install --upgrade pip setuptools py wheel requirements-builder | ||
requirements-builder -e ${{ matrix.EXTRAS }} --level=${{ matrix.REQUIREMENTS_LEVEL }} --req requirements-devel.txt setup.py > .${{ matrix.REQUIREMENTS_LEVEL }}-${{ matrix.python-version }}-requirements.txt | ||
- name: Cache pip | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.REQUIREMENTS_LEVEL }}-${{ matrix.python-version }}-requirements.txt') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r .${{matrix.REQUIREMENTS_LEVEL}}-${{ matrix.python-version }}-requirements.txt | ||
pip install -e .[all] | ||
pip freeze | ||
docker --version | ||
docker-compose --version | ||
- name: Run tests | ||
# You must change the ignore command for the manifest check. | ||
# Remove `.travis-*` and add `.*-requirements.txt` | ||
run: | | ||
./run-tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# Idea software family | ||
.idea/ | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Vim swapfiles | ||
.*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2020 CERN. | ||
# | ||
# Invenio-Vocabularies is free software; you can redistribute it and/or | ||
# modify it under the terms of the MIT License; see LICENSE file for more | ||
# details. | ||
|
||
# TODO: Transifex integration | ||
# | ||
# 1) Create message catalog: | ||
# $ python setup.py extract_messages | ||
# $ python setup.py init_catalog -l <lang> | ||
# $ python setup.py compile_catalog | ||
# 2) Ensure project has been created on Transifex under the inveniosoftware | ||
# organisation. | ||
# 3) Install the transifex-client | ||
# $ pip install transifex-client | ||
# 4) Push source (.pot) and translations (.po) to Transifex | ||
# $ tx push -s -t | ||
# 5) Pull translations for a single language from Transifex | ||
# $ tx pull -l <lang> | ||
# 6) Pull translations for all languages from Transifex | ||
# $ tx pull -a | ||
|
||
[main] | ||
host = https://www.transifex.com | ||
|
||
[invenio.invenio-vocabularies-messages] | ||
file_filter = invenio_vocabularies/translations/<lang>/LC_MESSAGES/messages.po | ||
source_file = invenio_vocabularies/translations/messages.pot | ||
source_lang = en | ||
type = PO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. | ||
Copyright (C) 2020 CERN. | ||
Invenio-Vocabularies is free software; you can redistribute it and/or | ||
modify it under the terms of the MIT License; see LICENSE file for more | ||
details. | ||
|
||
Authors | ||
======= | ||
|
||
Invenio module for managing vocabularies. | ||
|
||
- CERN <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. | ||
Copyright (C) 2020 CERN. | ||
Invenio-Vocabularies is free software; you can redistribute it and/or | ||
modify it under the terms of the MIT License; see LICENSE file for more | ||
details. | ||
|
||
Changes | ||
======= | ||
|
||
Version 0.1.0 (released TBD) | ||
|
||
- Initial public release. |
Oops, something went wrong.