Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2044e43
Added names.csv
ClaasRostock Apr 22, 2026
8b587f6
updated files in root folder with latest changes in python_project_te…
ClaasRostock Apr 22, 2026
cf686c7
Updated uv.lock
ClaasRostock Apr 22, 2026
3e86551
Added Visual Studio Code settings
ClaasRostock Apr 22, 2026
af3174e
(limited) updates of files in /src
ClaasRostock Apr 22, 2026
76c6643
(limited) updates of files in /tests
ClaasRostock Apr 22, 2026
6a57a35
updated Sphinx documentation with latest changes in python_project_te…
ClaasRostock Apr 22, 2026
e9d3bf0
ruff check --fix
ClaasRostock Apr 22, 2026
709636b
docs/source/assurance.rst: formatted
ClaasRostock Apr 22, 2026
dbe9880
Added GitHub workflows
ClaasRostock Apr 22, 2026
5e5a38a
ruff.toml: Temporarily deactivated docstring rules, to focus on the m…
ClaasRostock Apr 22, 2026
fe16e7d
tests/test_q.py: Replaced print by logger.info
ClaasRostock Apr 22, 2026
7e4cb03
Added GitHub Copilot instruction files
ClaasRostock Apr 22, 2026
b31f256
chore: clean up scripts and tests for ruff
ClaasRostock Apr 22, 2026
d6e4a84
refactor: tighten agent and wrapper typing
ClaasRostock Apr 22, 2026
1ea1bff
fix: align crane environments with lint and tests
ClaasRostock Apr 22, 2026
4b7d826
docs: add ruff-fix plan and changelog notes
ClaasRostock Apr 22, 2026
a0b8b3e
pyproject.toml: Added /scripts to the folders to be included in the b…
ClaasRostock Apr 22, 2026
31e354e
type: parameterize gym.Env in environment modules
ClaasRostock Apr 23, 2026
97c5556
type: parameterize wrapper base classes
ClaasRostock Apr 23, 2026
323b378
type: add type annotations to agent modules
ClaasRostock Apr 23, 2026
e87a823
type: tighten test fixture and parameter types
ClaasRostock Apr 23, 2026
2023e43
docs: add type-hints plan and update changelog
ClaasRostock Apr 23, 2026
ab9b757
type: add torch type stubs
ClaasRostock Apr 23, 2026
51d1cdf
type: add matplotlib type stubs
ClaasRostock Apr 23, 2026
3fab1c7
type: add stable-baselines3 type stubs
ClaasRostock Apr 23, 2026
b947e54
chore: remove stale type-ignore comments
ClaasRostock Apr 23, 2026
dbbaecb
docs: update changelog and add type-stubs plan
ClaasRostock Apr 23, 2026
88fe705
chore: remove stale type-ignore comments
ClaasRostock Apr 23, 2026
ba4c91d
chore: assign unused call results to _
ClaasRostock Apr 23, 2026
c87c710
fix: resolve pyright warnings in environment modules
ClaasRostock Apr 23, 2026
d83260f
fix: resolve pyright warnings in agents and wrappers
ClaasRostock Apr 23, 2026
431c704
fix: add type annotations in tests to resolve pyright warnings
ClaasRostock Apr 23, 2026
d9c30d0
docs: update changelog and plan for pyright fixes
ClaasRostock Apr 23, 2026
269944a
chore: remove nonexistent demos from mypy/pyright config
ClaasRostock Apr 23, 2026
dd5c7e6
fix(mypy): drop _ = from void-returning function calls
ClaasRostock Apr 23, 2026
8ca2c2b
fix(mypy): correct type: ignore error codes for mypy+pyright compat
ClaasRostock Apr 23, 2026
2dd2e7d
fix(mypy): remove duplicate self.steps annotation
ClaasRostock Apr 23, 2026
01785ee
fix(mypy): suppress render() override for gymnasium RenderFrame TypeVar
ClaasRostock Apr 23, 2026
1fd0c0b
fix(mypy): initialize running_g as float
ClaasRostock Apr 23, 2026
07d043b
docs: update changelog and plan for mypy fixes
ClaasRostock Apr 23, 2026
c19620a
docs: reformat docstrings in algorithm.py to numpy-style
ClaasRostock Apr 23, 2026
7ebcab6
docs: reformat docstrings in q_agent.py to numpy-style
ClaasRostock Apr 23, 2026
906e9af
docs: reformat docstrings in reinforce_agent.py to numpy-style
ClaasRostock Apr 23, 2026
09811b1
docs: reformat docstrings in ppo_agent.py to numpy-style
ClaasRostock Apr 23, 2026
6ae52dc
docs: reformat docstrings in controlled_crane_pendulum.py to numpy-style
ClaasRostock Apr 23, 2026
182c8bc
docs: reformat docstrings in controlled_mobile_crane.py to numpy-style
ClaasRostock Apr 23, 2026
856c60e
docs: reformat docstrings in scripts to numpy-style
ClaasRostock Apr 23, 2026
51a27c3
docs: update changelog and plan for docstring reformatting
ClaasRostock Apr 23, 2026
7b5334f
docs: replace em-dash with ASCII hyphen in docstrings
ClaasRostock Apr 23, 2026
7dfdbf3
docs: add missing __init__ docstrings (D107)
ClaasRostock Apr 23, 2026
c594f15
docs: add missing public method docstrings (D102)
ClaasRostock Apr 23, 2026
6504009
docs: add missing public function docstrings (D103)
ClaasRostock Apr 23, 2026
f4733f9
docs: add missing public class docstrings (D101)
ClaasRostock Apr 23, 2026
a3c3f2c
docs: add missing module docstrings (D100)
ClaasRostock Apr 23, 2026
1e8420d
docs: reactivate D10x rules and update changelog
ClaasRostock Apr 23, 2026
3d1c103
chore: feed back session learnings into instructions and plan templates
ClaasRostock Apr 23, 2026
70a9ac5
chore: add baseline sections to existing plan drafts
ClaasRostock Apr 23, 2026
9889420
chore: add baseline sections to remaining plan drafts
ClaasRostock Apr 23, 2026
a6d68c1
src/crane_controller/envs/controlled_mobile_crane.py: Lifted mypy ign…
ClaasRostock Apr 23, 2026
c0b12cc
resolved issues raised by sourcery
ClaasRostock Apr 23, 2026
018c1c9
Resolving reminaing minor issues raised by pyright and mypy
ClaasRostock Apr 23, 2026
8d72bdb
Removed plan.md files of yesterdays and todays Copilot sessions
ClaasRostock Apr 23, 2026
b692b83
updated CHANGELOG.md
ClaasRostock Apr 23, 2026
cb626ab
Bumped version number to 0.0.1
ClaasRostock Apr 23, 2026
0a7a23c
Updated CHANGELOG.md
ClaasRostock Apr 23, 2026
17a1b06
tests/conftest.py: Resolved minor issue raised by pyright
ClaasRostock Apr 23, 2026
bc8e2d5
Updated uv.lock
ClaasRostock Apr 23, 2026
834a280
GitHub workflows: Reduced tested Python versions to 3.11, 3.12, 3.13 …
ClaasRostock Apr 23, 2026
a2bbcd2
test: skip slow test_algorithm_strategies in CI workflows
ClaasRostock Apr 23, 2026
1137696
docs: update CHANGELOG with slow test marker change
ClaasRostock Apr 23, 2026
f169294
merge: integrate main (PR #3 dtype fix + VecNormalize, PR #4 test cle…
Copilot Apr 24, 2026
2cd304d
fix: address review comments - add venv accessor comment in ppo_agent.py
Copilot Apr 24, 2026
4117ec0
docs: create plan.md for all 7 code quality plans
Copilot Apr 24, 2026
64ededa
docs: apply session learnings to plan-draft and instruction files
Copilot Apr 24, 2026
67727a7
docs: remove plan.md files created this session
Copilot Apr 24, 2026
a930924
docs: add plan for fixing pyright errors
ClaasRostock Apr 24, 2026
ae2d1e6
fix: resolve pyright errors by narrowing obs type in test
ClaasRostock Apr 24, 2026
d8424ea
docs: add plan for fixing mypy errors
ClaasRostock Apr 24, 2026
f0bd2ea
fix: resolve mypy attr-defined error in test_ppo_vecnorm_updates
ClaasRostock Apr 24, 2026
8478d82
refactor: replace stale type: ignore with pyright: ignore
ClaasRostock Apr 24, 2026
fcccf83
docs: refine plan-drafts and instructions with type-ignore divergence…
ClaasRostock Apr 24, 2026
df756b5
docs: remove fix-pyright and fix-mypy plan.md files
ClaasRostock Apr 24, 2026
eec8b23
Updated CHANGELOG.md
ClaasRostock Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[paths]
source =
src/crane_controller
*/site-packages/crane_controller

[run]
source = crane_controller
branch = True

[report]
fail_under = 10.0
show_missing = True
skip_covered = True
15 changes: 15 additions & 0 deletions .editorconfig
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
36 changes: 36 additions & 0 deletions .gitattributes
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
98 changes: 98 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# GitHub Copilot – Project Instructions

This repository uses a **hybrid instruction model**:

- **Portable, tool-agnostic rules live in the repository root**
- **GitHub-specific scoping and activation live under `.github/`**

GitHub Copilot and GitHub Agents must treat the files below as the
authoritative source of project behavior.

---

## Primary Instruction Sources (Authoritative)

Always load and follow these files first:

- `/.instructions.md`
Project-wide engineering rules, quality standards, and constraints.

- `/.prompt.md`
Default working style and agent execution discipline.

- `/plans/plan.md` or `/plans/plan-draft.md` (when present)
Explicit plan / orchestration artifact for Plan Mode workflows.
The presence of `/plans/plan.md` or `/plans/plan-draft.md` indicates that a plan-first workflow is expected.
`/plans/.plan.md` serves as a template and should not be modified directly.

These files form the **knowledge contract** for this repository and
are reviewed and maintained like production code.

---

## GitHub-Scoped Instructions (Additive)

Additional GitHub-specific guidance MAY apply from:

- `.github/instructions/*.instructions.md`
Narrow, scoped rules using `applyTo` (must not contradict root rules).

- `.github/prompts/*.prompt.md`
Reusable GitHub workflows (feature implementation, reviews, refactors).

- `.github/agents/*.agent.md`
Named agent personas, if explicitly activated.

GitHub-scoped files **refine or specialize** behavior.
They must never redefine or override the intent of `/.instructions.md`.

---

## Precedence & Conflict Resolution

If multiple instructions apply, resolve conflicts in this order:

1. Scoped `.github/instructions/*.instructions.md` (most specific — may only **narrow or refine** root rules, never override or contradict them)
2. `/.instructions.md`
3. `/.prompt.md`

When in doubt:
- Prefer correctness, testability, and clarity over speed
- Ask for clarification rather than guessing

---

## Safety & Boundaries

- Work only within this repository
- Do not assume network or internet access unless explicitly stated
- Do not introduce hidden side effects, hooks, or background behavior
- Do not change unrelated code opportunistically

All agent output is subject to human review and normal PR processes.

---

## Agent Operating Mode

Use a **plan-first workflow** by default:

1. Restate the task and assumptions
2. Produce or update `plan.md` (unless instructed otherwise)
3. Wait for confirmation if scope is ambiguous
4. Implement incrementally
5. Verify with tests
6. Summarize changes and remaining risks

This discipline is mandatory for non-trivial changes.

---

## Intentional Non-Goals

- This file does **not** contain detailed coding rules
(those belong in `/.instructions.md`)
- This file does **not** encode organization policy or governance logic
- This file avoids duplication by design

Less is intentional. Stability is a feature.
107 changes: 107 additions & 0 deletions .github/workflows/_build_and_publish_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Build and publish documentation

on: workflow_call

env:
DEFAULT_BRANCH: 'release'
#SPHINXOPTS: '-W --keep-going -T'
# ^-- If these SPHINXOPTS are enabled, then be strict about the builds and fail on any warnings

jobs:
build-and-publish-docs:
name: Build and publish documentation
runs-on: ubuntu-latest
steps:
- name: Checkout active branch
uses: actions/checkout@v5
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Install the project
run: uv sync --frozen
- name: Print debugging information
run: |
echo "github.ref:" ${{github.ref}}
echo "github.event_name:" ${{github.event_name}}
echo "github.head_ref:" ${{github.head_ref}}
echo "github.base_ref:" ${{github.base_ref}}
set -x
git rev-parse --abbrev-ref HEAD
git branch
git branch -a
git remote -v
uv run python -V
uv pip list

# Build documentation
- uses: sphinx-doc/github-problem-matcher@master
- name: Build documentation
run: |
cd docs
uv run make html

- name: Clone and cleanup gh-pages branch
run: |
set -x
git fetch
( git branch gh-pages remotes/origin/gh-pages && git clone . --branch=gh-pages _gh-pages/ ) || mkdir _gh-pages
rm -rf _gh-pages/.git/
mkdir -p _gh-pages/branch/

# Delete orphaned branch-folders:
# Go through each subfolder in _gh-pages/branch/
# If it relates to an orphaned branch, delete it.
- name: Delete orphaned branch-folders
run: |
set -x
for brdir in `ls _gh-pages/branch/` ; do
brname=${brdir//--/\/} # replace '--' with '/'
if ! git show-ref remotes/origin/$brname ; then
echo "Removing $brdir"
rm -r _gh-pages/branch/$brdir/
fi
done

# Copy documentation to _gh-pages/ (if push happened on release branch)
- name: Copy documentation to _gh-pages/
if: |
contains(github.ref, env.DEFAULT_BRANCH)
run: |
set -x
# Delete everything under _gh-pages/ that is from the
# primary branch deployment. Excludes the other branches
# _gh-pages/branch-* paths, and not including
# _gh-pages itself.
find _gh-pages/ -mindepth 1 ! -path '_gh-pages/branch*' -delete
rsync -a docs/build/html/ _gh-pages/

# Copy documentation to _gh-pages/branch/$brname (if push happened on any other branch)
# ('/' gets replaced by '--')
- name: Copy documentation to _gh-pages/branch/${{github.ref}}
if: |
!contains(github.ref, env.DEFAULT_BRANCH)
run: |
set -x
#brname=$(git rev-parse --abbrev-ref HEAD)
brname="${{github.ref}}"
brname="${brname##refs/heads/}"
brdir=${brname//\//--} # replace '/' with '--'
rm -rf _gh-pages/branch/${brdir}
rsync -a docs/build/html/ _gh-pages/branch/${brdir}

# Add .nojekyll file
- name: Add .nojekyll file
run: touch _gh-pages/.nojekyll

# Publish: Commit gh-pages branch and publish it to GitHub Pages
- name: Publish documentation
uses: peaceiris/actions-gh-pages@v4
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _gh-pages/
force_orphan: true
29 changes: 29 additions & 0 deletions .github/workflows/_build_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Package

on: workflow_call

jobs:
build:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
lfs: true
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Build source distribution and wheels
run: uv build
- name: Check build artifacts
run: uvx twine check --strict dist/*
- name: Upload build artifacts
uses: actions/upload-artifact@v5
with:
name: dist
path: |
dist/*.tar.gz
dist/*.whl
68 changes: 68 additions & 0 deletions .github/workflows/_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Code Quality

on: workflow_call

jobs:
ruff_format:
runs-on: ubuntu-latest
name: ruff format
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Install the project
run: uv sync -U
- name: Run ruff format
run: uv run ruff format --diff

ruff_check:
runs-on: ubuntu-latest
name: ruff check
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Install the project
run: uv sync -U
- name: Run ruff check
run: uv run ruff check --diff

pyright:
runs-on: ubuntu-latest
name: pyright
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Install the project
run: uv sync -U
- name: Run pyright
run: uv run pyright

mypy:
runs-on: ubuntu-latest
name: mypy
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Install the project
run: uv sync -U
- name: Run mypy
run: uv run mypy
26 changes: 26 additions & 0 deletions .github/workflows/_merge_into_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Merge into release

on:
workflow_call:
secrets:
RELEASE_TOKEN:
required: true

jobs:
merge_into_release:
name: Merge ${{ github.event.ref }} -> release branch
runs-on: ubuntu-latest
environment: release
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
# Fetch the whole history to prevent unrelated history errors
fetch-depth: 0
# The branch you want to checkout (usually equal to `branchtomerge`)
# ref: ${{ github.event.ref }}
- uses: devmasx/merge-branch@v1.4.0
with:
type: now
target_branch: release
github_token: ${{ secrets.RELEASE_TOKEN }}
Loading