Skip to content

Commit

Permalink
adding contributing doc (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidslusser committed Jan 1, 2024
1 parent 436f890 commit e2840f2
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 9 deletions.
86 changes: 86 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributing to django-pygwalker

First off, thank you for considering contributing to django-pygwalker!

The following is a set of guidelines for contributing to this project. These are just guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

## Table of Contents

1. [Code of Conduct](#code-of-conduct)
2. [How Can I Contribute?](#how-can-i-contribute)
- [Reporting Bugs](#reporting-bugs)
- [Suggesting Enhancements](#suggesting-enhancements)
- [Pull Requests](#pull-requests)
3. [Development Setup](#development-setup)
4. [Style Guide](#style-guide)
5. [License](#license)

<br/>

## Code of Conduct

This project and everyone participating in it are governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [maintainer email].

<br/>

## How Can I Contribute?

### Reporting Bugs

- Before creating bug reports, please check the [existing issues](https://github.com/djangoaddicts/django-pygwalker/issues) as you might find that the issue has already been reported.
- When creating a bug report, please include a clear and concise description of the problem and steps to reproduce it.

### Suggesting Enhancements

- Before creating enhancement suggestions, please check the [list of open issues](https://github.com/djangoaddicts/django-pygwalker/issues) as you might find that the suggestion has already been made.
- When creating an enhancement suggestion, please provide a detailed description and, if possible, an implementation proposal.

### Pull Requests

- Provide a clear and concise description of your pull request.
- Ensure you have tested your changes thoroughly.
- Add/update unittests as nessessary.
- Make sure code quaility tools run successfully.

Merging contributions requires passing the checks configured with the CI. This includes running tests, linters, and other code quaility tools successfully on the currently officially supported Python and Django versions.

<br/>

## Development

You can contribute to this project forking it from GitHub and sending pull requests.

First [fork](https://help.github.com/en/articles/fork-a-repo) the
[repository](https://github.com/djangoaddicts/django-pygwalker) and then clone it:

```shell
git clone git@github.com:<you>/django-pygwalker.git
```

Create a virtual environment and install dependancies:

```shell
cd django-pygwalker
python -m venv venv
source venv/bin/activate
pip install .[dev]
```

Unit tests are located under the tests directory and can be executed via pytest:

```shell
pytest
```


<br/>

## Style Guide

Follow the coding style outlined in [STYLE_GUIDE.md](STYLE_GUIDE.md).

<br/>

## License

By contributing, you agree that your contributions will be licensed under the [GNU-3 license](../LICENSE).
26 changes: 26 additions & 0 deletions .github/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Project Style Guide

This style guide outlines the coding conventions and formatting standards for the django-pygwalker Python codebase.

<br/>

## PEP 8

We adhere to the PEP 8 style guide, which is the style guide for Python code. Please make sure to familiarize yourself with PEP 8 guidelines: [PEP 8 -- Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/).

<br/>

## Line Length

The maximum line length for code and comments is set to 120 characters. This allows for better readability without excessively long lines.

<br/>

## Code Formatting with Black

We recommend using the `black` code formatter to ensure consistent and automatically formatted code. `black` is an opinionated code formatter that automatically formats your code in a consistent style.

To install `black`, run the following command:

```bash
pip install black
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ Full documentation can be found on http://django-pygwalker.readthedocs.org.
Documentation source files are available in the docs folder.


<br/>

## License
django-pygwalker is licensed under the GNU-3 license (see the LICENSE file for details).

https://github.com/djangoaddicts/django-pygwalker/blob/main/LICENSE


<br/>

## Installation
Expand Down Expand Up @@ -131,3 +123,15 @@ class MyPygWalkerView(PygWalkerView):
queryset = MyModel.objects.all()
template_name = "my_custom_template.html"
```

<br/>

## License
django-pygwalker is licensed under the GNU-3 license (see the LICENSE file for details).

https://github.com/djangoaddicts/django-pygwalker/blob/main/LICENSE

<br/>

## Contributing
To contribute to django-pygwalker, please see [Contributing](.github/CONTRIBUTING.md)
2 changes: 2 additions & 0 deletions docs/source/coc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../.github/CODE_OF_CONDUCT.md
```
2 changes: 2 additions & 0 deletions docs/source/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../.github/CONTRIBUTING.md
```
3 changes: 3 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ features
internals
version_history
license
coc
contributing
style_guide
```

<br/>
2 changes: 1 addition & 1 deletion docs/source/license.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LICENSE
# License

```{eval-rst}
.. include:: ../../LICENSE
Expand Down
2 changes: 2 additions & 0 deletions docs/source/style_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
```{include} ../../.github/STYLE_GUIDE.md
```

0 comments on commit e2840f2

Please sign in to comment.