This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# | |
# Copyright 2013-2020 - Ingy döt Net <[email protected]> | |
# | |
### INLINED License (0.4.6, 110b9eb13f259986fffcf11e8fb187b8cce50921) | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2013-2020 Ingy döt Net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Module::Runtime qw< require_module >; | |
use Text::CSV; | |
my $filename = $ARGV[0]; | |
my $parser_class = $filename =~ /\.xlsx$/ | |
? "Spreadsheet::ParseXLSX" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Threading utilities. | |
""" | |
from threading import Thread, Event | |
class StoppableThread(Thread): | |
""" | |
A :cls:`Thread` with a :meth:`.stop` function and :attr:`.stopped` | |
attribute. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(): | |
+ """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5de6c904a6be1c775a576f6497e8a7a2c1f2f06b Mon Sep 17 00:00:00 2001 | |
From: James Hadfield <[email protected]> | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit b8de8d5d3dbce28d12b5d946c2f6f1cbf7becfbb | |
Author: Thomas Sibley <[email protected]> | |
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |