-
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
Showing
64 changed files
with
4,003 additions
and
160 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,66 @@ | ||
--- | ||
extends: | ||
- airbnb-base | ||
- plugin:import/warnings | ||
|
||
env: | ||
browser: true | ||
jest: true | ||
|
||
plugins: | ||
- import | ||
|
||
settings: | ||
import/resolver: | ||
webpack: | ||
node: { } | ||
|
||
rules: | ||
sort-imports: | ||
- error | ||
- ignoreDeclarationSort: true | ||
no-multiple-empty-lines: 0 | ||
arrow-parens: 0 | ||
max-classes-per-file: 0 | ||
import/extensions: 0 | ||
import/no-cycle: | ||
- error | ||
- maxDepth: 2 | ||
import/order: off | ||
import/newline-after-import: | ||
- error | ||
- count: 2 | ||
padding-line-between-statements: | ||
- error | ||
- blankLine: always | ||
prev: "*" | ||
next: return | ||
- blankLine: always | ||
prev: "*" | ||
next: export | ||
no-param-reassign: | ||
- 2 | ||
- props: false | ||
no-console: | ||
- error | ||
- allow: | ||
- warn | ||
- error | ||
object-curly-newline: | ||
- error | ||
- ImportDeclaration: | ||
minProperties: 1 | ||
multiline: true | ||
consistent: true | ||
ObjectExpression: | ||
consistent: true | ||
minProperties: 3 | ||
require-await: | ||
- error | ||
|
||
parserOptions: | ||
parser: "@babel/eslint-parser" | ||
requireConfigFile: false | ||
|
||
globals: | ||
inject: false |
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,8 @@ | ||
[flake8] | ||
exclude = .idea,.vscode,.git,pg_data,venv,env,node_modules | ||
show-source = True | ||
max-line-length = 100 | ||
application-import-names = connect_bi_reporter | ||
import-order-style = smarkets | ||
max-cognitive-complexity = 15 | ||
ignore = B008,FI1,I100,W503 |
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,53 @@ | ||
name: Test Connect BI Reporter | ||
|
||
on: | ||
push: | ||
branches: '*' | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
backend: | ||
runs-on: ubuntu-latest | ||
name: Backend tests | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
poetry config virtualenvs.create false --local | ||
poetry install --no-root | ||
- name: Linting | ||
run: | | ||
flake8 . | ||
- name: Testing | ||
run: | | ||
pytest | ||
frontend: | ||
runs-on: ubuntu-latest | ||
name: Frontend tests | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Linting | ||
run: npm run lint | ||
- name: Testing | ||
run: npm run test |
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 |
---|---|---|
@@ -1,160 +1,10 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# 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/ | ||
.nox/ | ||
*.pyc | ||
htmlcov | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/#use-with-ide | ||
.pdm.toml | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
.connect_bi_reporter_dev.env | ||
node_modules | ||
ui/tests/coverage | ||
pg_data | ||
.vscode | ||
.idea |
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,3 @@ | ||
# EaaS: Connect BI Reporter changelog | ||
|
||
* 1.0.0: initial version |
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,9 @@ | ||
FROM cloudblueconnect/connect-extension-runner:30.0 | ||
|
||
COPY pyproject.toml /install_temp/. | ||
COPY poetry.* /install_temp/. | ||
WORKDIR /install_temp | ||
RUN poetry update && poetry install --no-root | ||
COPY package*.json /extension/. | ||
WORKDIR /extension | ||
RUN if [ -f "/extension/package.json" ]; then npm install; fi |
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,49 @@ | ||
# Welcome to Connect Extension project Connect BI Reporter | ||
|
||
## Next steps | ||
|
||
You may open your favourite IDE and start working with your project, please note that this project runs using docker. | ||
You may modify at any time the credentials used to authenticate to connect modifying the file *connect_bi_reporter/.connect_bi_reporter_dev.env*. | ||
|
||
|
||
|
||
In order to start your extension as a standalone docker container first of all you need to build the docker image for your project. To do that run: | ||
|
||
```sh | ||
$ docker compose build | ||
``` | ||
|
||
Once your container is built, you can access the project folder and run: | ||
|
||
```sh | ||
$ docker compose up connect_bi_reporter_dev | ||
``` | ||
|
||
> please note that in this way you will run the docker container and if you do changes on the code you will need to stop it and start it again. | ||
|
||
If you would like to develop and test at the same time, we recommend you run your project using the command: | ||
|
||
```sh | ||
$ docker compose run connect_bi_reporter_bash | ||
``` | ||
|
||
Once you get the interactive shell an help banner will be displayed to inform you about the included tools that can help you with the development of your extension. | ||
|
||
|
||
Additionally, a basic boilerplate for writing unit tests has been created, you can run the tests using: | ||
|
||
```sh | ||
$ docker compose run connect_bi_reporter_test | ||
``` | ||
|
||
|
||
## Community Resources | ||
|
||
Please take note of these links in order to get additional information: | ||
|
||
* https://connect.cloudblue.com/ | ||
* https://connect.cloudblue.com/community/modules/devops/ | ||
* https://connect.cloudblue.com/community/sdk/python-openapi-client/ | ||
* https://connect-openapi-client.readthedocs.io/en/latest/ | ||
* https://connect-eaas-core.readthedocs.io/en/latest/ |
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
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 |
---|---|---|
@@ -1 +1,10 @@ | ||
# connect-bi-reporter | ||
# Welcome to Connect BI Reporter ! | ||
|
||
|
||
BI reports transfer tool from the Connect Reports module to external storages | ||
|
||
|
||
|
||
## License | ||
|
||
**Connect BI Reporter** is licensed under the *Apache Software License 2.0* license. |
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,5 @@ | ||
/* | ||
Copyright (c) 2024, Ingram Micro | ||
All rights reserved. | ||
*/ | ||
module.exports = 'test-file-stub'; |
Oops, something went wrong.