Skip to content

Commit

Permalink
Make C++ NDArray implementation configurable (#181)
Browse files Browse the repository at this point in the history
Closes #22
  • Loading branch information
naegelejd authored Oct 8, 2024
1 parent 3e9a724 commit bf7068e
Show file tree
Hide file tree
Showing 91 changed files with 1,377 additions and 8,065 deletions.
4 changes: 1 addition & 3 deletions .github/actions/configure-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ runs:
' environment.yml > ci-environment.yml
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
# Do not specify environment file - see Cache step below
activate-environment: yardl
use-mamba: true

- name: Get Date
id: get-date
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure environment
uses: ./.github/actions/configure-environment
Expand All @@ -41,7 +41,7 @@ jobs:
name: Build yardl binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
Expand All @@ -65,7 +65,7 @@ jobs:
runs-on: windows-latest
needs: buildBinaries
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download yardl binaries
uses: actions/download-artifact@v4
Expand All @@ -86,7 +86,7 @@ jobs:
runs-on: macos-latest
needs: buildBinaries
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download yardl binaries
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
language: [ 'cpp', 'go', 'python' ]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure environment
uses: ./.github/actions/configure-environment
Expand All @@ -140,7 +140,7 @@ jobs:
name: Check NOTICE.txt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Build static page
run: |
cd docs
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dist/
.vscode/settings.json

cpp/build/
cpp/sandbox/generated/

**/*.bin

Expand Down
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "c++ unit tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/cpp/build/tests",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/cpp/build",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
{
"name": "cli sandbox model",
"type": "go",
Expand Down
182 changes: 182 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@ SOFTWARE.

================================================================================

github.com/fatih/structs

The MIT License (MIT)

Copyright (c) 2014 Fatih Arslan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

================================================================================

github.com/fsnotify/fsnotify

Copyright © 2012 The Go Authors. All rights reserved.
Expand Down Expand Up @@ -84,6 +110,32 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

================================================================================

github.com/go-viper/mapstructure/v2

The MIT License (MIT)

Copyright (c) 2013 Mitchell Hashimoto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

================================================================================

github.com/inancgumus/screen

MIT License
Expand All @@ -110,6 +162,84 @@ SOFTWARE.

================================================================================

github.com/knadh/koanf/maps

The MIT License

Copyright (c) 2019, Kailash Nadh. https://github.com/knadh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

================================================================================

github.com/knadh/koanf/providers/structs

The MIT License

Copyright (c) 2019, Kailash Nadh. https://github.com/knadh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

================================================================================

github.com/knadh/koanf/v2

The MIT License

Copyright (c) 2019, Kailash Nadh. https://github.com/knadh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

================================================================================

github.com/mattn/go-colorable

The MIT License (MIT)
Expand Down Expand Up @@ -150,6 +280,58 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

================================================================================

github.com/mitchellh/copystructure

The MIT License (MIT)

Copyright (c) 2014 Mitchell Hashimoto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

================================================================================

github.com/mitchellh/reflectwalk

The MIT License (MIT)

Copyright (c) 2013 Mitchell Hashimoto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

================================================================================

github.com/rs/zerolog

MIT License
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@ We are releasing this project order to get community feedback and contributions.
It is not complete and is **not ready for production use** at this time. We
expect to introduce breaking changes until the project reaches V1.

We currently support C++ and Python codegen. Other planned features include:
We currently support C++, Python, and MATLAB codegen. Other planned features include:

- Reading data with a different schema version
- MATLAB support
- References between packages
- Validating schema evolution is non-breaking
- Constraints
Expand Down
3 changes: 3 additions & 0 deletions cpp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
build/

test/generated/yardl
evolution/v0/generated/yardl
evolution/v1/generated/yardl
evolution/v2/generated/yardl
3 changes: 1 addition & 2 deletions cpp/evolution/v0/generated/binary/protocols.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
#include <variant>
#include <vector>

#include "../yardl/detail/binary/reader_writer.h"
#include "../protocols.h"
#include "../types.h"
#include "../yardl/detail/binary/reader_writer.h"

namespace evo_test::binary {
// Binary writer for the ProtocolWithChanges protocol.
Expand Down
1 change: 0 additions & 1 deletion cpp/evolution/v0/generated/hdf5/protocols.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <vector>

#include "../protocols.h"
#include "../types.h"
#include "../yardl/detail/hdf5/io.h"

namespace evo_test::hdf5 {
Expand Down
1 change: 0 additions & 1 deletion cpp/evolution/v0/generated/ndjson/protocols.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

#include "../yardl/detail/ndjson/reader_writer.h"
#include "../protocols.h"
#include "../types.h"

namespace evo_test::ndjson {
// NDJSON writer for the ProtocolWithChanges protocol.
Expand Down
1 change: 0 additions & 1 deletion cpp/evolution/v0/generated/types.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// This file was generated by the "yardl" tool. DO NOT EDIT.

#include "types.h"
#include "yardl/yardl.h"
namespace evo_test {
} // namespace evo_test

Loading

0 comments on commit bf7068e

Please sign in to comment.