diff --git a/.github/workflows/scan-codeql.yml b/.github/workflows/scan-codeql.yml deleted file mode 100644 index 3403744..0000000 --- a/.github/workflows/scan-codeql.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: CodeQL analysis -on: - workflow_dispatch: - # push: - # branches: [master] - pull_request: - branches: [master] - schedule: - - cron: '0 3 * * 6,3' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: ['python'] - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/src/openpredict/__init__.py b/src/openpredict/__init__.py index 9663094..a258b7e 100644 --- a/src/openpredict/__init__.py +++ b/src/openpredict/__init__.py @@ -3,4 +3,4 @@ from .predict_output import PredictHit, PredictOptions, PredictOutput, TrainingOutput from .trapi import TRAPI -__version__ = "0.1.1" +__version__ = "0.2.0" diff --git a/src/openpredict/config.py b/src/openpredict/config.py index ddcfc60..1e45072 100644 --- a/src/openpredict/config.py +++ b/src/openpredict/config.py @@ -5,12 +5,12 @@ class Settings(BaseSettings): + VIRTUAL_HOST: str = None PROD_URL: str = 'https://openpredict.transltr.io' TEST_URL: str = 'https://openpredict.test.transltr.io' STAGING_URL: str = 'https://openpredict.ci.transltr.io' DEV_URL: str = 'https://openpredict.semanticscience.org' - VIRTUAL_HOST: str = None DEV_MODE: bool = False LOG_LEVEL: str = 'ERROR' diff --git a/src/trapi/main.py b/src/trapi/main.py index 9eb2398..45187d8 100644 --- a/src/trapi/main.py +++ b/src/trapi/main.py @@ -83,7 +83,7 @@ }, ] -# Try to order the servers list based on the env variable used for nginx proxy in docker +# Order the servers list based on the env variable used for nginx proxy in docker if settings.VIRTUAL_HOST: servers = [] # Add the current server as 1st server in the list @@ -96,7 +96,7 @@ if settings.VIRTUAL_HOST not in server['url']: servers.append(server) else: - servers = servers_list + servers = [] app = TRAPI(