diff --git a/.github/workflows/code-qa.yml b/.github/workflows/code-qa.yml index 0674ef5f7..845dc1490 100644 --- a/.github/workflows/code-qa.yml +++ b/.github/workflows/code-qa.yml @@ -31,34 +31,29 @@ jobs: python_version: "3.10" steps: - uses: actions/checkout@v4 - - name: Set up Python ${{matrix.python_version}} - uses: actions/setup-python@v5 with: - cache: pip - cache-dependency-path: pyproject.toml + fetch-depth: 0 + - uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" python-version: ${{matrix.python_version}} - - name: Upgrade Pip - run: python -m pip install -U pip - - name: Install test dependencies - run: python -m pip install '.[test]' - name: Run unit tests - run: python -m pytest --cov-report=term --cov=capellambse --rootdir=. + run: uv run -m coverage run pre-commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 with: - cache: pip - cache-dependency-path: pyproject.toml + fetch-depth: 0 + - uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" python-version: "3.12" - - name: Upgrade pip - run: python -m pip install -U pip - - name: Install pre-commit - run: python -m pip install 'pre-commit' - name: Run Pre-Commit - run: pre-commit run --all-files + run: uv run pre-commit run --all-files build: name: Build wheel @@ -67,18 +62,15 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup Python - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v4 with: - cache: pip - cache-dependency-path: pyproject.toml + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" python-version: "3.12" - - name: Install dependencies - run: python -m pip install -U pip build twine - name: Build packages - run: python -m build + run: uv build - name: Verify packages - run: python -m twine check dist/* + run: uvx twine check dist/* - name: Upload artifacts uses: actions/upload-artifact@v4 with: @@ -120,15 +112,11 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v4 with: - cache: pip - cache-dependency-path: pyproject.toml + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" python-version: "3.12" - - name: Upgrade pip - run: python -m pip install -U pip - - name: Install dependencies - run: python -m pip install jupyter '.[docs,png]' capellambse-context-diagrams - name: Run example notebooks run: | jq --version @@ -142,7 +130,7 @@ jobs: } for file in docs/source/examples/*.ipynb; do old_outputs="$(celloutputs "$file")" - if ! jupyter nbconvert --to notebook --execute "$file" --output "${file##*/}" --ExecutePreprocessor.timeout "${NOTEBOOK_TIMEOUT_SEC:-300}"; then + if ! uv run --all-extras jupyter nbconvert --to notebook --execute "$file" --output "${file##*/}" --ExecutePreprocessor.timeout "${NOTEBOOK_TIMEOUT_SEC:-300}"; then ok=false continue fi @@ -160,17 +148,13 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v4 with: - cache: pip - cache-dependency-path: pyproject.toml + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" python-version: "3.12" - - name: Upgrade pip - run: python -m pip install -U pip - - name: Install dependencies - run: | - sudo apt-get install -y pandoc - python -m pip install '.[docs]' + - name: Install system-level dependencies + run: sudo apt-get install -y pandoc - name: Auto-generate APIDOC sources run: make -C docs apidoc - name: Create docs diff --git a/.gitignore b/.gitignore index 636a7727d..c02c7fbd8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ # Ignore all custom known_models by default, to avoid accidental information # leaks. To commit one anyway, use: git add -f filename.json -capellambse/known_models/*.json +src/capellambse/known_models/*.json # Byte-compiled / optimized / DLL files __pycache__/ @@ -162,6 +162,9 @@ dmypy.json # Cython debug symbols cython_debug/ +# don't commit lock files for library projects +uv.lock + # Mac garbage .DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f3091f77..eb8b97156 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -98,7 +98,7 @@ repos: name: mypy types_or: [python, pyi, toml, yaml] pass_filenames: false - args: [capellambse, tests] + args: [src/capellambse, tests] additional_dependencies: - mypypp==0.1.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 60732b8d8..6042861b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,14 +22,48 @@ our style guidelines outlined below. Developing ---------- -We recommend that you [develop inside of a virtual -environment](README.md#installation). After you have set it up, simply run the -unit tests to verify that everything is set up correctly: +Use [uv](https://docs.astral.sh/uv/) to set up a local development environment. + +```bash +git clone https://github.com/DSD-DBS/py-capellambse +cd py-capellambse +uv sync +uv run pre-commit install + +# You may need to explicitly activate the project venv +# to make code completion and tools available: +source .venv/bin/activate.sh # for Linux / Mac +.venv\Scripts\activate # for Windows +``` + +You can use `uv run ` to avoid having to manually activate the project +venv. For example, to run the unit tests, use: ```sh -pytest +uv run pytest ``` +The example notebooks (see above) are verified during CI, to ensure their +output is up to date. This means they have to be re-run whenever the expected +output changes. + +Use the following command to start a Jupyter server, which can be used to +develop and re-run the example notebooks: + +```bash +cd docs/source/examples +CAPELLAMBSE_UUID_SEED=0 uv run jupyter lab +``` + +> [!NOTE] +> The above command provides a static seed for the internal pseudo-random +> number generator. This is not recommended for production environments. [Read +> more about +> CAPELLAMBSE_UUID_SEED.](https://dsd-dbs.github.io/py-capellambse/start/envvars.html) + +If your browser did not open automatically, follow the instructions in the +terminal to start it manually. + We additionally recommend that you set up your editor / IDE as follows. - Indent with 4 spaces per level of indentation diff --git a/README.md b/README.md index 64b095aa3..3d9ba13e8 100644 --- a/README.md +++ b/README.md @@ -181,47 +181,8 @@ pip install capellambse Development ----------- -To set up a development environment, clone the project and install it into a -virtual environment. - -```bash -git clone https://github.com/DSD-DBS/py-capellambse -cd py-capellambse -python -m venv .venv - -source .venv/bin/activate.sh # for Linux / Mac -.venv\Scripts\activate # for Windows - -pip install -U pip pre-commit -pip install -e '.[docs,test]' -pre-commit install -``` - -The example notebooks (see above) are verified during CI, to ensure their -output is up to date. This means they have to be re-run whenever the expected -output changes. - -Use the following command to start a Jupyter server, which can be used to -develop and re-run the example notebooks: - -```bash -pip install jupyter capellambse -cd docs/source/examples -CAPELLAMBSE_UUID_SEED=0 jupyter-notebook -``` - -> [!NOTE] -> The above command provides a static seed for the internal pseudo-random -> number generator. This is not recommended for production environments. [Read -> more about -> CAPELLAMBSE_UUID_SEED.](https://dsd-dbs.github.io/py-capellambse/start/envvars.html) - -If your browser did not open automatically, follow the instructions in the -terminal to start it manually. - -Once in the browser, simply click on the [01 -Introduction.ipynb](https://dsd-dbs.github.io/py-capellambse/examples/01%20Introduction.html) -notebook to start! +For details on how to set up a local development environment, please refer to +the [CONTRIBUTING guide](CONTRIBUTING.md). Current limitations ------------------- diff --git a/docs/Makefile b/docs/Makefile index f6d33492e..2184cd3b6 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,25 +11,27 @@ SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build +export UV_PYTHON = 3.12 + # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @uv run --no-dev --group docs $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @uv run --no-dev --group docs $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) # Auto-generate API documentation apidoc: - sphinx-apidoc --module-first --output-dir source/code --force .. \ - ../capellambse/aird/diagram.py \ - ../capellambse/extensions/reqif/elements.py \ - ../capellambse/repl.py \ - ../capellambse/sphinx.py + uv run --no-dev --group docs sphinx-apidoc --module-first --output-dir source/code --force ../src \ + ../src/capellambse/aird/diagram.py \ + ../src/capellambse/extensions/reqif/elements.py \ + ../src/capellambse/repl.py \ + ../src/capellambse/sphinx.py sed -i -e '/^\.\. automodule:: capellambse$$/a \ :no-index:' source/code/capellambse.rst clean-apidoc: diff --git a/docs/source/examples/01 Introduction.ipynb b/docs/source/examples/01 Introduction.ipynb index c91dd8270..3f79cc54d 100644 --- a/docs/source/examples/01 Introduction.ipynb +++ b/docs/source/examples/01 Introduction.ipynb @@ -229,40 +229,14 @@ "id": "30e17ac3", "metadata": {}, "source": [ - "We can also turn the above data into a table, for example \"actor function allocation\", using `pandas`.\n", + "Using the `pandas` library, we can also easily export the data above in tabular format.\n", "\n", - "For this, we first make sure pandas itself is installed, as well as an extension we'll use later." + "For that, first build up the table as pandas DataFrame:" ] }, { "cell_type": "code", "execution_count": 4, - "id": "400e483d-eca7-4fdd-a9e0-71467e1af8d8", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], - "source": [ - "%pip install -q pandas openpyxl" - ] - }, - { - "cell_type": "markdown", - "id": "acbe1247-e1a1-4da8-a95a-7b41f4836937", - "metadata": {}, - "source": [ - "Now we can use it together with `capellambse`:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, "id": "833220d0", "metadata": {}, "outputs": [ @@ -344,7 +318,7 @@ "5 LAF 1 " ] }, - "execution_count": 5, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -368,12 +342,12 @@ "id": "6e04c482", "metadata": {}, "source": [ - "and any `pandas.DataFrame` can always be turned into an Excel Spreadsheet, just like that:" + "This DataFrame can then be processed as usual. For example, to export it as Excel Spreadsheet:" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "10af24a2", "metadata": {}, "outputs": [], @@ -407,7 +381,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "eb5f8747", "metadata": {}, "outputs": [ @@ -436,7 +410,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "id": "71bf090e", "metadata": { "scrolled": true @@ -547,7 +521,7 @@ "[47] " ] }, - "execution_count": 8, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -575,7 +549,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "id": "cc09fd22", "metadata": {}, "outputs": [ @@ -589,7 +563,7 @@ "" ] }, - "execution_count": 9, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -608,7 +582,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "id": "b5699e75-2e4c-4b8e-81af-51be00ff6dc3", "metadata": {}, "outputs": [ @@ -641,7 +615,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "7798e7f0-61eb-4395-99f2-2cc6dbd46ff1", "metadata": {}, "outputs": [], @@ -651,7 +625,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "id": "93a2e9cf-e599-4c3d-96b7-d6c590e74b16", "metadata": {}, "outputs": [ @@ -688,7 +662,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 12, "id": "cf91c71a", "metadata": {}, "outputs": [ @@ -703,7 +677,7 @@ "[0] " ] }, - "execution_count": 13, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -726,7 +700,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 13, "id": "b5751a0d", "metadata": {}, "outputs": [ @@ -745,7 +719,7 @@ "[2] " ] }, - "execution_count": 14, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } diff --git a/docs/source/examples/02 Intro to Physical Architecture API.ipynb b/docs/source/examples/02 Intro to Physical Architecture API.ipynb index a5b119394..56f64d279 100644 --- a/docs/source/examples/02 Intro to Physical Architecture API.ipynb +++ b/docs/source/examples/02 Intro to Physical Architecture API.ipynb @@ -7,31 +7,7 @@ "source": [ "# Introduction to Physical Architecture API\n", "\n", - "**Note**: In this notebook we will use `pandas` dataframes library to construct and visualize tables, **if you don't have pandas installed** in the current environment you may want to do so by running the cell below." - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "4c181cfb", - "metadata": { - "editable": true, - "slideshow": { - "slide_type": "" - }, - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Note: you may need to restart the kernel to use updated packages.\n" - ] - } - ], - "source": [ - "%pip install -q pandas" + "**Note**: In this notebook, we will use the `pandas` library to construct and visualize tables, so make sure it is installed before running it locally." ] }, { @@ -44,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "id": "1386d2f7", "metadata": { "scrolled": true @@ -78,7 +54,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "id": "8b555976", "metadata": {}, "outputs": [ @@ -92,7 +68,7 @@ "" ] }, - "execution_count": 3, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -114,7 +90,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "id": "711574aa", "metadata": { "scrolled": true @@ -163,7 +139,7 @@ "[16] " ] }, - "execution_count": 4, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -185,7 +161,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "id": "21ef5c4d", "metadata": {}, "outputs": [ @@ -296,7 +272,7 @@ ".xtype = 'org.polarsys.capella.core.data.pa:PhysicalComponent'" ] }, - "execution_count": 5, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } @@ -317,7 +293,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "63ff286c", "metadata": {}, "outputs": [], @@ -341,7 +317,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "6d8ff25c", "metadata": {}, "outputs": [ @@ -536,7 +512,7 @@ "16 " ] }, - "execution_count": 7, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -559,7 +535,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "id": "01644c9d", "metadata": {}, "outputs": [ @@ -588,7 +564,7 @@ "[7] " ] }, - "execution_count": 8, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -612,7 +588,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "id": "70abf6f9", "metadata": {}, "outputs": [ @@ -631,7 +607,7 @@ "[2] " ] }, - "execution_count": 9, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -657,7 +633,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "id": "faa00eb0", "metadata": {}, "outputs": [ @@ -743,7 +719,7 @@ "7 ISP Network Mail server" ] }, - "execution_count": 10, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -774,7 +750,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "e48d4998", "metadata": {}, "outputs": [ @@ -807,7 +783,7 @@ "[9] " ] }, - "execution_count": 11, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } diff --git a/pyproject.toml b/pyproject.toml index b57815cf7..6dfc06fab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,25 +48,6 @@ Homepage = "https://github.com/DSD-DBS/py-capellambse" Documentation = "https://dsd-dbs.github.io/py-capellambse" [project.optional-dependencies] -docs = [ - "furo", - "ipython", - "jinja2", - "nbsphinx>=0.9.5", - "sphinx>=8.0.2", - "sphinx-argparse-cli", - "sphinx-autodoc-typehints", - "tomli; python_version<'3.11'", -] - -test = [ - "click", - "jinja2>=3.1.3", - "pytest", - "pytest-cov", - "requests-mock", -] - cli = [ "click>=8.1.7", "jinja2>=3.1.3", @@ -101,6 +82,37 @@ pvmt = "capellambse.extensions.pvmt:init" reqif = "capellambse.extensions.reqif:init" validation = "capellambse.extensions.validation:init" +[dependency-groups] +dev = [ + "cairosvg>=2.5.2", + "capellambse-context-diagrams>=0.6.1", + "click>=8.1.7", + "coverage>=7.6.9", + "jinja2>=3.1.3", + "jupyterlab>=4.3.3", + "mypypp>=0.1.1", + "pandas>=2.2.3", + "pre-commit>=4.0.1", + "pyls-isort>=0.2.2", + "pylsp-mypy>=0.6.9", + "pytest>=8.3.4", + "python-lsp-server>=1.12.0", + "requests-mock>=1.12.1", + "ruff>=0.8.2", + "xlsxwriter>=3.2.0", +] + +docs = [ + "furo>=2024.8.6", + "ipython>=8.30.0", + "jinja2>=3.1.3", + "nbsphinx>=0.9.5", + "sphinx>=8.1.3", + "sphinx-argparse-cli>=1.19.0", + "sphinx-autodoc-typehints>=2.5.0", + "tomli>=2.2.1 ; python_full_version < '3.11'", +] + [tool.coverage.run] branch = true command_line = "-m pytest" @@ -247,7 +259,7 @@ zip-safe = false "capellambse" = ["OpenSans-Regular.ttf"] [tool.setuptools.packages.find] -include = ["capellambse", "capellambse.*"] +where = ["src"] [tool.setuptools_scm] # This section must exist for setuptools_scm to work diff --git a/capellambse/OpenSans-Regular.ttf b/src/capellambse/OpenSans-Regular.ttf similarity index 100% rename from capellambse/OpenSans-Regular.ttf rename to src/capellambse/OpenSans-Regular.ttf diff --git a/capellambse/OpenSans-Regular.ttf.license b/src/capellambse/OpenSans-Regular.ttf.license similarity index 100% rename from capellambse/OpenSans-Regular.ttf.license rename to src/capellambse/OpenSans-Regular.ttf.license diff --git a/capellambse/__init__.py b/src/capellambse/__init__.py similarity index 100% rename from capellambse/__init__.py rename to src/capellambse/__init__.py diff --git a/capellambse/_diagram_cache.py b/src/capellambse/_diagram_cache.py similarity index 100% rename from capellambse/_diagram_cache.py rename to src/capellambse/_diagram_cache.py diff --git a/capellambse/_namespaces.py b/src/capellambse/_namespaces.py similarity index 100% rename from capellambse/_namespaces.py rename to src/capellambse/_namespaces.py diff --git a/capellambse/_native.py b/src/capellambse/_native.py similarity index 100% rename from capellambse/_native.py rename to src/capellambse/_native.py diff --git a/capellambse/aird/__init__.py b/src/capellambse/aird/__init__.py similarity index 100% rename from capellambse/aird/__init__.py rename to src/capellambse/aird/__init__.py diff --git a/capellambse/aird/_box_factories.py b/src/capellambse/aird/_box_factories.py similarity index 100% rename from capellambse/aird/_box_factories.py rename to src/capellambse/aird/_box_factories.py diff --git a/capellambse/aird/_common.py b/src/capellambse/aird/_common.py similarity index 100% rename from capellambse/aird/_common.py rename to src/capellambse/aird/_common.py diff --git a/capellambse/aird/_edge_factories.py b/src/capellambse/aird/_edge_factories.py similarity index 100% rename from capellambse/aird/_edge_factories.py rename to src/capellambse/aird/_edge_factories.py diff --git a/capellambse/aird/_filters/__init__.py b/src/capellambse/aird/_filters/__init__.py similarity index 100% rename from capellambse/aird/_filters/__init__.py rename to src/capellambse/aird/_filters/__init__.py diff --git a/capellambse/aird/_filters/composite.py b/src/capellambse/aird/_filters/composite.py similarity index 100% rename from capellambse/aird/_filters/composite.py rename to src/capellambse/aird/_filters/composite.py diff --git a/capellambse/aird/_filters/global.py b/src/capellambse/aird/_filters/global.py similarity index 100% rename from capellambse/aird/_filters/global.py rename to src/capellambse/aird/_filters/global.py diff --git a/capellambse/aird/_semantic.py b/src/capellambse/aird/_semantic.py similarity index 100% rename from capellambse/aird/_semantic.py rename to src/capellambse/aird/_semantic.py diff --git a/capellambse/aird/_styling.py b/src/capellambse/aird/_styling.py similarity index 100% rename from capellambse/aird/_styling.py rename to src/capellambse/aird/_styling.py diff --git a/capellambse/aird/_visual.py b/src/capellambse/aird/_visual.py similarity index 100% rename from capellambse/aird/_visual.py rename to src/capellambse/aird/_visual.py diff --git a/capellambse/cli_helpers.py b/src/capellambse/cli_helpers.py similarity index 100% rename from capellambse/cli_helpers.py rename to src/capellambse/cli_helpers.py diff --git a/capellambse/decl.py b/src/capellambse/decl.py similarity index 100% rename from capellambse/decl.py rename to src/capellambse/decl.py diff --git a/capellambse/diagram/__init__.py b/src/capellambse/diagram/__init__.py similarity index 100% rename from capellambse/diagram/__init__.py rename to src/capellambse/diagram/__init__.py diff --git a/capellambse/diagram/_diagram.py b/src/capellambse/diagram/_diagram.py similarity index 100% rename from capellambse/diagram/_diagram.py rename to src/capellambse/diagram/_diagram.py diff --git a/capellambse/diagram/_icons.py b/src/capellambse/diagram/_icons.py similarity index 100% rename from capellambse/diagram/_icons.py rename to src/capellambse/diagram/_icons.py diff --git a/capellambse/diagram/_json_enc.py b/src/capellambse/diagram/_json_enc.py similarity index 100% rename from capellambse/diagram/_json_enc.py rename to src/capellambse/diagram/_json_enc.py diff --git a/capellambse/diagram/_vector2d.py b/src/capellambse/diagram/_vector2d.py similarity index 100% rename from capellambse/diagram/_vector2d.py rename to src/capellambse/diagram/_vector2d.py diff --git a/capellambse/diagram/capstyle.py b/src/capellambse/diagram/capstyle.py similarity index 100% rename from capellambse/diagram/capstyle.py rename to src/capellambse/diagram/capstyle.py diff --git a/capellambse/diagram_cache.py b/src/capellambse/diagram_cache.py similarity index 100% rename from capellambse/diagram_cache.py rename to src/capellambse/diagram_cache.py diff --git a/capellambse/extensions/__init__.py b/src/capellambse/extensions/__init__.py similarity index 100% rename from capellambse/extensions/__init__.py rename to src/capellambse/extensions/__init__.py diff --git a/capellambse/extensions/filtering.py b/src/capellambse/extensions/filtering.py similarity index 100% rename from capellambse/extensions/filtering.py rename to src/capellambse/extensions/filtering.py diff --git a/capellambse/extensions/metrics/__init__.py b/src/capellambse/extensions/metrics/__init__.py similarity index 100% rename from capellambse/extensions/metrics/__init__.py rename to src/capellambse/extensions/metrics/__init__.py diff --git a/capellambse/extensions/metrics/collector.py b/src/capellambse/extensions/metrics/collector.py similarity index 100% rename from capellambse/extensions/metrics/collector.py rename to src/capellambse/extensions/metrics/collector.py diff --git a/capellambse/extensions/metrics/composer.py b/src/capellambse/extensions/metrics/composer.py similarity index 100% rename from capellambse/extensions/metrics/composer.py rename to src/capellambse/extensions/metrics/composer.py diff --git a/capellambse/extensions/pvmt/__init__.py b/src/capellambse/extensions/pvmt/__init__.py similarity index 100% rename from capellambse/extensions/pvmt/__init__.py rename to src/capellambse/extensions/pvmt/__init__.py diff --git a/capellambse/extensions/pvmt/_config.py b/src/capellambse/extensions/pvmt/_config.py similarity index 100% rename from capellambse/extensions/pvmt/_config.py rename to src/capellambse/extensions/pvmt/_config.py diff --git a/capellambse/extensions/pvmt/_objects.py b/src/capellambse/extensions/pvmt/_objects.py similarity index 100% rename from capellambse/extensions/pvmt/_objects.py rename to src/capellambse/extensions/pvmt/_objects.py diff --git a/capellambse/extensions/reqif/__init__.py b/src/capellambse/extensions/reqif/__init__.py similarity index 100% rename from capellambse/extensions/reqif/__init__.py rename to src/capellambse/extensions/reqif/__init__.py diff --git a/capellambse/extensions/reqif/_capellareq.py b/src/capellambse/extensions/reqif/_capellareq.py similarity index 100% rename from capellambse/extensions/reqif/_capellareq.py rename to src/capellambse/extensions/reqif/_capellareq.py diff --git a/capellambse/extensions/reqif/_glue.py b/src/capellambse/extensions/reqif/_glue.py similarity index 100% rename from capellambse/extensions/reqif/_glue.py rename to src/capellambse/extensions/reqif/_glue.py diff --git a/capellambse/extensions/reqif/_requirements.py b/src/capellambse/extensions/reqif/_requirements.py similarity index 100% rename from capellambse/extensions/reqif/_requirements.py rename to src/capellambse/extensions/reqif/_requirements.py diff --git a/capellambse/extensions/reqif/exporter.py b/src/capellambse/extensions/reqif/exporter.py similarity index 100% rename from capellambse/extensions/reqif/exporter.py rename to src/capellambse/extensions/reqif/exporter.py diff --git a/capellambse/extensions/validation/__init__.py b/src/capellambse/extensions/validation/__init__.py similarity index 100% rename from capellambse/extensions/validation/__init__.py rename to src/capellambse/extensions/validation/__init__.py diff --git a/capellambse/extensions/validation/__main__.py b/src/capellambse/extensions/validation/__main__.py similarity index 100% rename from capellambse/extensions/validation/__main__.py rename to src/capellambse/extensions/validation/__main__.py diff --git a/capellambse/extensions/validation/_validate.py b/src/capellambse/extensions/validation/_validate.py similarity index 100% rename from capellambse/extensions/validation/_validate.py rename to src/capellambse/extensions/validation/_validate.py diff --git a/capellambse/extensions/validation/report-template.html.jinja b/src/capellambse/extensions/validation/report-template.html.jinja similarity index 100% rename from capellambse/extensions/validation/report-template.html.jinja rename to src/capellambse/extensions/validation/report-template.html.jinja diff --git a/capellambse/extensions/validation/rules.py b/src/capellambse/extensions/validation/rules.py similarity index 100% rename from capellambse/extensions/validation/rules.py rename to src/capellambse/extensions/validation/rules.py diff --git a/capellambse/filehandler/__init__.py b/src/capellambse/filehandler/__init__.py similarity index 100% rename from capellambse/filehandler/__init__.py rename to src/capellambse/filehandler/__init__.py diff --git a/capellambse/filehandler/abc.py b/src/capellambse/filehandler/abc.py similarity index 100% rename from capellambse/filehandler/abc.py rename to src/capellambse/filehandler/abc.py diff --git a/capellambse/filehandler/git.py b/src/capellambse/filehandler/git.py similarity index 100% rename from capellambse/filehandler/git.py rename to src/capellambse/filehandler/git.py diff --git a/capellambse/filehandler/git_askpass.py b/src/capellambse/filehandler/git_askpass.py similarity index 100% rename from capellambse/filehandler/git_askpass.py rename to src/capellambse/filehandler/git_askpass.py diff --git a/capellambse/filehandler/gitlab_artifacts.py b/src/capellambse/filehandler/gitlab_artifacts.py similarity index 100% rename from capellambse/filehandler/gitlab_artifacts.py rename to src/capellambse/filehandler/gitlab_artifacts.py diff --git a/capellambse/filehandler/http.py b/src/capellambse/filehandler/http.py similarity index 100% rename from capellambse/filehandler/http.py rename to src/capellambse/filehandler/http.py diff --git a/capellambse/filehandler/local.py b/src/capellambse/filehandler/local.py similarity index 100% rename from capellambse/filehandler/local.py rename to src/capellambse/filehandler/local.py diff --git a/capellambse/filehandler/memory.py b/src/capellambse/filehandler/memory.py similarity index 100% rename from capellambse/filehandler/memory.py rename to src/capellambse/filehandler/memory.py diff --git a/capellambse/filehandler/zip.py b/src/capellambse/filehandler/zip.py similarity index 100% rename from capellambse/filehandler/zip.py rename to src/capellambse/filehandler/zip.py diff --git a/capellambse/helpers.py b/src/capellambse/helpers.py similarity index 100% rename from capellambse/helpers.py rename to src/capellambse/helpers.py diff --git a/capellambse/known_models/coffee-machine.json b/src/capellambse/known_models/coffee-machine.json similarity index 100% rename from capellambse/known_models/coffee-machine.json rename to src/capellambse/known_models/coffee-machine.json diff --git a/capellambse/known_models/coffee-machine.json.license b/src/capellambse/known_models/coffee-machine.json.license similarity index 100% rename from capellambse/known_models/coffee-machine.json.license rename to src/capellambse/known_models/coffee-machine.json.license diff --git a/capellambse/known_models/croud-surveillance-demo.json b/src/capellambse/known_models/croud-surveillance-demo.json similarity index 100% rename from capellambse/known_models/croud-surveillance-demo.json rename to src/capellambse/known_models/croud-surveillance-demo.json diff --git a/capellambse/known_models/croud-surveillance-demo.json.license b/src/capellambse/known_models/croud-surveillance-demo.json.license similarity index 100% rename from capellambse/known_models/croud-surveillance-demo.json.license rename to src/capellambse/known_models/croud-surveillance-demo.json.license diff --git a/capellambse/known_models/docs.json b/src/capellambse/known_models/docs.json similarity index 100% rename from capellambse/known_models/docs.json rename to src/capellambse/known_models/docs.json diff --git a/capellambse/known_models/docs.json.license b/src/capellambse/known_models/docs.json.license similarity index 100% rename from capellambse/known_models/docs.json.license rename to src/capellambse/known_models/docs.json.license diff --git a/capellambse/known_models/ife-demo-dsd.json.license b/src/capellambse/known_models/ife-demo-dsd.json.license similarity index 100% rename from capellambse/known_models/ife-demo-dsd.json.license rename to src/capellambse/known_models/ife-demo-dsd.json.license diff --git a/capellambse/known_models/ife-demo.json b/src/capellambse/known_models/ife-demo.json similarity index 100% rename from capellambse/known_models/ife-demo.json rename to src/capellambse/known_models/ife-demo.json diff --git a/capellambse/known_models/ife-demo.json.license b/src/capellambse/known_models/ife-demo.json.license similarity index 100% rename from capellambse/known_models/ife-demo.json.license rename to src/capellambse/known_models/ife-demo.json.license diff --git a/capellambse/known_models/level-crossing-demo.json b/src/capellambse/known_models/level-crossing-demo.json similarity index 100% rename from capellambse/known_models/level-crossing-demo.json rename to src/capellambse/known_models/level-crossing-demo.json diff --git a/capellambse/known_models/level-crossing-demo.json.license b/src/capellambse/known_models/level-crossing-demo.json.license similarity index 100% rename from capellambse/known_models/level-crossing-demo.json.license rename to src/capellambse/known_models/level-crossing-demo.json.license diff --git a/capellambse/known_models/test-5.0.json b/src/capellambse/known_models/test-5.0.json similarity index 100% rename from capellambse/known_models/test-5.0.json rename to src/capellambse/known_models/test-5.0.json diff --git a/capellambse/known_models/test-5.0.json.license b/src/capellambse/known_models/test-5.0.json.license similarity index 100% rename from capellambse/known_models/test-5.0.json.license rename to src/capellambse/known_models/test-5.0.json.license diff --git a/capellambse/known_models/test-5.2.json b/src/capellambse/known_models/test-5.2.json similarity index 100% rename from capellambse/known_models/test-5.2.json rename to src/capellambse/known_models/test-5.2.json diff --git a/capellambse/known_models/test-5.2.json.license b/src/capellambse/known_models/test-5.2.json.license similarity index 100% rename from capellambse/known_models/test-5.2.json.license rename to src/capellambse/known_models/test-5.2.json.license diff --git a/capellambse/known_models/test-6.0.json b/src/capellambse/known_models/test-6.0.json similarity index 100% rename from capellambse/known_models/test-6.0.json rename to src/capellambse/known_models/test-6.0.json diff --git a/capellambse/known_models/test-6.0.json.license b/src/capellambse/known_models/test-6.0.json.license similarity index 100% rename from capellambse/known_models/test-6.0.json.license rename to src/capellambse/known_models/test-6.0.json.license diff --git a/capellambse/known_models/test-lib.json b/src/capellambse/known_models/test-lib.json similarity index 100% rename from capellambse/known_models/test-lib.json rename to src/capellambse/known_models/test-lib.json diff --git a/capellambse/known_models/test-lib.json.license b/src/capellambse/known_models/test-lib.json.license similarity index 100% rename from capellambse/known_models/test-lib.json.license rename to src/capellambse/known_models/test-lib.json.license diff --git a/capellambse/loader/__init__.py b/src/capellambse/loader/__init__.py similarity index 100% rename from capellambse/loader/__init__.py rename to src/capellambse/loader/__init__.py diff --git a/capellambse/loader/core.py b/src/capellambse/loader/core.py similarity index 100% rename from capellambse/loader/core.py rename to src/capellambse/loader/core.py diff --git a/capellambse/loader/exs.py b/src/capellambse/loader/exs.py similarity index 100% rename from capellambse/loader/exs.py rename to src/capellambse/loader/exs.py diff --git a/capellambse/loader/modelinfo.py b/src/capellambse/loader/modelinfo.py similarity index 100% rename from capellambse/loader/modelinfo.py rename to src/capellambse/loader/modelinfo.py diff --git a/capellambse/metamodel/__init__.py b/src/capellambse/metamodel/__init__.py similarity index 100% rename from capellambse/metamodel/__init__.py rename to src/capellambse/metamodel/__init__.py diff --git a/capellambse/metamodel/capellacommon.py b/src/capellambse/metamodel/capellacommon.py similarity index 100% rename from capellambse/metamodel/capellacommon.py rename to src/capellambse/metamodel/capellacommon.py diff --git a/capellambse/metamodel/capellacore.py b/src/capellambse/metamodel/capellacore.py similarity index 100% rename from capellambse/metamodel/capellacore.py rename to src/capellambse/metamodel/capellacore.py diff --git a/capellambse/metamodel/capellamodeller.py b/src/capellambse/metamodel/capellamodeller.py similarity index 100% rename from capellambse/metamodel/capellamodeller.py rename to src/capellambse/metamodel/capellamodeller.py diff --git a/capellambse/metamodel/cs.py b/src/capellambse/metamodel/cs.py similarity index 100% rename from capellambse/metamodel/cs.py rename to src/capellambse/metamodel/cs.py diff --git a/capellambse/metamodel/fa.py b/src/capellambse/metamodel/fa.py similarity index 100% rename from capellambse/metamodel/fa.py rename to src/capellambse/metamodel/fa.py diff --git a/capellambse/metamodel/information/__init__.py b/src/capellambse/metamodel/information/__init__.py similarity index 100% rename from capellambse/metamodel/information/__init__.py rename to src/capellambse/metamodel/information/__init__.py diff --git a/capellambse/metamodel/information/datatype.py b/src/capellambse/metamodel/information/datatype.py similarity index 100% rename from capellambse/metamodel/information/datatype.py rename to src/capellambse/metamodel/information/datatype.py diff --git a/capellambse/metamodel/information/datavalue.py b/src/capellambse/metamodel/information/datavalue.py similarity index 100% rename from capellambse/metamodel/information/datavalue.py rename to src/capellambse/metamodel/information/datavalue.py diff --git a/capellambse/metamodel/interaction.py b/src/capellambse/metamodel/interaction.py similarity index 100% rename from capellambse/metamodel/interaction.py rename to src/capellambse/metamodel/interaction.py diff --git a/capellambse/metamodel/la.py b/src/capellambse/metamodel/la.py similarity index 100% rename from capellambse/metamodel/la.py rename to src/capellambse/metamodel/la.py diff --git a/capellambse/metamodel/modellingcore.py b/src/capellambse/metamodel/modellingcore.py similarity index 100% rename from capellambse/metamodel/modellingcore.py rename to src/capellambse/metamodel/modellingcore.py diff --git a/capellambse/metamodel/modeltypes.py b/src/capellambse/metamodel/modeltypes.py similarity index 100% rename from capellambse/metamodel/modeltypes.py rename to src/capellambse/metamodel/modeltypes.py diff --git a/capellambse/metamodel/oa.py b/src/capellambse/metamodel/oa.py similarity index 100% rename from capellambse/metamodel/oa.py rename to src/capellambse/metamodel/oa.py diff --git a/capellambse/metamodel/pa.py b/src/capellambse/metamodel/pa.py similarity index 100% rename from capellambse/metamodel/pa.py rename to src/capellambse/metamodel/pa.py diff --git a/capellambse/metamodel/sa.py b/src/capellambse/metamodel/sa.py similarity index 100% rename from capellambse/metamodel/sa.py rename to src/capellambse/metamodel/sa.py diff --git a/capellambse/model/__init__.py b/src/capellambse/model/__init__.py similarity index 100% rename from capellambse/model/__init__.py rename to src/capellambse/model/__init__.py diff --git a/capellambse/model/_descriptors.py b/src/capellambse/model/_descriptors.py similarity index 100% rename from capellambse/model/_descriptors.py rename to src/capellambse/model/_descriptors.py diff --git a/capellambse/model/_model.py b/src/capellambse/model/_model.py similarity index 100% rename from capellambse/model/_model.py rename to src/capellambse/model/_model.py diff --git a/capellambse/model/_obj.py b/src/capellambse/model/_obj.py similarity index 100% rename from capellambse/model/_obj.py rename to src/capellambse/model/_obj.py diff --git a/capellambse/model/_pods.py b/src/capellambse/model/_pods.py similarity index 100% rename from capellambse/model/_pods.py rename to src/capellambse/model/_pods.py diff --git a/capellambse/model/_styleclass.py b/src/capellambse/model/_styleclass.py similarity index 100% rename from capellambse/model/_styleclass.py rename to src/capellambse/model/_styleclass.py diff --git a/capellambse/model/_xtype.py b/src/capellambse/model/_xtype.py similarity index 100% rename from capellambse/model/_xtype.py rename to src/capellambse/model/_xtype.py diff --git a/capellambse/model/diagram.py b/src/capellambse/model/diagram.py similarity index 100% rename from capellambse/model/diagram.py rename to src/capellambse/model/diagram.py diff --git a/capellambse/py.typed b/src/capellambse/py.typed similarity index 100% rename from capellambse/py.typed rename to src/capellambse/py.typed diff --git a/capellambse/repl.py b/src/capellambse/repl.py similarity index 99% rename from capellambse/repl.py rename to src/capellambse/repl.py index 650d5263c..723fe03d0 100755 --- a/capellambse/repl.py +++ b/src/capellambse/repl.py @@ -32,7 +32,7 @@ file defines the instantiation parameters for the :class:`capellambse.model.MelodyModel`: -.. literalinclude:: ../../../capellambse/known_models/test-lib.json +.. literalinclude:: ../../../src/capellambse/known_models/test-lib.json :language: json :lineno-start: 1 :linenos: diff --git a/capellambse/sphinx.py b/src/capellambse/sphinx.py similarity index 100% rename from capellambse/sphinx.py rename to src/capellambse/sphinx.py diff --git a/capellambse/svg/__init__.py b/src/capellambse/svg/__init__.py similarity index 100% rename from capellambse/svg/__init__.py rename to src/capellambse/svg/__init__.py diff --git a/capellambse/svg/decorations.py b/src/capellambse/svg/decorations.py similarity index 100% rename from capellambse/svg/decorations.py rename to src/capellambse/svg/decorations.py diff --git a/capellambse/svg/drawing.py b/src/capellambse/svg/drawing.py similarity index 100% rename from capellambse/svg/drawing.py rename to src/capellambse/svg/drawing.py diff --git a/capellambse/svg/generate.py b/src/capellambse/svg/generate.py similarity index 100% rename from capellambse/svg/generate.py rename to src/capellambse/svg/generate.py diff --git a/capellambse/svg/helpers.py b/src/capellambse/svg/helpers.py similarity index 100% rename from capellambse/svg/helpers.py rename to src/capellambse/svg/helpers.py diff --git a/capellambse/svg/style.py b/src/capellambse/svg/style.py similarity index 100% rename from capellambse/svg/style.py rename to src/capellambse/svg/style.py diff --git a/capellambse/svg/symbols.py b/src/capellambse/svg/symbols.py similarity index 100% rename from capellambse/svg/symbols.py rename to src/capellambse/svg/symbols.py