Skip to content

Commit

Permalink
Add contributing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Prescod committed Dec 18, 2020
1 parent 6e38f80 commit a2f1e92
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps.

You can contribute in many ways:

Types of Contributions
----------------------

### Report Bugs

Report bugs at <https://github.com/hpyproject/hpy/issues>.

When reporting a bug, please include:

- Your operating system name and version.
- Any details about your local setup that might be helpful in
troubleshooting.
- Detailed steps to reproduce the bug.

### Donate to HPy

Become a financial contributor and help us sustain the HPy community: [Contribute to HPy](https://opencollective.com/hpy/contribute).

### Fix Bugs or Implement Features

Look through the GitHub issues for bugs or proposals being discussed
or ready for implementation.

### Write Documentation

HPy could always use more documentation, whether as part of the
official HPy docs, in docstrings, or even on the web in blog
posts, articles, and such.

Get Started!
------------

You can test your environment by running

```bash
proof-of-concept/test_pof.sh wheel universal
```

This should build HPy and a proof of concept (demo) extension and
then run a pytest that validates both.

Until we get around to more comprehensive documentation, you
can reverse engineer how the system works by looking at these
files:

- `proof-of-concept/test_pof.sh`
- `proof-of-concept/setup.py`
18 changes: 18 additions & 0 deletions proof-of-concept/test_pof.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ setup_py_install() {

# ======== main code =======

# validate arguments
if [[ "$#" -lt 1 || ( "$#" -lt 2 && "$1" != "clean") ]]; then
echo "Usage: $0 COMMAND [TARGET_ABI]" >&2
echo "Commands:" >&2
echo " wheel TARGET_ABI: build a wheel, install and test"
echo " setup_py_install TARGET_ABI: install poc using 'setup.py install' & run tests" >&2
echo " clean: clean build artifacts" >&2
echo "Target ABIs:" >&2
echo " universal: Binary intended for any Python implementation" >&2
echo " cpython : Binary optimized for CPython" >&2
exit 1
fi

if [ ! -d "proof-of-concept" ] ; then
echo "Script must be run in the repo root" >&2
exit 1
fi

# call the function mentioned as the first arg
COMMAND="$1"
shift
Expand Down

0 comments on commit a2f1e92

Please sign in to comment.