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

Draft SMFL-based native canvas implementation #406

Open
wants to merge 243 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
df83dd3
Draft SMFL-based native canvas implementation
mmore500 Dec 29, 2020
b04416a
Bugfix: actually draw lines
mmore500 Dec 30, 2020
5f03c33
Implement CanvasShape for native
mmore500 Dec 30, 2020
40da472
Add stub tests for canvas shape
mmore500 Jan 10, 2021
1532208
Fixup test makefile
mmore500 Jan 11, 2021
2088d0f
Add optimized shift for single-field bitsets
mmore500 Jan 18, 2021
37389c4
Add single-field optimization for BitSet Any
mmore500 Jan 18, 2021
c9ce6ec
Use X_SELF to implement X operations
mmore500 Jan 18, 2021
5073179
Mark constexpr
mmore500 Jan 18, 2021
c3b5a33
Implement and test OptimizedApproxDualStreakMetric
mmore500 Jan 18, 2021
dcf098b
Bugfix: actuall test ApproxDualStreakMetric
mmore500 Jan 18, 2021
f0e0cf6
Add fastDivide profiling result
mmore500 Jan 18, 2021
6e6d9c0
Don't fail asserts for raw scores outside bounds
mmore500 Jan 25, 2021
47da80e
Describe X11 Display Set up
perryk12 Jan 25, 2021
49449de
Merge 'native-canvas' with local
perryk12 Jan 25, 2021
d50f11c
Fix X11 walkthrough format
perryk12 Jan 25, 2021
3553756
Add clamp leeway to plus coundown regulator
mmore500 Jan 26, 2021
10855eb
Patch for Emscripten >1.38.48
mmore500 Jan 28, 2021
af36a63
Fixup MatchDepository caching
mmore500 Jan 28, 2021
480595f
Static assert against un-zeroed filler bits bug
mmore500 Jan 29, 2021
9548cb9
Bugfix: reset start token when clearing map
mmore500 Feb 2, 2021
40ff566
Implement AddVal on DataFile
mmore500 Feb 3, 2021
a27bcdf
Strip trailing whitespace
mmore500 Feb 3, 2021
f1794ec
Write tests for NativeCanvas Circle
perryk12 Feb 4, 2021
6c31e4a
Implement NativeCanvas Circle
perryk12 Feb 4, 2021
d5268fe
Refactor for readability
mmore500 Feb 6, 2021
054b5d0
Add MaxUpreg, CountdownStart options
mmore500 Feb 6, 2021
0473cbe
Use int32_t, uint32_t for decay countdown
mmore500 Feb 7, 2021
829679a
Add operator==, operator!=, name methods
mmore500 Feb 7, 2021
3d71cca
Disable failing assert in cereal
mmore500 Feb 8, 2021
0ecca01
Load sf::Font from header file for Text creation
perryk12 Feb 9, 2021
3fbac1a
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Feb 9, 2021
9f1a37d
Fix LAST_BIT and NUM_FIELDS cases in shift left
perryk12 Feb 11, 2021
1b44b03
Add Reset method to config objects
mmore500 Feb 12, 2021
9096fd1
Take const string&, not const string args
mmore500 Feb 12, 2021
a648547
Store parsed default value, not raw default value
mmore500 Feb 12, 2021
0c61764
Track template API change
mmore500 Feb 16, 2021
666625c
Add undefined functionality handling
perryk12 Feb 16, 2021
cf26983
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Feb 16, 2021
964b192
Pin all python packages, incl indirect deps
mmore500 Feb 22, 2021
05beef7
Add X11 Display logic to decide Native vs Emscripten
perryk12 Feb 23, 2021
c87f0e8
Create temporary test pngs to compare in CanvasImages.cpp
perryk12 Feb 23, 2021
4ae9590
Create CanvasImages.cpp to do png comparison tests
perryk12 Feb 23, 2021
c62b3f9
Add X11 logic to CanvasShape.hpp
perryk12 Feb 23, 2021
1c2e3e4
Add lsfml to github actions
perryk12 Feb 25, 2021
d27e539
Start X11 server and DISPLAY in github actions
perryk12 Feb 25, 2021
97d7cc5
Add static assert if emsdk and SFML don't exist
perryk12 Feb 25, 2021
6a614d7
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Feb 25, 2021
de4aa3c
Implement promote and demote keyname utils
mmore500 Mar 4, 2021
d5dfdf6
Revert bad diffs from "Add static assert if emsdk and SFML don't exist"
github-actions[bot] Mar 4, 2021
76b97a5
Merge branch 'master' of https://github.com/devosoft/Empirical into HEAD
rodsan0 Mar 9, 2021
300b605
Make NativeCanvas copyable
rodsan0 Mar 9, 2021
1d03e7d
Strip trailing whitespace
rodsan0 Mar 9, 2021
9667def
Resolve ambiguous operator overloads
mmore500 Mar 9, 2021
c212e26
Mark optional operator==, operator< const
mmore500 Mar 9, 2021
0f09873
Add comparison operator overloads for std::nullopt
mmore500 Mar 9, 2021
dd9a777
Perfectly forward vector it parent's return type
mmore500 Mar 9, 2021
38649de
Merge branch 'master' of https://github.com/devosoft/Empirical into n…
mmore500 Mar 9, 2021
c41cd40
Don't call nullopt_t ctor, use std::nullopt
mmore500 Mar 9, 2021
0f6048f
Revert MochaTestRunner function to MAIN_THREAD_EM_ASM
perryk12 Mar 9, 2021
162e8cd
Add file and error links for configpanel fix
perryk12 Mar 9, 2021
ef965d0
Use templated emp::optional comparsion overloads
mmore500 Mar 9, 2021
48c1c62
Update emp::slugify to match Python behavior
rodsan0 Mar 11, 2021
143856d
Merge remote native canvas with local
perryk12 Mar 11, 2021
4e1c6e7
Add dummy constructor taking Widget to NativeCanvase
perryk12 Mar 11, 2021
5799c6f
Add baseline png files for comparison
perryk12 Mar 11, 2021
1f57ad6
Create python script to compare pngs
perryk12 Mar 11, 2021
6b7a315
Add X11 logic to CanvasShape test
perryk12 Mar 11, 2021
7b1b599
Change png image filename in test
perryk12 Mar 11, 2021
c30d9f7
Add lsfml tags to web Makefile
perryk12 Mar 11, 2021
4b29b1f
Add EMP_HAS_X11 flag to web makefile
perryk12 Mar 11, 2021
8104824
Add overloads for comparing to emp::optional<T>
mmore500 Mar 12, 2021
99d8711
Fix absolute include path, make relative
mmore500 Mar 13, 2021
48eb916
Restore emscripten includes
mmore500 Mar 13, 2021
fc97b23
Only include emscritpen headers when available
mmore500 Mar 13, 2021
6ca14e8
Add to_string emp::optional overload
mmore500 Mar 14, 2021
47dcec4
Add second write function to create csv
perryk12 Mar 16, 2021
dc1e7cd
Break up color.hpp constructor into many functions
perryk12 Mar 16, 2021
602a867
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Mar 16, 2021
96fb814
Add test Color.cpp
perryk12 Mar 16, 2021
ae9862b
Add Color to makefile test names
perryk12 Mar 16, 2021
9a64c63
Add comma separators to csv write function
perryk12 Mar 16, 2021
7ee09a6
Add universe to potential package locations in CI
perryk12 Mar 16, 2021
00bff2f
Revert "Add universe to potential package locations in CI"
perryk12 Mar 16, 2021
1eb9fc7
Pin ubuntu version 18.04
perryk12 Mar 16, 2021
c39878d
Echo display for debugging
perryk12 Mar 16, 2021
41a437c
Move xvfb settings to same run line as make test
perryk12 Mar 16, 2021
e5fc9ff
Pass all strings by constant reference in color functions
perryk12 Mar 18, 2021
a177039
Clean up code, variable names and function parameters
perryk12 Mar 18, 2021
c339df1
Alphabetize namedColors
perryk12 Mar 18, 2021
969f331
Merge branch 'master' of https://github.com/devosoft/Empirical into n…
perryk12 Mar 18, 2021
8194cb2
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Mar 18, 2021
8e07e0b
Fix Makefile gdb lsfml merge conflict
perryk12 Mar 23, 2021
e9d7594
Add gdb backtrace to native Makefile
perryk12 Mar 23, 2021
560c080
Create WriteCSV functions in config
perryk12 Mar 23, 2021
581fe50
Consolidate WriteCSV function for 2 row output
perryk12 Mar 23, 2021
8301200
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Mar 23, 2021
a671783
Add file for color logic, fix parse function return values
perryk12 Mar 23, 2021
ac0fdda
Fix typo in comment
mmore500 Mar 23, 2021
aec316f
Refactor WriteCSV to use emp::DataFile
mmore500 Mar 23, 2021
5d0b4bb
Replace std::endl with '\n'
mmore500 Mar 24, 2021
0058fc1
Add else to CanvasShape emscripten if statement
perryk12 Mar 25, 2021
bc42757
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Mar 25, 2021
a0654c2
Use GabrielBB for yml xvfb setup
perryk12 Mar 25, 2021
d3edfc7
Disable all tests but native for debugging
perryk12 Mar 25, 2021
091afc1
Take out xvfb from apt-get install
perryk12 Mar 25, 2021
f6d18d5
Take out source emsdk from test native yml
perryk12 Mar 25, 2021
1dc8ca5
Specify literal environment variables in yml test set
perryk12 Mar 25, 2021
4754827
Update third-party requirements
perryk12 Mar 25, 2021
b006d5a
Don't auto compile requirements.txt due to python version
perryk12 Mar 25, 2021
3897c48
Make color a class, use only 1 string parameter
perryk12 Mar 29, 2021
b9efd88
Remove numpy use until we support python 3
perryk12 Mar 29, 2021
f48f5bb
Add Color ToCss_str method and test rgba strings
perryk12 Mar 29, 2021
084536e
Add DEMP_HAS_X11 variable to coverage
perryk12 Mar 29, 2021
835c190
Add native canvas support for emp::web::Color as parameter
perryk12 Mar 30, 2021
5f6583d
Turn off CanvasImages test until we move to python3
perryk12 Mar 30, 2021
f1cdfeb
Run emsdk file using old version of source
perryk12 Mar 30, 2021
1bbad6b
Run coverage tests and other modes with xvfb and x11
perryk12 Mar 30, 2021
8b79c37
Merge branch 'master' of https://github.com/devosoft/Empirical into n…
perryk12 Mar 30, 2021
815a16e
Turn back on CanvasImages test
perryk12 Mar 30, 2021
d36a36e
Use pip-compile to generate requirements.txt
perryk12 Mar 30, 2021
848e884
Run source emsdk inside bash shell
perryk12 Mar 30, 2021
6126ea3
Try to fix bash emsdk run syntax
perryk12 Mar 30, 2021
871fa8a
Get rid of DEMP_HAS_X11 flag in fulldebug
perryk12 Mar 30, 2021
b58a26a
Set fail-fast to false
perryk12 Mar 30, 2021
3949f6c
Overload EmscriptenCanvas functions to support emp::web::Color
perryk12 Apr 1, 2021
b5db06b
use env/bin/pip instead of pip3
perryk12 Apr 1, 2021
427809b
Include Color.hpp to use emp::web::Color
perryk12 Apr 1, 2021
fe9fc9b
Revert "use env/bin/pip instead of pip3"
perryk12 Apr 1, 2021
9538536
Fix Constructor argument errors
perryk12 Apr 1, 2021
3dbf53c
Try using venv instead of virtualenv
mmore500 Apr 1, 2021
b40b146
Pin matplotlib version to 3.3.4
mmore500 Apr 1, 2021
99fb3e7
Update requirements.txt with matplotlib==3.3.4
mmore500 Apr 1, 2021
fdca7dd
Test/source virtualenv to ensure python packages
perryk12 Apr 1, 2021
a77b71b
Revert "Fix Constructor argument errors"
perryk12 Apr 1, 2021
5bf6040
add implicit conversion string to Color
perryk12 Apr 1, 2021
50567bd
Revert "Overload EmscriptenCanvas functions to support emp::web::Color"
perryk12 Apr 1, 2021
f89297e
Add implicit color conversion to const string&
perryk12 Apr 1, 2021
89c0353
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Apr 1, 2021
8ed7bda
Pin to numpy 1.19.5
mmore500 Apr 1, 2021
914d160
Install python3-wheel
perryk12 Apr 1, 2021
74f35ae
Change source to .
perryk12 Apr 1, 2021
7bb691a
Install wheel before requirements.txt
perryk12 Apr 1, 2021
7f9e44a
Add lsfml tags to coverage tests
perryk12 Apr 1, 2021
a5282e0
Change sfml static_assert message
perryk12 Apr 5, 2021
dc4bee1
Miscellaneous code/format fixes
perryk12 Apr 5, 2021
0a34b56
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Apr 5, 2021
4b568cd
Comment out sf cached Color
perryk12 Apr 6, 2021
4985fbc
Move lsfml flags to FLAGS variable
perryk12 Apr 6, 2021
387c645
Revert "Move lsfml flags to FLAGS variable"
perryk12 Apr 6, 2021
6c98fb9
Add libsfml-dev to CI coverage recipe
perryk12 Apr 6, 2021
33673a6
Clean test pngs between modes, rerun failed tests 5 times
perryk12 Apr 6, 2021
8a71d84
Fix makefile syntax error
perryk12 Apr 6, 2021
ab6ee9c
Add python3-venv to docker
perryk12 Apr 6, 2021
9cbad19
Turn on all the tests
perryk12 Apr 6, 2021
9ecd724
Move color tokens and alpha to ParseRGB/HSL
perryk12 Apr 8, 2021
b8c38fb
Make bin/bash the shell for native Makefile
perryk12 Apr 8, 2021
b46281d
Fix makefile fail loop, only enable native tests to debug
perryk12 Apr 8, 2021
2a3a5b8
Add DataFile AddVal test, uncomment cases
perryk12 Apr 8, 2021
e6615b9
Fail loop working, enable all tests
perryk12 Apr 8, 2021
67d5817
Add test addval file for comparison
perryk12 Apr 8, 2021
4e0f9d7
Pin to arrow version Dockerfile pip knows about
mmore500 Apr 9, 2021
eb3d9ac
Pin kiwisolver to a version Docker pip knows about
mmore500 Apr 9, 2021
7d6dfd1
Use pip3 not pip in Dockerfile
mmore500 Apr 9, 2021
d2930d4
Revert "Pin kiwisolver to a version Docker pip knows about"
mmore500 Apr 9, 2021
f35143c
Revert "Pin to arrow version Dockerfile pip knows about"
mmore500 Apr 9, 2021
397cedf
Add docstrings to Color.hpp
perryk12 Apr 13, 2021
25477aa
Fix default parameters and misc code
perryk12 Apr 13, 2021
a42903c
Add test cases for locations by point
perryk12 Apr 13, 2021
638ad3b
Compare new point location pngs
perryk12 Apr 13, 2021
f46fe7c
Test implicit Color to string conversion
perryk12 Apr 13, 2021
560d0a3
Merge branch 'native-canvas' of https://github.com/devosoft/Empirical…
perryk12 Apr 13, 2021
6d97510
Fix Rect default parameter called from ConfigPanel
perryk12 Apr 13, 2021
e2e2ef4
Consolidate SFML mactros into EMP_HAS_SFML
perryk12 Apr 15, 2021
9e20c01
Misc code fixes and manage cached sf::Color
perryk12 Apr 15, 2021
4c85991
Mark canvasshape apply functions unimplimented
perryk12 Apr 15, 2021
5a597f3
Patch emp::array, emp::vector for _GLIBCXX_DEBUG
mmore500 Apr 21, 2021
47dbbd1
More patching for _GLIBCXX_DEBUG
mmore500 Apr 21, 2021
7d13097
Add _GLIBCXX_DEBUG, _LIBCPP_DEBUG to test recipes
mmore500 Apr 21, 2021
a9746cb
Fix invalidated iterator dereference
mmore500 Apr 22, 2021
5c0be5e
Debug-mode containers aren't compatible w/ sfml
mmore500 Apr 22, 2021
4cb3688
Fix BitSet web/native JSON serialization interop
mmore500 Apr 27, 2021
2deb35d
Bugfix: account for truncating integer division
mmore500 Apr 27, 2021
e7bd66c
Strip trailing whitespace
mmore500 Apr 27, 2021
3bf445e
Mark MatchDepository methods noexcept
mmore500 May 4, 2021
8ee79b9
Group assets into subdirectory
mmore500 May 13, 2021
76e1912
Add missing assets
mmore500 May 13, 2021
4ff2c42
Fix bug setting up cached sf color
mmore500 May 13, 2021
05f8ff9
Fix whitespace errors
mmore500 May 13, 2021
be1974f
fixup! Group assets into subdirectory
mmore500 May 13, 2021
904ebcc
Make stylistic polishes
mmore500 May 13, 2021
a5ac573
Mark script executable
mmore500 May 28, 2021
84e6a7b
Implement url_encode, url_decode
mmore500 May 28, 2021
d3a210f
Remove builtin debugging its from base build
mmore500 May 28, 2021
5c97ad4
Ensure that emp::array is serialized as array
mmore500 May 28, 2021
ebb6d81
Revert "Remove builtin debugging its from base build"
mmore500 May 28, 2021
0b96bfa
Handle emp::array reverse iterator correctly
mmore500 May 28, 2021
ce47785
Fix and test reverse iterators on safe containers
mmore500 May 29, 2021
90882e6
Add more bitset_utils tests
mmore500 May 31, 2021
521ed53
Patch for config settings containing spaces
mmore500 Jun 3, 2021
77dfdc6
Explicitly exclude loops for one field bitset
mmore500 Jun 9, 2021
9ec7bfd
Mark todo
mmore500 Jun 9, 2021
d33fd5c
Refactor for readability
mmore500 Jun 9, 2021
f8e75b6
Move lookup table up one level
mmore500 Jun 9, 2021
28ff8ce
Add support for filtering, locking containers
mmore500 Aug 17, 2021
9bc68d2
Add convenience overload for AddFun
mmore500 Aug 17, 2021
bc9eb34
Take data_t by const ref
mmore500 Aug 17, 2021
4de0433
fixup! Take data_t by const ref
mmore500 Aug 17, 2021
0c79e2e
fixup! Add support for filtering, locking containers
mmore500 Aug 17, 2021
b37993f
Fixup API for spelling and consistency
mmore500 Aug 18, 2021
1c88a07
Add convenience overloads
mmore500 Aug 18, 2021
6aa9777
Fix backwards decay/antidecay
rodsan0 Aug 23, 2021
ec53530
Add equality operators for matching classes
rodsan0 Sep 28, 2021
9e7d14d
Revert "Replace std::endl with '\n'"
mmore500 Oct 12, 2021
06556a9
Implement and test GetRandPareto
mmore500 Jan 15, 2022
775517d
Tighten constraints on Pareto params
mmore500 Jan 17, 2022
2d687ea
Implement and test GetRandomLomax
mmore500 Jan 17, 2022
97317f8
Bugfix: ensure proper lomax range
mmore500 Jan 18, 2022
fadcef2
Implement and test GetRandZeroSymmetricPareto
mmore500 Jan 18, 2022
adc28b9
Move derivatin/validation notebooks to gists
mmore500 Jan 18, 2022
5ee26cd
Refactor helpers out of GetRandZeroSymmetricPareto
mmore500 Jan 19, 2022
d4eee97
Fix edge case causing division by zero
mmore500 Jan 27, 2022
1d56058
Add missing include
mmore500 Jan 27, 2022
58d5377
Mark free functions inline
mmore500 Feb 9, 2022
a8eea10
Implement, test fast floating point exp2
mmore500 May 28, 2022
91ba797
Optimize streak metric using emp::exp2
mmore500 May 28, 2022
92b9620
Implement and test codon metric
mmore500 Jun 3, 2022
6173055
Bugfix condon metric calculation
mmore500 Jun 3, 2022
12ce65b
Ensure at least one query and tag gene
mmore500 Jun 3, 2022
dd705ab
Fix bad human-readable metric name
mmore500 Jun 3, 2022
1c8274b
Bugfix: make callbacks available on main thread
mmore500 Sep 28, 2022
aac5975
Add missing header includes
mmore500 Oct 14, 2022
2b3eee9
Allow emp namespace substitution inside macros
mmore500 Oct 14, 2022
4704b5c
Fixup namespace override in macros
mmore500 Oct 14, 2022
ae6cb91
Fix missing headerguards
mmore500 Oct 14, 2022
5200681
Fix namespace resolution in config macro
mmore500 Oct 14, 2022
ceea25f
Bump robin hood hashing pin
mmore500 Oct 14, 2022
8ae47f0
Bugfix: convert size_t to int before negating
mmore500 Oct 14, 2022
ad74a02
fixup! Bugfix: convert size_t to int before negating
mmore500 Oct 14, 2022
72eb305
Actually test exp2_overflow_unsafe
mmore500 Oct 14, 2022
7c54593
Make polyfill cpp20-safe
mmore500 Oct 16, 2024
0a071ee
Exclude array ostream under vendorization
mmore500 Oct 16, 2024
4f05436
Patch to workaround vendorized Ptr operator<<
mmore500 Oct 17, 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
23 changes: 17 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- test-native-opt
- test-examples
# - test-cookiecutter
fail-fast: false
env:
CXX: ${{ matrix.cxx }}
TEST_SET: ${{ matrix.test-set }}
Expand All @@ -27,14 +28,17 @@ jobs:
submodules: 'recursive'
- run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- run: sudo apt-get update -qq
- run: sudo apt-get install -qq g++-8 cmake build-essential python3-pip python3-virtualenv nodejs tar gzip libpthread-stubs0-dev libc6-dbg gdb
- run: sudo apt-get install -qq g++-8 cmake build-essential python3-pip python3-virtualenv nodejs tar gzip libpthread-stubs0-dev libsfml-dev libc6-dbg gdb
- run: sudo apt-get install python3-wheel -y
- run: pip3 install wheel
- run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
- run: git fetch origin master:refs/remotes/origin/master
- run: make install-test-dependencies
- run: ${CXX} --version
- run: |
source third-party/emsdk/emsdk_env.sh
make ${TEST_SET} CXX=${CXX}
- name: Run headless test
uses: GabrielBB/xvfb-action@v1
with:
run: bash -c "echo ${DISPLAY}; source third-party/emsdk/emsdk_env.sh; make ${{ matrix.test-set }} CXX=${{ matrix.cxx }};"
test-web:
name: Web Tests
runs-on: ubuntu-18.04
Expand All @@ -43,6 +47,8 @@ jobs:
with:
submodules: 'recursive'
- run: sudo apt-get install -qq g++-8 cmake build-essential python3-pip python3-virtualenv nodejs tar gzip libpthread-stubs0-dev libc6-dbg gdb
- run: sudo apt-get install python3-wheel -y
- run: pip3 install wheel
- run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
- run: make install-test-dependencies
- name: Run headless test
Expand All @@ -62,15 +68,20 @@ jobs:
- run: sudo apt-get update -qq
- run: sudo apt-get install -qq g++-8
- run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
- run: sudo apt-get install cmake build-essential python3-virtualenv python3-pip nodejs tar gzip libclang-7-dev llvm llvm-dev libllvm7 llvm-7 llvm-7-dev clang-7 libstdc++-7-dev # might have to happen after we update g++
- run: sudo apt-get install cmake build-essential python3-virtualenv python3-pip nodejs tar gzip libclang-7-dev llvm llvm-dev libllvm7 llvm-7 llvm-7-dev clang-7 libsfml-dev libstdc++-7-dev # might have to happen after we update g++
- run: sudo apt-get install python3-wheel -y
- run: pip3 install wheel
- run: sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-7 90
- run: sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-7 90
- run: sudo update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-7 90
- run: sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-7 90
- run: git fetch origin master:refs/remotes/origin/master
- run: make install-test-dependencies
- run: export CXX=clang++-7 && make install-coverage-dependencies
- run: export CXX=clang++-7 && make coverage
- name: Run coverage test with headless xvfb
uses: GabrielBB/xvfb-action@v1
with:
run: bash -c "export CXX=clang++-7; make coverage;"
- run: curl -s https://codecov.io/bash | bash
test-documentation:
name: Test Documentation Build
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN \
libc6=2.27-3ubuntu1 \
libc6-dev \
libc6-dbg \
libsfml-dev \
build-essential \
xvfb \
x11vnc \
Expand All @@ -60,6 +61,7 @@ RUN \
libstdc++-8-dev \
cmake \
python-virtualenv \
python3-venv \
python-pip-whl \
python-pip \
python-setuptools \
Expand Down Expand Up @@ -246,9 +248,9 @@ RUN \
echo "installed karma-firefox-launcher"

