Skip to content

Commit d4b3306

Browse files
Initial commit
0 parents  commit d4b3306

36 files changed

Lines changed: 1493 additions & 0 deletions

.bumpversion.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[bumpversion]
2+
current_version = 0.0.1
3+
commit = True
4+
tag = True
5+
files = pyproject.toml saezlab_core/_metadata.py
6+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
7+
serialize = {major}.{minor}.{patch}

.codecov.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Based on pydata/xarray
2+
codecov:
3+
require_ci_to_pass: no
4+
5+
coverage:
6+
status:
7+
project:
8+
default:
9+
# Require 1% coverage, i.e., always succeed
10+
target: 1
11+
patch: false
12+
changes: false
13+
14+
comment:
15+
layout: diff, flags, files
16+
behavior: once
17+
require_base: no

.coveragerc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[paths]
2+
source =
3+
project_name
4+
*/site-packages/saezlab_core
5+
6+
[run]
7+
branch = true
8+
parallel = true
9+
source = saezlab_core
10+
omit = */__init__.py
11+
12+
[report]
13+
exclude_lines =
14+
\#.*pragma:\s*no.?cover
15+
16+
if __name__ == .__main__.
17+
18+
^\s*raise AssertionError\b
19+
^\s*raise NotImplementedError\b
20+
^\s*return NotImplemented\b
21+
show_missing = true
22+
precision = 2

.cruft.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"template": "https://github.com/saezlab/python-project.git",
3+
"commit": "9994d74de08e6c13ae1c82fd47675347f1e3a79f",
4+
"checkout": "master",
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "saezlab_core",
8+
"project_slug": "saezlab_core",
9+
"package_name": "saezlab_core",
10+
"short_description": "This is session handler, configuration and logging handler for Saezlab packages and applications.",
11+
"readme": "This is session handler, configuration and logging handler for Saezlab packages and applications.",
12+
"author_full_name": "Edwin Carreño",
13+
"author_email": "ecarrenolozano@gmail.com",
14+
"github_organization": "saezlab",
15+
"project_repo": "https://github.com/saezlab/saezlab_core",
16+
"license": "MIT License",
17+
"_license": {
18+
"MIT License": {
19+
"license_short": "MIT",
20+
"license_classifiers": "MIT License",
21+
"license_spdx": "MIT"
22+
},
23+
"BSD 2-Clause License": {
24+
"license_short": "BSD-2-Clause",
25+
"license_classifiers": "BSD License",
26+
"license_spdx": "BSD-2-Clause"
27+
},
28+
"BSD 3-Clause License": {
29+
"license_short": "BSD-3-Clause",
30+
"license_classifiers": "BSD License",
31+
"license_spdx": "BSD-3-Clause"
32+
},
33+
"Apache License Version 2.0": {
34+
"license_short": "Apache-2.0",
35+
"license_classifiers": "Apache Software License",
36+
"license_spdx": "Apache-2.0"
37+
},
38+
"GNU General Public License Version 3": {
39+
"license_short": "GPL-3.0-or-later",
40+
"license_classifiers": "GNU General Public License v3 (GPLv3)",
41+
"license_spdx": "GPL-3.0-or-later"
42+
},
43+
"GNU Lesser General Public License Version 3": {
44+
"license_short": "LGPL-3.0-or-later",
45+
"license_classifiers": "GNU Lesser General Public License v3 (LGPLv3)",
46+
"license_spdx": "LGPL-3.0-or-later"
47+
},
48+
"ISC License": {
49+
"license_short": "ISC",
50+
"license_classifiers": "ISC License (ISCL)",
51+
"license_spdx": "ISC"
52+
},
53+
"Unlicense": {
54+
"license_short": "Unlicense",
55+
"license_classifiers": "The Unlicense (Unlicense)",
56+
"license_spdx": "Unlicense"
57+
}
58+
},
59+
"python_version": "3.10",
60+
"copyright_holder": "Heidelberg University Hospital",
61+
"__year": "2025",
62+
"_extensions": [
63+
"cookiecutter.extensions.TimeExtension"
64+
],
65+
"_copy_without_render": [
66+
".github/workflows/*.yml",
67+
".github/workflows/**.yaml",
68+
".github/actions/*"
69+
],
70+
"_template": "https://github.com/saezlab/python-project.git",
71+
"_commit": "9994d74de08e6c13ae1c82fd47675347f1e3a79f"
72+
}
73+
},
74+
"directory": null
75+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[Makefile]
12+
indent_style = tab

.github/actions/setup/action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Setup Python and Install Dependencies
2+
description: Sets up Python and installs dependencies using uv
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: actions/setup-python@v5
7+
with:
8+
python-version: ${{ inputs.python-version }}
9+
- name: Install uv
10+
shell: bash
11+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
12+
- name: Create virtualenv and install dependencies
13+
shell: bash
14+
run: |
15+
uv venv .venv
16+
source .venv/bin/activate
17+
uv pip install ".[dev,tests,docs]"
18+
inputs:
19+
python-version:
20+
required: true
21+
description: Python version to use in the matrix.

.github/workflows/ci-docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build MkDocs documentation
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-documentation:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Configure Git Credentials
16+
run: |
17+
git config user.name github-actions[bot]
18+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
19+
- uses: ./.github/actions/setup
20+
with:
21+
python-version: '3.12'
22+
- name: configure mkdocs-material cache
23+
uses: actions/cache@v4
24+
with:
25+
key: mkdocs-material-${{ github.run_id }}
26+
path: .cache
27+
restore-keys: |
28+
mkdocs-material-
29+
- name: Build documentation with mkdocs
30+
run: .venv/bin/mkdocs gh-deploy --force

.github/workflows/ci-linting.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Linting
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
linting:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: ./.github/actions/setup
11+
with:
12+
python-version: '3.13'
13+
- name: Run Ruff (lint + formatting + import order)
14+
run: .venv/bin/ruff check .
15+
- name: Run Ruff format check (like Black)
16+
run: .venv/bin/ruff format --check .

.github/workflows/ci-security.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Security Scan
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
security-check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-python@v5
11+
with:
12+
python-version: '3.12'
13+
- name: Install Bandit
14+
run: pip install bandit
15+
- name: Run Bandit
16+
run: bandit -r . --exclude venv,.venv,.tox --skip B101
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI testing [unit testing]
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: ./.github/actions/setup
11+
with:
12+
python-version: '3.13'
13+
- name: Run Ruff (lint + formatting + import order)
14+
run: .venv/bin/ruff check .
15+
- name: Run Ruff format check (like Black)
16+
run: .venv/bin/ruff format --check .
17+
18+
test:
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
python-version: ['3.10', '3.11', '3.12', '3.13']
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: ./.github/actions/setup
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Run tests with coverage
29+
run: |
30+
source .venv/bin/activate
31+
pytest --cov=omnigraph tests/
32+
- name: Upload coverage report
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: coverage-report
36+
path: .coverage*

0 commit comments

Comments
 (0)