Skip to content

Commit

Permalink
Dev (#29)
Browse files Browse the repository at this point in the history
* fixed URL bug in setup..py

* Add dev branch to test.yml

* Fixed a typo on custom rqaoa (#21)

Co-authored-by: Eze <[email protected]>

* updated the structure of device creation, including removing qpu_auth… (#19)

* updated the structure of device creation, including removing qpu_auth and entire access_object structure; updated notebooks and tests

* some changes missing from the previous commit

* updated pytest.ini to exclude credentials based test_qpu_devices.py

* commented credentials requiring part of notebooks

* fixed: pyquil wavefunction simulator

* update the readme

* fix typos in the readme

* addressed the comments on PR

Co-authored-by: Leonardo Disilvestro <[email protected]>

* fix: spelling issue in README and URL in setup.py

* Dev logger unittests (#20)

* Added Logger Class and partial result return feature

* Minor changes to error messages

* Updated to fit new results output structure

* Changed workflow defaults and attribute names in optimizer_dict. Updated relevant tests

* Logger histories are now empty if user does not request for logs

* Bugfix: Updating the Number of Evaluations works

* fixed test_sample_from_wavefunction

* fixed URL bug in setup.py

* Added Logger unittests

* Fixed conflict

* Removed Commented Print Statements

* Bugfix: Removed Old Import

Co-authored-by: Vishal Sharma <[email protected]>

* updated README with badges

* corrected location of OpenQAOA logo

* Bugfix workflow backend properties and added templates (#26)

* bugfix to set_backend_properties.asdict converting qiskit circuit to dictionary object

* added issue and pull request templates, and new Code of conduct

* Update README.md

* Update README.md

* Update README.md

* fixed the cell that prints qiskit circuit using pylatexeenv leading to test failure

* changes to README -- new badge, updated logo

* updated image size in README

* tagged python code in REDME, removed redundant checklist item from bug report template

* addressed latest comments and updated new logo HD

Co-authored-by: Leonardo Disilvestro <[email protected]>

* Updated Logger Class with new inner representation of variables (#25)

* BugFix: Number of evals now includes evaluations used for jacobian

* Updated tests for new changes with derivatives_function

* Updated Logger Class with Networkx relational structure

* Updated unittests for changes to Logger Class

* Bugfix: Changed the types for some of the entries in results_dict

* Bugfix: Added defaults possible empty outputs in results_dictionary

* Dev derivatives fix + training_vqa documentation (#18)

* Parameter shift gradient computation fix + method to convert std to ext arguments in QAOAVariationalStandardParams

* Fixed stochastic parameter shift derivative computation, and documentation of derivative_functions.py

* Updated derivative_functions unit test for SPS gradient method

* Updated documentation of training_vqa.py

* Updated documentation of qaoa_optimizer.py

* docstring fix to func: optimize_this in training_vqa.py

* Update derivative_functions.py

- Small docstring fix.
- Added assertions for `param_shift` and `stoch_param_shift` to only allow Standard Parametrisation params, until support for Fourier and Extended is added later.

* added parameter converter methods

* fixed errors on derivative functions failing tests

* fix to grad_sps method

Co-authored-by: shaohen <[email protected]>
Co-authored-by: Vishal Sharma <[email protected]>

* moved issue templates

* Update issue templates (#28)

* Update issue templates

* removed older issue templates

* Bugfix in `qaoa_vectorized.py`, apply_gate methods

- Fixed a few erroneous lines in`apply_ryy` and `apply_ryz` methods.

* Dev rqaoa (#31)

* Added features to RQAOA and added functions to utilities, updated tests accordingly

* Fixed bugs on fetching QAOA parameters in expectation_values()

* Removed qaoa_cost_backend from RQAOA and updated workflows to latest version of RQAOA

* Removed unnecessary imports from utilities.py

* Fixed bug in final_solution() inside rqaoa

* Changed names of functions computing expectation values and fixed typos

* Fixed new names in test_utilities

Co-authored-by: Eze <[email protected]>

* Update README.md

* Dev derivatives migration (#30)

* BugFix: Number of evals now includes evaluations used for jacobian

* Updated tests for new changes with derivatives_function

* Updated Logger Class with Networkx relational structure

* Updated unittests for changes to Logger Class

* Bugfix: Changed the types for some of the entries in results_dict

* Moved derivative_function in QAOABaseBackend to derivative_functions.py

* Updated unittests for new derivative location

* Updated unittests in test_derivative

* removed duplicate import statement

* Added deepcopy of params in derivative

* Moved qfim into its own python file

* Update test_optimisers for qfim change

* Added qfim_func_evals and Updated unittests

* Raise NotImplemented if Shot-Based Backend

* Bugfix: Missing import

Co-authored-by: Vishal Sharma <[email protected]>

* Updated CI to support codecov (#37)

* Updated CI to support codecov

* Update setup.py

* Add codecov token to github action

* Update test.yml

* Add codecov badge to readme

* Update codecoverage icon

* Update qaoa_vectorized.py

- Fixed bug in vectorised backend due to indexing/big endian <> little endian error for all rotation gates with X and Y components.

* Update qaoa_vectorized.py

- Fix phase difference between qiskit and vectorised.
- Added definitions of RX, RY, RZ, RXX, RYY, RZZ gates in docstrings.

* Update test_sim_qiskit.py

- Fixed some errors in unit tests : (1) changed expectation of random real operator to expectation of complex Hermitian operator, (2) fixed indexing errors on expectation value comparison in `test_qaoa_circuit_wavefunction_expectation_equivalence` tests (3) changed the value of beta from 0 in some tests to other angles.

- Added 2 tests : (1) nonuniform X mixer coefficients (2) Mixer Hamiltonian containing XX, YY, Y terms.

* Update test_vectorised.py

- Changed some tests to be consistent with change of global phase from recent RZZ, RZ and RX gate fixes.

* Dev rqaoa (#40)

* Modified RQAOA to handle isolated nodes, and corrected tests accordingly

* Modified RQAOA to handle corner cases, modified Hamiltonian class function for consistency and modified unit tests to increase coverage

* Modified docstrings in test_rqaoa and eliminated commented lines in rqaoa

Co-authored-by: Eze <[email protected]>

* Update qaoa_vectorized.py

- Added check for shape of `prepend_state` : automatically reshapes to (2,2,...,2) form if the input is `(2**self.n_qubits,)`.

* Update qaoa_vectorized.py

- Copied wavefunction initialization from the `qaoa_circuit` method to the `init` of `QAOAvectorizedBackendSimulator`, so that `self.wavefn` is populated.

* qaoa_vectorized.py documentation fix

- Added missing factor of (1/2) in documentation of `apply_gate` methods.

* - lowlevelgate.py bugfix

- bugfix for RZX object : pauli gate is RXZ, but lowlevelgate is RZX. Fixed by changing name and interchanging indices appropriately.

* update test_lowlevelgate.py

- Fixed error arising from RZX <> RXZ change from previous commit.

* Added unit tests for all apply_gate methods for vectorised in test_vectorised.py + bugfix for RXY gate + RXZ gate test inclusion in test_sim_qiskit.py

* Moved hamiltonian creation outside of expectation and expectation_w_uncertainty methods, to init.

* Improve problem classes (#43)

* from problem classes -- removed ENCODING, renamed PUBO to QUBO and added unittests for problem classes

* updates to problem.py

* updated PUBO to QUBO in notebooks to pass tests

* updated PUBO to QUBO in test_rqaoa.py

* removed stale comments

* updated PUBO to QUBO in README

* added constant checking test

* updates to vectorized wavefunction init

* updates to vectorized backend

* removed workflow and vectorized notebooks to fix conflicts with result object PR #34

* Result object (#34)

* Obtain the optimisation soution and degeneracy in training vqa

* Bugfix to Logger and Updates to Backends for new logger variable (#39)

* Dev rqaoa (#31)

* Added features to RQAOA and added functions to utilities, updated tests accordingly

* Fixed bugs on fetching QAOA parameters in expectation_values()

* Removed qaoa_cost_backend from RQAOA and updated workflows to latest version of RQAOA

* Removed unnecessary imports from utilities.py

* Fixed bug in final_solution() inside rqaoa

* Changed names of functions computing expectation values and fixed typos

* Fixed new names in test_utilities

Co-authored-by: Eze <[email protected]>

* Update README.md

* Updated Logger with new naming scheme and removed dated comments

* Dev derivatives migration (#30)

* BugFix: Number of evals now includes evaluations used for jacobian

* Updated tests for new changes with derivatives_function

* Updated Logger Class with Networkx relational structure

* Updated unittests for changes to Logger Class

* Bugfix: Changed the types for some of the entries in results_dict

* Moved derivative_function in QAOABaseBackend to derivative_functions.py

* Updated unittests for new derivative location

* Updated unittests in test_derivative

* removed duplicate import statement

* Added deepcopy of params in derivative

* Moved qfim into its own python file

* Update test_optimisers for qfim change

* Added qfim_func_evals and Updated unittests

* Raise NotImplemented if Shot-Based Backend

* Bugfix: Missing import

Co-authored-by: Vishal Sharma <[email protected]>

* Added measurement outcomes to all available backends

* Bugfix qaoa_wavefunction and Updated unittests

* Added Results unittests

* Changed entropica.vectorized to vectorized and Updated missing measurement_outcomes vectorized backend

Co-authored-by: Ezequiel Rodríguez Chiacchio <[email protected]>
Co-authored-by: Eze <[email protected]>
Co-authored-by: Leonardo Disilvestro <[email protected]>
Co-authored-by: Vishal Sharma <[email protected]>

* Update workfloww notebook

* Create the result class and add a basic test and a notebook showing its usage

* Removed unncessary numpy casting

* Statevectors will be returned as numpy arrays

* update the result object and fix all subsequent bugs

* update result object tests

* Add documentation and more unit tests

* add get counts method and fix the tests

* fixed PUBO -> QUBO bug in notebook

Co-authored-by: shahidee44 <[email protected]>
Co-authored-by: Ezequiel Rodríguez Chiacchio <[email protected]>
Co-authored-by: Eze <[email protected]>
Co-authored-by: Vishal Sharma <[email protected]>
Co-authored-by: shahidee <[email protected]>

* update the qpu tests (#38)

* update the qpu tests

* Update pytest.ini

* Update test.yml

* Update unittests, credentials and test.yml

* Updated test.yml

* Bugfix Variable naming error in Device tests

* Missing os import

Co-authored-by: shahidee <[email protected]>

* Create .coveragerc (#44)

* Create .coveragerc

* Update .coveragerc

* changes to exp_val_hamiltonian_termwise and other subsequent changes (#45)

* changes to exp_val_hamiltonian_termwise and other subsequent changes

* added analytical in docstring and added test for Result.get_counts()

* Added ShortestPath problem class

* Added binary to ising conversion

* Added tests for ShortestPath

* pyQuil SWAP decomposition + minor modifications to pyQuil backend (#33)

* Testing + update docstrings

* Added active reset and rewiring (NAIVE/PARTIAL) support, and unit tests for them

* Added check_edge_connectivity method to pyquil backend

* Modified check_edge_connectivity to check on Program instead of Hamiltonian

* Removed get_qaoa_backend from pyquil and vectorised unit test

* For pyquil backend, added check for prepend state size at init

* Added unit test for prepend state size

* Update qaoa_pyquil_qpu.py

Add cvar_alpha to the docstring and  fixed the order of active reset and rewiring

* Small change to qaoa_pyquil_qpu.py

Changed default of `rewiring` to the blank string to be consistent with type hint, and added the blank string to the set of acceptable strings (pyQuil treats the blank string as None)

* Cosmetic change to qaoa_pyquil_qpu.py

changed
if self.rewiring == 'PRAGMA INITIAL_REWIRING "NAIVE"' or self.rewiring == 'PRAGMA INITIAL_REWIRING "PARTIAL"' or self.rewiring == '':
to 
if self.rewiring in ['PRAGMA INITIAL_REWIRING "NAIVE"', 'PRAGMA INITIAL_REWIRING "PARTIAL"', '']:

* Update pauligate.py

- Corrected decomposition of SWAP gate using native quil gates (RZ(theta), RX(+- pi/2), CZ, XY)

* Update qaoa_pyquil_qpu.py

- Modification to Hadamard gate creation : create in terms of native RX(+- pi/2) and RZ gates directly, instead of passing through the non-native H gate.

* Update test_pyquil_qvm.py

- Updated unit test to account for hadamard gate decomposition.

* Update test_pyquil_qvm.py

- Fixed  `test_qaoa_pyquil_gate_names` to be consistent with change in H gate decomposition.

Co-authored-by: shaohen <[email protected]>
Co-authored-by: Leonardo Disilvestro <[email protected]>

* Documentation RQAOA (#53)

* Modified RQAOA examples notebook

* Finalized RQAOA example notebook

Co-authored-by: Eze <[email protected]>

* Dev doc structure (#50)

* improve doc structure and workflows documentation and testing

* improve index structure

* updates to the doc structure to include notebooks

* add avanced parametrization example

* add nb extension to setup

* add pandoc

* fix pandoc test

* Fix pandoc github action

* Fix verbose flags in the workflows

* SH - documentation clean-ups (#51)

* Documentation clean-ups

* Change param-shift typo in workflows to param_shift

* Update qaoa_parameters.py

Co-authored-by: Leonardo Disilvestro <[email protected]>

* Read the docs integration (#54)

* Update conf.py

* Update conf.py

* add mock modules

* add readthedocs yml

* Add the readthedocs yml

* add read the docs yml

* update docs requirements

* Update requirements.txt

* Update .readthedocs.yml

* Update .readthedocs.yml

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* update readthedocs.yml

* update readthedocs yml

* Update requirements.txt

* Update .readthedocs.yml

* Update .readthedocs.yml

* Added Jupyter Notebook Example related to the Parameter Classes and bugfix to QAOAVariationalBaseParams (#52)

* Add Parameter Class Explainor Notebook

* Bugfix: return __repr__ for __str__ in QAOAVariationalBaseParams

* Added Parameter Class notebook example

* Update unittest for identical output from __str__ and __repr__

* Renamed notebook and minor updates

* Update .readthedocs.yml (#55)

* Update .readthedocs.yml

* Update .readthedocs.yml

* Update .readthedocs.yml

* Update README.md

* Corrected typo in ShortestPath + fixed tests

* Dev update notebooks (#56)

* polishing notebooks for proper release and bgufixes on the way

* updated advanced parameters notebook

* dev_update_notebooks

* added noise_model argument to backend_properties and added new notebook

* Update qaoa_parameters.py

Add qubit_layout argument to workflows

* example notebooks updated, fixed workflow initialization bug

* fixed notebook naming

* fixed failing script tests

* fixed docstring

* fix tests and docs to compile with nw examples

* Update test_notebooks.py

* Fix noise tutorial

* fix readthedocs tutorials

* fix read the docs notebooks

* fix read the docs notebooks

* fix doc index

Co-authored-by: Shao-Hen Chiew <[email protected]>
Co-authored-by: Leonardo Disilvestro <[email protected]>

* Updated docstring

* Fixed small spelling errors

* vectorised backend documentation fixes

* Added error-raising when non-classical Hamiltonian is used in vectorised backend

* Small change to avoid casting error when using -=

* Update workflows unittest

* Minor fixes to tests

* Updated setup.py

* try remove import sympy exception

* renamed some variables and fixed spelling issues (#57)

* renamed some variables and fixed spelling issues

* bugfix workflow: create cost hamiltonian and then create mixer hamiltonian with appropriate n_qubits

* notebook will all cells excuted

* Update README.md

* Update basebackend.py

* fix typos

* fixed trailing naming updates, renamed test_gates.py, fixed an issue with cvar

* fixed trailing naming updates, fixed an issue with cvar

* cost_function fix

Co-authored-by: Shao-Hen Chiew <[email protected]>
Co-authored-by: Leonardo Disilvestro <[email protected]>

* direct fix to notebook 7, bug in mixer_creation

* Commented out unused code

* Modified setup.py

* Updated unittests

* Moved sympy import location

* Commented out sympy import exception check

* Removed unused code

* Added test for Exception raising for non-classical Hamiltonians

* Switched to using random graphs for each test

* Add check for source and destination nodes

* Add test for error assertion

* Fixed test_set_circuit_properties_fourier_q

* Fixed bug on FourierParams and added error message in utilities (#63)

* Fixed bug on FourierParams and added error message in ground_state_hamiltonian

* Fixed bug on QAOAVariationalFourierwithBiasParam and QAOAVariationalFourierExtendedParam classes

Co-authored-by: Eze <[email protected]>

* Bugfix vishal o qtesting session (#65)

* few bugfixes from the OQ testing session

* fixed plot_graph method formatting

* fixed problem type assertion in compile function

* some documentation fixes suggested during the OQ testing session

* fixed linear_ramp_time issue and plot_graph colormap

* plot_graph conditional bugfix

* fixes to annealingparams and plot_graph suggestion

* Added type-checking for Problem Classes and Changed Error Catching in Optimization Loop (#64)

* Catch only ConnectionError in optimize

* Updated type-checking for problem class creation

* Bugfix: TSP and Knapsack Problem Creation

* Bugfix: ShortestPath tab indentation error

* Updated unittests for problem classes

* Bugfix: TSP no error raised

* Bugfix: plot_cost method

* Fixes for optimizer options and corresponding unit test + docs (#66)

* Fixes for optimizer options and corresponding unit test + documentation changes

* minor workflow test fix

* Remove top_k_solutions

* Remove ExtraResults and top_k_solutions references everywhere

* removed redundant conditional from trainng_vqa.py

* Revert "Remove ExtraResults and top_k_solutions references everywhere"

This reverts commit 05ead73.

reverting to previous commit because the change broke since maxfev does not work with all optimizers

* fixed failing issues

* adding conditionals back

* added conditionals for `maxfev`

Co-authored-by: Vishal Sharma <[email protected]>

Co-authored-by: Leonardo Disilvestro <[email protected]>
Co-authored-by: Ezequiel Rodríguez Chiacchio <[email protected]>
Co-authored-by: Eze <[email protected]>
Co-authored-by: shahidee44 <[email protected]>
Co-authored-by: Shao-Hen Chiew <[email protected]>
Co-authored-by: shaohen <[email protected]>
Co-authored-by: shaohenc <[email protected]>
Co-authored-by: shahidee <[email protected]>
Co-authored-by: Kilian <[email protected]>
Co-authored-by: Shao Hen <[email protected]>
  • Loading branch information
11 people authored Jul 13, 2022
1 parent 79c0da1 commit 8963de9
Show file tree
Hide file tree
Showing 101 changed files with 12,219 additions and 8,892 deletions.
19 changes: 19 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[report]
exclude_lines =
# Skip any pass lines such as may be used for @abstractmethod
pass

# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

### Prerequisites
Before raising this issue, I have already checked that I am:

- [ ] running the latest version
- [ ] made sure that this issue has not already been filed

### 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.

### Additional context
Add any other context about the problem here.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Custom issue template
about: Not a bug report or a feature request
title: ''
labels: ''
assignees: ''

---

### Issue Description
Describe your issue in detail here
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

### Prerequisites
Before raising this feature request, I have made sure:

- [ ] It does not lead to duplication.
- [ ] It has not already been requested.

### 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.
Binary file added .github/images/openqaoa_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/workflow_openqaoa.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Description

- Please include a summary of the changes and the related issue
- Please also include relevant context.
- List any dependencies that are required for this change, if any.
- **Fixes # (issue)**

## Checklist

[//]: <> (- [ ] My code follows the style guidelines of this project)

- [ ] I have performed a self-review of my code.
- [ ] I have commented my code and used numpy-style docstrings
- [ ] I have made corresponding updates to the documentation.
- [ ] My changes generate no new warnings
- [ ] I have added/updated tests to make sure bugfix/feature works.
- [ ] New and existing unit tests pass locally with my changes.

[//]: <> (- [ ] Any dependent changes have been merged and published in downstream modules)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Name the new unit-tests that you have added along with this change.
18 changes: 16 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down Expand Up @@ -53,10 +55,21 @@ jobs:
cd ..
- name: Run tests
env:
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
IBMQ_HUB: ibm-q
IBMQ_GROUP: open
IBMQ_PROJECT: main
run: |
source env/bin/activate
ipython kernel install --name "env" --user
python -m pytest --junitxml=report.xml
python -m pytest --cov --cov-report=xml:coverage.xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage.xml

docs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -92,6 +105,7 @@ jobs:
- name: Build and test Sphinx docs
run: |
sudo apt-get install pandoc
cd docs/
make html
38 changes: 38 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.8"
jobs:
pre_build:
- echo "Creating the notebook folder from .readthedocs.yml"
- pwd
- ls -lah
- mkdir ./docs/source/notebooks
- cp ./examples/* ./docs/source/notebooks/

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally set the version of Python and requirements required to build your docs
# python:
# version: 3.8
# install:
# - method: pip
# path: .

python:
install:
- requirements: docs/requirements.txt
Empty file added CHANGELOG.md
Empty file.
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-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, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement 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 within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
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 to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
Loading

0 comments on commit 8963de9

Please sign in to comment.