From 3892dce15be76844030115525146bc94fbd36378 Mon Sep 17 00:00:00 2001 From: //va Date: Tue, 28 Nov 2023 14:56:56 -0500 Subject: [PATCH] clean up (#2206) * clean up python * clean up domain --- .github/workflows/release.yml | 6 +++--- .github/workflows/test.yml | 6 +++--- README.md | 2 +- .../textbook-converter/requirements-test.txt | 21 +------------------ converter/textbook-converter/setup.py | 2 +- frontend/vue/components/OneXP/OneXPBanner.vue | 2 +- .../components/UserAccount/AccountAdmin.vue | 4 ++-- server/app.ts | 6 +++--- .../quantum-computing-utilities.ts | 2 +- server/utilities.ts | 3 ++- 10 files changed, 18 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05f70cb68..b24d0b1b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,10 +34,10 @@ jobs: - run: npm ci - - name: Install Python 3.8 - uses: actions/setup-python@v2 + - name: Install Python 3.10 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - name: Load pip cache uses: actions/cache@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83976a2d3..40a3fb3d3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,10 +26,10 @@ jobs: - run: npm ci - - name: Install Python 3.8 - uses: actions/setup-python@v2 + - name: Install Python 3.10 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - name: Load pip cache uses: actions/cache@v3 diff --git a/README.md b/README.md index 0ac7a2977..a37ccd944 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ The textbook is intended for use as a university quantum algorithms course suppl ## Getting Started ### Pre-requisites -1. Python 3.8 environment with `textbook_converter` requirements installed +1. Python 3.10 environment with `textbook_converter` requirements installed ``` $ cd platypus/converter/textbook-converter diff --git a/converter/textbook-converter/requirements-test.txt b/converter/textbook-converter/requirements-test.txt index d5e8197eb..c78d6ebc1 100644 --- a/converter/textbook-converter/requirements-test.txt +++ b/converter/textbook-converter/requirements-test.txt @@ -1,21 +1,2 @@ -cython==0.29.32 -cmake==3.24.1 -nbqa==1.3.1 -pylint==2.14.3 +pylint==3.0.2 scour==0.38.2 -qiskit==0.39.0 -qiskit-nature==0.4.1 -qiskit-machine-learning==0.4.0 -qiskit-finance==0.3.2 -scikit-learn==1.0.1 -tensorflow==2.9.3 -matplotlib==3.5.2 -bokeh==3.0.2 -pyscf==2.0.1 -pylatexenc==2.10 -ipywidgets==8.0.1 -qiskit-machine-learning[sparse] -qiskit-experiments==0.4.0 -git+https://github.com/qiskit-community/qiskit-textbook.git#subdirectory=qiskit-textbook-src -git+https://github.com/anedumla/quantum_linear_solvers -git+https://github.com/NCCR-SPIN/topological_codes.git diff --git a/converter/textbook-converter/setup.py b/converter/textbook-converter/setup.py index 818824b82..17b6b4584 100644 --- a/converter/textbook-converter/setup.py +++ b/converter/textbook-converter/setup.py @@ -31,7 +31,7 @@ install_requires=requirements, packages=find_packages(include=['textbook_converter']), url='https://github.com/Qiskit/platypus/tree/main/converter/textbook-converter', - python_requires='>=3.6', + python_requires='>=3.10', entry_points={ 'nbconvert.exporters': [ 'textbook = textbook_converter:TextbookExporter', diff --git a/frontend/vue/components/OneXP/OneXPBanner.vue b/frontend/vue/components/OneXP/OneXPBanner.vue index 3f90803a2..d878069e0 100644 --- a/frontend/vue/components/OneXP/OneXPBanner.vue +++ b/frontend/vue/components/OneXP/OneXPBanner.vue @@ -9,7 +9,7 @@ />
  • {{ $translate("Create an account in") }} - + IBM Quantum.
  • {{ $translate("Access your") }} - + {{ $translate("account page") }} {{ $translate("and copy the value from the API token input.") }} diff --git a/server/app.ts b/server/app.ts index 729f76114..c11de15e9 100644 --- a/server/app.ts +++ b/server/app.ts @@ -14,7 +14,7 @@ import { LOCALES, translate } from '@mathigon/studio/server/utilities/i18n' import { generateMockData } from './populate-database' import { - CONFIG, NOTATIONS, TEXTBOOK_HOME, LATEST_TEXTBOOK_VERSION, TRANSLATIONS, UNIVERSAL_NOTATIONS, LEARNING_REDIRECTS, + CONFIG, NOTATIONS, TEXTBOOK_HOME, LEARNING_HOME, LATEST_TEXTBOOK_VERSION, TRANSLATIONS, UNIVERSAL_NOTATIONS, LEARNING_REDIRECTS, findNextSection, findPrevSection, getSectionIndex, isLearningPath, updateGlossary, loadLocaleRawFile, tocFilterByType, removeVersionPrefix } from './utilities' @@ -137,8 +137,8 @@ const start = () => { // .redirects({'/login': '/signin'}) .accounts() .redirects({ - '/': TEXTBOOK_HOME, - '/textbook': TEXTBOOK_HOME, + '/': LEARNING_HOME, + '/textbook': LEARNING_HOME, ...LEARNING_REDIRECTS }) .get('/locales/:locale', (req, res) => { diff --git a/server/libs/quantum-computing/quantum-computing-utilities.ts b/server/libs/quantum-computing/quantum-computing-utilities.ts index 0e9abe0c6..b751202a1 100644 --- a/server/libs/quantum-computing/quantum-computing-utilities.ts +++ b/server/libs/quantum-computing/quantum-computing-utilities.ts @@ -2,7 +2,7 @@ import { IS_PRODUCTION } from '../../configuration' import { QCHttpError } from './quantum-computing-domain' -export const QC_URL = IS_PRODUCTION ? 'https://auth.quantum-computing.ibm.com/api' : 'https://auth-dev.quantum-computing.ibm.com/api' +export const QC_URL = IS_PRODUCTION ? 'https://auth.quantum.ibm.com/api' : 'https://auth-dev.quantum.ibm.com/api' export const isQCHttpError = (error: any): error is QCHttpError => { return typeof error?.message === 'string' diff --git a/server/utilities.ts b/server/utilities.ts index 12a332df8..ec9c221e9 100644 --- a/server/utilities.ts +++ b/server/utilities.ts @@ -24,7 +24,7 @@ import { import { IS_PRODUCTION } from './configuration' const TEXTBOOK_HOME = 'https://qiskit.org/learn' -const LEARNING_HOME = 'https://learning.quantum-computing.ibm.com' +const LEARNING_HOME = 'https://learning.quantum.ibm.com' const LEARNING_REDIRECTS = { '/course/algorithm-design': `${LEARNING_HOME}/course/variational-algorithm-design`, @@ -188,6 +188,7 @@ export { NOTATIONS, GLOSSARY, TEXTBOOK_HOME, + LEARNING_HOME, LATEST_TEXTBOOK_VERSION, TRANSLATIONS, UNIVERSAL_NOTATIONS,