Last active
September 12, 2023 07:08
-
-
Save EmperorYP7/d48ef6840bbb0ccc63ea4a5a2d19f67d to your computer and use it in GitHub Desktop.
Revisions
-
EmperorYP7 revised this gist
Apr 4, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -99,6 +99,7 @@ void bindPyEnforcer(py::module& m) { py::class_<casbin::Enforcer>(m, "Enforcer") .def(py::init<const std::string &, const std::string &>(), "") .def("Enforce", &casbin::Enforcer::Enforce); } ``` ## Contributions @@ -256,7 +257,7 @@ growth. ## Ackowledgement I'd like to thank Google for organizing such an amazing program for us and that it did create an impact on my immediate surroundings and peers to participate and contribute to opensource. -
EmperorYP7 revised this gist
Aug 22, 2021 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -266,3 +266,15 @@ Joey ([@xcaptain](https://github.com/xcaptain)) for their suggestions during the This was a great experience for me! I learned a lot about software engineering and sharpen my researching skills through this opportunity. <br /> <div align="center"> <h3> 📫 Connect with me </h3> <img src="https://raw.githubusercontent.com/ShahriarShafin/ShahriarShafin/main/Assets/handshake.gif" height="50px"> |<a href="mailto:[email protected]"><img src="https://image.flaticon.com/icons/svg/281/281769.svg" width="40"></a>|<a href="https://www.linkedin.com/in/emperoryp/"><img src="https://cdn2.iconfinder.com/data/icons/social-media-2285/512/1_Linkedin_unofficial_colored_svg-128.png" width="40"></a>|<a href="https://twitter.com/emperoryp"><img src="https://cdn2.iconfinder.com/data/icons/social-media-2285/512/1_Twitter3_colored_svg-128.png" width="40"></a>|<a href="https://medium.com/@emperoryp"><img src="https://user-images.githubusercontent.com/67560900/109533536-57d87a80-7ae0-11eb-8602-d312a0cb0b0e.png" width="45"></a>|<a href="http://yt.emperoryp.live/"><img src="https://user-images.githubusercontent.com/67560900/124399599-ef253700-dd39-11eb-8b81-68807fdc3541.png" width="45"></a>| |--|--|--|--|--| </div> -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ This can be done using CMake build system along with CTest. Here is the current build tree of the project: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130329472-bc823a40-c597-416b-82f5-2b76642ec2e9.png" height="85%" width="85%"/> </p> The project also involved setting up all the tests that were defined in the -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ This can be done using CMake build system along with CTest. Here is the current build tree of the project: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130329472-bc823a40-c597-416b-82f5-2b76642ec2e9.png" height="80%" width="80%"/> </p> The project also involved setting up all the tests that were defined in the -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ This can be done using CMake build system along with CTest. Here is the current build tree of the project: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130329293-1cf3af28-5ffa-4bc8-aad5-f23daa6330a0.png" height="90%" width="90%"/> </p> The project also involved setting up all the tests that were defined in the -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ This can be done using CMake build system along with CTest. Here is the current build tree of the project: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130329293-1cf3af28-5ffa-4bc8-aad5-f23daa6330a0.png" height="80%" width="80%"/> </p> The project also involved setting up all the tests that were defined in the -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,10 +45,9 @@ This can be done using CMake build system along with CTest. Here is the current build tree of the project: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130329293-1cf3af28-5ffa-4bc8-aad5-f23daa6330a0.png" /> </p> The project also involved setting up all the tests that were defined in the MS Unit Testing framework to [Googletest](https://github.com/google/googletest) and setting up CI workflow through GitHub Actions. A typical test may look like this: -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -212,7 +212,7 @@ Here is a summary on how to use the `pycasbin` module within a python file: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130328692-9b7ccbe0-becf-4383-a131-01526ebf8240.png" alt="pycasbin" height="70%" width="70%"/> </p> The [CI test for PyCasbin-on-CPP](https://github.com/casbin/casbin-cpp/actions/workflows/python_binding.yml) are up and running through GitHub Actions. Here is the output of the [tests](https://github.com/casbin/casbin-cpp/tree/master/tests/python): -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 14 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,7 +44,10 @@ This can be done using CMake build system along with CTest. Here is the current build tree of the project: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130225498-9b722923-ae96-4353-90c8-d134a9d16c34.png" /> </p> The project also involved setting up all the tests that were defined in the MS Unit Testing framework to [Googletest](https://github.com/google/googletest) and setting up CI workflow through GitHub Actions. @@ -177,7 +180,9 @@ The entirety of my contributions during the coding period includes 18,867 lines of code added and 6,730 lines of code deleted in casbin-cpp. The entire list of my contributions in `casbin-cpp` can be accessed [here](https://github.com/casbin/casbin-cpp/issues?q=author%3AEmperorYP7). <p align="center"> <img width="445" alt="Screenshot" src="https://user-images.githubusercontent.com/62606998/130235683-08bc682a-fc6b-42de-94c8-ca18bddc56e8.png"> </p> <br /> @@ -194,7 +199,9 @@ The [benchmarks](https://github.com/casbin/casbin-cpp/tree/master/tests/benchmar [corresponding CI](https://github.com/casbin/casbin-cpp/actions/workflows/benchmark.yml) is up and running. Here is the output of `casbin_benchmark` on my system: <p align="center"> <img width="703" alt="Screenshot 2021-08-20 at 2 20 10 AM" src="https://user-images.githubusercontent.com/62606998/130142096-ccff8e5d-b963-4035-b7df-00ad52ad977d.png"> </p> <br /> @@ -204,12 +211,15 @@ Python bindings for casbin-cpp are now ready to be used as Here is a summary on how to use the `pycasbin` module within a python file: <p align="center"> <img src="https://user-images.githubusercontent.com/62606998/130328692-9b7ccbe0-becf-4383-a131-01526ebf8240.png" alt="pycasbin" height="400" width="auto"/> </p> The [CI test for PyCasbin-on-CPP](https://github.com/casbin/casbin-cpp/actions/workflows/python_binding.yml) are up and running through GitHub Actions. Here is the output of the [tests](https://github.com/casbin/casbin-cpp/tree/master/tests/python): <p align="center"> <img width="722" alt="Screenshot 2021-08-20 at 8 10 10 PM" src="https://user-images.githubusercontent.com/62606998/130250471-621e8b91-a63e-45c3-a344-056877687744.png" /> </p> <br /> -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -200,7 +200,13 @@ Here is the output of `casbin_benchmark` on my system: Python bindings for casbin-cpp are now ready to be used as `pycasbin` module. [Documentation for installation and usage](https://github.com/casbin/casbin-cpp/blob/master/bindings/README.md) are up as well. Here is a summary on how to use the `pycasbin` module within a python file:  The [CI test for PyCasbin-on-CPP](https://github.com/casbin/casbin-cpp/actions/workflows/python_binding.yml) are up and running through GitHub Actions. Here is the output of the [tests](https://github.com/casbin/casbin-cpp/tree/master/tests/python): <img width="722" alt="Screenshot 2021-08-20 at 8 10 10 PM" src="https://user-images.githubusercontent.com/62606998/130250471-621e8b91-a63e-45c3-a344-056877687744.png"> @@ -212,6 +218,8 @@ I also made a repository to demonstrate how to integrate casbin into a CMake project for the clients. Here is the link to the same: https://github.com/EmperorYP7/casbin-CMake-setup <br /> ## What's next? All the primary goals of my GSoC proposal are completed. -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 22 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,6 +67,7 @@ TEST(TestEnforcer, TestVectorParams) { The project also needed some performance metrics in the form of benchmarks. I developed the benchmarking workflow for the project with [Google's benchmarking tool](https://github.com/google/benchmark) along with continuous testing with GitHub Actions. Here's a simple benchmark for `casbin::Enforcer::Enforce()`. ```cpp #include <benchmark/benchmark.h> @@ -167,16 +168,24 @@ period of GSoC i.e. 8th June 2021 to 18th August 2021. | [casbin-cpp#145](https://github.com/casbin/casbin-cpp/pull/145) | docs: Updated documentation and version |  | | [casbin-cpp#146](https://github.com/casbin/casbin-cpp/pull/146) | docs: Added documentation for python bindings |  | Weekly blogs/reports can be found at https://gsoc.casbin.org. I also documented my progress in a [separate gist](https://gist.github.com/EmperorYP7/25eacba56533d44d323f264a16754445). The entirety of my contributions during the coding period includes 31 Pull Requests (30 Merged, 1 Closed) and 7 issues which accounts for 18,867 lines of code added and 6,730 lines of code deleted in casbin-cpp. The entire list of my contributions in `casbin-cpp` can be accessed [here](https://github.com/casbin/casbin-cpp/issues?q=author%3AEmperorYP7). <img width="445" alt="Screenshot" src="https://user-images.githubusercontent.com/62606998/130235683-08bc682a-fc6b-42de-94c8-ca18bddc56e8.png"> <br /> ## Outcome The project's directory structure is set and CMake build system has been configured successfully and is ready to be used across all platforms. [Testing for casbin-cpp](https://github.com/casbin/casbin-cpp/tree/master/tests) has been completed successfully. There are 57 individual and disjoint tests executed through CTest. [The CI](https://github.com/casbin/casbin-cpp/actions/workflows/ci.yml) now tests the library for every platform on PR and push. @@ -196,9 +205,19 @@ The [CI test for PyCasbin-on-CPP](https://github.com/casbin/casbin-cpp/actions/w <img width="722" alt="Screenshot 2021-08-20 at 8 10 10 PM" src="https://user-images.githubusercontent.com/62606998/130250471-621e8b91-a63e-45c3-a344-056877687744.png"> <br /> I also made a repository to demonstrate how to integrate casbin into a CMake project for the clients. Here is the link to the same: https://github.com/EmperorYP7/casbin-CMake-setup ## What's next? All the primary goals of my GSoC proposal are completed. However, there is a huge scope for improving the product. Here are a few things which can be done in the project for any future contributor: - [Functional tests](https://github.com/casbin/casbin-cpp/blob/master/tests/enforcer_synced_test.cpp) for `casbin::SyncedEnforcer`. The problem arised due to ambiguity in handling multi-threaded tests in GoogleTest. @@ -212,7 +231,7 @@ to install python bindings and we need some workflow to upload and update the pa internal API of casbin-cpp. - Inspecting and improving the metrics shown by the benchmarks for regular `casbin::Enforcer` as discussed in [casbin-website#255](https://github.com/casbin/casbin-website/issues/255). I plan to work on these issues after the final evaluations are completed successfully and keep contributing to the project and help the organisation in their -
EmperorYP7 revised this gist
Aug 21, 2021 . 1 changed file with 8 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -182,7 +182,7 @@ There are 57 individual and disjoint tests executed through CTest. [The CI](https://github.com/casbin/casbin-cpp/actions/workflows/ci.yml) now tests the library for every platform on PR and push. The [benchmarks](https://github.com/casbin/casbin-cpp/tree/master/tests/benchmarks) are functional and the [corresponding CI](https://github.com/casbin/casbin-cpp/actions/workflows/benchmark.yml) is up and running. Here is the output of `casbin_benchmark` on my system: <img width="703" alt="Screenshot 2021-08-20 at 2 20 10 AM" src="https://user-images.githubusercontent.com/62606998/130142096-ccff8e5d-b963-4035-b7df-00ad52ad977d.png"> @@ -208,9 +208,11 @@ tests in GoogleTest. - Packaging of `pycasbin` as discussed in [casbin-cpp#146](https://github.com/casbin/casbin-cpp/pull/146). It is still difficult to install python bindings and we need some workflow to upload and update the package in pypi.org. - Completion of the implementation of ABAC model within the internal API of casbin-cpp. - Inspecting and improving the metrics shown by the benchmarks for regular `casbin::Enforcer`. I plan to work on these issues after the final evaluations are completed successfully and keep contributing to the project and help the organisation in their @@ -224,7 +226,7 @@ and contribute to opensource. Apart from that, I'd like to thank my mentor Yang Luo ([@hsluoyz](https://github.com/hsluoyz)) for their constant support and guidance and Joey ([@xcaptain](https://github.com/xcaptain)) for their suggestions during the program. This was a great experience for me! I learned a lot about software engineering and sharpen my researching skills through this opportunity. -
EmperorYP7 revised this gist
Aug 20, 2021 . 1 changed file with 33 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -195,3 +195,36 @@ Python bindings for casbin-cpp are now ready to be used as The [CI test for PyCasbin-on-CPP](https://github.com/casbin/casbin-cpp/actions/workflows/python_binding.yml) are up and running through GitHub Actions. Here is the output of the [tests](https://github.com/casbin/casbin-cpp/tree/master/tests/python): <img width="722" alt="Screenshot 2021-08-20 at 8 10 10 PM" src="https://user-images.githubusercontent.com/62606998/130250471-621e8b91-a63e-45c3-a344-056877687744.png"> ## What is left? Here are the things that are left: - [Functional tests](https://github.com/casbin/casbin-cpp/blob/master/tests/enforcer_synced_test.cpp) for `casbin::SyncedEnforcer`. The problem arised due to ambiguity in handling multi-threaded tests in GoogleTest. - Benchmarking for `casbin::SyncedEnforcer`. This one is related to the problem described above. - Packaging of `pycasbin` as discussed in [casbin-cpp#146](https://github.com/casbin/casbin-cpp/pull/146). It is still difficult to install python bindings and we need some workflow to upload and update the package in pypi.org. - Completion the implementation of ABAC model within the internal API of casbin-cpp. - Inspecting and improving the metrics shown by the benchmarks for regular `casbin::Enforcer`. I plan to work on these issues after the final evaluations are completed successfully and keep contributing to the project and help the organisation in their growth. ## Ackowledgement I'd like to thank Google for organisation such an amazing program for us and that it did create an impact on my immediate surroundings and peers to participate and contribute to opensource. Apart from that, I'd like to thank my mentor Yang Luo ([@hsluoyz](https://github.com/hsluoyz)) for their constant support and guidance and Joey (@xcaptain) for their suggestions during the program. This was a great experience for me and I learned a lot about software engineering and sharpen my researching skills through this opportunity. -
EmperorYP7 revised this gist
Aug 20, 2021 . 1 changed file with 172 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,14 @@ # Google Summer of Code 2021 Final Work Product <br />  <br /> ## Introduction - **Name:** Yash Pandey ([@EmperorYP7](https://github.com/EmperorYP7)) - **Organisation:** [Casbin](https://github.com/casbin) - **Project link:** https://summerofcode.withgoogle.com/projects/#6057909131149312 - **Repository link:** https://github.com/casbin/casbin-cpp @@ -24,4 +28,170 @@ Project Ideas are as follows: - Implement Python bindings for Casbin-CPP using pybind11 library - Implement testing based on CTest and set up workflows for Continuous Integration through GitHub Actions --- <br /> ## About the Project Casbin is an authorization libary which provides various authorization models upon which the client can build auth interfaces for their apps. The project was using the Visual Studio workflow to build and test the project. However, the demographics of the potential clients include people who use UNIX based operating systems for development. Thus, we needed a new build system to handle the generation, testing and packaging of the library for all platforms to make it better. This can be done using CMake build system along with CTest. Here is the current build tree of the project:  The project also involved setting up all the tests that were defined in the MS Unit Testing framework to [Googletest](https://github.com/google/googletest) and setting up CI workflow through GitHub Actions. A typical test may look like this: ```cpp #include <gtest/gtest.h> #include <casbin/casbin.h> #include "config_path.h" TEST(TestEnforcer, TestVectorParams) { casbin::Enforcer e(basic_model_path, basic_policy_path); ASSERT_EQ(e.Enforce({ "alice", "data1", "read" }), true); ASSERT_EQ(e.Enforce({ "alice", "data1", "write" }), false); // ... and so on } ``` The project also needed some performance metrics in the form of benchmarks. I developed the benchmarking workflow for the project with [Google's benchmarking tool](https://github.com/google/benchmark) along with continuous testing with GitHub Actions. ```cpp #include <benchmark/benchmark.h> #include <casbin/casbin.h> #include "config_path.h" static void BM_Enforcer(benchmark::State& state) { casbin::CachedEnforcer e(basic_model_path, basic_policy_path); for(auto _ : state) e.Enforce({ "alice", "data1", "read" }); } ``` The project needs powerful python bindings for supporting PyCasbin-on-CPP which combines the advantages of two different programming languages. This can be made with [pybind11](https://github.com/pybind/pybind11) library. A sample binding may look like this: ```cpp #include <pybind11/pybind11.h> #include <casbin/casbin.h> namespace py = pybind11; void bindPyEnforcer(py::module& m) { py::class_<casbin::Enforcer>(m, "Enforcer") .def(py::init<const std::string &, const std::string &>(), "") .def("Enforce", &casbin::Enforcer::Enforce); ``` ## Contributions ### Prior to GSoC I've been contributing to Casbin-CPP prior to GSoC coding period. This is when I got introduced to the project. I tackled some good first issues and learnt about the codebase. Major contributions include the implementation of `SyncedEnforcer` along with the unit tests. Here are my contributions: | # | Title | Status | | :--- | :---- | :-------: | | [casbin-cpp#82](https://github.com/casbin/casbin-cpp/pull/82) | feat: Replaced pragma with include guards |  | | [casbin-cpp#83](https://github.com/casbin/casbin-cpp/pull/83) | feat: Implemented synced enforcer |  | | [casbin-cpp#84](https://github.com/casbin/casbin-cpp/issues/84) | Python bindings to facilitate PyCasbin-on-CPP |  | | [casbin-cpp#90](https://github.com/casbin/casbin-cpp/pull/90) | feat: Added async ticker | | | [casbin-cpp#92](https://github.com/casbin/casbin-cpp/pull/92) | feat: Replaced travis with GitHub Actions |  | | [casbin-cpp#93](https://github.com/casbin/casbin-cpp/pull/93) | feat: Added translation unit for synced enforcer |  | | [casbin-cpp#94](https://github.com/casbin/casbin-cpp/pull/94) | feat: Added Tests for SyncedEnforcer |  | | [casbin-cpp#96](https://github.com/casbin/casbin-cpp/issues/96) | Upgrade to C++17 |  | | [casbin-cpp#98](https://github.com/casbin/casbin-cpp/pull/98) | fix: Build on MS Visual Studio |  | <br /> ### Contributions during GSoC Here is the list of contributions I made during the coding period of GSoC i.e. 8th June 2021 to 18th August 2021. | # | Title | Status | | :--- | :---- | :-------: | | [casbin-cpp#99](https://github.com/casbin/casbin-cpp/issues/99) | Configure CMake build system 🏗️|  | | [casbin-cpp#101](https://github.com/casbin/casbin-cpp/pull/101) | feat: Initiate CMake configuration |  | | [casbin-cpp#103](https://github.com/casbin/casbin-cpp/pull/103) | feat: Completion of Enforcer API |  | | [casbin-cpp#104](https://github.com/casbin/casbin-cpp/pull/104) | fix: Taking in parameters by const reference |  | | [casbin-cpp#105](https://github.com/casbin/casbin-cpp/pull/105) | feat: Added ABAC entity wrapper |  | | [casbin-cpp#106](https://github.com/casbin/casbin-cpp/pull/106) | feat: Added implementation and tests for UpdatePolicy API |  | | [casbin-cpp#107](https://github.com/casbin/casbin-cpp/pull/107) | feat: Initiated CTest setup |  | | [casbin-cpp#108](https://github.com/casbin/casbin-cpp/pull/108) | test: Management API, Utility methods and more |  | | [casbin-cpp#109](https://github.com/casbin/casbin-cpp/pull/109) | test: Added RBAC, Role Manager and removed MS Unit Tests|  | | [casbin-cpp#110](https://github.com/casbin/casbin-cpp/issues/110) | feat: Implemented ABAC in Internal API |  | | [casbin-cpp#112](https://github.com/casbin/casbin-cpp/pull/112) | feat: Inherit `std::exception` |  | | [casbin-cpp#113](https://github.com/casbin/casbin-cpp/pull/113) | chore: Updated docs for build instructions |  | | [casbin-cpp#114](https://github.com/casbin/casbin-cpp/pull/114) | feat: Initiated benchmark workflow |  | | [casbin-cpp#116](https://github.com/casbin/casbin-cpp/pull/116) | test: Benchmarks for CachedEnforcer |  | | [casbin-cpp#117](https://github.com/casbin/casbin-cpp/issues/117) | Error while using `casbin::Enforcer::AddPolicies()` |  | | [casbin-cpp#118](https://github.com/casbin/casbin-cpp/pull/118) | test: Benchmarks for ManagementAPI |  | | [casbin-cpp#119](https://github.com/casbin/casbin-cpp/issues/119) | Memory leakage while using `Enforcer::AddPolicy` and RBAC workflows |  | | [casbin-cpp#120](https://github.com/casbin/casbin-cpp/pull/120) | test: Benchmarks for `Model` and `RoleManager` |  | | [casbin-cpp#121](https://github.com/casbin/casbin-cpp/pull/121) | chore: Cleanup |  | | [casbin-cpp#122](https://github.com/casbin/casbin-cpp/pull/122) | feat: Streamlined types |  | | [casbin-website#256](https://github.com/casbin/casbin-website/pull/256) | feat: Added benchmarks for Casbin-CPP |  | | [casbin-cpp#123](https://github.com/casbin/casbin-cpp/pull/123) | feat: Initiated pybind11 Configuration |  | | [casbin-cpp#124](https://github.com/casbin/casbin-cpp/pull/124) | chore: Util cleanup |  | | [casbin-cpp#125](https://github.com/casbin/casbin-cpp/pull/125) | chore: Model Cleanup |  | | [casbin-cpp#127](https://github.com/casbin/casbin-cpp/pull/127) | chore: Config and enforcer cleanup|  | | [casbin-cpp#128](https://github.com/casbin/casbin-cpp/pull/128) | feat: Added python bindings for `casbin::Enforcer` |  | | [casbin-cpp#129](https://github.com/casbin/casbin-cpp/pull/129) | feat: Added bindings for `CachedEnforcer` |  | | [casbin-cpp#130](https://github.com/casbin/casbin-cpp/pull/130) | feat: Added bindings for `casbin::ABACData` |  | | [casbin-cpp#133](https://github.com/casbin/casbin-cpp/pull/133) | feat: Added tests for Python Bindings |  | | [casbin-cpp#134](https://github.com/casbin/casbin-cpp/issues/134) | Add tests for python bindings |  | | [casbin-cpp#135](https://github.com/casbin/casbin-cpp/pull/135) | feat: Added bindings for `casbin::Model` |  | | [casbin-cpp#136](https://github.com/casbin/casbin-cpp/issues/136) | [Test] Error in locating Test Entities in Xcode |  | | [casbin-cpp#137](https://github.com/casbin/casbin-cpp/pull/137) | feat: Added config_path for test entities |  | | [casbin-cpp#138](https://github.com/casbin/casbin-cpp/pull/138) | refactor: Exported targets for easy access |  | | [casbin-cpp#139](https://github.com/casbin/casbin-cpp/pull/139) | feat: Added python bindings for `casbin::Config` |  | | [casbin-cpp#141](https://github.com/casbin/casbin-cpp/pull/141) | chore: Updated project config |  | | [casbin-cpp#142](https://github.com/casbin/casbin-cpp/pull/142) | feat: Added bindings for `casbin::SyncedEnforcer` |  | | [casbin-cpp#145](https://github.com/casbin/casbin-cpp/pull/145) | docs: Updated documentation and version |  | | [casbin-cpp#146](https://github.com/casbin/casbin-cpp/pull/146) | docs: Added documentation for python bindings |  | The entirety of my contributions during the coding period includes 31 Pull Requests (30 Merged, 1 Closed) and 7 issues which accounts for 18,867 lines of code added and 6,730 lines of code deleted in casbin-cpp. <img width="445" alt="Screenshot" src="https://user-images.githubusercontent.com/62606998/130235683-08bc682a-fc6b-42de-94c8-ca18bddc56e8.png"> <br /> ## Outcome [Testing for casbin-cpp](https://github.com/casbin/casbin-cpp/tree/master/tests) has been completed successfully. There are 57 individual and disjoint tests executed through CTest. [The CI](https://github.com/casbin/casbin-cpp/actions/workflows/ci.yml) now tests the library for every platform on PR and push. The [benchmarks](https://github.com/casbin/casbin-cpp/tree/master/tests/benchmarks) are functional and the [corresponsing CI](https://github.com/casbin/casbin-cpp/actions/workflows/benchmark.yml) is up and running. Here is the output of `casbin_benchmark` on my system: <img width="703" alt="Screenshot 2021-08-20 at 2 20 10 AM" src="https://user-images.githubusercontent.com/62606998/130142096-ccff8e5d-b963-4035-b7df-00ad52ad977d.png"> <br /> Python bindings for casbin-cpp are now ready to be used as `pycasbin` module. [Documentation for installation and usage](https://github.com/casbin/casbin-cpp/blob/master/bindings/README.md) are up as well. The [CI test for PyCasbin-on-CPP](https://github.com/casbin/casbin-cpp/actions/workflows/python_binding.yml) are up and running through GitHub Actions. Here is the output of the [tests](https://github.com/casbin/casbin-cpp/tree/master/tests/python): <img width="722" alt="Screenshot 2021-08-20 at 8 10 10 PM" src="https://user-images.githubusercontent.com/62606998/130250471-621e8b91-a63e-45c3-a344-056877687744.png"> -
EmperorYP7 revised this gist
Aug 9, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Google Summer of Code 2021 Final Work Product  -
EmperorYP7 created this gist
Aug 9, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ # Google Summer of Code 2021 Project Report  ## Introduction - **Name:** Yash Pandey - **Organisation:** [Casbin](https://github.com/casbin) - **Project link:** https://summerofcode.withgoogle.com/projects/#6057909131149312 - **Repository link:** https://github.com/casbin/casbin-cpp - **Project Name:** Benchmarking, Python bindings and Migrating to CTest for Casbin-CPP - **Project Summary:** Casbin is an authorization library that extends its features to implement Access Control Lists, Role-Based Access Control, and Attribute-Based Access Control models in various programming languages to its clients. Casbin's Core Engine is written in GoLang. Casbin-CPP has obvious benefits of speed and efficiency compared to its implementation in other languages and thus, benchmarking is vital for the project to stand out from the rest. Python is the most versatile as well as the most used programming language and has huge community support. Casbin-CPP has the potential to support new PyCasbin to compound the benefits of both languages through language bindings and extension libraries. Currently, the project uses Microsoft Unit Testing Framework for C++ for testing and Microsoft’s Azure DevOps pipelines for CI. CTest is truly cross-platform and can be configured using GitHub Actions for consistent and better CI. Project Ideas are as follows: - Modernizing the project with C++17 standard and Google’s benchmarking tool - Implement Python bindings for Casbin-CPP using pybind11 library - Implement testing based on CTest and set up workflows for Continuous Integration through GitHub Actions ---