Skip to content

Commit

Permalink
Merge pull request #778 from dandi/remove-girder-stuff
Browse files Browse the repository at this point in the history
Remove remaining girder API stuff
  • Loading branch information
mvandenburgh authored Jul 15, 2021
2 parents 264faae + b20f390 commit 6a86825
Show file tree
Hide file tree
Showing 24 changed files with 9 additions and 431 deletions.
4 changes: 0 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ jobs:
DJANGO_MINIO_STORAGE_SECRET_KEY: minioSecretKey
DJANGO_STORAGE_BUCKET_NAME: dandi-bucket
DJANGO_DANDI_DANDISETS_BUCKET_NAME: dandi-bucket
DJANGO_DANDI_GIRDER_API_URL: https://girder.dandiarchive.org/not/real
DJANGO_DANDI_GIRDER_API_KEY: notarealkey
DJANGO_CELERY_BROKER_URL: amqp://rabbitmq:5672/
- run:
name: Run API server in the background
Expand All @@ -79,8 +77,6 @@ jobs:
DJANGO_MINIO_STORAGE_SECRET_KEY: minioSecretKey
DJANGO_STORAGE_BUCKET_NAME: dandi-bucket
DJANGO_DANDI_DANDISETS_BUCKET_NAME: dandi-bucket
DJANGO_DANDI_GIRDER_API_URL: https://girder.dandiarchive.org/not/real
DJANGO_DANDI_GIRDER_API_KEY: notarealkey
DJANGO_CELERY_BROKER_URL: amqp://rabbitmq:5672/
- run:
name: Install web app
Expand Down
1 change: 0 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ publish = "dist"
command = "yarn run build"

[build.environment]
VUE_APP_API_ROOT = "https://girder.dandiarchive.org/api/v1"
VUE_APP_OAUTH_API_ROOT = "https://api.dandiarchive.org/oauth/"
VUE_APP_OAUTH_CLIENT_ID = "Dk0zosgt1GAAKfN8LT4STJmLJXwMDPbYWYzfNtAl"
VUE_APP_PUBLISH_API_ROOT = "https://api.dandiarchive.org/api/"
Expand Down
2 changes: 1 addition & 1 deletion test/src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
vTextarea,
} from 'jest-puppeteer-vuetify';

export const { CLIENT_URL, GIRDER_URL } = process.env;
export const { CLIENT_URL } = process.env;