RUN \
pip install -r /opt/Empirical/third-party/requirements.txt \
pip3 install -r /opt/Empirical/third-party/requirements.txt \
&& \
echo "installed documentation build requirements"
echo "installed python3 requirements"

# Perform any further action as an unprivileged user.
# adapted from https://stackoverflow.com/a/27703359
Expand Down
25 changes: 25 additions & 0 deletions doc/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,28 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This repository contains source code adapted from the LLVM Project, under the
Apache License v2.0 with LLVM Exceptions. See https://llvm.org/LICENSE.txt for
license information. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception.

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

This repository contains source code for css-color-parser-cpp.

(c) Dean McNamee <[email protected]>, 2012.
(c) Konstantin Käfer <[email protected]>, 2014.

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.
21 changes: 21 additions & 0 deletions doc/dev/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,24 @@ recipe:
git status ## sanity check
git push ## should fail
git push --force ## override what's in GitHub's copy of the branch/pull request

## How to Set Up X11 Display for SFML on Windows:
1. Download MobaXterm
2. Open a WSL-Ubuntu Session
3. Hover over the XServer icon at the top right of the screen and note the DISPLAY value (X.X.X.X:X.X)
4. Type at the command prompt:

export DISPLAY=X.X.X.X:X.X

5. Run your desired programs!

