-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5eb3f97
commit 4cdd357
Showing
5 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Install the latest | ||
=================== | ||
|
||
To install the latest version of tnpy simply run: | ||
|
||
`pip3 install tnpy` | ||
|
||
OR | ||
|
||
`poetry add tnpy` | ||
|
||
OR | ||
|
||
`pipenv install tnpy` | ||
|
||
|
||
Changelog | ||
========= | ||
## 1.0.0 - TBD | ||
- Initial API stable release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Contributing to tnpy | ||
======== | ||
|
||
Looking for a useful open source project to contribute to? | ||
Want your contributions to be warmly welcomed and acknowledged? | ||
Welcome! You have found the right place. | ||
|
||
## Getting tnpy set up for local development | ||
The first step when contributing to any project is getting it set up on your local machine. tnpy aims to make this as simple as possible. | ||
|
||
Account Requirements: | ||
|
||
- [A valid GitHub account](https://github.com/join) | ||
|
||
Base System Requirements: | ||
|
||
- Python3.6+ | ||
- poetry | ||
- bash or a bash compatible shell (should be auto-installed on Linux / Mac) | ||
|
||
Once you have verified that you system matches the base requirements you can start to get the project working by following these steps: | ||
|
||
1. [Fork the project on GitHub](https://github.com/tanlin2013/tnpy/fork). | ||
2. Clone your fork to your local file system: | ||
`git clone https://github.com/$GITHUB_ACCOUNT/tnpy.git` | ||
3. `cd tnpy | ||
4. `poetry install` | ||
|
||
## Making a contribution | ||
Congrats! You're now ready to make a contribution! Use the following as a guide to help you reach a successful pull-request: | ||
|
||
1. Check the [issues page](https://github.com/tanlin2013/tnpy/issues) on GitHub to see if the task you want to complete is listed there. | ||
- If it's listed there, write a comment letting others know you are working on it. | ||
- If it's not listed in GitHub issues, go ahead and log a new issue. Then add a comment letting everyone know you have it under control. | ||
- If you're not sure if it's something that is good for the main tnpy project and want immediate feedback, you can discuss it [here](https://gitter.im/tanlin2013/tnpy). | ||
2. Create an issue branch for your local work `git checkout -b issue/$ISSUE-NUMBER`. | ||
3. Do your magic here. | ||
4. Ensure your code matches the [HOPE-8 Coding Standard](https://github.com/hugapi/HOPE/blob/master/all/HOPE-8--Style-Guide-for-Hug-Code.md#hope-8----style-guide-for-hug-code) used by the project. | ||
5. Submit a pull request to the main project repository via GitHub. | ||
|
||
Thanks for the contribution! It will quickly get reviewed, and, once accepted, will result in your name being added to the acknowledgments list :). | ||
|
||
## Thank you! | ||
I can not tell you how thankful I am for the hard work done by tnpy contributors like *you*. | ||
|
||
Thank you! | ||
|
||
~Timothy Crosley |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# HOPE 8 -- Style Guide for Hug Code | ||
|
||
| | | | ||
| ------------| ------------------------------------------- | | ||
| HOPE: | 8 | | ||
| Title: | Style Guide for Hug Code | | ||
| Author(s): | Timothy Crosley <[email protected]> | | ||
| Status: | Active | | ||
| Type: | Process | | ||
| Created: | 19-May-2019 | | ||
| Updated: | 17-August-2019 | | ||
|
||
## Introduction | ||
|
||
This document gives coding conventions for the Hug code comprising the Hug core as well as all official interfaces, extensions, and plugins for the framework. | ||
Optionally, projects that use Hug are encouraged to follow this HOPE and link to it as a reference. | ||
|
||
## PEP 8 Foundation | ||
|
||
All guidelines in this document are in addition to those defined in Python's [PEP 8](https://www.python.org/dev/peps/pep-0008/) and [PEP 257](https://www.python.org/dev/peps/pep-0257/) guidelines. | ||
|
||
## Line Length | ||
|
||
Too short of lines discourage descriptive variable names where they otherwise make sense. | ||
Too long of lines reduce overall readability and make it hard to compare 2 files side by side. | ||
There is no perfect number: but for Hug, we've decided to cap the lines at 100 characters. | ||
|
||
## Descriptive Variable names | ||
|
||
Naming things is hard. Hug has a few strict guidelines on the usage of variable names, which hopefully will reduce some of the guesswork: | ||
- No one character variable names. | ||
- Except for x, y, and z as coordinates. | ||
- It's not okay to override built-in functions. | ||
- Except for `id`. Guido himself thought that shouldn't have been moved to the system module. It's too commonly used, and alternatives feel very artificial. | ||
- Avoid Acronyms, Abbreviations, or any other short forms - unless they are almost universally understand. | ||
|
||
## Adding new modules | ||
|
||
New modules added to the a project that follows the HOPE-8 standard should all live directly within the base `PROJECT_NAME/` directory without nesting. If the modules are meant only for internal use within the project, they should be prefixed with a leading underscore. For example, def _internal_function. Modules should contain a docstring at the top that gives a general explanation of the purpose and then restates the project's use of the MIT license. | ||
There should be a `tests/test_$MODULE_NAME.py` file created to correspond to every new module that contains test coverage for the module. Ideally, tests should be 1:1 (one test object per code object, one test method per code method) to the extent cleanly possible. | ||
|
||
## Automated Code Cleaners | ||
|
||
All code submitted to Hug should be formatted using Black and isort. | ||
Black should be run with the line length set to 100, and isort with Black compatible settings in place. | ||
|
||
## Automated Code Linting | ||
|
||
All code submitted to hug should run through the following tools: | ||
|
||
- Black and isort verification. | ||
- Flake8 | ||
- flake8-bugbear | ||
- Bandit | ||
- pep8-naming | ||
- vulture | ||
- safety |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# HOPE 11 -- Code of Conduct | ||
|
||
| | | | ||
| ------------| ------------------------------------------- | | ||
| HOPE: | 11 | | ||
| Title: | Code of Conduct | | ||
| Author(s): | Timothy Crosley <[email protected]> | | ||
| Status: | Active | | ||
| Type: | Process | | ||
| Created: | 17-August-2019 | | ||
| Updated: | 17-August-2019 | | ||
|
||
## Abstract | ||
|
||
Defines the Code of Conduct for Hug and all related projects. | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
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. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting [[email protected]](mailto:[email protected]). All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. Confidentiality will be maintained | ||
with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][https://www.contributor-covenant.org], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Contributors | ||
=================== | ||
|
||
## Core Developers | ||
- Tan Tao-Lin (@tanlin2013) | ||
|
||
## Notable Bug Reporters | ||
- | ||
|
||
## Code Contributors | ||
- | ||
|
||
## Documenters | ||
- | ||
|
||
|
||
-------------------------------------------- | ||
|
||
A sincere thanks to everyone who helps make tnpy into a great Python3 project! | ||
|
||
~Tan Tao-Lin |