-
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
Updates #1
Merged
Merged
Updates #1
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4bbb38a
fix requirements
gonzalocasas 2a02125
Capitalize constant
gonzalocasas 5eb7214
Configure black
gonzalocasas 664ce06
blacken
gonzalocasas a981f10
Cleanup unused imports, reformat, and make sure lint passes
gonzalocasas 289d3ae
build matrix
gonzalocasas 437a691
Disable tests on src
gonzalocasas 11d77c1
Ignore built artifacts
gonzalocasas 8bae4f1
Add installable aixd_grasshopper package
gonzalocasas bf858cb
Add documentation, gh component install, and dev workflow
gonzalocasas 04db11e
build fixes
gonzalocasas 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
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
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 |
---|---|---|
|
@@ -116,5 +116,6 @@ temp/** | |
.vscode | ||
|
||
docs/api/generated/ | ||
src/aixd_grasshopper/components/ghuser/ | ||
|
||
conda.recipe/ |
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
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
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,4 +1,73 @@ | ||
# aixd_grasshopper | ||
# AI-eXtended Design (AIXD): Grasshopper plugin | ||
|
||
Grasshopper plugin for the AIXD toolkit | ||
Grasshopper plugin for the AIXD toolkit. | ||
|
||
## Installation | ||
|
||
#### Requirements: | ||
|
||
- Python >= 3.9 | ||
- compas > 2.0 | ||
- flask | ||
|
||
#### Latest stable version | ||
Install `aixd_grasshopper` using `pip` | ||
``` | ||
pip install aixd_grasshopper | ||
``` | ||
|
||
Install `aixd_grasshopper` using `conda`: | ||
``` | ||
conda install -c conda-forge aixd_grasshopper | ||
``` | ||
|
||
**Note**: It is recommended to use virtual environments to manage the dependencies of your projects. If you are using | ||
`conda`, you can create a new environment with `conda create -n myproject python=3.9` and then activate it with | ||
`conda activate myproject` before installing `aixd_grasshopper`. | ||
|
||
#### Latest unstable version | ||
|
||
Install the latest version using `pip` from the git repository: | ||
``` | ||
pip install --upgrade git+https://github.com/gramaziokohler/aixd_grasshopper.git | ||
``` | ||
|
||
## Development | ||
|
||
If you are going to develop on this repository, perform an installation from source: | ||
|
||
```bash | ||
git clone https://github.com/gramaziokohler/aixd_grasshopper.git | ||
cd aixd_grasshopper | ||
``` | ||
|
||
Then, install using conda, to install all the dependencies into a new environment called `aixd_gh`: | ||
```bash | ||
conda env create -f environment.yml | ||
``` | ||
|
||
Or using pip: | ||
```bash | ||
pip install -e ".[dev]" | ||
``` | ||
|
||
Finally, build Grasshopper components and install on Rhino/GH: | ||
|
||
```bash | ||
invoke build-ghuser-components | ||
python -m compas_rhino.install -v 7.0 | ||
``` | ||
|
||
For more details on how the process of building components work, refer to [this docs](https://github.com/compas-dev/compas-actions.ghpython_components). | ||
|
||
Check the [contribution guidelines](CONTRIBUTING.md) for more details. | ||
|
||
## Folders and structure | ||
|
||
The structure we follow on the current repo is as follows: | ||
|
||
* `src` : for all source code. | ||
* `src/aixd_grasshopper` : source code of `aixd_grasshopper` plugin. | ||
* `src/aixd_grasshopper/components` : source code of the GH components. | ||
* `src/aixd_grasshopper/ghuser_manual` : binary components, pre-built. | ||
* `src/compas_aixd` : source code of the connector to COMPAS infrastructure. |
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,11 @@ | ||
name: aixd_gh | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.9 | ||
- compas >2,<3 | ||
- flask | ||
- pip | ||
- pip: | ||
- -e ".[dev]" | ||
prefix: "/opt/conda" |
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
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,13 +1 @@ | ||
attrs >=17.4 | ||
black ==22.12.0 | ||
bump2version >=1.0.1 | ||
check-manifest >=0.36 | ||
compas_invocations | ||
doc8 | ||
flake8 | ||
invoke >=0.14 | ||
isort | ||
sphinx_compas2_theme | ||
twine | ||
wheel | ||
-e . | ||
-e ".[dev]" |
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 +1,3 @@ | ||
aixd >=0.10.0 | ||
compas >2,<3 | ||
flask |
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
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
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 +1 @@ | ||
from __future__ import absolute_import | ||
from __future__ import absolute_import |
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,3 +1,4 @@ | ||
# flake8: noqa | ||
from aixd_grasshopper.wrappers import WrapperShallowDataObject | ||
|
||
if not dim or dim < 1: | ||
|
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,3 +1,4 @@ | ||
# flake8: noqa | ||
from aixd_grasshopper.wrappers import WrapperShallowDataObject | ||
|
||
if not dim or dim < 1: | ||
|
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,3 +1,4 @@ | ||
# flake8: noqa | ||
from aixd_grasshopper.wrappers import WrapperShallowDataObject | ||
|
||
if not dim or dim < 1: | ||
|
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,3 +1,4 @@ | ||
# flake8: noqa | ||
from aixd_grasshopper.wrappers import WrapperShallowDataObject | ||
|
||
if not dim or dim < 1: | ||
|
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
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
6 changes: 4 additions & 2 deletions
6
src/aixd_grasshopper/components/aixd_DatasetOneSample/code.py
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
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
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,3 +1,4 @@ | ||
# flake8: noqa | ||
summarytxt = {} # key =obj name, values= [req, pred, real] | ||
|
||
request_dict = {} | ||
|
Oops, something went wrong.
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.
what is "compas_aixd"?
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.
This is related to our need to hook up on the
python -m compas_rhino.install
step, the way we hook up to it is by declaring a few small plugins in our code. A plugin is just a function that can be automatically detected by compas to serve some function, there are different types but two of these types that we need are: 1) a plugin that will do declare which packages to make available inside rhino, and 2) what happens after install and uninstall (in our case, we install and uninstall the GH components respectively).However, in order to detect plugins, compas has the requirement that the package name is prefixed with
compas_
. So,compas_aixd
is basically an almost empty package that only contains the "pointers" to where the plugins mentioned before are located inaixd_grasshopper
. You can identify the plugins because they are marked with a decorator (@compas.plugins.plugin
).