## How to Set Up X11 Display for SFML on HPCC:
adapted from https://wiki.hpcc.msu.edu/display/[email protected]/2013/10
1. specify display, start the Xvfb server, and save the process ID
2. Run the following commands

export DISPLAY=":${SLURM_JOB_ID-1}"
rm -f "/tmp/.X11-unix/X${SLURM_JOB_ID-1}"
rm -f "/tmp/.X${SLURM_JOB_ID-1}-lock"
Xvfb "${DISPLAY}" -auth /dev/null/ &
export XVFB_PID=$!
6 changes: 6 additions & 0 deletions doc/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sphinx==3.2.1
exhale==0.2.3
sphinx-rtd-theme==0.5.0
coverxygen==1.5.0
breathe==4.22.1
myst-parser==0.12.9
95 changes: 91 additions & 4 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,93 @@
sphinx==3.2.1
exhale==0.2.3
sphinx-rtd-theme==0.5.0
coverxygen==1.5.0
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements.in
#
alabaster==0.7.12
# via sphinx
attrs==20.3.0
# via markdown-it-py
babel==2.9.0
# via sphinx
beautifulsoup4==4.9.3
# via bs4
breathe==4.22.1
# via
# -r requirements.in
# exhale
bs4==0.0.1
# via exhale
certifi==2020.12.5
# via requests
chardet==4.0.0
# via requests
coverxygen==1.5.0
# via -r requirements.in
docutils==0.16
# via
# breathe
# myst-parser
# sphinx
exhale==0.2.3
# via -r requirements.in
idna==2.10
# via requests
imagesize==1.2.0
# via sphinx
jinja2==2.11.3
# via sphinx
lxml==4.6.2
# via exhale
markdown-it-py==0.5.8
# via myst-parser
markupsafe==1.1.1
# via jinja2
myst-parser==0.12.9
# via -r requirements.in
packaging==20.9
# via sphinx
pygments==2.8.0
# via sphinx
pyparsing==2.4.7
# via packaging
pytz==2021.1
# via babel
pyyaml==5.4.1
# via myst-parser
requests==2.25.1
# via sphinx
six==1.15.0
# via
# breathe
# exhale
snowballstemmer==2.1.0
# via sphinx
soupsieve==2.2
# via beautifulsoup4
sphinx-rtd-theme==0.5.0
# via -r requirements.in
sphinx==3.2.1
# via
# -r requirements.in
# breathe
# exhale
# myst-parser
# sphinx-rtd-theme
sphinxcontrib-applehelp==1.0.2
# via sphinx
sphinxcontrib-devhelp==1.0.2
# via sphinx
sphinxcontrib-htmlhelp==1.0.3
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.4
# via sphinx
urllib3==1.26.3
# via requests

