Skip to content

Commit

Permalink
update all links that refer to the repo itself
Browse files Browse the repository at this point in the history
  • Loading branch information
rcreasi committed Jul 30, 2024
1 parent a2e2cc9 commit b26ae1a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions breadbox/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Breadbox

Breadbox is a persistent service for storing and retrieving data for the [DepMap portal](https://github.com/broadinstitute/depmap). It aims to simplify and consolidate formats across datasets that are uploaded by CDS during portal database re-builds, by users transiently, and by users for private groups. It consists of a persistent database to store the datasets and an API for uploading and fetching from the dataset.
Breadbox is a persistent service for storing and retrieving data for the [DepMap portal](https://github.com/broadinstitute/depmap-portal). It aims to simplify and consolidate formats across datasets that are uploaded by CDS during portal database re-builds, by users transiently, and by users for private groups. It consists of a persistent database to store the datasets and an API for uploading and fetching from the dataset.

## Setup

Expand Down Expand Up @@ -54,7 +54,7 @@ To run tests, run

### Running Elara

Elara is the UI containing tools that use and interface with the Breadbox service. To run the elara app, see instructions for setup at https://github.com/broadinstitute/depmap/tree/master/frontend/packages/elara-frontend.
Elara is the UI containing tools that use and interface with the Breadbox service. To run the elara app, see instructions for setup at https://github.com/broadinstitute/depmap-portal/tree/master/frontend/packages/elara-frontend/README.md

If trying to access Elara from the Depmap app (behind the `/breadbox` url prefix) locally, the Elara static files must exist at `depmap/breadbox/app/static/elara/` which are produced by running `yarn build` from the `elara/` directory. Additionally, the environment variable `HOST_SCHEME_OVERRIDE=http:127.0.0.1:5000` should be added to the `depmap/breadbox/.env` file. The Breadbox app must also be running first with the flag option `--use_proxy`. See instructions below for running Breadbox behind a proxy.

Expand Down
8 changes: 4 additions & 4 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ directory. If two different packages share the same dependency, only one copy
is installed in frontend/node_modules.

But you won't often need to do this because it's run for you as part of the
[portal-backend/install_prereqs.sh](https://github.com/broadinstitute/depmap/blob/master/portal-backend/install_prereqs.sh#L16)
[portal-backend/install_prereqs.sh](https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/portal-backend/install_prereqs.sh#L39)
script.

## Main packages

In the ./packages directory you'll find two main projects:

- [elara-frontend](https://github.com/broadinstitute/depmap/tree/master/frontend/packages/elara-frontend#readme)
- [portal-frontend](https://github.com/broadinstitute/depmap/tree/master/frontend/packages/portal-frontend#readme)
- [elara-frontend](https://github.com/broadinstitute/depmap-portal/tree/master/frontend/packages/elara-frontend#readme)
- [portal-frontend](https://github.com/broadinstitute/depmap-portal/tree/master/frontend/packages/portal-frontend#readme)

Each of these represents a different set of UI features. The Elara frontend is
limited to Data Explorer (the original version, also known as the "interactive
Expand Down Expand Up @@ -50,7 +50,7 @@ that's what you're used to. All it does is call `yarn dev:portal` for you).

The two main frontends described above share a fair amount of code. The shared
code is distributed across several libraries, scoped under the
[@depmap](https://github.com/broadinstitute/depmap/tree/master/frontend/packages/%40depmap)
[@depmap](https://github.com/broadinstitute/depmap-portal/tree/master/frontend/packages/%40depmap)
directory. This is a naming convention to make them easily distinguishable from
3rd party libraries.

Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/@depmap/data-explorer-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Data Explorer 2.0 is the replacement for the original Data Explorer (a.k.a.
original.

Note that most of of the DE2 UI code is located in the
[../../portal-frontend/src/data-explorer-2/](https://github.com/broadinstitute/depmap/tree/0fa2d2e/frontend/packages/portal-frontend/src/data-explorer-2)
[../../portal-frontend/src/data-explorer-2/](https://github.com/broadinstitute/depmap-portal/tree/master/frontend/packages/portal-frontend/src/data-explorer-2)
directory. That code will be migrated here over time. For now, only the
ContextSelector is exported from this package.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const isPartialSliceId = (value: string | null) => {
};

// A more aggressive version of encodeURIComponent() to match this:
// https://github.com/broadinstitute/depmap/blob/af83d4d/portal-backend/depmap/vector_catalog/models.py#L358
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/portal-backend/depmap/vector_catalog/models.py#L358
export const urlLibEncode = (s: string) => {
return encodeURIComponent(s).replace(
/[()*!']/g,
Expand Down
18 changes: 9 additions & 9 deletions frontend/packages/@depmap/globals/src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@ function makeMockEnabledFeatures() {
}

// In the Portal, this is defined here:
// https://github.com/broadinstitute/depmap/blob/c1ecacb/portal-backend/depmap/templates/nav_footer/layout.html#L88
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/portal-backend/depmap/templates/nav_footer/layout.html#L88
// In Elara, it's defined here:
// https://github.com/broadinstitute/depmap/blob/c1ecacb/frontend/packages/elara-frontend/webpack.common.js#L34-L36
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/frontend/packages/elara-frontend/webpack.common.js#L34-L36
export const depmapContactUrl: string = (window as any).depmapContactUrl;

// This is injected into the HTML by the Portal backend:
// https://github.com/broadinstitute/depmap/blob/c1ecacb/portal-backend/depmap/templates/nav_footer/layout.html#L87
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/portal-backend/depmap/templates/nav_footer/layout.html#L88
// In Elara, it's instead "baked in" as a hardcoded feature list at build time:
// https://github.com/broadinstitute/depmap/blob/c1ecacb/frontend/packages/elara-frontend/webpack.common.js#L29-L33
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/frontend/packages/elara-frontend/webpack.common.js#L29-L33
// If it doesn't exist on `window` then we assume we're running in a test
// environment (like Jest or Storybook) and return a mock.
export const enabledFeatures: Record<string, boolean> =
(window as any).enabledFeatures || makeMockEnabledFeatures();

// Currently, the `errorHandler` doesn't really do anything special outside of
// logging to the console. In the Portal, it's defined here:
// https://github.com/broadinstitute/depmap/blob/c1ecacb/portal-backend/depmap/templates/nav_footer/layout.html#L102
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/portal-backend/depmap/templates/nav_footer/layout.html#L103
// In Elara, it's defined here:
// https://github.com/broadinstitute/depmap/blob/c1ecacb/frontend/packages/elara-frontend/webpack.common.js#L37
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/frontend/packages/elara-frontend/webpack.common.js#L37
export const errorHandler: {
report: (message: string) => void;
} = (window as any).errorHandler;

// The DepMap global is created by the portal-frontend's Webpack config.
// There is no equivalent in elara-frontend and should be avoided there.
// This is "set" by Webpack as part of its module loader.
// https://github.com/broadinstitute/depmap/blob/70396b2/frontend/packages/portal-frontend/webpack.common.js#L7-L13
// All exported functions in file become its properties:
// https://github.com/broadinstitute/depmap/blob/70396b2/frontend/packages/portal-frontend/src/index.tsx
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/frontend/packages/portal-frontend/webpack.common.js#L7-L13
// All exported functions in this file become its properties:
// https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/frontend/packages/portal-frontend/src/index.tsx
// eslint-disable-next-line @typescript-eslint/ban-types
export const DepMap: Record<string, Function> =
"Proxy" in window
Expand Down
6 changes: 3 additions & 3 deletions portal-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,9 @@ def view_MY_APP():
```

👉 Make sure to
[import it here](https://github.com/broadinstitute/depmap/blob/54005fb/portal-backend/depmap/app.py#L37)
[import it here](https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/portal-backend/depmap/app.py#L36)
and
[register it here](https://github.com/broadinstitute/depmap/blob/54005fb/portal-backend/depmap/app.py#L383).
[register it here](https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/portal-backend/depmap/app.py#L382).

#### Step #3: Create a new React app

Expand Down Expand Up @@ -665,7 +665,7 @@ ReactDOM.render(<App />, container);
#### Step #4: Configure Webpack

Now Webpack needs to know that your app should be considered its own bundle. To the
[webpack config](https://github.com/broadinstitute/depmap/blob/54005fb/frontend/packages/portal-frontend/webpack.common.js#L31),
[webpack config](https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/frontend/packages/portal-frontend/webpack.common.js#L31),
add this line:

```js
Expand Down
2 changes: 1 addition & 1 deletion portal-backend/depmap/data_explorer_2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def unique_values_or_range():
# HACK: Infer if the values are lists by looking at the first member of the
# series. If so, we assume it's a list of strings. When we rework this to
# use BreadBox, we can take advantage of its "list_strings" AnnotationType.
# https://github.com/broadinstitute/depmap/blob/6f2b043/breadbox/app/models/dataset.py#L66
# https://github.com/broadinstitute/depmap-portal/blob/a2e2cc9/breadbox-client/breadbox_client/models/annotation_type.py#L8
if isinstance(series[0], list):
all_values = series.explode()
if dataset_id == "mutation_protein_change_by_gene":
Expand Down
2 changes: 1 addition & 1 deletion portal-backend/depmap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"test": "jest"
},
"repository": "https://github.com/broadinstitute/depmap",
"repository": "https://github.com/broadinstitute/depmap-portal",
"author": "CDS Team <[email protected]>",
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit b26ae1a

Please sign in to comment.