1 Star 0 Fork 0

吕超/Leach / Fury

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CONTRIBUTING.md 3.43 KB
一键复制 编辑 原始数据 按行查看 历史
caicancai 提交于 2023-10-20 16:56 . [Improve][Doc] Improve README (#1020)

How to contribute to Fury

Finding good first issues 🔎

See Good First Issue for open good first issues.

How to create an issue

See https://github.com/alipay/fury/issues for open issues.

Testing 🧪

Python

cd python
pytest -v -s .

Java

cd java
mvn -T10 clean test

C++

Run c++ tests:

bazel test $(bazel query //...)

GoLang

cd go/fury
# run tests
go test -v
# run xlang tests
go test -v fury_xlang_test.go

Styling 😎

Run all checks: bash ci/format.sh --all

License headers

docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v3 format

Java

cd java
# code format
mvn spotless:apply
# code format check
mvn spotless:check
mvn checkstyle:check

Python

cd python 
# install dependencies fro styling
pip install black==22.1.0 flake8==3.9.1 flake8-quotes flake8-bugbear
# format python code
black pyfury

C++

git ls-files -- '*.cc' '*.h' | xargs -P 5 clang-format -i

GoLang

cd go/fury
gofmt -s -w .

Debug

Java Debug

JIT DEBUG

Fury supports dump jit generated code into local file for better debug by configuring environment variables:

  • FURY_CODE_DIR:The directory for fury to dump generated code. Set to empty by default to skip dump code.
  • ENABLE_FURY_GENERATED_CLASS_UNIQUE_ID: Append an unique id for dynamically generated files by default to avoid serializer collision for different classes with same name. Set this to false to keep serializer name same for multiple execution or AOT codegen.

By using those environment variables, we can generate code to source directory and debug the generated code in next run.

Python Debug

cd python
python setup.py develop
FURY_DEBUG=true python setup.py build_ext --inplace
# For linux
cygdb build

C++ debug

See cpp_debug doc.

Debug Crash

Enable core dump on Macos Monterey 12.1

 /usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" tmp.entitlements     
codesign -s - -f --entitlements tmp.entitlements /Users/chaokunyang/anaconda3/envs/py3.8/bin/python
ulimit -c unlimited

python fury_serializer.py
ls -al /cores

Profiling

C++

# Dtrace
sudo dtrace -x ustackframes=100 -n 'profile-99 /pid == 73485 && arg1/ { @[ustack()] = count(); } tick-60s { exit(0); }' -o out.stack
sudo stackcollapse.pl out.stack > out.folded
sudo flamegraph.pl out.folded > out.svg

CI

Login into ci machine

      - name: Setup tmate session
        uses: mxschmitt/action-tmate@v3

Website

Fury website are static pages hosted by github pages under https://github.com/fury-project/fury-sites.

All updates about docs under guide and benchmarks will be synced to fury-sites automatically.

If you want write a blog, or update other contents about fury website, please submit PR to fury-sites.

1
https://gitee.com/cwwjdhya/fury.git
git@gitee.com:cwwjdhya/fury.git
cwwjdhya
fury
Fury
main

搜索帮助