diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 218ae7c..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "[BUG]" -labels: bug -assignees: ajatkj - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Provide minimum reproducible code. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Library version** -Provide the version of library you are using. Check typed_configparser.__version__ - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..456963c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,54 @@ +name: Bug Report +description: Report a bug or unexpected behavior in typed_configparser +labels: [bug, pending] + +body: + +- type: markdown + attributes: + value: Thank you for contributing to typed_configparser! + +- type: textarea + id: description + attributes: + label: Description + description: | + Please explain what you're seeing and what you would expect to see. + + Please provide as much detail as possible to make understanding and solving your problem as quick as possible. + + validations: + required: true + +- type: textarea + id: example + attributes: + label: Example Code + description: > + If applicable, please add a self-contained, + [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) + demonstrating the bug. + + placeholder: | + from typed_configparser import ConfigParser + + ... + + render: Python + +- type: textarea + id: version + attributes: + label: Python, typed_configparser & OS Version + description: | + Which version of Python & typed_configparser are you using, and which Operating System? + + Please run the following command for the version and copy the output below: + + ```bash + python -c "import typed_configparser; print(typed_configparser.__version__)" + ``` + + render: Text + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..78fec85 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: Ask a Question + url: "https://github.com/ajatkj/typed_configparser/discussions/new?category=q-a" + about: Ask a question about how to use typed_configparser using github discussions diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index a599944..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[FEAT]" -labels: enhancement -assignees: ajatkj - ---- - -**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. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..9b43349 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,33 @@ +name: Feature Request +description: 'Suggest a new feature for typed_configparser' +labels: [feature request] + +body: + +- type: markdown + attributes: + value: Thank you for contributing to typed_configparser! + +- type: checkboxes + id: searched + attributes: + label: Initial Checks + description: | + Just a few checks to make sure you need to create a feature request. + options: + - label: I have searched Google & GitHub for similar requests and couldn't find anything + required: true + +- type: textarea + id: description + attributes: + label: Description + description: | + Please give as much detail as possible about the feature you would like to suggest. + + You might like to add: + * A demo of how code might look when using the feature + * Your use case(s) for the feature + + validations: + required: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe4d5d3..ac58eb4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,116 @@ -Coming soon \ No newline at end of file +# Contributing + +I'd love you to contribute to typed_configparser! +zw + +## Issues + +Questions, feature requests and bug reports are all welcome as [discussions or issues](https://github.com/ajatkj/typed_configparser/issues/new/choose). + +To make it as simple as possible for us to help you, please include the output of the following call in your issue: + +```bash +python -c "import typed_configparser; print(typed_configparser.__version__)" +``` + +## Pull Requests + +It should be extremely simple to get started and create a Pull Request. + +Unless your change is trivial (typo, etc.), please create an issue to discuss the change before creating a pull request. + +To make contributing as easy and fast as possible, you'll want to run tests and linting locally. + +## Prerequisites + +You'll need the following prerequisites: + +Any Python version between Python 3.8 and 3.12 + +- a virtual environment tool +- git +- pyenv & nox (to optionally test your changes on all versions of python) + +## Installation and setup + +Fork the repository on GitHub and clone your fork locally. + +```sh +# Clone your fork and cd into the repo directory +git clone git@github.com:/typed_configparser.git +cd typed_configparser +``` + +## Install typed-configparser locally + +```sh +# Create the virtual environment using your favourite tool +python3 -m venv env + +# Activate the virtual environment +source env/bin/activate + +# Install typed-configparser in your virtual environment +# This will install all development dependencies to help you get start +python3 -m pip install -r requirements.txt +``` + +## Check out a new branch and make your changes + +Create a new branch for your changes. + +```sh +# Checkout a new branch and make your changes +git checkout -b my-new-feature-branch +# Make your changes... +``` + +## Run tests and linting + +Run tests and linting locally to make sure everything is working as expected. + +```sh +# Run automated code formatting and linting +poe lint +# typed_configparser uses ruff for linting and formatting +# https://github.com/astral-sh/ruff + +# Run tests and linting +poe test +# There are few commands set-up using poethepoet task manager. +# You can check list of all commands using `poe` +# https://github.com/nat-n/poethepoet + +# Check test coverage +# Make sure test coverage is 100% else PR will fail in CI pipeline. +poe coverage +poe converage_report +``` + +## Run automation test on all python versions + +You can optionally run tests and linting on all python versions from 3.8 to 3.12 to make sure code is compliant across all supported python versions. +If you don't do this, any errors will be caught in the PR check phase. + +```sh +# Install pyenv using https://github.com/pyenv/pyenv?tab=readme-ov-file#installation +# Install nox using https://nox.thea.codes/en/stable/ +# You can either install it globally or using pipx (do not install it in project virtual environment) + +# Install all supported python versions using pyenv +pyenv install 3.8 && pyenv install 3.9 && pyenv install 3.10 && pyenv install 3.11 && pyenv install 3.12 + +# Go to project root and set pyenv global environment (do not activate project virtual environment) +pyenv global 3.8 3.9 3.10 3.11 3.12 + +# Run nox +nox +``` + +## Commit and push your changes + +Commit your changes, push your branch to GitHub, and create a pull request. + +Please follow the pull request template and fill in as much information as possible. Link to any relevant issues and include a description of your changes. + +When your pull request is ready for review, add a comment with the message "please review" and we'll take a look as soon as we can.