Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,31 @@ env:

matrix:
include:
- env: PYTHON_VERSION=3.6
- name: "Python 3.6 - osx"
env: PYTHON_VERSION=3.6
os: osx
- env: PYTHON_VERSION=3.6
- name: "Python 3.6 - linux"
env: PYTHON_VERSION=3.6
os: linux
- env: PYTHON_VERSION=3.7
- name: "Python 3.7 - osx"
env: PYTHON_VERSION=3.7
os: osx
- env: PYTHON_VERSION=3.7
- name: "Python 3.7 - linux"
env: PYTHON_VERSION=3.7
os: linux
- name: "Lint"
env: PYTHON_VERSION=3.7
os: linux
script:
- black . --diff --check

before_install:
- if [[ "$PYTHON_VERSION" == "2.7" ]]; then
PY_MAJOR=2 ;
else
PY_MAJOR=3 ;
fi ;
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
OS=Linux ;
else
OS=MacOSX ;
fi ;
wget https://repo.continuum.io/miniconda/Miniconda$PY_MAJOR-latest-$OS-x86_64.sh -O miniconda.sh
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-$OS-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda;
- export PATH="$HOME/miniconda/bin:$HOME/miniconda/lib:$PATH";
- conda config --set always_yes yes --set changeps1 no;
Expand All @@ -67,4 +71,4 @@ after_success:

after_failure:
- ls /cores/core.*
- lldb --core `ls /cores/core.*` --batch --one-line "bt"
- lldb --core `ls /cores/core.*` --batch --one-line "bt"
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,38 @@ You do not need to be a software developer to have a big impact on this project.

It is asked that all contributions to this project be made in a respectful and considerate way. Please use the [Python Community Code of Conduct's](https://www.python.org/psf/codeofconduct/) guidelines as a reference.

### Contributing code

If you are going to contribute code, make sure to follow this steps:

- Consider opening an issue first to discuss what you have in mind
- Try to keep it as short and simple as possible (if you want to change several
things, start with just one!)
- Fork the CadQuery repository, clone your fork and create a new branch to
start working on your changes
- Start with the tests! How should CadQuery behave after your changes? Make
sure to add some tests to the test suite to ensure proper behavior
- Make sure your tests have assertions checking all the expected results
- Add a nice docstring to the test indicating what the test is doing; if there
is too much to explain, consider splitting the test in two!
- Go ahead and implement the changes
- Add a nice docstring to the functions/methods/classes you implement
describing what they do, what the expected parameters are and what it returns
(if anything)
- Update the documentation if there is any change to the public API
- Consider adding an example to the documentation showing your cool new
feature!
- Make sure nothing is broken (run the complete test suite with `pytest`)
- Run `black` to autoformat your code and make sure your code style complies
with CadQuery's
- Push the changes to your fork and open a pull-request upstream
- Keep an eye on the automated feedback you will receive from the CI pipelines;
if there is a test failing or some code is not properly formatted, you will
be notified without human intervention
- Be prepared for constructive feedback and criticism!
- Be patient and respectful, remember that those reviewing your code are also
working hard (sometimes reviewing changes is harder than implementing them!)

### How to Report a Bug
When filing a bug report [issue](https://github.com/CadQuery/cadquery/issues), please be sure to answer these questions:

Expand Down
58 changes: 49 additions & 9 deletions cadquery/__init__.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,65 @@
# these items point to the OCC implementation
from .occ_impl.geom import Plane, BoundBox, Vector, Matrix
from .occ_impl.shapes import (Shape, Vertex, Edge, Face, Wire, Solid, Shell,
Compound, sortWiresByBuildOrder)
from .occ_impl.shapes import (
Shape,
Vertex,
Edge,
Face,
Wire,
Solid,
Shell,
Compound,
sortWiresByBuildOrder,
)
from .occ_impl import exporters
from .occ_impl import importers

# these items are the common implementation

# the order of these matter
from .selectors import (NearestToPointSelector, ParallelDirSelector,
DirectionSelector, PerpendicularDirSelector, TypeSelector,
DirectionMinMaxSelector, StringSyntaxSelector, Selector)
from .selectors import (
NearestToPointSelector,
ParallelDirSelector,
DirectionSelector,
PerpendicularDirSelector,
TypeSelector,
DirectionMinMaxSelector,
StringSyntaxSelector,
Selector,
)
from .cq import CQ, Workplane, selectors
from . import plugins


__all__ = [
'CQ', 'Workplane', 'plugins', 'selectors', 'Plane', 'BoundBox', 'Matrix', 'Vector', 'sortWiresByBuildOrder',
'Shape', 'Vertex', 'Edge', 'Wire', 'Face', 'Solid', 'Shell', 'Compound', 'exporters', 'importers',
'NearestToPointSelector', 'ParallelDirSelector', 'DirectionSelector', 'PerpendicularDirSelector',
'TypeSelector', 'DirectionMinMaxSelector', 'StringSyntaxSelector', 'Selector', 'plugins'
"CQ",
"Workplane",
"plugins",
"selectors",
"Plane",
"BoundBox",
"Matrix",
"Vector",
"sortWiresByBuildOrder",
"Shape",
"Vertex",
"Edge",
"Wire",
"Face",
"Solid",
"Shell",
"Compound",
"exporters",
"importers",
"NearestToPointSelector",
"ParallelDirSelector",
"DirectionSelector",
"PerpendicularDirSelector",
"TypeSelector",
"DirectionMinMaxSelector",
"StringSyntaxSelector",
"Selector",
"plugins",
]

__version__ = "2.0.0dev"
Loading