Package: sect
sectIn what followspythonis an alias forpython3.7orpypy3.7or any later version (python3.8,pypy3.8and so on).InstallationInstall the latestpip&setuptoolspackages versionspython-mpipinstall--upgradepipsetuptoolsUserDownload and install the latest stable version fromPyPIrepositorypython-mpipinstall--upgradesectDeveloperDownload the latest version fromGitHubrepositorygitclonehttps://github.com/lycantropos/sect.gitcdsectInstall dependenciespython-mpipinstall-rrequirements.txtInstallpythonsetup.pyinstallUsage>>>fromground.baseimportget_context>>>fromsect.triangulationimportTriangulation>>>context=get_context()>>>Contour,Point=context.contour_cls,context.point_cls>>>(Triangulation.delaunay([Point(0,0),Point(1,0),Point(0,1)],...context=context).triangles()...==[Contour([Point(0,0),Point(1,0),Point(0,1)])])True>>>(Triangulation.delaunay([Point(0,0),Point(3,0),Point(1,1),...Point(0,3)],...context=context).triangles()...==[Contour([Point(0,0),Point(3,0),Point(1,1)]),...Contour([Point(0,0),Point(1,1),Point(0,3)]),...Contour([Point(0,3),Point(1,1),Point(3,0)])])True>>>(Triangulation.delaunay([Point(0,0),Point(1,0),Point(1,1),...Point(0,1)],...context=context).triangles()...==[Contour([Point(0,1),Point(1,0),Point(1,1)]),...Contour([Point(0,0),Point(1,0),Point(0,1)])])True>>>Polygon=context.polygon_cls>>>(Triangulation.constrained_delaunay(...Polygon(Contour([Point(0,0),Point(1,0),Point(0,1)]),[]),...context=context...).triangles()...==[Contour([Point(0,0),Point(1,0),Point(0,1)])])True>>>(Triangulation.constrained_delaunay(...Polygon(Contour([Point(0,0),Point(3,0),Point(1,1),Point(0,3)]),...[]),...context=context...).triangles()...==[Contour([Point(0,0),Point(3,0),Point(1,1)]),...Contour([Point(0,0),Point(1,1),Point(0,3)])])True>>>(Triangulation.constrained_delaunay(...Polygon(Contour([Point(0,0),Point(4,0),Point(0,4)]),...[Contour([Point(0,0),Point(1,2),...Point(2,1)])]),...context=context...).triangles()...==[Contour([Point(0,0),Point(4,0),Point(2,1)]),...Contour([Point(1,2),Point(2,1),Point(4,0)]),...Contour([Point(0,4),Point(1,2),Point(4,0)]),...Contour([Point(0,0),Point(1,2),Point(0,4)])])True>>>fromsect.decompositionimportGraph>>>graph=Graph.from_polygon(Polygon(Contour([Point(0,0),Point(6,0),...Point(6,6),Point(0,6)]),...[Contour([Point(2,2),Point(2,4),...Point(4,4),Point(4,2)])]),...context=context)>>>Point(0,0)ingraphTrue>>>Point(1,1)ingraphTrue>>>Point(2,2)ingraphTrue>>>Point(3,3)ingraphFalse>>>fromground.baseimportLocation>>>graph.locate(Point(0,0))isLocation.BOUNDARYTrue>>>graph.locate(Point(1,1))isLocation.INTERIORTrue>>>graph.locate(Point(2,2))isLocation.BOUNDARYTrue>>>graph.locate(Point(3,3))isLocation.EXTERIORTrueDevelopmentBumping versionPreparationInstallbump2version.Pre-releaseChoose which version number category to bump followingsemver
specification.Test bumping versionbump2version--dry-run--verbose$CATEGORYwhere$CATEGORYis the target version number category name, possible
values arepatch/minor/major.Bump versionbump2version--verbose$CATEGORYThis will set version tomajor.minor.patch-alpha.ReleaseTest bumping versionbump2version--dry-run--verbosereleaseBump versionbump2version--verbosereleaseThis will set version tomajor.minor.patch.Running testsInstall dependenciespython-mpipinstall-rrequirements-tests.txtPlainpytestInsideDockercontainer:withCPythondocker-compose--filedocker-compose.cpython.ymlupwithPyPydocker-compose--filedocker-compose.pypy.ymlupBashscript:withCPython./run-tests.shor./run-tests.shcpythonwithPyPy./run-tests.shpypyPowerShellscript:withCPython.\run-tests.ps1or.\run-tests.ps1cpythonwithPyPy.\run-tests.ps1pypy