Skip to content

Latest commit

 

History

History
138 lines (102 loc) · 4.96 KB

project_overview.md

File metadata and controls

138 lines (102 loc) · 4.96 KB

Project Overview

The Ecosystem consists of projects, tools, utilities, libraries and tutorials from a broad community of developers and researchers. The goal of the Ecosystem is to recognize, support and accelerate development of quantum technologies using Qiskit.

Contents

Background

As number of projects in Qiskit ecosystem is growing, we found it useful to create a curated list of libraries, open source repos, guides, games, demos, and other resources in order to accelerate development of quantum technologies and provide more visibility for community projects.

Solution Explanation

As entire repository is designed to be run through GitHub Actions, we implemented ecosystem python package as runner of CLI commands to be executed from steps in Actions.

Entrypoint is manager.py file in the root of repository.

Example of commands:

python manager.py python_dev_tests https://github.com/IceKhan13/demo-implementation --python_version=py39
python manager.py python_stable_tests https://github.com/IceKhan13/demo-implementation --python_version=py39

or in general

python manager.py <NAME_OF_FUNCTION_IN_MANAGER_FILE> <POSITIONAL_ARGUMENT> [FLAGS]

Adding project to the ecosystem

Anyone can add their project for review to be included in the ecosystem by submitting issue.

Once issue created GH Actions starts running tests for repository. If all tests passed PR will be created automatically to add project to the ecosystem. If test failed GH Actions will comment in the created issue.

Read more on tests.

Minimal requirements for projects

By default project must have

  • tests folder and test runnable discoverable unittest in this older.
  • requirements.txt file with list of dependencies for running tests and project

Minimal requirements for project might be overwritten by introducing ecosystem test configuration

Ecosystem test configuration

In order to help CI to currectly run tests for your repository you can put ecosystem.json file in a root of your project.

Structure of config file:

  • dependencies_files: list[string] - files with package dependencies (ex: requirements.txt, packages.json)
  • extra_dependencies: list[string] - names of additional packages to install before tests execution
  • language: string - programming language for tests env. Only supported lang is Python at this moment.
  • tests_command: list[string] - list of commands to execute tests

Example of ecosystem.json:

{
    "dependencies_files": [
        "requirements.txt",
        "requirements-dev.txt"
    ],
    "extra_dependencies": [
        "pytest"
    ],
    "language": {
        "name": "python",
        "versions": ["3.9"]
    },
    "tests_command": [
        "pytest"
    ],
    "styles_check_command": [
        "pylint -rn src tests"
    ],
    "coverages_check_command": [
        "coverage3 run -m pytest",
        "coverage3 report --fail-under=80"
    ]
}

Alternatively configuration is stored for each project in the state of ecosystem.

Example of configured project:

https://github.com/mickahell/qiskit-ecosystem_template.

Storage

We use json file (members.json) as ecosystem state storage. Access to members.json is handled through JsonDAO class.

Tests

There are 3 type of tests for project: STANDARD, DEV and STABLE.

STANDARD - runs tests with default requirements for project

CLI command:

python manager.py python_standard_tests <REPO_URL> --run_name=<NAME_OF_RUN> --python_version=py39 --tier=<TIER>

DEV - runs tests with default requirements for project + dev version of qiskit-terra installed

CLI command:

python manager.py python_dev_tests <REPO_URL> --run_name=<NAME_OF_RUN> --python_version=py39 --tier=<TIER>

STABLE - runs tests with default requirements for project + latest stable version of qiskit-terra installed

CLI command:

python manager.py python_stable_tests <REPO_URL> --run_name=<NAME_OF_RUN> --python_version=py39 --tier=<TIER>

You can see full setup on test running in GitHub Action

Workflow diagram

workflow