How To Contribute

Thank you for considering to contribute to nametable! People like yourself are the lifeblood of the community and this tool.

The purpose of this document is to codify the processes required to contribute to this project to empower yourself and the community to contribute.

Support

If GitHub is overwelming, but still want to help the community: help fellow developers on StackOverflow.

The official tag is python-nametable and support enables us to improve nametable instead.

Getting Started

You will need a working version of Python between the versions specified inside the toml file and to install Poetry. To install the remaining dependencies, simply write the following:

$ git clone git@github.com:TheJoeSmo/nametable.git
$ cd nametable
$ poetry install

This will install the remaining dependencies. It is recommended to run this command after each fetch or update to the project’s dependencies, as it ensures the continous integration environment is equivelent to your local one.

If everything worked, you should be able to run the following and see that every test passed:

$ poetry run pytest tests/

Workflow

  • No contribution is too small! Fixes to typos and grammar are welcome.

  • Try to limit each pull request to a single change.

  • Always add tests and documentation for your code. We recommend using test driven development to develop your software. It helps divide the program into smaller parts, which helps both yourself and the reviewer. If either tests or documentation are not provided, your code will be inelegiable to be merged.

  • Make sure that your new tests would otherwise fail without your change.

  • Ensure that your new test and the remaining tests pass using pytest. When making a pull request, Github will automatically run these tests. We will not provide feedback until all tests pass or explicitly asked.

  • Once you’ve addressed review feedback, make sure to bump the pull request with a small note so we know you have finished.

Code

  • Obey PEP 8 and Numpy Docs style guide. We use """ for on seperate lines for docstrings.

    def func(x: int) -> str:
        """
        Do something.
    
        Parameters
        ----------
        x : int
            Description of parameter `x`.
    
        Returns
        -------
        str
            Description of the string return value.
        """
    
  • We use Black and Flake8 as our linters. We recommend you set run the following commands before making a pull request. If you don’t, the continous integration workflow will catch it on Github, but it is often simpler to run it locally.

    $ cd C:\\User\\user_name\\path\\to\\repository
    $ flake8 .  --max-line-length 120  --ignore=E203  --per-file-ignores="__init__.py:F401"
    $ black . --check --line-length 120
    

Tests

  • Tests should write the asserts as expected == actual, to provide easier readability

  • To run the test suite, simply write the following in your console:

    $ cd C:\\User\\user_name\\path\\to\\repository
    $ pytest tests/ --exitfirst --verbose --failed-first
    

Contributor Code of Conduct

Our Promise

We as members, contributors, and leaders promise to provide a harrassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge that our interactions will contribute to an open, welcoming, diverse, inclusive, and healthy community.

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

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders 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, and will communicate reasons for moderation decisions when appropriate.

Scope

This Code of Conduct applies both inside the project and in public spaces where an individual is representing the project or its associated community. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at joesmo.joesmo12@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality 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, version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>.