Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Mar 19, 2024
1 parent ec13da2 commit 8227aac
Show file tree
Hide file tree
Showing 3 changed files with 305 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: aps-toolkit in c:\\python311\\lib\\site-packages (0.0.8)Note: you may need to restart the kernel to use updated packages.\n",
"\n",
"Requirement already satisfied: aps-toolkit in c:\\python311\\lib\\site-packages (0.3.7)\n",
"Collecting aps-toolkit\n",
" Downloading aps_toolkit-0.3.8-py3-none-any.whl.metadata (2.0 kB)\n",
"Requirement already satisfied: requests in c:\\python311\\lib\\site-packages (from aps-toolkit) (2.31.0)\n",
"Requirement already satisfied: pandas in c:\\python311\\lib\\site-packages (from aps-toolkit) (2.2.1)\n",
"Requirement already satisfied: numpy<2,>=1.23.2 in c:\\python311\\lib\\site-packages (from pandas->aps-toolkit) (1.26.0)\n",
Expand All @@ -57,7 +58,18 @@
"Requirement already satisfied: idna<4,>=2.5 in c:\\python311\\lib\\site-packages (from requests->aps-toolkit) (3.4)\n",
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\python311\\lib\\site-packages (from requests->aps-toolkit) (2.0.4)\n",
"Requirement already satisfied: certifi>=2017.4.17 in c:\\python311\\lib\\site-packages (from requests->aps-toolkit) (2023.7.22)\n",
"Requirement already satisfied: six>=1.5 in c:\\python311\\lib\\site-packages (from python-dateutil>=2.8.2->pandas->aps-toolkit) (1.16.0)\n"
"Requirement already satisfied: six>=1.5 in c:\\python311\\lib\\site-packages (from python-dateutil>=2.8.2->pandas->aps-toolkit) (1.16.0)\n",
"Downloading aps_toolkit-0.3.8-py3-none-any.whl (45 kB)\n",
" ---------------------------------------- 0.0/45.2 kB ? eta -:--:--\n",
" ------------------ --------------------- 20.5/45.2 kB 330.3 kB/s eta 0:00:01\n",
" ---------------------------------------- 45.2/45.2 kB 554.4 kB/s eta 0:00:00\n",
"Installing collected packages: aps-toolkit\n",
" Attempting uninstall: aps-toolkit\n",
" Found existing installation: aps-toolkit 0.3.7\n",
" Uninstalling aps-toolkit-0.3.7:\n",
" Successfully uninstalled aps-toolkit-0.3.7\n",
"Successfully installed aps-toolkit-0.3.8\n",
"Note: you may need to restart the kernel to use updated packages.\n"
]
}
],
Expand All @@ -74,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2024-03-02T14:12:22.214171Z",
Expand All @@ -89,7 +101,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2024-03-02T14:12:23.004384Z",
Expand All @@ -103,7 +115,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 29,
"metadata": {
"ExecuteTime": {
"end_time": "2024-03-02T14:12:23.009480Z",
Expand All @@ -112,26 +124,33 @@
},
"outputs": [],
"source": [
"urn = \"dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLjAtYnBtcEpXUWJTRUVNdUFac1VETWc_dmVyc2lvbj0yNQ\""
"urn = \"dXJuOmFkc2sud2lwcHJvZDpmcy5maWxlOnZmLk9kOHR4RGJLU1NlbFRvVmcxb2MxVkE_dmVyc2lvbj0yNA\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Reader"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Metadata"
"### Reader With Default View"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this notebook, we able to get all metadata from the item in ACC ot bucket storage"
"In this notebook, we able to get all metadata from the item in ACC or bucket storage"
]
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 30,
"metadata": {
"ExecuteTime": {
"end_time": "2024-03-02T14:12:31.994676Z",
Expand All @@ -144,6 +163,87 @@
"prop_reader = PropReader(urn, token)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Reader With View SVF Custom"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the case with many derivative items svf"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"from aps_toolkit import Derivative\n",
"derivative = Derivative(urn, token,\"US\")"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"MyRoom.svf\n",
"Chair.svf\n",
"Bed.svf\n",
"3D_MyHouse.svf\n",
"{3D - Chuong_Ho}.svf\n",
"3D_Data Xchange.svf\n",
"{3D - vanchuong_ho}.svf\n",
"Project Completion.svf\n"
]
}
],
"source": [
"items = derivative.read_svf_manifest_items()\n",
"for item in items:\n",
" print(item.path_info.root_file_name)"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Guid: a4e4238d-a839-5b6a-ad55-42f5e125f820\n",
"Root File Name Item: MyRoom.svf\n",
"Path: ['../../objects_attrs.json.gz', '../../objects_vals.json.gz', '../../objects_ids.json.gz', '../../objects_viewables.json.gz', '../../objects_offs.json.gz', '../../objects_avs.json.gz', 'Materials.json.gz', 'CameraDefinitions.bin', 'LightDefinitions.bin', '0.pf', '1.pf', '2.pf', '3.pf', '4.pf', '5.pf', 'GeometryMetadata.pf', 'FragmentList.pack', 'CameraList.bin', 'LightList.bin', 'InstanceTree.bin', 'Set.bin']\n"
]
}
],
"source": [
"item = items[0]\n",
"print(\"Guid: \", item.guid)\n",
"print(\"Root File Name Item: \", item.path_info.root_file_name)\n",
"print(\"Path: \", item.path_info.files)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
"prop_reader = PropReader(urn, token,\"US\",items[1])"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -164,16 +264,16 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<aps_toolkit.PropReader.Property at 0x216ebf12010>"
"<aps_toolkit.PropReader.Property at 0x231a4ce4c90>"
]
},
"execution_count": 8,
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -185,14 +285,14 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'Organization Name': 'Group',\n",
" 'Organization Description': 'Design, Engineering & Construction',\n",
"{'Organization Name': '',\n",
" 'Organization Description': '',\n",
" 'Building Name': '',\n",
" 'Author': '',\n",
" 'IfcSite GUID': '',\n",
Expand All @@ -204,12 +304,13 @@
" 'Project Address': 'Enter address here',\n",
" 'Project Name': 'Project Name',\n",
" 'Project Number': 'Project Number',\n",
" 'Data.Hello.Parquet': 0,\n",
" 'Workset': 'Project Info',\n",
" 'Edited by': '',\n",
" 'Route Analysis Settings': ''}"
]
},
"execution_count": 9,
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -220,14 +321,14 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'Identity Data': [('Organization Name', 'Group'),\n",
" ('Organization Description', 'Design, Engineering & Construction'),\n",
"{'Identity Data': [('Organization Name', ''),\n",
" ('Organization Description', ''),\n",
" ('Building Name', ''),\n",
" ('Author', ''),\n",
" ('Workset', 'Project Info'),\n",
Expand All @@ -241,10 +342,11 @@
" ('Project Address', 'Enter address here'),\n",
" ('Project Name', 'Project Name'),\n",
" ('Project Number', 'Project Number')],\n",
" 'Dimensions': [('Data.Hello.Parquet', 0)],\n",
" 'Route Analysis': [('Route Analysis Settings', '')]}"
]
},
"execution_count": 10,
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -255,7 +357,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 40,
"metadata": {},
"outputs": [
{
Expand All @@ -264,7 +366,7 @@
"2"
]
},
"execution_count": 11,
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -276,7 +378,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 41,
"metadata": {},
"outputs": [
{
Expand All @@ -285,7 +387,7 @@
"[]"
]
},
"execution_count": 12,
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -296,7 +398,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 42,
"metadata": {},
"outputs": [
{
Expand All @@ -305,7 +407,7 @@
"[]"
]
},
"execution_count": 13,
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
Loading

0 comments on commit 8227aac

Please sign in to comment.