-
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.
Merge pull request #3 from dnv-opensource/2-restructure-the-repo-and-…
…change-to-uv-as-package-manager 2 restructure the repo and change to uv as package manager
- Loading branch information
Showing
76 changed files
with
4,140 additions
and
1,496 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,13 @@ | ||
[paths] | ||
source = | ||
src/sim_explorer | ||
*/site-packages/sim_explorer | ||
|
||
[run] | ||
source = sim_explorer | ||
branch = True | ||
|
||
[report] | ||
# fail_under = 10.0 | ||
show_missing = True | ||
skip_covered = True |
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 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 |
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,36 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# Explicitly declare text files you want to always be normalized and converted | ||
# to native line endings on checkout. | ||
*.py text | ||
*.cpp text | ||
*.hpp text | ||
*.c text | ||
*.h text | ||
*.json text | ||
*.xml text | ||
*.txt text | ||
*.yml text | ||
*.yaml text | ||
*.toml text | ||
*.rst text | ||
*.ini text | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.vcproj text eol=crlf | ||
*.sln text eol=crlf | ||
*.md text eol=crlf | ||
|
||
# Declare files that will always have LF line endings on checkout. | ||
*.sh text eol=lf | ||
|
||
# Declare files that will not be normalized regardless of their content. | ||
*.jpg -text | ||
*.png -text | ||
*.gif -text | ||
*.ico -text | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.onnx binary | ||
*.fmu binary |
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,26 +1,29 @@ | ||
name: Build Package | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
build: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
lfs: true | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' # cache pip dependencies | ||
- name: Install build and twine | ||
run: pip install build twine | ||
- name: Run build | ||
run: python -m build | ||
- name: Run twine check | ||
run: twine check --strict dist/* | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./dist/*.tar.gz | ||
name: Build Package | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
build: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
- name: Build source distribution and wheel | ||
run: uv build | ||
- name: Run twine check | ||
run: uvx twine check --strict dist/* | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: | | ||
dist/*.tar.gz | ||
dist/*.whl |
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,36 +1,80 @@ | ||
name: Code Quality | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
ruff_format: | ||
runs-on: ubuntu-latest | ||
name: ruff format | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' # cache pip dependencies | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Install ruff | ||
run: pip install ruff==0.3.0 | ||
- name: Run ruff format | ||
run: ruff format --diff . | ||
|
||
ruff_check: | ||
runs-on: ubuntu-latest | ||
name: ruff check | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
cache: 'pip' # cache pip dependencies | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Install ruff | ||
run: pip install ruff==0.3.0 | ||
- name: Run ruff check | ||
run: ruff check --diff . | ||
name: Code Quality | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
ruff_format: | ||
runs-on: ubuntu-latest | ||
name: ruff format | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
- name: Install the project | ||
run: uv sync --upgrade | ||
- name: Run ruff format | ||
run: uv run ruff format --diff | ||
|
||
ruff_check: | ||
runs-on: ubuntu-latest | ||
name: ruff check | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
- name: Install the project | ||
run: uv sync --upgrade | ||
- name: Run ruff check | ||
run: uv run ruff check --diff | ||
|
||
# pyright: | ||
# runs-on: ubuntu-latest | ||
# name: pyright | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Install uv | ||
# uses: astral-sh/setup-uv@v2 | ||
# with: | ||
# enable-cache: true | ||
# cache-dependency-glob: "uv.lock" | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version-file: "pyproject.toml" | ||
# - name: Install the project | ||
# run: uv sync --upgrade | ||
# - name: Run pyright | ||
# run: uv run pyright | ||
|
||
mypy: | ||
runs-on: ubuntu-latest | ||
name: mypy | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: "pyproject.toml" | ||
- name: Install the project | ||
run: uv sync --upgrade | ||
- name: Run mypy | ||
run: uv run mypy |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.