Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples and tests for Azure Quantum SDK #13480

Merged
merged 49 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1da2349
Adding mandatorry parameters to the client
vxfield Jan 29, 2021
6714ab0
Client api updates
vxfield Jan 29, 2021
fc8f447
Config update
vxfield Jan 29, 2021
83a43cd
Adding samples and tests
vxfield Jan 29, 2021
bc2204d
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-js in…
vxfield Jan 29, 2021
d5f53db
Adding CI pipeline
vxfield Jan 29, 2021
a3e15aa
Update pnpm-lock for quantum-jobs
vxfield Jan 29, 2021
13a19eb
Updated autorest config
vxfield Feb 1, 2021
a8fa7cd
Updated authentication
vxfield Feb 1, 2021
4aa4324
Regenerating the client with credentials
vxfield Feb 2, 2021
4669947
Regenerating the client with credentials
vxfield Feb 2, 2021
6356913
Revert change by mistake
vxfield Feb 3, 2021
5174d95
Update api-extractor.json
vxfield Feb 3, 2021
feb5018
Update tsconfig.json
vxfield Feb 3, 2021
7d6d897
Reverting changes
vxfield Feb 3, 2021
039ab31
Reverting changes
vxfield Feb 3, 2021
6e9bbf2
Merge
vxfield Feb 3, 2021
8141fc3
Test recordings and config fixes
vxfield Feb 3, 2021
61a58f9
Test recordings and config fixes
vxfield Feb 3, 2021
3c57297
Fixing tests playback mode
vxfield Feb 3, 2021
55ce37c
Fixing tests playback mde
vxfield Feb 3, 2021
1bac079
Merge branch 'master' into feature/azure-quantum-sdk
vxfield Feb 3, 2021
6e3e6be
Update devDep version
vxfield Feb 3, 2021
f974d24
Update sdk/quantum/quantum-jobs/package.json
vxfield Feb 3, 2021
7950276
Update sdk/quantum/quantum-jobs/package.json
vxfield Feb 3, 2021
c8d7eb2
Update sdk/quantum/quantum-jobs/package.json
vxfield Feb 3, 2021
80e8008
Update sdk/quantum/quantum-jobs/package.json
vxfield Feb 3, 2021
085595c
Update sdk/quantum/quantum-jobs/package.json
vxfield Feb 3, 2021
c9ffbe4
Update index.ts
vxfield Feb 3, 2021
0bf1788
Merge branch 'master' into feature/azure-quantum-sdk
vxfield Feb 4, 2021
359afb8
Create CHANGELOG.md
vxfield Feb 4, 2021
945ff45
Updated md file
sarangan12 Feb 4, 2021
a52135b
Fix build failures (attempt)
HarshaNalluru Feb 4, 2021
461ce15
dummy comment
HarshaNalluru Feb 4, 2021
c2e1434
recordings
HarshaNalluru Feb 4, 2021
c2c818d
Merge branch 'feature/azure-quantum-sdk' of https://github.com/Azure/…
HarshaNalluru Feb 4, 2021
ae4df86
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-js in…
HarshaNalluru Feb 4, 2021
d21aac2
pass "SUBSCRIPTION_ID", "RESOURCE_GROUP", "WORKSPACE_NAME" to k…
HarshaNalluru Feb 4, 2021
8fa6742
Fix rollup-base config
HarshaNalluru Feb 4, 2021
ff84457
Fix rollup test config
HarshaNalluru Feb 4, 2021
207be92
build:test:browser
HarshaNalluru Feb 4, 2021
f236fef
Add events: ["EventEmitter"], to the named exports
HarshaNalluru Feb 4, 2021
6341726
Had to add "events" in the devDependencies to get rid of the rollup c…
HarshaNalluru Feb 4, 2021
c2483b2
Update sdk/quantum/quantum-jobs/package.json
vxfield Feb 4, 2021
1334d50
serve the files
HarshaNalluru Feb 4, 2021
61b415a
Merge branch 'feature/azure-quantum-sdk' of https://github.com/Azure/…
HarshaNalluru Feb 4, 2021
bc8fbb9
remove the coverage for "dist-test/index.browser.js" - to not run int…
HarshaNalluru Feb 4, 2021
a9d3892
browser = ChromeHeadlessNoSandbox
HarshaNalluru Feb 4, 2021
5448f93
skip browser testing
HarshaNalluru Feb 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions sdk/quantum/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# DO NOT EDIT THIS FILE
# This file is generated automatically and any changes will be lost.

