diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d4e2f88195..5fb4d45270 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -303,7 +303,7 @@ backend-lint: - .docker-image-test-stage - .skippable-job variables: - RUN_WHEN_CHANGES_MADE_IN: "backend/ premium/backend/" + RUN_WHEN_CHANGES_MADE_IN: "backend/ premium/backend/ enterprise/backend/" script: - docker run --rm $BACKEND_CI_DEV_IMAGE lint needs: @@ -313,7 +313,7 @@ backend-lint: # - Runs the backend startup check if changes to the backend, otherwise skips. backend-check-startup: variables: - RUN_WHEN_CHANGES_MADE_IN: "backend/ premium/backend/" + RUN_WHEN_CHANGES_MADE_IN: "backend/ premium/backend/ enterprise/backend/" POSTGRES_USER: "baserow" POSTGRES_PASSWORD: "baserow" POSTGRES_DB: "baserow" @@ -356,7 +356,7 @@ backend-test-group-1: POSTGRES_PASSWORD: baserow POSTGRES_DB: baserow PYTEST_SPLIT_GROUP: 1 - RUN_WHEN_CHANGES_MADE_IN: "backend/ premium/backend/" + RUN_WHEN_CHANGES_MADE_IN: "backend/ premium/backend/ enterprise/backend/" DOWNLOAD_AND_UNPACK_ARTIFACTS_ON_SKIP: 'true' script: - DB_IP=$(cat /etc/hosts | awk '{if ($2 == "db") print $1;}') @@ -487,7 +487,7 @@ web-frontend-lint: needs: - job: build-web-frontend-image variables: - RUN_WHEN_CHANGES_MADE_IN: "web-frontend/ premium/web-frontend/" + RUN_WHEN_CHANGES_MADE_IN: "web-frontend/ premium/web-frontend/ enterprise/web-frontend/" script: - docker run --rm $WEBFRONTEND_CI_DEV_IMAGE lint @@ -499,7 +499,7 @@ web-frontend-test: - .docker-image-test-stage - .skippable-job variables: - RUN_WHEN_CHANGES_MADE_IN: "web-frontend/ premium/web-frontend/" + RUN_WHEN_CHANGES_MADE_IN: "web-frontend/ premium/web-frontend/ enterprise/web-frontend/" DOWNLOAD_AND_UNPACK_ARTIFACTS_ON_SKIP: 'true' needs: - job: build-web-frontend-image diff --git a/.gitlab/merge_request_templates/default.md b/.gitlab/merge_request_templates/default.md index 1a5aecdcb5..32f088514d 100644 --- a/.gitlab/merge_request_templates/default.md +++ b/.gitlab/merge_request_templates/default.md @@ -1,8 +1,8 @@ ### Merge Request Checklist - [ ] [changelog.md](https://gitlab.com/bramw/baserow/-/blob/develop/changelog.md) has - been updated if required -- [ ] New/updated **Premium features** are separated correctly in the premium folder + been updated if required. +- [ ] New/updated **Premium/Enterprise features** are separated correctly in the premium or enterprise folder - [ ] The latest **Chrome and Firefox** have been used to test any new frontend features - [ ] [Documentation](https://gitlab.com/bramw/baserow/-/tree/develop/docs) has been updated diff --git a/.nvmrc b/.nvmrc index 48082f72f0..b6a7d89c68 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12 +16 diff --git a/LICENSE b/LICENSE index ec2551ee0c..d003cd57e3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,17 +1,19 @@ Copyright (c) 2019-present Baserow B.V. -Parts of Baserow’s software are licensed as follows: +Parts of Baserow's software are licensed as follows: * All content residing under the "docs/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license". * All content that resides under the "premium/" directory of this repository, if that directory exists, is licensed under the license defined in "premium/LICENSE". +* All content that resides under the "enterprise/" directory of this repository, if that + directory exists, is licensed under the license defined in "enterprise/LICENSE". * All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license. * All third party components incorporated into the Baserow Software are licensed under the original license provided by the owner of the applicable component. * Content outside of the above mentioned directories or restrictions above [Baserow - Open Source Edition (“Baserow OSE”)] is available under the "MIT Expat" license as + Open Source Edition ("Baserow OSE")] is available under the "MIT Expat" license as defined below. Permission is hereby granted, free of charge, to any person obtaining a copy of this diff --git a/README.md b/README.md index c8ce5a8d46..064054f15d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ tool gives you the powers of a developer without leaving your browser. * Easily self-hosted with no storage restrictions or sign-up on https://baserow.io to get started immediately. * Alternative to Airtable. -* Open-core with all non-premium features under +* Open-core with all non-premium and non-enterprise features under the [MIT License](https://choosealicense.com/licenses/mit/) allowing commercial and private use. * Headless and API first. diff --git a/backend/.coveragerc b/backend/.coveragerc index 7be032f274..8f364fcd6a 100644 --- a/backend/.coveragerc +++ b/backend/.coveragerc @@ -10,3 +10,4 @@ omit = include = backend/src/**/* premium/backend/src/**/* + enterprise/backend/src/**/* diff --git a/backend/.flake8 b/backend/.flake8 index dd67f64014..7293b7ee71 100644 --- a/backend/.flake8 +++ b/backend/.flake8 @@ -4,6 +4,7 @@ max-doc-length = 88 per-file-ignores = tests/*: F841 ../premium/backend/tests/*: F841 + ../enterprise/backend/tests/*: F841 src/baserow/contrib/database/migrations/*: X1 src/baserow/core/migrations/*: X1 exclude = diff --git a/backend/Dockerfile b/backend/Dockerfile index 05ede62c52..9ad1af3940 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -67,13 +67,14 @@ COPY --chown=$UID:$GID ./docs /baserow/docs # and not cached even though we already have separate layers above. COPY --chown=$UID:$GID ./backend /baserow/backend COPY --chown=$UID:$GID ./premium/backend /baserow/premium/backend +COPY --chown=$UID:$GID ./enterprise/backend /baserow/enterprise/backend WORKDIR /baserow/backend # Ensure that Python outputs everything that's printed inside # the application rather than buffering it. ENV PYTHONUNBUFFERED 1 -ENV PYTHONPATH $PYTHONPATH:/baserow/backend/src:/baserow/premium/backend/src +ENV PYTHONPATH $PYTHONPATH:/baserow/backend/src:/baserow/premium/backend/src:/baserow/enterprise/backend/src COPY --chown=$UID:$GID ./deploy/plugins/*.sh /baserow/plugins/ RUN dos2unix /baserow/backend/docker/docker-entrypoint.sh && \ diff --git a/backend/Makefile b/backend/Makefile index 6fb777c37b..120dff6101 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -6,29 +6,29 @@ install-dev-dependencies: pip install -r requirements/dev.txt lint: - flake8 src tests ../premium/backend && \ - black . ../premium/backend --extend-exclude='/generated/' --check && \ - isort --check --skip generated src tests ../premium/backend && \ + flake8 src tests ../premium/backend ../enterprise/backend && \ + black . ../premium/backend ../enterprise/backend --extend-exclude='/generated/' --check && \ + isort --check --skip generated src tests ../premium/backend ../enterprise/backend && \ ./baserow makemigrations --dry-run --check && \ - bandit -r --exclude src/baserow/test_utils src/ ../premium/backend/src/ \ + bandit -r --exclude src/baserow/test_utils src/ ../premium/backend/src/ ../enterprise/backend/src/ \ || exit; lint-python: lint format: - black . ../premium/backend --extend-exclude='/generated/' || exit; + black . ../premium/backend ../enterprise/backend --extend-exclude='/generated/' || exit; sort: - isort --skip generated src tests ../premium/backend || exit; + isort --skip generated src tests ../premium/backend ../enterprise/backend || exit; test: - pytest tests ../premium/backend/tests || exit; + pytest tests ../premium/backend/tests ../enterprise/backend/tests || exit; test-regenerate-ci-durations: - pytest tests ../premium/backend/tests --store-durations || exit; + pytest tests ../premium/backend/tests ../enterprise/backend/tests --store-durations || exit; test-parallel: - pytest tests ../premium/backend/tests -n 10 || exit; + pytest tests ../premium/backend/tests ../enterprise/backend/tests -n 10 || exit; PYTEST_SPLITS:=1 PYTEST_SPLIT_GROUP:=1 @@ -46,7 +46,8 @@ ci-test-python: --junitxml=backend/reports/report.xml \ $(PYTEST_EXTRA_ARGS) \ backend/tests \ - premium/backend/tests; + premium/backend/tests\ + enterprise/backend/tests; generate-html-coverage-report: mkdir html_coverage/ -p; \ @@ -54,6 +55,7 @@ generate-html-coverage-report: coverage run --rcfile=backend/.coveragerc -m pytest \ backend/tests \ premium/backend/tests; \ + enterprise/backend/tests; \ coverage html -d html_coverage/; ci-check-startup-python: diff --git a/backend/mypy.ini b/backend/mypy.ini index a80650ccbf..dcbc4f4ef2 100644 --- a/backend/mypy.ini +++ b/backend/mypy.ini @@ -4,7 +4,7 @@ python_version = 3.7 exclude = "[a-zA-Z_]+.migrations.|[a-zA-Z_]+.tests.|[a-zA-Z_]+.testing." allow_redefinition = false -mypy_path=backend/src:premium/backend/src +mypy_path=backend/src:premium/backend/src:enterprise/backend/src check_untyped_defs = True disallow_untyped_defs = True disallow_any_generics = True diff --git a/backend/pytest.ini b/backend/pytest.ini index 210b90fdde..5db5cf27c4 100644 --- a/backend/pytest.ini +++ b/backend/pytest.ini @@ -6,6 +6,7 @@ env = testpaths = tests ../premium/backend/tests + ../enterprise/backend/tests markers = field_file: All tests related to file field field_single_select: All tests related to single select field diff --git a/backend/src/baserow/config/settings/base.py b/backend/src/baserow/config/settings/base.py index d25f166342..f5d8d873d1 100644 --- a/backend/src/baserow/config/settings/base.py +++ b/backend/src/baserow/config/settings/base.py @@ -60,6 +60,7 @@ INSTALLED_APPS = [ "baserow.ws", "baserow.contrib.database", "baserow_premium", + "baserow_enterprise", ] BASEROW_FULL_HEALTHCHECKS = os.getenv("BASEROW_FULL_HEALTHCHECKS", None) diff --git a/backend/src/baserow/test_utils/pytest_conftest.py b/backend/src/baserow/test_utils/pytest_conftest.py index 88db5ce76f..22e0157c53 100644 --- a/backend/src/baserow/test_utils/pytest_conftest.py +++ b/backend/src/baserow/test_utils/pytest_conftest.py @@ -106,8 +106,9 @@ def patch_filefield_storage(tmpdir): return patch -# We reuse this file in the premium backend folder, if you run a pytest session over -# plugins and the core at the same time pytest will crash if this called multiple times. +# We reuse this file in the premium/enterprise backend folder, if you run a pytest +# session over plugins and the core at the same time pytest will crash if this +# called multiple times. def pytest_addoption(parser): # Unfortunately a simple decorator doesn't work here as pytest is doing some # exciting reflection of sorts over this function and crashes if it is wrapped. diff --git a/config/intellij/.idea/jsLinters/eslint.xml b/config/intellij/.idea/jsLinters/eslint.xml index 80c04e9b23..d6133de426 100644 --- a/config/intellij/.idea/jsLinters/eslint.xml +++ b/config/intellij/.idea/jsLinters/eslint.xml @@ -1,7 +1,7 @@ - + diff --git a/config/intellij/.idea/runConfigurations/_template__of_py_test.xml b/config/intellij/.idea/runConfigurations/_template__of_py_test.xml index 4fe2f7ae68..5290299fc8 100644 --- a/config/intellij/.idea/runConfigurations/_template__of_py_test.xml +++ b/config/intellij/.idea/runConfigurations/_template__of_py_test.xml @@ -7,7 +7,7 @@ - +