Skip to content

Commit

Permalink
Restructure Project (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeyadOsama authored Jan 9, 2021
1 parent 42e3b0f commit b453e62
Show file tree
Hide file tree
Showing 44 changed files with 18,997 additions and 587 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ZeyadOsama
22 changes: 22 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# How-to contribute

Those are the main contributing guidelines for contributing to this project:

- Verify that your contribution does not embark proprietary code or infringe any copyright of any sort.
- Avoid adding any unnecessary dependencies to the project, especially of those are not easily packaged and installed through `brew` or `apt-get`.
- C/C++ contributions must follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html#Run-Time_Type_Information__RTTI_).
- Use [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) mechanism and please be patient while waiting for reviews.
- Remain polite and civil in all exchanges with the maintainers and other contributors.
- Any issue submitted which does not respect provided template, or lack of information, will be considered as invalid and automatically closed.

## Get started

In order to contribute, the safest is to create your [own fork of jsonCPP](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) first. The following set of commands will clone this new repository, create a virtual environment provisioned with the dependencies and run the tests (will take a few minutes):

```bash
git clone https://github.com/<user-name>/jsonCPP && cd jsonCPP
```

You can then make your changes and experiment freely. Once you're done, remember to check that the tests still run. If you've added a new feature, add tests!

Then finally, you're more than welcome to create a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) in **jsonCPP** main repo. We will look at it as soon as possible and eventually integrate your changes in the project.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
NAME: Bug
ABOUT: Report a bug
LABELS: bug, invalid
TITLE: "[Bug] name your bug"
---

<!-- PLEASE READ THIS CAREFULLY :
- Any issue which does not respect following template or lack of information will be considered as invalid and automatically closed
- First check FAQ from wiki to see if your problem is not already known
-->

- [ ] I didn't find a similar issue already open.
- [ ] I read the documentation (README & Wiki)
- [ ] My problem is related to jsonCPP only, not a derivative product (such as CMake, or GUI provided by others)


## Description

<!-- Give us a clear and concise description of the bug you are reporting. -->

## Step to reproduce

<!-- Indicates clearly steps to reproduce the behavior: -->

1. Installed using `...`
2. Run as `...`
3. Got `...` error

## Output

```bash
Share what your terminal says when you run the script (as well as what you would expect).
```

## Environment

<!-- Fill the following table -->

| | |
| ----------------- | ------------------------------- |
| OS | Windows / Linux / MacOS / other |
| Installation type | Conda / pip / other |
| RAM available | XGo |
| Hardware spec | GPU / CPU / etc ... |

## Additional context

<!-- Add any other context about the problem here, references, cites, etc.. -->
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/discussion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
NAME: Discussion
ABOUT: Ideas sharing or theoretical question solving
LABELS: Question
TITLE: "[Discussion] your question"
---

<!-- Please respect the title [Discussion] tag. -->
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
NAME: Feature request
ABOUT: Submit idea for new feature
LABELS: feature, enhancement
TITLE: "[Feature] your feature name"
---

## Description

<!-- Describe your feature request here. -->

## Additional information

<!-- Add any additional description -->
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# [jsonCPP-vX.Y.Z] - <pull-request-title>

## Description

A few sentences describing the overall goals of the pull request's commits.

## How this patch was tested

You tested it, right?

## Documentation link and external references

Please provide any info that may help us better understand your code.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on: [ push ]

jobs:

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
configs: [ Release, Debug ]

steps:
- name: Checkout
uses: actions/[email protected]

- name: Build
uses: nicledomaS/[email protected]
with:
config: ${{ matrix.configs }}
cmake_args: -DjsonCPP_BUILD_EXAMPLES=ON;

- name: Test
uses: nicledomaS/[email protected]
with:
config: ${{ matrix.configs }}
cmake_args: -DjsonCPP_BUILD_TESTS=ON;

- name: Lint
uses: deep5050/[email protected]
continue-on-error: true
129 changes: 90 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,81 @@
### C++ ###
### C ###
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
*.dll

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

### C++ ###
# Prerequisites

# Compiled Object files
*.slo

# Precompiled Headers

# Linker files

# Debugger Files

# Compiled Dynamic libraries

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

### CLion ###
### CLion+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

Expand Down Expand Up @@ -105,32 +148,40 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### CLion Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
### CLion+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
.idea/

# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
.idea/sonarlint

### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json

### CMake Patch ###
# External projects
*-prefix/

### Project Dependent ###
/log
*.log
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
==============================================
jsonCPP Release Notes
==============================================

v.1.0.0
=======

**Added**:

* Supports *.json file parsing
* Supports folder containing multiple *.json files parsing
* Uses C++11 standard.
* Uses CMake 3.5 standard.
35 changes: 25 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
cmake_minimum_required(VERSION 3.4)
project(JSON-Parser)
# Set minimum cmake version
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_policy(SET CMP0048 NEW)

set(CMAKE_CXX_STANDARD 14)
# Project settings.
project(JSON-CPP VERSION 1.0.0)

# Set C++ standard to c++11.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_definitions(-DDATA_PATH="./examples/data/")

add_subdirectory(json)
include_directories(json/include)
include_directories(prerequisites)
include_directories(include)

add_subdirectory(src)

option(jsonCPP_BUILD_EXAMPLES "Build the example of jsonCPP." OFF)
if (jsonCPP_BUILD_EXAMPLES)
add_subdirectory(examples)
endif ()

option(JSON_BUILD_EXAMPLE "Build the example of CLogger." OFF)
if (JSON_BUILD_EXAMPLE)
# add the example executable, linked with the JSON library
add_executable(JSON_Example examples/main.cpp)
target_link_libraries(JSON_Example JSON ${SYSTEM_LIBRARIES})
option(jsonCPP_BUILD_TESTS "Build the tests of jsonCPP." OFF)
if (jsonCPP_BUILD_TESTS)
add_subdirectory(tests)
include(CTest)
add_test(NAME System-Tests
COMMAND system-tests
)
endif ()
9 changes: 9 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file contains a list of people who've made non-trivial
# contribution to the jsonCPP project.
#
# People who commit code to the project are encouraged to add their names
# here.
#
# Please keep the list sorted by first names.

Zeyad Osama <[email protected]>
Loading

0 comments on commit b453e62

Please sign in to comment.