trigger:
branches:
include:
- master
- release/*
- hotfix/*
paths:
include:
- sdk/quantum/
- eng/common/

pr:
branches:
include:
- master
- feature/*
- release/*
- hotfix/*
paths:
include:
- sdk/quantum/

extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: quantum
Artifacts:
- name: azure-quantum-jobs
safeName: quantumjobs
5 changes: 5 additions & 0 deletions sdk/quantum/quantum-jobs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release History

## 1.0.0-beta.1 (2021-02-05)

Initial public preview of the @azure/quantum-jobs library.
2 changes: 2 additions & 0 deletions sdk/quantum/quantum-jobs/generate.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
autorest --version=3.0.6335 --typescript --use=@autorest/[email protected] swagger\README.md
vxfield marked this conversation as resolved.
Show resolved Hide resolved
rushx build
38 changes: 30 additions & 8 deletions sdk/quantum/quantum-jobs/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// https://github.com/karma-runner/karma-chrome-launcher
process.env.CHROME_BIN = require("puppeteer").executablePath();
require("dotenv").config();
const {
jsonRecordingFilterFunction,
isPlaybackMode,
isSoftRecordMode,
isRecordMode
} = require("@azure/test-utils-recorder");

module.exports = function(config) {
config.set({
Expand All @@ -21,28 +27,31 @@ module.exports = function(config) {
"karma-env-preprocessor",
"karma-coverage",
"karma-sourcemap-loader",
"karma-junit-reporter"
"karma-junit-reporter",
"karma-json-to-file-reporter",
"karma-json-preprocessor"
],

// list of files / patterns to load in the browser
files: [
// polyfill service supporting IE11 missing features
// Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys
"https://cdn.polyfill.io/v2/polyfill.js?features=Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always",
"test-browser/index.js",
{ pattern: "test-browser/index.js.map", type: "html", included: false, served: true }
],
"dist-test/index.browser.js",
{ pattern: "dist-test/index.browser.js.map", type: "html", included: false, served: true }
].concat(isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : []),

// list of files / patterns to exclude
exclude: [],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
"**/*.js": ["env"]
"**/*.js": ["sourcemap", "env"],
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
// Preprocess source file to calculate code coverage, however this will make source file unreadable
// "test-browser/index.js": ["coverage"]
// "dist-test/index.browser.js": ["coverage"],
"recordings/browsers/**/*.json": ["json"]
},

// inject following environment values into browser testing with window.__env__
Expand All @@ -52,13 +61,16 @@ module.exports = function(config) {
"AZURE_CLIENT_ID",
"AZURE_CLIENT_SECRET",
"AZURE_TENANT_ID",
"SUBSCRIPTION_ID",
"RESOURCE_GROUP",
"WORKSPACE_NAME",
"TEST_MODE"
],

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ["mocha", "coverage", "junit"],
reporters: ["mocha", "coverage", "junit", "json-to-file"],

coverageReporter: {
// specify a common output directory
Expand All @@ -81,6 +93,12 @@ module.exports = function(config) {
properties: {} // key value pair of properties to add to the <properties> section of the report
},

jsonToFileReporter: {
// required - to save the recordings of browser tests
filter: jsonRecordingFilterFunction,
outputPath: "."
},

// web server port
port: 9876,

Expand All @@ -97,11 +115,12 @@ module.exports = function(config) {
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
// 'ChromeHeadless', 'Chrome', 'Firefox', 'Edge', 'IE'
// --no-sandbox allows our tests to run in Linux without having to change the system.
browsers: ["ChromeHeadlessNoSandbox"],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: "ChromeHeadless",
flags: ["--no-sandbox"]
flags: ["--no-sandbox", "--disable-web-security"]
}
},

Expand All @@ -116,6 +135,9 @@ module.exports = function(config) {
browserNoActivityTimeout: 600000,
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 3,
browserConsoleLogOptions: {
terminal: !isRecordMode()
},

client: {
mocha: {
Expand Down
Loading