Skip to content

Commit

Permalink
Exports v2 (#1054)
Browse files Browse the repository at this point in the history
* Epi export rewrite (#911)

* preliminary epi rewrite

* changes

* changes

* changes

* fix

* added back something accidentally deleted

* moved code

* fix test

* remove old stuff

* cleanup:

* use vectorized timestamp conversion

* minor formatting

---------

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>

* rewrite riskofbias exports (#921)

* preliminary epi rewrite

* changes

* changes

* changes

* fix

* added back something accidentally deleted

* moved code

* fix test

* remove old stuff

* cleanup:

* rewrite riskofbias exports

* update naming for domain and metric

---------

Co-authored-by: Daniel Rabstejnek <rabstejnek@gmail.com>

* Epimeta export rewrite (#922)

* preliminary epi rewrite

* changes

* changes

* changes

* fix

* added back something accidentally deleted

* moved code

* fix test

* remove old stuff

* cleanup:

* epimeta export rewrite

* remove obsolete code

* changes

* merge fix

* update admin site to browse data pivot by evidence type

---------

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>

* Invitro export rewrite (#958)

* Convert invitro exports

* Fix exporter datetime converter when datetime is None

* Fix exports where there's no data

* DTXSID in export should be None instead of useless dict if missing

* add endpoint categories

* Remove bloated dsstox dict from exports in favor of dtxsid

---------

Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>

* Animal export rewrite (#961)

* Made animal model exports, began configuring exporters

* first export largely done, second export mostly done

* Some cleanups, finished fourth animal exporter

* Changes after more testing

* Fix tests

* Remove remaining flat_complete_* methods

* Cleanup

* Update sql_display to accept dict

* Add TODO to comment to easily find it

* Rename exporters to match the flat file exporter class names

* Add safeguard for qs accessing and fix groupby side effects (#982)

* two updates

* move to correct place

* exports-v2 - Updates from image review (#1058)

* remove duplicate rename calls

* add ci calculation

* update treatment period calculation

* add back space; fix caused too many false positives in comparison

* properly handle a 500 response from the server in a data pivot

* fix epi logic from plot review

* fix invitro export when category id is null; remove category id from export

* add unique rob columns

* use same method for categories

* refactor into a reusable method

* remove pytest warning "Marks applied to fixtures have no effect"

* refactor; write tests

* add tests

* rewrite animal export test using same pattern

* add udf to openapi

* remove extra whitespace (will change visuals; known change)

---------

Co-authored-by: Daniel Rabstejnek <rabstejnek@gmail.com>
  • Loading branch information
shapiromatron and rabstejnek authored Jul 2, 2024
1 parent 876a8ae commit 2da4f1f
Show file tree
Hide file tree
Showing 39 changed files with 3,539 additions and 2,800 deletions.
16 changes: 13 additions & 3 deletions frontend/summary/dataPivot/DataPivot.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,22 @@ class DataPivot {
}

static get_object(pk, callback) {
const url = `/summary/api/data_pivot/${pk}/`;
const url = `/summary/api/data_pivot/${pk}/`,
handleError = err => {
$("#loading_div").hide();
handleVisualError(err, $("#dp_display"));
};

fetch(url, h.fetchGet)
.then(d => d.json())
.then(d => {
fetch(d.data_url, h.fetchGet)
.then(resp => {
if (!resp.ok) {
throw Error(`Invalid server response: ${resp.status}`);
}
return resp;
})
.then(d => d.text())
.then(data => d3.tsvParse(data))
.then(data => {
Expand All @@ -58,9 +68,9 @@ class DataPivot {
callback(dp);
}
})
.catch(err => handleVisualError(err, null));
.catch(handleError);
})
.catch(err => handleVisualError(err, null));
.catch(handleError);
}

static displayAsModal(id) {
Expand Down
Loading

0 comments on commit 2da4f1f

Please sign in to comment.