Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #35

Merged
merged 115 commits into from
Aug 12, 2024
Merged

Dev #35

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
79260aa
syntax
lewiswolf Jan 14, 2023
d10d7b0
remove calculate, add equilateralTriangle modes and LaméModel
lewiswolf Jan 20, 2023
5b24a7d
Merge branch 'master' into dev
lewiswolf Jan 20, 2023
86a10b5
order correction
lewiswolf Jan 20, 2023
90daa30
amplitude fix
lewiswolf Jan 21, 2023
a164e8d
added types-setuptools
lewiswolf Jan 21, 2023
134b964
small logic change to fdtd
lewiswolf Jan 23, 2023
d6051a5
add lamé test
lewiswolf Jan 23, 2023
3da8f3a
docs
lewiswolf Jan 23, 2023
5f91fa6
added updated version of generateConvexPolygon
lewiswolf Mar 6, 2023
b4c9d72
rodrigo fixes
lewiswolf Mar 7, 2023
84674c7
minor clean
lewiswolf Mar 8, 2023
95a9510
added lineIntersection
lewiswolf Mar 9, 2023
635e09f
docs
lewiswolf Mar 9, 2023
a618db5
fixes
lewiswolf Mar 9, 2023
2f529da
fix test
lewiswolf Mar 9, 2023
ffa4d62
added tests, fixes and documentation for lineIntersection, added isSi…
lewiswolf Mar 11, 2023
d3f7c01
add generatePolygon and normalisePolygon
lewiswolf Mar 11, 2023
156ffd9
removed functools for broader composability of methods
lewiswolf Mar 11, 2023
fffdcf1
fixed test
lewiswolf Mar 11, 2023
cb356f7
made isConvex a method again and updated example
lewiswolf Mar 12, 2023
9185f66
docs
lewiswolf Mar 12, 2023
f1c973d
added generateIrregularStar
lewiswolf Mar 13, 2023
c87b5d9
added generateIrregularStar
lewiswolf Mar 13, 2023
b7b11b8
Merge branch 'dev' of https://github.com/lewiswolf/kac_drumset into dev
lewiswolf Mar 13, 2023
4d86726
updated UnitRectangle
lewiswolf Mar 14, 2023
7f39f1e
complete geometry restructure
lewiswolf Mar 14, 2023
7903efa
begin preparing for an fdtd model with open shapes
lewiswolf Mar 17, 2023
e0b3927
line midpoint is a waste of time
lewiswolf Mar 18, 2023
ea1b0be
fixes to types, docs, redesign Polygon, redesign Ellipse, redesign Ci…
lewiswolf Mar 18, 2023
8081a4e
updated FDTDModel, fixed test_samplers, ammended tests test_circle
lewiswolf Mar 18, 2023
afc2d22
add most of the ellipse general properties, made centroid a @property
lewiswolf Mar 20, 2023
81d76eb
fixed signature issue in UnitTriangle and changed area back to a @pro…
lewiswolf Mar 21, 2023
a299547
ecosystem updates
lewiswolf Mar 25, 2023
540910e
version control
lewiswolf Mar 25, 2023
98dcdc1
better docs and cleaner dataset tests
lewiswolf Apr 2, 2023
5dc1428
added bilinear interpolation to FDTDWaveform2D
lewiswolf Apr 4, 2023
797d2a4
clean up FDTDModel and tests, removed a permanently True assertion
lewiswolf Apr 7, 2023
aa64818
renamed lines.py
lewiswolf Apr 7, 2023
57aa5a6
finished Ellipse implementation
lewiswolf Apr 11, 2023
3fc9487
docs correction
lewiswolf Apr 11, 2023
2cb1f10
added movable centroid
lewiswolf Apr 11, 2023
df52377
added placeholder for generateUnitTriangle
lewiswolf Apr 11, 2023
32d2ed3
simpler setup
lewiswolf Apr 14, 2023
1cd4e23
cleaner circle and generator for ellipse
lewiswolf Apr 14, 2023
5f724e8
dropped python 3.9 support in favour of modern union notation
lewiswolf Apr 15, 2023
b96eac7
docs
lewiswolf Apr 16, 2023
c58e7d5
sampler info not exported correctly
lewiswolf Apr 23, 2023
79e9fa2
Merge branch 'master' into dev
lewiswolf Apr 23, 2023
95f1fac
python 3.10 typing updates
lewiswolf Apr 23, 2023
4833398
Merge branch 'master' into dev
lewiswolf Apr 25, 2023
ab3ed52
removed Pipfile.lock because it does not like different OS
lewiswolf Apr 27, 2023
e6b2b92
added try except for improved error handling
lewiswolf Apr 28, 2023
31a4581
FDTDModel now supports all class of type Shape due to the inclusion o…
lewiswolf Apr 28, 2023
df2b89e
improvement to __getLabels__
lewiswolf Apr 28, 2023
4e2c604
added rectangularChladniPattern
lewiswolf May 17, 2023
1545ee5
added circularChladniPattern
lewiswolf May 18, 2023
3a9bf1a
docs
lewiswolf May 18, 2023
214374e
docs
lewiswolf May 29, 2023
e62fc1d
account for python oddity passsing {} as a default argument
lewiswolf Jul 4, 2023
68d8c72
updated local install
lewiswolf Jul 28, 2023
0e44ed2
added flake8-quotes
lewiswolf Aug 9, 2023
7ad1b69
fixes and types for opencv
lewiswolf Sep 1, 2023
6635aed
updates to kac_core
lewiswolf Sep 1, 2023
75fa71b
pipenv breaking changes
lewiswolf Sep 9, 2023
fb51c3f
clang-format 17
lewiswolf Sep 23, 2023
0db9bad
the dataset library is now handled by kac_prediction
lewiswolf Oct 3, 2023
7beb6ef
cleanup
lewiswolf Oct 3, 2023
51fa51c
fixed issue with incorrect #egg-info, version control, and removed un…
lewiswolf Nov 19, 2023
545d17a
cleaner install
lewiswolf Feb 1, 2024
32880d1
updated python to 3.11 & 3.12, updated opencv to 4.9 and fixed type e…
lewiswolf Feb 14, 2024
21f4d97
update clang-format, update setup.py, updated triangular modes, made …
lewiswolf Apr 1, 2024
abd9ce5
update rectangularChladni signature and make circulareChladni continuous
lewiswolf Apr 1, 2024
10ebb45
updated windows functions
lewiswolf Apr 5, 2024
fa6c9ac
fix crash
lewiswolf Apr 5, 2024
fb38fe3
removed unnecessary line
lewiswolf Apr 24, 2024
c9d5308
updated github actions
lewiswolf May 10, 2024
d3bd0b9
accurate type signature
lewiswolf May 17, 2024
5081ad0
latest core build
lewiswolf May 17, 2024
b830a26
fix minor type error
lewiswolf Jun 17, 2024
5f62433
numpy 2.0 bb
lewiswolf Jun 19, 2024
45826c5
added fix to lineIntersection
lewiswolf Jul 22, 2024
428cf36
updated cmake and added test
lewiswolf Jul 22, 2024
be860c8
more numpy 2 support
lewiswolf Jul 22, 2024
1e30f6e
fixed isPointOnLine, removed geometry tests the failed due to floatin…
lewiswolf Aug 1, 2024
5693e4f
split ellipse and circle tests
lewiswolf Aug 1, 2024
c8f3a49
used or instead of if None else, added tests and improvements to Ellipse
lewiswolf Aug 3, 2024
015c7fd
docs and removed all None types from Shape generators
lewiswolf Aug 9, 2024
2f1f8fa
better geometry tests and better dataset example
Aug 10, 2024
626eab3
fix to setup.py
lewiswolf Aug 10, 2024
5aff46a
possible addition that enables this project to work as local package
lewiswolf Aug 10, 2024
31e4d6f
more example and more docs
lewiswolf Aug 10, 2024
7dbe47f
switched back to find_packages
lewiswolf Aug 10, 2024
7e627da
added FDTD support for Ellipses
lewiswolf Aug 10, 2024
826b490
removed Circle from example as its a special case for the FDTD
lewiswolf Aug 10, 2024
a161bf3
added signed_norm to nomalise polygon and fixed and issue with _polyg…
lewiswolf Aug 12, 2024
09e0544
final fixes to setup
lewiswolf Aug 12, 2024
ac30239
fix to broken polygon test
lewiswolf Aug 12, 2024
aed65e4
other test typos
lewiswolf Aug 12, 2024
2616891
macos floating point error
lewiswolf Aug 12, 2024
26936f2
fix to FDTDModel with ConvexPolygon
lewiswolf Aug 12, 2024
87b6fde
fix an issue with isPointInsideConvexPolygon
lewiswolf Aug 12, 2024
8708456
added isPointInsidePolygon and finally adding support for concave pol…
lewiswolf Aug 12, 2024
85f5541
remove failing tests
lewiswolf Aug 12, 2024
0d31fdc
possible Pipfile fix to my problems?
lewiswolf Aug 12, 2024
7245d2a
windows please
lewiswolf Aug 12, 2024
c8c149d
windows please 2
lewiswolf Aug 12, 2024
39a525a
fix windows test?
lewiswolf Aug 12, 2024
fa66ad4
more workflow
lewiswolf Aug 12, 2024
e4dcb1b
windwows attempt 4
lewiswolf Aug 12, 2024
0ff23d4
windwows attempt 5
lewiswolf Aug 12, 2024
0dadf48
fix intermittent test
lewiswolf Aug 12, 2024
736f935
remove windows support
lewiswolf Aug 12, 2024
cbf65f4
was it setup.py afterall
lewiswolf Aug 12, 2024
a779d58
windows support dropped
lewiswolf Aug 12, 2024
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
18 changes: 16 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: AcrossEmptyLinesAndComments
AlignConsecutiveShortCaseStatements:
Enabled: false
AlignOperands: AlignAfterOperator
AlignTrailingComments: true
AlignTrailingComments:
Kind: Always
OverEmptyLines: 2
AllowAllArgumentsOnNextLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortLoopsOnASingleLine: true
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BinPackParameters: false
BreakArrays: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
ColumnLimit: 100
CompactNamespaces: true
Expand All @@ -29,21 +36,27 @@ IndentExternBlock: Indent
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentRequires: false
IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: true
InsertTrailingCommas: Wrapped
JavaScriptQuotes: Single
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
LambdaBodyIndentation: Signature
LineEnding: LF
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
PPIndentWidth: 4
PointerAlignment: Left
QualifierAlignment: Left
ReferenceAlignment: Pointer
ReflowComments: true
RemoveParentheses: ReturnStatement
RemoveSemicolon: true
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
SortIncludes: CaseInsensitive
SortUsingDeclarations: true
Expand All @@ -55,6 +68,7 @@ SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: false
SpaceBeforeSquareBrackets: false
Expand All @@ -65,7 +79,7 @@ SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInParens: Never
SpacesInSquareBrackets: false
Standard: c++20
TabWidth: 4
Expand Down
33 changes: 23 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,41 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: ["3.9", "3.10"]
python: ["3.11", "3.12"]

steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@main
with:
python-version: ${{ matrix.python }}

- name: Test installation
run: pip install "git+https://github.com/lewiswolf/kac_drumset.git#egg=kac_drumset"
run: |
pip install "git+https://github.com/lewiswolf/kac_drumset.git"
python3 -c "import kac_drumset"

# - name: Test C++ deployment
# run: |
# python3 -c "import kac_drumset.externals._geometry"
# python3 -c "import kac_drumset.externals._physics"

all-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: ["3.9", "3.10"]
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, ubuntu-latest]
python: ["3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache-pipenv
with:
path: ~/.local/share/virtualenvs
Expand All @@ -57,9 +65,14 @@ jobs:
- name: Build CPP
run: pipenv run build

- name: Lint project
- name: Lint project 3.11
if: ${{ matrix.python == '3.11' }}
run: pipenv run flake8 --config=test/test.cfg

- name: Lint project 3.12
if: ${{ matrix.python == '3.12' }}
run: pipenv run flake8 --config=test/test.cfg --extend-ignore=Q000

- name: Assert types
run: pipenv run mypy --config-file=test/test.cfg

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ _skbuild
# files
*.so
.DS_Store
Pipfile.lock
MANIFEST.in
Pipfile.lock

# lew stuff
unused
19 changes: 2 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,14 @@ cmake_minimum_required(VERSION 3.22)
set(CMAKE_CXX_STANDARD 20)
include(FetchContent)

project(kac_drumset)
project(${SKBUILD_PROJECT_NAME} VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX)

# include pybind as a remote dependency
FetchContent_Declare(
pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11
)
FetchContent_GetProperties(pybind11)
if(NOT pybind11_POPULATED)
FetchContent_Populate(pybind11)
add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR})
endif()

