diff --git a/docs/DEVELOPER.md b/docs/DEVELOPER.md new file mode 100644 index 00000000..a1dd9249 --- /dev/null +++ b/docs/DEVELOPER.md @@ -0,0 +1,44 @@ +# Instructions for packaging ConStrain package locally with Poetry + +ConStrain can be made a pip-able Python package using `poetry`. Here's a quick guide to go about creating the package, installing it, and testing it. + +## Install `poetry` +``` +curl -sSL https://install.python-poetry.org | python3 - +``` +## Build `constrain` using `poetry` +From the root of the repository: +``` +poetry build +``` +## Install the package +From the root of the repository: +``` +pip install .\dist\constrain-0.3.1-py3-none-any.whl +``` +## Testing the package on one of the example scripts +``` +python .\demo\G36_demo\g36_demo_workflow_runner.py +``` +Should output something similar to the following: +``` +[...] +Running state 12: [Success] ... Congratulations! the demo workflow is executed with expected results and no error! +Done. -- [22:19:51] +Workflow done at 22:19:51, a total of 12 states were executed in 0:00:33.789468. +``` +## Run tests locally +``` +poetry run pytest tests +``` + +# Publish ConStrain to Pypi + +`poetry build` then `poetry publish` + +# Build the Documentation locally + +- Install sphinx: `pip install sphinx==7.3.7` +- Build documentation: `poetry run sphinx-build .\docs\source\ .\docs\` + +This will create all the `*.html` files in the `.\docs` folder. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ed74063e..769076ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ConStrain" -version = "0.3.2" +version = "0.4.0" description = "ConStrain is a data-driven knowledge-integrated framework that automatically verifies that building system controls function as intended." authors = ["Lei, Xuechen ", "Chen, Yan ", "Lerond, Jeremy ", "Jung, Yun Joon "] readme = "README.md"