Skip to content
Merged

0.4.1 #616

Show file tree
Hide file tree
Changes from all commits
Commits
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
54 changes: 54 additions & 0 deletions dev/Multiprocessing POC/Multiprocessing POC.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1, 4, 9]\n"
]
}
],
"source": [
"from multiprocessing import Pool\n",
"from functions import f\n",
"\n",
"\n",
"with Pool(5) as p:\n",
" print(p.map(f, [1, 2, 3]))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "BlockScience",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
2 changes: 2 additions & 0 deletions dev/Multiprocessing POC/functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def f(x):
return x * x
1 change: 1 addition & 0 deletions dev/cadCAD Scratch/.obsidian/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions dev/cadCAD Scratch/.obsidian/appearance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
30 changes: 30 additions & 0 deletions dev/cadCAD Scratch/.obsidian/core-plugins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"properties": false,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": false
}
173 changes: 173 additions & 0 deletions dev/cadCAD Scratch/.obsidian/workspace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
{
"main": {
"id": "ebb1f7af23941637",
"type": "split",
"children": [
{
"id": "568d45caa507431d",
"type": "tabs",
"children": [
{
"id": "104134b1d981b567",
"type": "leaf",
"state": {
"type": "canvas",
"state": {
"file": "MSML cadCAD Architecture.canvas",
"viewState": {
"x": 173.7321486342915,
"y": 92.17958112430901,
"zoom": -0.2988097469011942
}
},
"icon": "lucide-layout-dashboard",
"title": "MSML cadCAD Architecture"
}
}
]
}
],
"direction": "vertical"
},
"left": {
"id": "e73f36936028d6e3",
"type": "split",
"children": [
{
"id": "029ed6d83ddc23dd",
"type": "tabs",
"children": [
{
"id": "fe4ee760909ef1a7",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical"
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "b005d680dfdcd155",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "8bbe726fc7efc331",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "a1ed7db625cdcfe6",
"type": "split",
"children": [
{
"id": "7dc8de8390d07cad",
"type": "tabs",
"children": [
{
"id": "9391e977b1f9e192",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "MSML cadCAD Architecture.canvas",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks for MSML cadCAD Architecture"
}
},
{
"id": "de8681df02472c23",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "MSML cadCAD Architecture.canvas",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links from MSML cadCAD Architecture"
}
},
{
"id": "e2678bce3695cc31",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "5439647b15bdca32",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "MSML cadCAD Architecture.canvas"
},
"icon": "lucide-list",
"title": "Outline of MSML cadCAD Architecture"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false
}
},
"active": "104134b1d981b567",
"lastOpenFiles": [
"Untitled.md",
"MSML cadCAD Architecture.canvas"
]
}
38 changes: 38 additions & 0 deletions dev/cadCAD Scratch/MSML cadCAD Architecture.canvas
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"nodes":[
{"id":"a6d1c3438e3eb4e1","x":280,"y":-280,"width":500,"height":640,"type":"group","label":"cadCAD User View"},
{"id":"b70dd39c3d751786","x":-100,"y":-280,"width":360,"height":580,"type":"group","label":"MSML-cadCAD Bridge Outputs"},
{"id":"a66ae27ec1859b01","x":-420,"y":-280,"width":260,"height":580,"type":"group","label":"MSML Dev View"},
{"id":"0c7ae0c823c829a9","x":-400,"y":-260,"width":220,"height":60,"type":"text","text":"MSML Object"},
{"id":"bbb1312697692952","x":-80,"y":-260,"width":240,"height":140,"type":"text","text":"cadCAD Model\n- Acts as a factory for generating experiments"},
{"id":"8e9e9cd0f2ed4507","x":-400,"y":160,"width":220,"height":120,"type":"text","text":"Blocks (Dynamics) -Will execute all sequentially for one \"step\" in MVP"},
{"id":"317162b129f622fd","x":-400,"y":80,"width":220,"height":60,"type":"text","text":"Parameter Preparation Functions"},
{"id":"cac35864b7b623bd","x":-400,"y":-20,"width":220,"height":80,"type":"text","text":"State Preparation Functions"},
{"id":"0a251eec55fbadaf","x":-400,"y":-150,"width":220,"height":70,"type":"text","text":"build_cadCAD(...)"},
{"id":"7a45b3e55b34f1a1","x":-40,"y":80,"width":250,"height":60,"type":"text","text":"State Space - Dictionary of state variables + types"},
{"id":"83ac341b0997ed52","x":-40,"y":180,"width":250,"height":60,"type":"text","text":"Parameter Space"},
{"id":"73de437b0ce0b423","x":-85,"y":-40,"width":250,"height":60,"type":"text","text":"build_experiment(state, parameters)"},
{"id":"eed778cc1965413f","x":360,"y":-260,"width":250,"height":60,"type":"text","text":"Writes state with type of StateSpace"},
{"id":"7a2060681be96243","x":360,"y":-175,"width":250,"height":60,"type":"text","text":"Writes parameters with type of ParameterSpace"},
{"id":"e1005f3dcf8fd223","x":360,"y":-70,"width":250,"height":180,"type":"text","text":"ExperimentObject\n- At init, sets parameter and state variable of object and runs state prep and param prep if present"},
{"id":"0fc9eb986c037b77","x":540,"y":190,"width":220,"height":150,"type":"text","text":"Run\n- State updated w/ multiple runs\n- Option to log all trajectory in list"},
{"id":"dd3b639fb23c6a14","x":300,"y":190,"width":185,"height":150,"type":"text","text":"Step\n- State updated w/ one run"}
],
"edges":[
{"id":"e26408cf783df197","fromNode":"0c7ae0c823c829a9","fromSide":"bottom","toNode":"0a251eec55fbadaf","toSide":"top","label":"class function"},
{"id":"1ef5bc8548306642","fromNode":"cac35864b7b623bd","fromSide":"left","toNode":"0a251eec55fbadaf","toSide":"left"},
{"id":"3bce4a56fce2ce4f","fromNode":"8e9e9cd0f2ed4507","fromSide":"left","toNode":"0a251eec55fbadaf","toSide":"left"},
{"id":"43ed4e3de30ccb1a","fromNode":"317162b129f622fd","fromSide":"left","toNode":"0a251eec55fbadaf","toSide":"left"},
{"id":"3a34b35e83d033fe","fromNode":"0a251eec55fbadaf","fromSide":"right","toNode":"bbb1312697692952","toSide":"left"},
{"id":"fd0fa4f5e8ee691a","fromNode":"0a251eec55fbadaf","fromSide":"right","toNode":"7a45b3e55b34f1a1","toSide":"left"},
{"id":"6fa7f5ea7310aecc","fromNode":"0a251eec55fbadaf","fromSide":"right","toNode":"83ac341b0997ed52","toSide":"left"},
{"id":"5faa2e303bc57a8a","fromNode":"bbb1312697692952","fromSide":"bottom","toNode":"73de437b0ce0b423","toSide":"top","label":"class function"},
{"id":"810922f3beef1a5a","fromNode":"83ac341b0997ed52","fromSide":"right","toNode":"7a2060681be96243","toSide":"right"},
{"id":"a6454fc03296dd06","fromNode":"7a45b3e55b34f1a1","fromSide":"right","toNode":"eed778cc1965413f","toSide":"right"},
{"id":"75eae6f79f689eb8","fromNode":"7a2060681be96243","fromSide":"left","toNode":"73de437b0ce0b423","toSide":"right"},
{"id":"daeae34e4a7c0624","fromNode":"eed778cc1965413f","fromSide":"left","toNode":"73de437b0ce0b423","toSide":"right"},
{"id":"52f937f41817fbf3","fromNode":"73de437b0ce0b423","fromSide":"right","toNode":"e1005f3dcf8fd223","toSide":"left"},
{"id":"02a6b575176162d1","fromNode":"e1005f3dcf8fd223","fromSide":"bottom","toNode":"dd3b639fb23c6a14","toSide":"top","label":"Class Fx"},
{"id":"26d6af604c11e792","fromNode":"e1005f3dcf8fd223","fromSide":"bottom","toNode":"0fc9eb986c037b77","toSide":"top","label":"Class Fx"}
]
}
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "math-spec-mapping"
version = "0.4.0"
version = "0.4.1"
authors = [
{ name="Sean McOwen", email="Sean@Block.Science" },
]
description = "A library for easy mapping of mathematical specifications."
dependencies = [
"graphviz>=0.20.1",
"ipython>=7.7.0",
"pandas>=1.4"
"pandas>=1.4",
"jsonschema>=4.21.1",
"PyGithub==2.5.0",
"dotenv",
"python-dotenv>=1.0.0"
]
readme = "README.md"
requires-python = ">=3.7"
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ graphviz>=0.20.1
ipython>=7.7.0
pandas>=1.4
jsonschema>=4.21.1
PyGithub=2.5.0
dotenv
PyGithub==2.5.0
python-dotenv>=1.0.0
Loading