Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b9d4a04
chore: removes old proof of concept
chalmerlowe Sep 11, 2025
5b4d538
removes old __init__.py
chalmerlowe Sep 11, 2025
132c571
Adds two utility files to handle basic tasks
chalmerlowe Sep 11, 2025
90b224e
Adds a configuration file for the microgenerator
chalmerlowe Sep 11, 2025
e071eab
Removes unused comment
chalmerlowe Sep 11, 2025
dc72a98
chore: adds noxfile.py for the microgenerator
chalmerlowe Sep 11, 2025
7318f0b
feat: microgen - adds two init file templates
chalmerlowe Sep 12, 2025
07910c5
feat: adds _helpers.py.js template
chalmerlowe Sep 12, 2025
dc54c99
Updates with two usage examples
chalmerlowe Sep 12, 2025
28de5f8
feat: adds two partial templates for creating method signatures
chalmerlowe Sep 12, 2025
c457754
feat: Add microgenerator __init__.py
chalmerlowe Sep 15, 2025
595e59f
feat: Add AST analysis utilities
chalmerlowe Sep 15, 2025
44a0777
feat: Add source file analysis capabilities
chalmerlowe Sep 15, 2025
3e9ade6
feat: adds code generation logic
chalmerlowe Sep 15, 2025
485b9d4
removes extraneous content
chalmerlowe Sep 15, 2025
a4276fe
feat: microgen - adds code generation logic
chalmerlowe Sep 15, 2025
1d0d036
feat: microgen - adds main execution and post-processing logic
chalmerlowe Sep 15, 2025
eff7223
minor tweak to markers
chalmerlowe Sep 15, 2025
0734bf8
feat: Add testing directory\n\nAdds the scripts/microgenerator/testin…
chalmerlowe Sep 16, 2025
510a87b
feat: Enhance to_snake_case to handle acronyms\n\nImproves the to_sna…
chalmerlowe Sep 16, 2025
a3117d8
feat: Add client.py.j2 template\n\nAdds the main Jinja2 template for …
chalmerlowe Sep 16, 2025
ae7d3e1
feat: Add _client_helpers.j2 partial template\n\nAdds a Jinja2 partia…
chalmerlowe Sep 16, 2025
82996d7
test: Add test_generate_analyzer.py from autogen
chalmerlowe Sep 16, 2025
44eb401
adds license text
chalmerlowe Sep 17, 2025
7a7b331
feat: adds type extraction tests
chalmerlowe Sep 18, 2025
548f0a9
Merge branch 'autogen' into test/adds-generate-typing-checks-2
chalmerlowe Sep 30, 2025
cb385ab
Merge branch 'autogen' into test/adds-generate-typing-checks-2
chalmerlowe Sep 30, 2025
2c06529
Merge branch 'autogen' into test/adds-generate-typing-checks-2
chalmerlowe Oct 6, 2025
bbea6cd
Merge branch 'autogen' into test/adds-generate-typing-checks-2
chalmerlowe Oct 7, 2025
62b8e5d
attempting to resolve a merge conflict
chalmerlowe Oct 7, 2025
68c55bc
Update scripts/microgenerator/testing/constraints-3.13.txt
chalmerlowe Oct 7, 2025
2bb5f85
minor tweaks to multiline strings in test inputs
chalmerlowe Oct 7, 2025
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
7 changes: 7 additions & 0 deletions scripts/microgenerator/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ def _get_type_str(self, node: ast.AST | None) -> str | None:
# Handles forward references as strings, e.g., '"Dataset"'
if isinstance(node, ast.Constant):
return repr(node.value)

# Handles | union types, e.g., int | float
if isinstance(node, ast.BinOp) and isinstance(node.op, ast.BitOr):
left_str = self._get_type_str(node.left)
right_str = self._get_type_str(node.right)
return f"{left_str} | {right_str}"

return None # Fallback for unhandled types

def _collect_types_from_node(self, node: ast.AST | None) -> None:
Expand Down
1 change: 1 addition & 0 deletions scripts/microgenerator/testing/constraints-3.13.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Comment thread
chalmerlowe marked this conversation as resolved.
Outdated
Loading
Loading