Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
Squashed 'imprint/' content from commit 23ea4fd
Browse files Browse the repository at this point in the history
git-subtree-dir: imprint
git-subtree-split: 23ea4fdac8ccbc83f4c8689a8399008306aaab70
  • Loading branch information
tbenthompson committed Jul 9, 2022
0 parents commit c0d4c37
Show file tree
Hide file tree
Showing 275 changed files with 73,529 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BasedOnStyle: Google
IndentWidth: 4
SortIncludes: true
77 changes: 77 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Test

on:
schedule:
# Every day at 9:00 AM UTC
- cron: "0 9 * * *"
push:
jobs:
test:
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9"]
name: Test (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
# https://github.com/marketplace/actions/setup-miniconda#caching-environments
steps:
- uses: actions/checkout@v2
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: anaconda-client-env
use-mamba: true
python-version: ${{ matrix.python-version }}
- name: Get Date
id: get-date
run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
shell: bash
- name: Cache Dependencies
uses: actions/cache@v2
with:
# Cache the Conda, Bazel, and Pre-commit files
path: |
${{ env.CONDA }}/envs
~/.cache/pre-commit
~/.cache/bazel
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 1
id: cache
- name: Update environment
run: mamba env update -n anaconda-client-env -f environment.yml
if: steps.cache.outputs.cache-hit != 'true'
- name: Run all pre-commit checks on the full repo!
run: |
pre-commit run --all-files
- name: Build and install pyimprint
run: |
./generate_bazelrc
bazel build -c dbg //python:pyimprint_wheel
pip install --force-reinstall bazel-bin/python/dist/*.whl
- name: Bazel Test
run: |
bazel test -c dbg //...
- name: Pytest
run: |
pytest .
- name: Report failures on Slack
if: failure() && github.event.repository.default_branch == github.event.workflow_run.head_branch
id: slack
uses: slackapi/[email protected]
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
channel-id: C02TC2DAN74
# For posting a simple plain text message
slack-message: "*Build failure on default branch!* 😱\nhttps://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
*.DS_Store
build/
/.vs
.vscode/
.history/
/imprint/CMakeSettings.json
CMakeCache.txt
CMakeFiles/
imprintConfig.cmake
imprintConfigVersion.cmake
DartConfiguration.tcl
.env

/python/dist/
.spyproject/

# ignore rc because we are tracking generator now
.bazelrc
bazel
bazel-*
.vagrant/
Vagrantfile
.idea/
compile_commands.json

# python stuff
__pycache__

# c++ extensions built in place within the source tree.
*.so

# bazel outputs
*pid*.log
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "src/imprint/third_party/pybind11"]
path = src/imprint/third_party/pybind11
url = https://github.com/pybind/pybind11.git
branch = stable
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
fail_fast: false
repos:
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args: [-i]
# - id: clang-tidy
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.7.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/mwouts/jupytext
rev: v1.13.8
hooks:
- id: jupytext
args: [--from, ipynb, --to, "md"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: debug-statements
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: forbid-new-submodules
6 changes: 6 additions & 0 deletions .vscode/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/zsh
eval "$(conda shell.zsh hook)"
conda activate kevlar
rm -f bazel-bin/python/dist/*.whl
bazel build -c dbg //python:pykevlar_wheel
pip install --force-reinstall bazel-bin/python/dist/*.whl
30 changes: 30 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/imprint/include",
"${workspaceFolder}/bazel-imprint/external/eigen",
"${workspaceFolder}/bazel-imprint/external/fmtlib/include",
"${workspaceFolder}/bazel-imprint/external/boost",
"${workspaceFolder}/bazel-imprint/external/pybind11/include"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "linux-clang-x64",
"compilerArgs": [],
"mergeConfigurations": false,
"browse": {
"path": [
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": true
},
"compileCommands": "${workspaceFolder}/compile_commands.json"
}
],
"version": 4
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
118 changes: 118 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"bazel-cpp-tools.compileCommands.targets": [
"//...",
],
"jupyter.jupyterServerType": "local",
"files.associations": {
"functional": "cpp",
"*.evaluator": "cpp",
"*.traits": "cpp",
"fft": "cpp",
"openglsupport": "cpp",
"regex": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"utility": "cpp",
"hash_map": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"ostream": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp",
"filesystem": "cpp",
"locale": "cpp",
"mprealsupport": "cpp",
"nonlinearoptimization": "cpp",
"dense": "cpp",
"__bit_reference": "cpp",
"__bits": "cpp",
"__config": "cpp",
"__debug": "cpp",
"__errc": "cpp",
"__hash_table": "cpp",
"__locale": "cpp",
"__mutex_base": "cpp",
"__node_handle": "cpp",
"__nullptr": "cpp",
"__split_buffer": "cpp",
"__string": "cpp",
"__threading_support": "cpp",
"__tree": "cpp",
"__tuple": "cpp",
"compare": "cpp",
"concepts": "cpp",
"ios": "cpp",
"queue": "cpp",
"stack": "cpp",
"__functional_base": "cpp",
"alignedvector3": "cpp",
"typeindex": "cpp",
"*.ipp": "cpp",
"*.inc": "cpp",
"core": "cpp",
"geometry": "cpp",
"qtalignedmalloc": "cpp",
"matrixfunctions": "cpp",
"bvh": "cpp"
},
"C_Cpp.errorSquiggles": "Enabled",
"editor.formatOnSave": false,
"cmake.configureOnOpen": false
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Build Python extension",
"command": ".vscode/build.sh",
"options": {
"cwd": "${workspaceFolder}",
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
2 changes: 2 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Dummy file just to appease Bazel.
# .bzl requires the existence of a BUILD file.
Loading

0 comments on commit c0d4c37

Please sign in to comment.