# The following packages are considered to be unsafe in a requirements file:
# setuptools
10 changes: 10 additions & 0 deletions include/emp/base/EMP_NAMESPACE.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef EMP_BASE_EMP_NAMESPACE_HPP
#define EMP_BASE_EMP_NAMESPACE_HPP

// use to allow for namespace substitions inside macros
#ifndef EMP_NAMESPACE
#define EMP_NAMESPACE_OBJLIKE emp
#define EMP_NAMESPACE() emp
#endif // #ifndef EMP_NAMESPACE

#endif // #ifndef EMP_BASE_EMP_NAMESPACE_HPP
4 changes: 4 additions & 0 deletions include/emp/base/Ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ namespace emp {
template <typename T2>
Ptr(T2 * in_ptr, bool track=false) : BasePtr<TYPE>(in_ptr, UNTRACKED_ID)
{
#ifndef UIT_VENDORIZE_EMP
if (internal::ptr_debug) std::cout << "raw construct: " << ptr << ". track=" << track << std::endl;
#endif // #ifndef UIT_VENDORIZE_EMP
emp_assert( (PtrIsConvertable<T2, TYPE>(in_ptr)) );

// If this pointer is already active, link to it.
Expand Down Expand Up @@ -471,8 +473,10 @@ namespace emp {
~Ptr() {
if (internal::ptr_debug) {
std::cout << "destructing Ptr instance ";
#ifndef UIT_VENDORIZE_EMP
if (ptr) std::cout << id << " (" << ptr << ")\n";
else std::cout << "(nullptr)\n";
#endif // #ifndef UIT_VENDORIZE_EMP
}
Tracker().DecID(id);
}
Expand Down
3 changes: 3 additions & 0 deletions include/emp/base/_is_streamable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#ifndef EMP_IS_STREAMABLE_HPP
#define EMP_IS_STREAMABLE_HPP

#include <type_traits>
#include <utility>

namespace emp {

// adapted from https://stackoverflow.com/a/22759544
Expand Down
7 changes: 4 additions & 3 deletions include/emp/base/always_assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <cstdlib>

#include "_assert_trigger.hpp"
#include "EMP_NAMESPACE.hpp"
#include "macros.hpp"

/// Helper macro used throughout...
Expand All @@ -41,7 +42,7 @@
#define emp_always_assert_impl(...) \
do { \
!(EMP_GET_ARG_1(__VA_ARGS__, ~)) \
&& emp::assert_trigger( \
&& EMP_NAMESPACE()::assert_trigger( \
__FILE__, __LINE__, \
EMP_STRINGIFY( EMP_GET_ARG_1(__VA_ARGS__, ~), ), \
EMP_WRAP_ARGS(emp_assert_TO_PAIR, __VA_ARGS__) \
Expand All @@ -53,7 +54,7 @@
#define emp_always_assert_msvc_impl(TEST) \
do { \
!(TEST) \
&& emp::assert_trigger(__FILE__, __LINE__, #TEST, 0) \
&& EMP_NAMESPACE()::assert_trigger(LE__, __LINE__, #TEST, 0) \
&& (std::abort(), false); \
} while(0)

Expand All @@ -64,7 +65,7 @@
#define emp_always_assert_impl(...) \
do { \
!(EMP_GET_ARG_1(__VA_ARGS__, ~)) \
&& emp::assert_trigger( \
&& EMP_NAMESPACE()::assert_trigger( \
__FILE__, __LINE__, \
EMP_STRINGIFY( EMP_GET_ARG_1(__VA_ARGS__, ~) ), \
EMP_WRAP_ARGS(emp_assert_TO_PAIR, __VA_ARGS__) \
Expand Down
7 changes: 4 additions & 3 deletions include/emp/base/always_assert_warning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,18 @@
#include <cstdlib>

#include "_assert_trigger.hpp"
#include "EMP_NAMESPACE.hpp"
#include "macros.hpp"

/// Helper macro used throughout...
#define emp_assert_warning_TO_PAIR(X) EMP_STRINGIFY(X) , X

#if defined( _MSC_VER )

#define emp_always_assert_warning_msvc_impl(TEST) \
#define emp_always_assert_warning_msvc_impl(TEST) \
do { \
!(TEST) \
&& emp::assert_trigger(__FILE__, __LINE__, #TEST, 0); \
&& EMP_NAMESPACE()::assert_trigger(__FILE__, __LINE__, #TEST, 0); \
} while(0)

#define emp_always_assert_warning_impl(TEST) \
Expand All @@ -51,7 +52,7 @@
#define emp_always_assert_warning_impl(...) \
do { \
!(EMP_GET_ARG_1(__VA_ARGS__, ~)) \
&& emp::assert_trigger( \
&& EMP_NAMESPACE()::assert_trigger( \
__FILE__, __LINE__, \
EMP_STRINGIFY( EMP_GET_ARG_1(__VA_ARGS__, ~) ), \
EMP_WRAP_ARGS(emp_assert_warning_TO_PAIR, __VA_ARGS__) \
Expand Down
Loading