-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add package build doc #32
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
85411d8
paste JL's instruction
leijerry888 0edde75
modify version number in poetry
leijerry888 24c9383
add how to push constrain update to pypi
leijerry888 5504ee4
Add instructions for building the documentation locally.
lymereJ c0873b4
Merge branch 'develop' into add_package_build_doc
leijerry888 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
Comment on lines
+39
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added instruction on how to build the documentation since I've been working on updating it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]>", "Chen, Yan <[email protected]>", "Lerond, Jeremy <[email protected]>", "Jung, Yun Joon <[email protected]>"] | ||
readme = "README.md" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add instructions for Windows? Or at least specify that this is for Unix?