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

Add code to use config in base always #308

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 8 additions & 1 deletion arxiv/ops/db_subset/clone_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,14 @@ def _make_subset (db_graph: Dict[str, List[Edge]],
new_session.commit()
new_session.close()

def clone_db_subset (n_users: int, config_directory: str):
def clone_db_subset (n_users: int, config_directory: Optional[str] = None):
config_directory = config_directory or \
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
'config'
)
)
graph = json.loads(open(os.path.join(config_directory, 'graph.json')).read())
special_cases = json.loads(open(os.path.join(config_directory, 'special_cases.json')).read())
graph_with_edges = { k: list(map(lambda x: Edge(**x), v)) for k,v in graph.items() }
Expand Down
2 changes: 1 addition & 1 deletion gcp/service_auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Expected to be used for GCP functions, Cloud runs and also at CIT web node.

## Service account role requirements

When using this, the library gets the id toke of the service account. For non-GCP,
When using this, the library gets the id token of the service account. For non-GCP,
you can use GOOGLE_APPLICATION_CREDENTIALS to point to the SA credentials.

The service account needs "Cloud Run Invoker" role
Loading