Skip to content

Commit

Permalink
adding issue templates; coc and contributing docs (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidslusser authored Jan 2, 2024
1 parent c4fcb66 commit 251fa55
Show file tree
Hide file tree
Showing 10 changed files with 261 additions and 11 deletions.
49 changes: 49 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.


This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at https://www.contributor-covenant.org/version/1/3/0/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org
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-hostutils

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

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-hostutils/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-hostutils/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-hostutils) and then clone it:

```shell
git clone [email protected]:<you>/django-hostutils.git
```

Create a virtual environment and install dependancies:

```shell
cd django-hostutils
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).
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature Request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

## Feature Request

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Question
about: Ask a question or seek clarification
title: ''
labels: ''
assignees: ''

---

## Question

**Describe your question or request for clarification**

[Please provide as much detail as possible]

**Additional context**
Add any other context or information relevant to your question.
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-hostutils 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
3 changes: 2 additions & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
runs-on: ubuntu-latest
name: "pypi"
steps:
- uses: davidslusser/actions_python_pypi@test
- uses: davidslusser/actions_python_pypi@v1.0.1
with:
build_command: "python -m build"
pypi_username: ${{ secrets.PYPI_USERNAME }}
pypi_password: ${{ secrets.PYPI_PASSWORD }}
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# django-hostutils
[![Downloads](https://static.pepy.tech/badge/django-hostutils)](https://pepy.tech/project/django-hostutils)
[![PyPI](https://img.shields.io/pypi/v/django-hostutils?label=pypi%20package&color=blue)](https://pypi.org/project/django-hostutils/)
[![Downloads](https://static.pepy.tech/badge/django-hostutils)](https://pepy.tech/project/django-hostutils)
![](https://img.shields.io/pypi/status/django-pygwalker)

[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7474/badge)](https://bestpractices.coreinfrastructure.org/projects/7474)

![PyPI - Python](https://img.shields.io/pypi/pyversions/django-hostutils)
![PyPI - Django](https://img.shields.io/pypi/djversions/django-hostutils)

Django hostutils is a collection of utilities to provide information and metrics for hosts running a Django project. Data is available via included Bootstrap 5 templates and custom views/templates also be used. Host metric data includes:
Django hostutils is a collection of utilities to provide information and metrics for hosts running a Django project. Data is available via included Bootstrap 5 templates and custom views/templates can also be used. Host metric data includes:
- Host OS, release, uptime
- CPU count and utilization
- Memory usage
Expand Down Expand Up @@ -48,13 +50,6 @@ Full documentation can be found on: https://django-hostutils.readthedocs.io/en/l

Documentation source files are available in the [docs](https://github.com/djangoaddicts/django-hostutils/tree/main/docs/source) folder.

<br/>

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

https://github.com/djangoaddicts/django-hostutils/blob/docs/LICENSE


<br/>

Expand Down Expand Up @@ -136,3 +131,15 @@ Custom views/templates can be used to override the Bootstrap 5 templates provide
template_name = "my_custom_template.html"
title = "My Custom Title"
```

<br/>

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

https://github.com/djangoaddicts/django-hostutils/blob/docs/LICENSE

<br/>

## Contributing
To contribute to django-hostutils, please see [Contributing](.github/CONTRIBUTING.md)
5 changes: 4 additions & 1 deletion docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ sphinx:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ dev = [
docs = [
"sphinx",
"sphinx-rtd-theme",
"myst-parser",
]


Expand Down

0 comments on commit 251fa55

Please sign in to comment.