Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat-add-issue-subm…
Browse files Browse the repository at this point in the history
…ission
  • Loading branch information
freshavocado7 committed Sep 18, 2024
2 parents aa90ef6 + bc0601a commit 52f9172
Show file tree
Hide file tree
Showing 64 changed files with 16,817 additions and 727 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ jobs:
matrix:
os: [ubuntu-latest]
python_version:
- "3.10"
- "3.11"
- "3.12"
include:
- os: windows-latest
python_version: "3.10"
python_version: "3.11"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{matrix.python_version}}
Expand Down Expand Up @@ -56,7 +55,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |-
python -m pip install -U pip
Expand All @@ -68,10 +67,10 @@ jobs:
run: |-
python -m twine check dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Artifacts
path: 'dist/*'
path: "dist/*"
- name: Publish to PyPI (release only)
if: startsWith(github.ref, 'refs/tags/v')
run: python -m twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --non-interactive dist/*
18 changes: 1 addition & 17 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"
- name: Upgrade pip
run: |-
python -m pip install -U pip
Expand All @@ -24,19 +24,3 @@ jobs:
- name: Run Pre-Commit
run: |-
pre-commit run --all-files
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Upgrade pip
run: |-
python -m pip install -U pip
- name: Install pylint
run: |-
python -m pip install pylint
- name: Run pylint
run: |-
pylint -dfixme capella_model_explorer || exit $(($? & ~24))
65 changes: 37 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_install_hook_types: [commit-msg, pre-commit]
default_stages: [commit, merge-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -26,7 +26,7 @@ repos:
- id: fix-byte-order-marker
- id: trailing-whitespace
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.0
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
Expand All @@ -43,17 +43,24 @@ repos:
rev: 6.3.0
hooks:
- id: pydocstyle
exclude: "^tests/"
exclude: '^tests/'
additional_dependencies:
- pydocstyle[toml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies:
- capellambse==0.5.72
- types-pyyaml==6.0.11
- repo: https://github.com/pylint-dev/pylint
rev: v3.2.7
hooks:
- id: pylint
require_serial: false
args: [-rn, -sn, -dfixme, -dduplicate-code]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: insert-license
name: Insert license headers (shell-style comments)
Expand All @@ -64,7 +71,7 @@ repos:
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- "#"
- '#'
- id: insert-license
name: Insert license headers (XML-style comments)
files: '\.(?:html|md|xml)$'
Expand All @@ -74,7 +81,7 @@ repos:
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- "<!--| ~| -->"
- '<!--| ~| -->'
- id: insert-license
name: Insert license headers (C-style comments)
files: '\.(?:css|js|ts)$'
Expand All @@ -84,7 +91,7 @@ repos:
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- "/*| *| */"
- '/*| *| */'
- id: insert-license
name: Insert license headers (reST comments)
files: '\.rst$'
Expand All @@ -94,7 +101,7 @@ repos:
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- "..| |"
- '..| |'
- id: insert-license
name: Insert license headers (JSX files)
files: '\.jsx$'
Expand All @@ -104,37 +111,39 @@ repos:
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- "//"
- '//'
- repo: https://github.com/fsfe/reuse-tool
rev: v3.0.1
rev: v4.0.3
hooks:
- id: reuse
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.11.0
rev: v9.17.0
hooks:
- id: commitlint
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
- repo: local
hooks:
- id: prettier
name: prettier
entry: prettier --write
language: node
types_or: [ts, css, html, markdown]
additional_dependencies:
- "prettier@^3.2.5"
- "prettier-plugin-tailwindcss@^0.5.14"
- "tailwind-scrollbar@^3.1.0"
- 'prettier@^3.3.3'
- 'prettier-plugin-tailwindcss@^0.6.6'
- 'tailwind-scrollbar@^3.1.0'
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.2.0
rev: v9.10.0
hooks:
- id: eslint
additional_dependencies:
- "eslint@^8.57.0"
- "eslint-config-prettier@^9.1.0"
- "eslint-plugin-import@^2.29.1"
- "eslint-plugin-unused-imports@^3.1.0"
- "eslint-plugin-deprecation@^2.0.0"
- "eslint-plugin-tailwindcss@^3.15.1"
- "eslint-plugin-storybook@^0.8.0"
- "eslint-plugin-react@^7.34.1"
- "eslint-plugin-react-hooks@^4.6.2"
- "eslint-plugin-react-refresh@^0.4.5"
- 'eslint@^8.57.0'
- 'eslint-config-prettier@^9.1.0'
- 'eslint-plugin-import@^2.29.1'
- 'eslint-plugin-unused-imports@^3.1.0'
- 'eslint-plugin-deprecation@^2.0.0'
- 'eslint-plugin-tailwindcss@^3.15.1'
- 'eslint-plugin-storybook@^0.8.0'
- 'eslint-plugin-react@^7.34.1'
- 'eslint-plugin-react-hooks@^4.6.2'
- 'eslint-plugin-react-refresh@^0.4.5'
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Thanks for your interest in our project. Contributions are always welcome!
We are committed to fostering a welcoming, respectful, and harassment-free
environment. Be kind!

If you have questions, ideas or want to report a bug, feel free to [open an
issue]. Or go ahead and [open a pull request] to contribute code. In order to
reduce the burden on our maintainers, please make sure that your code follows
our style guidelines outlined below.
If you have questions, ideas or want to report a bug, feel free to [open
an issue]. Or go ahead and [open a pull request] to contribute code. In order to
reduce the burden on our maintainers, please make sure that your code follows our
style guidelines outlined below.

<!-- prettier-ignore -->
[open an issue]: https://github.com/DSD-DBS/capella-model-explorer/issues
Expand Down Expand Up @@ -129,8 +129,7 @@ The key differences are:
etc.
- For classes that are not builtin (e.g. `Iterable`),
`import collections.abc as cabc` and then use them like `cabc.Iterable`.
- Use [PEP-604-style unions], e.g. `int | float` instead of
`t.Union[int, float]`.
- Use [PEP-604-style unions], e.g. `int | float` instead of `t.Union[int, float]`.
- Use `... | None` (with `None` always as the last union member) instead of
`t.Optional[...]` and always explicitly annotate where `None` is possible.

Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ config:
methods:
- id: f51872a8-1a4f-4a4d-b4f4-b39cbd31a75b
type: http
name: default
name: Direct Browser connection
sharing:
enabled: true
ports:
metrics: 8000
http: 8000
Expand Down Expand Up @@ -162,6 +164,11 @@ config:
Replace the numbers in `compatible_versions` with the version IDs for the
versions you want to support.

When configured properly, users will be able to start read-only sessions for
the Capella Model Explorer. More information about read-only sessions is
available in the
[Capella Collaboration Manager documentation](https://dsd-dbs.github.io/capella-collab-manager/user/sessions/types/read-only/).

# Contributing

We'd love to see your bug reports and improvement suggestions! Please take a
Expand Down
7 changes: 6 additions & 1 deletion capella_model_explorer/backend/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
default=PATH_TO_TEMPLATES,
)
def run(model: capellambse.MelodyModel, templates: Path):
backend = explorer.CapellaModelExplorerBackend(Path(templates), model)

backend = explorer.CapellaModelExplorerBackend(
Path(templates),
model,
)

uvicorn.run(backend.app, host=HOST, port=int(PORT))


Expand Down
Loading

0 comments on commit 52f9172

Please sign in to comment.