Skip to content

Commit

Permalink
Added Routes to BCF (IfcOpenShell#1644)
Browse files Browse the repository at this point in the history
  • Loading branch information
TestPrab authored Aug 12, 2021
1 parent 4b64e09 commit 7a5b15e
Show file tree
Hide file tree
Showing 20 changed files with 845 additions and 87 deletions.
17 changes: 9 additions & 8 deletions src/bcf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ A simple Python implementation of BCF. The data model is described in `data.py`.
Manipulation of BCF-XML is available via `bcfxml.py` and manipulation of BCF-API
is available via `bcfapi.py`.

- BCF-XML version 2.1: Fully supported
- BCF-API version 2.1: Not supported, will probably tackle this after BCF-API v3.0
- BCF-XML version 3.0: Almost fully supported, except for the documents module
- BCF-API version 3.0: Almost fully supported, except for two requests.
- BCF-XML version 2.1: Fully supported
- BCF-API version 2.1: Not supported, will probably tackle this after BCF-API v3.0
- BCF-XML version 3.0: Almost fully supported, except for the documents module
- BCF-API version 3.0: Almost fully supported, except for two requests.

## bcfxml

Expand Down Expand Up @@ -73,9 +73,9 @@ auth_methods = foundation_client.get_auth_methods()

# Our library currently only implements the authorization_code flow
if "authorization_code" in auth_methods:
auth_client.login()
foundation_client.login()

bcf_client = BcfClient()
bcf_client = BcfClient(foundation_client)

versions = foundation_client.get_versions()
for version in versions:
Expand All @@ -94,7 +94,8 @@ print(data)
```

## Todo List

The remaining work that needs to be completed in `bcfxml.py` and `bcfapi.py`.
* For `bcfxml.py` two xsds support is remaining namely 'documents.xsd` and `extensions.xsd`.
* For `bcfapi.py` two requests that are `get_topics` and `get_comments` are remaining.

- For `bcfxml.py` two xsds support is remaining namely 'documents.xsd`and`extensions.xsd`.
- For `bcfapi.py` two requests that are `get_topics` and `get_comments` are remaining.
51 changes: 0 additions & 51 deletions src/bcfserver/bcf/routes.py

This file was deleted.

File renamed without changes.
71 changes: 71 additions & 0 deletions src/foundationserver/bcfserver/bcf/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"Projects":[{
"project_id": "F445F4F2-4D02-4B2A-B612-5E456BEF9137",
"name": "Example project 1",
"authorization": {
"project_actions": [
"createTopic",
"createDocument"
]
}
},
{
"project_id": "A233FBB2-3A3B-EFF4-C123-DE22ABC8414",
"name": "Example project 2",
"authorization": {
"project_actions": []
}
}],
"Extensions":[{
"topic_type": [
"Information",
"Error"
],
"topic_status": [
"Open",
"Closed",
"ReOpened"
],
"topic_label": [
"Architecture",
"Structural",
"MEP"
],
"snippet_type": [
".ifc",
".csv"
],
"priority": [
"Low",
"Medium",
"High"
],
"users": [
"[email protected]",
"[email protected]",
"[email protected]"
],
"stage": [
"Preliminary Planning End",
"Construction Start",
"Construction End"
],
"project_actions": [
"update",
"createTopic",
"createDocument"
],
"topic_actions": [
"update",
"updateBimSnippet",
"updateRelatedTopics",
"updateDocumentReferences",
"updateFiles",
"createComment",
"createViewpoint"
],
"comment_actions": [
"update"
]
}]
}
Loading

0 comments on commit 7a5b15e

Please sign in to comment.