export function uniqueId() {
// TODO think of something cleaner
Expand Down
1 change: 0 additions & 1 deletion web/.env.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
VUE_APP_API_ROOT=http://localhost:8080/api/v1
VUE_APP_PUBLISH_API_ROOT=http://localhost:8000/api/
VUE_APP_OAUTH_API_ROOT=http://localhost:8000/oauth/
VUE_APP_OAUTH_CLIENT_ID=Dk0zosgt1GAAKfN8LT4STJmLJXwMDPbYWYzfNtAl
1 change: 0 additions & 1 deletion web/.env.docker

This file was deleted.

1 change: 0 additions & 1 deletion web/src/components/DandisetList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export default defineComponent({
name: 'DandisetList',
props: {
dandisets: {
// Girder Items
type: Array as PropType<Dandiset[]>,
required: true,
},
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/DandisetsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ export default defineComponent({
djangoDandisetRequest.value = response.data;
});
// Unified Django + Girder
const dandisets = computed(() => djangoDandisetRequest.value?.results.map(
(dandiset) => dandiset.most_recent_published_version || dandiset.draft_version,
));
Expand Down
52 changes: 0 additions & 52 deletions web/src/components/SearchBox.vue

This file was deleted.

3 changes: 1 addition & 2 deletions web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import '@/title';
import App from '@/App.vue';
import router from '@/router';
import store from '@/store';
import { girderRest, publishRest } from '@/rest';
import { publishRest } from '@/rest';

Sentry.init({
dsn: process.env.VUE_APP_SENTRY_DSN,
Expand All @@ -42,7 +42,6 @@ loadUser().then(() => {
new Vue({
setup() {
provide('store', store);
provide('girderRest', girderRest);
},
router,
render: (h) => h(App),
Expand Down
10 changes: 0 additions & 10 deletions web/src/rest/girder.js

This file was deleted.

2 changes: 0 additions & 2 deletions web/src/rest/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import girderRest from '@/rest/girder';
import publishRest from '@/rest/publish';

const user = () => publishRest.user;
const loggedIn = () => !!user();
const insideIFrame = () => window.self !== window.top;

export {
girderRest,
publishRest,
loggedIn,
user,
Expand Down
6 changes: 0 additions & 6 deletions web/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import FileBrowser from '@/views/FileBrowserView/FileBrowser.vue';

import HomeView from '@/views/HomeView/HomeView.vue';
import UserLoginView from '@/views/UserLoginView/UserLoginView.vue';
import UserRegisterView from '@/views/UserRegisterView/UserRegisterView.vue';
import PublicDandisetsView from '@/views/PublicDandisetsView/PublicDandisetsView.vue';
import MyDandisetsView from '@/views/MyDandisetsView/MyDandisetsView.vue';
import SearchDandisetsView from '@/views/SearchDandisetsView/SearchDandisetsView.vue';
Expand All @@ -25,11 +24,6 @@ export default new Router({
name: 'userLogin',
component: UserLoginView,
},
{
path: '/user/register',
name: 'userRegister',
component: UserRegisterView,
},
{
path: '/dandiset',
name: 'publicDandisets',
Expand Down
15 changes: 1 addition & 14 deletions web/src/store/dandiset.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import axios from 'axios';
import RefParser from '@apidevtools/json-schema-ref-parser';

import { girderRest, publishRest } from '@/rest';
import { publishRest } from '@/rest';
import { draftVersion } from '@/utils/constants';

export default {
namespaced: true,
state: {
publishDandiset: null,
girderDandiset: null,
versions: null,
loading: false, // No mutation, as we don't want this mutated by the user
owners: null,
Expand All @@ -20,9 +19,6 @@ export default {
},
},
mutations: {
setGirderDandiset(state, dandiset) {
state.girderDandiset = dandiset;
},
setPublishDandiset(state, dandiset) {
state.publishDandiset = dandiset;
},
Expand All @@ -39,7 +35,6 @@ export default {
actions: {
async uninitializeDandisets({ state, commit }) {
commit('setPublishDandiset', null);
commit('setGirderDandiset', null);
commit('setVersions', null);
commit('setOwners', null);
state.loading = false;
Expand Down Expand Up @@ -78,14 +73,6 @@ export default {

state.loading = false;
},
async fetchGirderDandiset({ state, commit }, { identifier }) {
state.loading = true;

const { data } = await girderRest.get(`dandi/${identifier}`);
commit('setGirderDandiset', data);

state.loading = false;
},
async fetchSchema({ commit }) {
const { schema_url: schemaUrl } = await publishRest.info();
const res = await axios.get(schemaUrl);
Expand Down
32 changes: 0 additions & 32 deletions web/src/store/girder.js

This file was deleted.

2 changes: 0 additions & 2 deletions web/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import Vue from 'vue';
import Vuex from 'vuex';

import dandiset from '@/store/dandiset';
import girder from '@/store/girder';

Vue.use(Vuex);

export default new Vuex.Store({
modules: {
dandiset,
girder,
},
});
1 change: 0 additions & 1 deletion web/src/views/DandisetLandingView/DandisetDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ export default {
return this.publishedVersions || [];
},
...mapState('dandiset', {
girderDandiset: (state) => state.girderDandiset,
publishDandiset: (state) => state.publishDandiset,
owners: (state) => state.owners,
publishedVersions: (state) => state.versions,
Expand Down
11 changes: 1 addition & 10 deletions web/src/views/DandisetLandingView/DandisetLandingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,9 @@ export default {
};
}
if (
!this.girderDandiset
|| !this.girderDandiset.meta
|| !this.girderDandiset.meta.dandiset
) {
return {};
}
return { ...this.girderDandiset.meta.dandiset };
return {};
},
...mapState('dandiset', {
girderDandiset: (state) => state.girderDandiset,
publishDandiset: (state) => state.publishDandiset,
loading: (state) => state.loading,
dandisetVersions: (state) => state.versions,
Expand Down
1 change: 0 additions & 1 deletion web/src/views/DandisetLandingView/DandisetMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ export default {
return schema_copy;
},
...mapState('dandiset', {
girderDandiset: (state) => state.girderDandiset,
publishDandiset: (state) => state.publishDandiset,
}),
...mapGetters('dandiset', ['version']),
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/DandisetLandingView/DandisetOwnersDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
},
computed: {
user,
...mapState('dandiset', ['girderDandiset', 'publishDandiset']),
...mapState('dandiset', ['publishDandiset']),
},
watch: {
selection(val) {
Expand Down
1 change: 0 additions & 1 deletion web/src/views/DandisetLandingView/DownloadDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export default {
return this.publishDandiset.meta.dandiset.identifier;
},
...mapState('dandiset', {
girderDandiset: (state) => state.girderDandiset,
publishDandiset: (state) => state.publishDandiset,
publishedVersions: (state) => state.versions,
}),
Expand Down
8 changes: 4 additions & 4 deletions web/src/views/FileBrowserView/FileBrowser.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-progress-linear
v-if="!girderDandiset && !publishDandiset"
v-if="!publishDandiset"
indeterminate
/>
<PublishFileBrowser
Expand Down Expand Up @@ -36,18 +36,18 @@ export default {
};
},
computed: {
...mapState('dandiset', ['publishDandiset', 'girderDandiset']),
...mapState('dandiset', ['publishDandiset']),
},
async created() {
// Don't extract girderDandiset or publishDandiset, for reactivity
// Don't extract publishDandiset, for reactivity
const { identifier, version } = this;
if (!this.publishDandiset) {
this.fetchPublishDandiset({ identifier, version });
}
},
methods: {
...mapActions('dandiset', ['fetchPublishDandiset', 'fetchGirderDandiset']),
...mapActions('dandiset', ['fetchPublishDandiset']),
},
};
</script>
Loading

0 comments on commit 6a86825

Please sign in to comment.