none
Requirements and considerations for deploying the nextstrain.org server in production.
class CognitoSession: | |
def __init__(self, origin: Origin) -> None: | |
assert origin | |
self.origin = origin | |
# Public ids. Client id is specific to the CLI. | |
user_pool_id = os.environ.get("NEXTSTRAIN_COGNITO_USER_POOL_ID") \ | |
or client_config(origin)["aws_cognito_user_pool_id"] | |
client_id = os.environ.get("NEXTSTRAIN_COGNITO_CLI_CLIENT_ID") \ |
diff --git a/nextstrain/cli/authn.py b/nextstrain/cli/authn.py | |
index 93515ce..6cd2af0 100644 | |
--- a/nextstrain/cli/authn.py | |
+++ b/nextstrain/cli/authn.py | |
@@ -173,6 +173,26 @@ def logout(origin: Origin): | |
print(f"Not logged in to {origin}.", file = stderr) | |
+def logout_all(): | |
+ """ |
sequenceDiagram | |
actor user as User | |
participant cli as Nextstrain CLI | |
participant .org as nextstrain.org | |
participant idp as IdP | |
user->>cli: nextstrain login | |
activate cli | |
note over cli: generates {uuid} (v4) |
diff --git a/src/resourceIndex.js b/src/resourceIndex.js | |
index 3bcffee4..886f2a74 100644 | |
--- a/src/resourceIndex.js | |
+++ b/src/resourceIndex.js | |
@@ -1,6 +1,7 @@ | |
import fs from 'fs'; | |
import * as utils from './utils/index.js'; | |
import zlib from 'zlib'; | |
+import { DateTime } from 'luxon'; | |
import { promisify } from 'util'; |
From 5de6c904a6be1c775a576f6497e8a7a2c1f2f06b Mon Sep 17 00:00:00 2001 | |
From: James Hadfield <hadfield.james@gmail.com> | |
Date: Mon, 25 Sep 2023 13:32:49 +1300 | |
Subject: [PATCH] Collect resources from core + staging buckets | |
This sets out the pattern for reading S3 inventories and turning them | |
into resource collections. The JSON output will ultimately be used by | |
nextstrain.org to both provide a listing of available resources and to | |
be queried by versioned dataset requests (in order to go from a | |
requested date to the corresponding S3 version IDs of the relevant |
commit b8de8d5d3dbce28d12b5d946c2f6f1cbf7becfbb | |
Author: Thomas Sibley <tsibley@fredhutch.org> | |
Date: Mon Oct 30 13:46:58 2023 -0700 | |
wip! version extractor | |
XXX FIXME: how far to take @ as not a given? i.e. update canonicalizeDataset to make the caller add the version? | |
XXX FIXME: default to extracting a version? | |
XXX FIXME: move core version extractor into a function we pass? | |
XXX FIXME: use route matching instead to make versionExtractor like: req => req.params.versionDescriptor? |
diff --git a/resourceIndexer/constants.js b/resourceIndexer/constants.js | |
index f22e209e..ce67d5f8 100644 | |
--- a/resourceIndexer/constants.js | |
+++ b/resourceIndexer/constants.js | |
@@ -7,16 +7,21 @@ export const INVALID_AUSPICE_PATTERNS = [/_seq\.json$/, /_sequences\.json$/, /_e | |
* The keys here represent the subresource type of these files used internally | |
* in the server code (encoded there as the 2nd argument when instantiating | |
* (sub-)classes of `Subresource`) | |
+ * | |
+ * Matched against filenames to classify them, in order, with the first match |
diff --git a/resourceIndexer/coreStagingS3.js b/resourceIndexer/coreStagingS3.js | |
index ad1cce9d..78cc2284 100644 | |
--- a/resourceIndexer/coreStagingS3.js | |
+++ b/resourceIndexer/coreStagingS3.js | |
@@ -1,6 +1,7 @@ | |
import {logger} from './logger.js'; | |
import { SOURCE, VALID_AUSPICE_PATTERNS, INVALID_AUSPICE_PATTERNS, | |
DATESTAMP_REGEX, MAIN_DATASET_JSON } from './constants.js'; | |
+import { fetchInventoryRemote, fetchInventoryLocal, parseInventory } from './inventory.js'; | |
"""\ | |
DOCSTRING\ | |
""" | |
print(__doc__) | |
if __debug__: | |
print("DEBUGGING") | |
if not __debug__: |