Skip to content

Commit

Permalink
Isolate onshapepy dependency to draw() (#190)
Browse files Browse the repository at this point in the history
* Isolate `onshapepy` dependency in `draw()`

* Increment version to v0.0.23

* No need to require numpy is scipy is required
  • Loading branch information
oliver-leung authored and monroews committed Mar 11, 2019
1 parent 51aa192 commit 9a2405e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions aguaclara/design/floc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import aguaclara.core.pipes as pipes
from aguaclara.core.units import unit_registry as u

from onshapepy import Part
import numpy as np

# Ratio of the width of the gap between the baffle and the wall and the spacing
Expand Down Expand Up @@ -57,10 +56,6 @@ class Flocculator:
RATIO_MAX_HS = 6.0
SDR = 41.0

CAD = Part(
'https://cad.onshape.com/documents/b4cfd328713460beeb3125ac/w/3928b5c91bb0a0be7858d99e/e/6f2eeada21e494cebb49515f'
)

def __init__(
self,
Q=20 * u.L/u.s,
Expand Down Expand Up @@ -298,7 +293,11 @@ def design(self):

def draw(self):
"""Draw the Onshape flocculator model based off of this object."""
self.CAD.params = {
from onshapepy import Part
CAD = Part(
'https://cad.onshape.com/documents/b4cfd328713460beeb3125ac/w/3928b5c91bb0a0be7858d99e/e/6f2eeada21e494cebb49515f'
)
CAD.params = {
'channel_L': self.channel_L,
'channel_W': self.channel_W,
'channel_H': self.downstream_H,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

setup(name='aguaclara',
version='0.0.22',
version='0.0.23',
description='Open source functions for AguaClara water treatment research and plant design.',
url='https://github.com/AguaClara/aguaclara',
author='AguaClara at Cornell',
Expand Down

0 comments on commit 9a2405e

Please sign in to comment.