# scikit-build does not add site-packages to the search path automatically,
# so it _or_ the pybind11 specific directory needs to be added here.
if(SKBUILD)
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c "import pybind11; print(pybind11.get_cmake_dir())"
OUTPUT_VARIABLE _tmp_dir
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ECHO STDOUT
)
list(APPEND CMAKE_PREFIX_PATH "${_tmp_dir}")
endif()
FetchContent_MakeAvailable(pybind11)

# include kac_core
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/kac_core)
Expand Down
15 changes: 7 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,24 @@ verify_ssl = true
name = "pypi"

[packages]
numpy = ">=1.23"
opencv-python = ">=4.6"
soundfile = "*"
torch = ">=1.12"
torchaudio = ">=0.12"
tqdm = ">=4.64"
kac_prediction = {git = "https://github.com/lewiswolf/kac_prediction.git"}
numpy = ">=2.0"
opencv-python = ">=4.10"

[dev-packages]
flake8 = "*"
flake8-commas = "*"
flake8-pyi = "*"
flake8-quotes = "*"
graphs = {git = "https://github.com/lewiswolf/graphs.git"}
kac_drumset = {editable = true, path = "."}
kac-drumset = {file = ".", editable = true}
mypy = "*"
scikit-build = "*"
types-setuptools = "*"
types-tqdm = "*"

[requires]
python_version = "3.9"
python_version = "3.11"

[scripts]
build = "python setup.py develop"
Expand Down
Loading