From 3bb5d530e022b50cdcfa39eecfadec4def3189ab Mon Sep 17 00:00:00 2001 From: peefy Date: Fri, 15 Jul 2022 11:40:11 +0800 Subject: [PATCH] refactor: deprecate the ./CONTRIBUTING.md and use ./docs/dev_guide/1.about_this_guide.md --- CONTRIBUTING.md | 134 --------------------------- README.md | 2 +- README_ZH.md | 2 +- docs/dev_guide/1.about_this_guide.md | 2 + 4 files changed, 4 insertions(+), 136 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index c0de0584f..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,134 +0,0 @@ -# KCLVM Developing Guide - -KCLVM follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you would like to contribute something, or simply want to hack on the code this document should help you get started. - -Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributor’s agreement does not grant anyone commits rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team and given the ability to merge pull requests. - -## Install Dependencies - -### macOS and OS X - -+ `Python3.7+` -+ `Go 1.16+` -+ `Rust 2021 edition` -+ `openssl@1.1` - -``` -brew install openssl@1.1 -``` - -### Linux - -+ `Go 1.16+` -+ `Rust 2021 edition` -+ `Python3 Building Dependencies` - -For UNIX based systems, you can run: - -``` -yum groupinstall -y "Development Tools" -yum install -y gcc patch libffi-devel python-devel zlib-devel bzip2-devel ncurses-devel sqlite-devel -yum install -y libpcap-devel xz-devel readline-devel tk-devel gdbm-devel db4-deve -yum -y install yum-utils -yum-builddep -y python3 -yum install -y zlib* -yum install -y openssl-devel -yum install -y glibc-static -``` - -On Debian, Ubuntu, and other apt based systems, you can run: - -``` -apt-get update - -apt-get install -y git wget curl -apt-get install -y make gcc patch -apt-get install -y python-dev libffi-dev -apt-get install -y zlib1g-dev ncurses-dev build-essential libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev -``` - -### Docker - -Use the image `kusionstack/kclvm-builder`, run: - -``` -make sh-in-docker -``` - -## Building and Testing - -### Scripting - -We provide a simple `run.sh` script to build and package with. - -To build everything, run: - -``` -./run.sh -a build -``` - -Building includes two steps, which are `build-cpython` and `build-kclvm`. Alternatively, these steps can be invoked separately: - -``` -./run.sh -a build-cpython -./run.sh -a build-kclvm -``` - -Building KCL requires local ssl module. Use -s $yourLocalSSL to specify custom ssl path: - -``` -./run.sh -a build -s $your-local-ssl -./run.sh -a build-cpython -s $your-local-ssl -``` - -If -s option unset, default ssl path will be used: -Darwin: `$(brew --prefix openssl@1.1)` -Linux: `/usr/lib64` - -To use KCL, add the path `_build/dist/{os}/kclvm/bin` to the `PATH` environment variable. Here, `{os}` stands for the operating system, which can be `Darwin`, `centos`, `ubuntu` or other types. - -Then, you can run: - -``` -kcl hello.k -``` - -To perform testing, run: - -``` -./run.sh -a test -``` - -Next, we can refer to [KCLVM README](./kclvm/README.md) for the next step of environment configuration and build the KCLVM rust code. - -If we have changed any codes in the program, we can update kclvm binaries, run: - -``` -./run.sh -a update-kclvm -``` - -To build a tar file, run: - -``` -./run.sh -a release -``` - -## Using KCL - -The specific user manual is as follows: [KCLVM User Manual](docs/cmd/README_KCLVM_USE.md) - -## Code Structure - -KCL has added the following files and directories: - -+ `kclvm` - The KCL compiler code. -+ `test` - All KCL test cases include regression tests and unit tests. -+ `scripts` - The directory where additional scripts to build and test KCL resist. -+ `run.sh` - The script to perform operations such as building and testing. -+ `internal/kclvm_py` - KCLVM Python implementation, will be abandoned soon, please do not submit any code to it, it will be reorganized in the way of KCLVM Python SDK in the future. -+ `docs` - KCL command line Documentation. -+ `spec` - KCL model and API Specification. - -During building and testing, the following directories can be generated: - -+ `_build` - The directory to save building results including distributions. diff --git a/README.md b/README.md index bccca797e..14e3de166 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Detailed documentation is available at https://kusionstack.io ### Developing -See [Developing Guide](./CONTRIBUTING.md). +See [Developing Guide](./docs/dev_guide/1.about_this_guide.md). ### Roadmap diff --git a/README_ZH.md b/README_ZH.md index 92f929b24..948d10b8d 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -80,7 +80,7 @@ fib8: 21 ### 开发 -参考[开发手册](./CONTRIBUTING.md). +参考[开发手册](./docs/dev_guide/1.about_this_guide.md). ### 路线规划 diff --git a/docs/dev_guide/1.about_this_guide.md b/docs/dev_guide/1.about_this_guide.md index 9e3a9c11b..b5dcb3c0f 100644 --- a/docs/dev_guide/1.about_this_guide.md +++ b/docs/dev_guide/1.about_this_guide.md @@ -13,6 +13,8 @@ The Guide itself is of course open-source as well, and the sources can be found If you do contribute to the guide, please see the corresponding subsection on writing documentation in this guide. +Read [Quick Start](2.quick_start.md) to start. + ## Other Documentations * [KCL Documents](https://kusionstack.io/docs/reference/lang/lang/tour)