Skip to content

Commit

Permalink
Feat/constraints (#16)
Browse files Browse the repository at this point in the history
* Updated parchmint deps

* Added initial version of the serialization and the new relationship mapping

* Updated teh constraint classes and added minimal tests for all of them

* Format code with black and isort

* Removed the component_spacing param from the datamodel

* reduced some errors in the mintcompiler

* Format code with black and isort

* Made some updates that I need to check on. The next step will be to update the tests and figure out why the graphs are not updating

* Added placeholder for testing files in future versions

* added first test file

* Updated the base structure for the layout constraint json

* Updated the constraint listener, seems to be working correctly for the 2 test cases.

TODO:
- verify the node test cases
- figure out how to check the json object equivalence

* Updated the test cases and added the json comparision code

* Format code with black and isort

* Added tests for mirror constraints

* Updated format for the mirror constraint for the conftest and the json for mirror_test1

* Updated the mirror constraint test json

* Updated the code for the baseline mirror constraint to work correctly

* -Updated the name of the function to make more sense.
-Finsihed the first pass implementation of the mirror constraint
with the brand new distance dictionary sytem
- Fixed error in the name of mirro_test4
- Unrolled all the test cases to make it easier to see
which cases failed

TODO - Expand to have all 8 test cases included here

* Changed the scope of DistanceDictionaries

* Test2 is working, needed to add a function to sort the arrays of the json objects

* Fixed error in the mirror_test

* Updated mirror constraint to not suck

* Got a basic bank_test1 working correctly

* Updated the formatting primarily

* Format code with black and isort

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
rkrishnasanka and deepsource-autofix[bot] committed May 30, 2022
1 parent 33fb127 commit 0665094
Show file tree
Hide file tree
Showing 54 changed files with 3,634 additions and 771 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
tags:
- "*.*.*"

jobs:
Release:
runs-on: ubuntu-latest

steps:
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.1
virtualenvs-create: false

- name: Get tag
id: tag
run: |
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: Checkout Code
- uses: actions/checkout@v2
with:
ref: ${{ steps.get_tag_name.outputs.tag }}
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
source $HOME/.poetry/env
poetry run poetry publish
14 changes: 13 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [


{
"name": "Debug - MINT Customfile",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/pymint/cmdline.py",
"args": [
"--outpath",
"./out/",
"${file}"
],
"console": "integratedTerminal"
},

{
"name": "Python: Current File",
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@
"python.formatting.blackArgs": [
"--line-length=88",
"--experimental-string-processing"
]
],
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
1 change: 1 addition & 0 deletions out/node_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name": "node_test", "components": [{"name": "n1", "id": "n1", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "n2", "id": "n2", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "n3", "id": "n3", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "p1", "id": "p1", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "PORT", "x-span": -1, "y-span": -1}, {"name": "p2", "id": "p2", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "PORT", "x-span": -1, "y-span": -1}, {"name": "p3", "id": "p3", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "PORT", "x-span": -1, "y-span": -1}], "connections": [{"sinks": [{"component": "n1", "port": null}], "name": "c1", "id": "c1", "source": {"component": "p1", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n2", "port": null}], "name": "c2", "id": "c2", "source": {"component": "n1", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n3", "port": null}], "name": "c3", "id": "c3", "source": {"component": "n2", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "p3", "port": null}], "name": "c4", "id": "c4", "source": {"component": "n3", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "p2", "port": null}], "name": "c5", "id": "c5", "source": {"component": "n2", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}], "params": {"x-span": null, "y-span": null}, "layers": [{"name": "FLOW_0", "id": "0", "type": "FLOW", "params": {}, "group": "0"}], "features": [], "version": "1.2", "valveMap": {}, "valveTypeMap": {}, "layoutConstraints": [{"type": "ORTHOGONAL_CONSTRAINT", "operation_type": "ALIGNMENT_OPERATION", "components": ["n1", "n2", "n3", "p3", "p2", "p1"], "connections": [], "params": {}, "relationships": {}}]}
1 change: 1 addition & 0 deletions out/node_test2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name": "node_test2", "components": [{"name": "n1", "id": "n1", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "n2", "id": "n2", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "n3", "id": "n3", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "p1", "id": "p1", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "PORT", "x-span": -1, "y-span": -1}, {"name": "p2", "id": "p2", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "PORT", "x-span": -1, "y-span": -1}, {"name": "p3", "id": "p3", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "PORT", "x-span": -1, "y-span": -1}, {"name": "p4", "id": "p4", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "PORT", "x-span": -1, "y-span": -1}, {"name": "lct1", "id": "lct1", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "LONG CELL TRAP", "x-span": -1, "y-span": -1}, {"name": "lct2", "id": "lct2", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "LONG CELL TRAP", "x-span": -1, "y-span": -1}, {"name": "n4", "id": "n4", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "n5", "id": "n5", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}, {"name": "n6", "id": "n6", "layers": ["0"], "params": {"position": [-1, -1]}, "ports": [], "entity": "NODE", "x-span": -1, "y-span": -1}], "connections": [{"sinks": [{"component": "n1", "port": null}], "name": "c1", "id": "c1", "source": {"component": "p1", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n2", "port": null}], "name": "c2", "id": "c2", "source": {"component": "n1", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n3", "port": null}], "name": "c3", "id": "c3", "source": {"component": "n2", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "p2", "port": null}], "name": "c4", "id": "c4", "source": {"component": "n3", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "lct1", "port": null}], "name": "c5", "id": "c5", "source": {"component": "n2", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "lct2", "port": null}], "name": "c6", "id": "c6", "source": {"component": "lct1", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n4", "port": null}], "name": "c7", "id": "c7", "source": {"component": "p3", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n5", "port": null}], "name": "c8", "id": "c8", "source": {"component": "n4", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n6", "port": null}], "name": "c9", "id": "c9", "source": {"component": "n5", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "p4", "port": null}], "name": "c10", "id": "c10", "source": {"component": "n6", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}, {"sinks": [{"component": "n5", "port": null}], "name": "c11", "id": "c11", "source": {"component": "lct2", "port": null}, "params": {}, "layer": "0", "paths": [], "entity": "CHANNEL"}], "params": {"x-span": null, "y-span": null}, "layers": [{"name": "FLOW_0", "id": "0", "type": "FLOW", "params": {}, "group": "0"}], "features": [], "version": "1.2", "valveMap": {}, "valveTypeMap": {}, "layoutConstraints": [{"type": "ORTHOGONAL_CONSTRAINT", "operation_type": "ALIGNMENT_OPERATION", "components": ["n1", "n2", "n3", "p2", "lct1", "p1"], "connections": [], "params": {}, "relationships": {}}, {"type": "ORTHOGONAL_CONSTRAINT", "operation_type": "ALIGNMENT_OPERATION", "components": ["n4", "p3", "n5", "lct2", "n6", "p4"], "connections": [], "params": {}, "relationships": {}}]}

0 comments on commit 0665094

Please sign in to comment.