Skip to content

Commit

Permalink
fix web links
Browse files Browse the repository at this point in the history
  • Loading branch information
StardustDL committed Feb 5, 2024
1 parent 1c63d19 commit 14f17aa
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ AexPy also provides a framework to process Python packages, extract APIs, and de

Diff generator-oj-problem v0.0.1 and v0.0.2.

- Output report to `report.txt`
- Save API descriptions to `cache/api1.json` and `cache/api2.json`
- Output report to `report.txt`

```sh
pip install aexpy
Expand All @@ -51,6 +51,12 @@ aexpy preprocess -r -p generator-oj-problem@0.0.2 ./cache - | aexpy extract - ./
aexpy diff ./cache/api1.json ./cache/api2.json - | aexpy report - - | aexpy view - > report.txt
```

View results on [online AexPy](https://aexpy.netlify.app/).

- generator-oj-problem@0.0.1 [Distribution](https://aexpy.netlify.app/distributions/generator-oj-problem@0.0.1/) and [API](https://aexpy.netlify.app/apis/generator-oj-problem@0.0.1/)
- generator-oj-problem@0.0.2 [Distribution](https://aexpy.netlify.app/distributions/generator-oj-problem@0.0.2/) and [API](https://aexpy.netlify.app/apis/generator-oj-problem@0.0.2/)
- [Changes](https://aexpy.netlify.app/changes/generator-oj-problem@0.0.1:0.0.2/) and [Report](https://aexpy.netlify.app/changes/generator-oj-problem@0.0.1:0.0.2/)

## Features

- Preprocessing
Expand Down Expand Up @@ -138,6 +144,8 @@ aexpy preprocess -d ./cache/generator_oj_problem-0.0.1-py3-none-any ./cache/dist
aexpy preprocess ./cache/generator_oj_problem-0.0.1-py3-none-any ./cache/distribution.json -p generator-oj-problem@0.0.1 -m generator_oj_problem
```

> View results at [AexPy Online](https://aexpy.netlify.app/distributions/generator-oj-problem@0.0.1/).
### Extract

Extract the API description from a distribution.
Expand All @@ -162,6 +170,8 @@ aexpy extract ./cache/distribution.json - -e demo-env
aexpy extract ./cache/distribution.json - --temp
```

> View results at [AexPy Online](https://aexpy.netlify.app/apis/generator-oj-problem@0.0.1/).
### Diff

Diff two API descriptions and detect changes.
Expand All @@ -170,6 +180,8 @@ Diff two API descriptions and detect changes.
aexpy diff ./cache/api1.json ./cache/api2.json ./cache/diff.json
```

> View results at [AexPy Online](https://aexpy.netlify.app/changes/generator-oj-problem@0.0.1:0.0.2/).
### Report

Generate report from detect changes.
Expand All @@ -178,6 +190,8 @@ Generate report from detect changes.
aexpy report ./cache/diff.json ./cache/report.json
```

> View results at [AexPy Online](https://aexpy.netlify.app/reports/generator-oj-problem@0.0.1:0.0.2/).
### View

View produced data.
Expand Down
1 change: 0 additions & 1 deletion src/web/src/components/metadata/ApiEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const entryUrl = computed(() => {
<n-button
:href="entryUrl"
tag="a"
target="_blank"
text
:style="{ 'user-select': 'auto' }"
>{{ entry }}</n-button>
Expand Down
8 changes: 4 additions & 4 deletions src/web/src/components/products/ApiDifferenceViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const columns = computed(() => {
{
trigger: () => {
if (row.old) {
return h(ApiEntryLink, { entry: row.old.id, url: `/extract/${props.data.old.release.toString()}/` }, {})
return h(ApiEntryLink, { entry: row.old.id, url: `/apis/${props.data.old.release.toString()}/` }, {})
}
return "";
},
Expand All @@ -212,7 +212,7 @@ const columns = computed(() => {
default: () => h(ApiEntryViewer, {
entry: old,
rawUrl: props.data.old.rootPath,
entryUrl: `/extract/${props.data.old.release.toString()}/`,
entryUrl: `/apis/${props.data.old.release.toString()}/`,
})
});
}
Expand Down Expand Up @@ -240,7 +240,7 @@ const columns = computed(() => {
{
trigger: () => {
if (row.new) {
return h(ApiEntryLink, { entry: row.new.id, url: `/extract/${props.data.new.release.toString()}/` }, {})
return h(ApiEntryLink, { entry: row.new.id, url: `/apis/${props.data.new.release.toString()}/` }, {})
}
return "";
},
Expand All @@ -253,7 +253,7 @@ const columns = computed(() => {
default: () => h(ApiEntryViewer, {
entry: ne,
rawUrl: props.data.new.rootPath,
entryUrl: `/extract/${props.data.new.release.toString()}/`,
entryUrl: `/apis/${props.data.new.release.toString()}/`,
})
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/src/components/products/DistributionViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ defineProps<{
<n-h6 type="info" prefix="bar">Top Level Modules</n-h6>
</template>
<n-space vertical>
<ApiEntryLink :url="`/view/description/${data.release.toString()}/`" v-for="item in data.topModules" :key="item" :entry="item">{{ item }}</ApiEntryLink>
<ApiEntryLink :url="`/apis/${data.release.toString()}/`" v-for="item in data.topModules" :key="item" :entry="item">{{ item }}</ApiEntryLink>
</n-space>
</n-descriptions-item>
<n-descriptions-item>
Expand Down
6 changes: 3 additions & 3 deletions src/web/src/pages/view/Description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ const argsEntryCounts = computed(() => {
placeholder="Entry ID" />

<ApiEntryViewer :entry="currentEntry" v-if="currentEntry" :raw-url="data.distribution.rootPath"
:entry-url="`/description/${params.id}/`" />
:entry-url="`/apis/${params.id}/`" />
</n-space>

<n-modal v-model:show="showCallgraph" preset="card"
Expand All @@ -474,11 +474,11 @@ const argsEntryCounts = computed(() => {
</n-space>
</template>
<CallgraphViewer :style="{ height: '100%' }" v-if="data && currentEntry instanceof FunctionEntry"
:api="data" :entry="currentEntry" :entry-url="`/description/${params.id}/`"
:api="data" :entry="currentEntry" :entry-url="`/apis/${params.id}/`"
:depth="callgraphDepth" :caller="showCallgraphCaller" :callee="showCallgraphCallee"
:external="showCallgraphExternal" />
<GlobalCallgraphViewer :style="{ height: '100%' }" v-if="data && !(currentEntry instanceof FunctionEntry)"
:api="data" :entry-url="`/description/${params.id}/`"
:api="data" :entry-url="`/apis/${params.id}/`"
:external="showCallgraphExternal"></GlobalCallgraphViewer>
</n-modal>

Expand Down

0 comments on commit 14f17aa

Please sign in to comment.