Skip to content

Commit

Permalink
Develop (#34)
Browse files Browse the repository at this point in the history
* Fix finite differences

* Fixed comprehensive rectangles

* Fixed flow_over_gaussian

* Painted the examples black

* Set up ReadTheDocs

* Added contents pages to readthedocs

* Fixed wheel_on_inclined_plane

* Fixed tutorial vehical picture

* Painted everything black

* Painted all the thing blacker

* isorted everything

* painted the docs black

* Migrated unit tests to hypothesis

* Bump mypy from 0.770 to 0.790 (#7)

* Bump mypy from 0.770 to 0.790

Bumps [mypy](https://github.com/python/mypy) from 0.770 to 0.790.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](python/mypy@v0.770...v0.790)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updated poetry.lock to reflect new dependency versions

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: CirleCI Automation <automation@circleci.com>

* Bump hypothesis from 5.38.0 to 5.38.1 (#16)

* Bump hypothesis from 5.38.0 to 5.38.1

Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 5.38.0 to 5.38.1.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](HypothesisWorks/hypothesis@hypothesis-python-5.38.0...hypothesis-python-5.38.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updated poetry.lock to reflect new dependency versions

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: CirleCI Automation <automation@circleci.com>

* Bump pytest from 5.4.3 to 6.1.1 (#10)

* Bump pytest from 5.4.3 to 6.1.1

Bumps [pytest](https://github.com/pytest-dev/pytest) from 5.4.3 to 6.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@5.4.3...6.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updated poetry.lock to reflect new dependency versions

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: CirleCI Automation <automation@circleci.com>

* Set up ReadTheDocs

* Got inclined wheel working

* Fixed badges

* Fixed badges

* Bump zest-releaser from 6.22.0 to 6.22.1 (#5)

* Bump zest-releaser from 6.22.0 to 6.22.1

Bumps [zest-releaser](https://zestreleaser.readthedocs.io) from 6.22.0 to 6.22.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fixed circle to build dependabot prs

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Richard Vodden <richard.vodden@babylonhealth.com>

* Set up ReadTheDocs

* Painted all the thing blacker

* Fixed badges on README.md

* Synced deps with master

* Fixed comprehensive rectangles

* Fixed flow_over_gaussian

* Painted the examples black

* Added contents pages to readthedocs

* Fixed wheel_on_inclined_plane

* Fixed badges

* Fixed badges

* Created tutorial schedule

* Added some documentation

* Removed tests from codeclimate commentary

* Removed tests from codeclimate commentary

* Updated poetry.lock

* Fixed the cognitive complexity of line.__call__()

* Made composition naming consistent

* Introduced the Angle object

* Fixed tests

* Told pytest to test docstrings (and fixed them :) )

* Factored the drawing logic out to backend

* Fixed erroneous imports

* Fixed simple circle.py

* Fixed layered_medium_3xi.py

* Fixed vehicle_dim.py

* Fixed vehicle

* Fixed pendulum1.py

* Fixed poetry lock file

* Fixed dependabot

* Fixed rotation test

* Bump hypothesis from 5.41.0 to 5.41.1 (#28)

* Bump hypothesis from 5.41.0 to 5.41.1

Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 5.41.0 to 5.41.1.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](HypothesisWorks/hypothesis@hypothesis-python-5.41.0...hypothesis-python-5.41.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updated poetry.lock to reflect new dependency versions

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: CirleCI Automation <automation@circleci.com>

* Fixed Hatch Test

* fixed hello_world.py

* Fixed layered_medium_2.py

* fixed layered_medium_general.py

* Fixed mesh_function.py

* fixed staggered_mesh_function.py

* Fixed remaining non-bugged examples

* Ported Spring

* Bump scipy from 1.5.3 to 1.5.4 (#29)

* Bump scipy from 1.5.3 to 1.5.4

Bumps [scipy](https://github.com/scipy/scipy) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](scipy/scipy@v1.5.3...v1.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updated poetry.lock to reflect new dependency versions

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: CirleCI Automation <automation@circleci.com>

* Fixed some precision issues

* Bump hypothesis from 5.41.1 to 5.41.2 (#30)

* Bump hypothesis from 5.41.1 to 5.41.2

Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 5.41.1 to 5.41.2.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](HypothesisWorks/hypothesis@hypothesis-python-5.41.1...hypothesis-python-5.41.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updated poetry.lock to reflect new dependency versions

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: CirleCI Automation <automation@circleci.com>

* Ported dashpot

* Restricted operating range to preserve precision

* Fixed oscillator_sketch1.py

* removed oscillator_sketch2.py

* Fixed tests

* Tidyed up point logic

* Reconfigured codeclimate to make it less winey

* added release cycle to circle configuration

* fixed release cycle

* Fixed tests

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: CirleCI Automation <automation@circleci.com>
  • Loading branch information
3 people authored Nov 11, 2020
1 parent 046523c commit a1805db
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ workflows:
filters:
branches:
only: master
- build:
- bumpVersion:
requires:
- checkout
- build:
requires:
- bumpVersion
- publishRelease:
requires:
- build
1 change: 1 addition & 0 deletions tests/test_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def test_subtraction(self, a: Angle, b: Angle):
def test_multiplication(self, a: Angle, b: np.float64):
c = a * b
assert type(c) == Angle
assert c <= np.pi
assert -np.pi <= c <= np.pi

@given_inferred
Expand Down
20 changes: 15 additions & 5 deletions tests/test_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

import numpy as np
import pytest
from hypothesis import assume, given, infer, note, reproduce_failure
from hypothesis import (
HealthCheck,
assume,
given,
infer,
note,
reproduce_failure,
settings,
)

from pysketcher import Point
from pysketcher.angle import Angle
Expand Down Expand Up @@ -65,11 +73,12 @@ def test_abs(self, x: np.float64, y: np.float64):
assert abs(a) == np.hypot(x, y)

@given_inferred
@settings(suppress_health_check=[HealthCheck.filter_too_much])
def test_angle(self, a: Point):
assume(mx > abs(a) > 0.0)
assume(abs(a) > 1e-160)
if a.x != 0.0 and a.y != 0:
assume(abs(a.x / a.y) < 1e4 and abs(a.y / a.x) < 1e4)
if a.x != 0.0:
assume(abs(a.y / a.x) < 1e4)
if a.y != 0.0:
assume(abs(a.x / a.y) < 1e4)
angle = a.angle()
note(angle)
b = Point(abs(a), 0.0).rotate(angle, Point(0.0, 0.0))
Expand Down Expand Up @@ -112,6 +121,7 @@ def test_rotation_about_zero(self, a: Point, angle: Angle):
assert isclose(bb - aa, angle)

@given_inferred
@settings(suppress_health_check=[HealthCheck.filter_too_much])
def test_rotation(self, a: Point, angle: Angle, center: Point):
assume(abs(a - center) != 0)
b = a.rotate(angle, center)
Expand Down

0 comments on commit a1805db

Please sign in to comment.