Skip to content

Commit 0d28563

Browse files
refactor: rename project/api to "purple" (#252)
* refactor: rpctracker -> purple API name * refactor: rpctracker purple module * ci: rename rpc-purple to purple for images * ci: rename rpc-app-base to purple-app-base
1 parent ef07c70 commit 0d28563

31 files changed

+47
-47
lines changed

.github/workflows/build-base-app.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
file: docker/base.Dockerfile
4040
platforms: linux/amd64,linux/arm64
4141
push: true
42-
tags: ghcr.io/ietf-tools/rpc-app-base:latest
42+
tags: ghcr.io/ietf-tools/purple-app-base:latest

.github/workflows/build.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,25 @@ jobs:
3737
file: dev/build/backend.Dockerfile
3838
platforms: linux/amd64
3939
push: true
40-
tags: ghcr.io/ietf-tools/rpc-purple-backend:latest
40+
tags: ghcr.io/ietf-tools/purple-backend:latest
4141

4242
- name: Generate Purple API client
4343
run: |
44-
container_id="$(docker create ghcr.io/ietf-tools/rpc-purple-backend:latest)"
45-
docker cp "${container_id}:/workspace/purple-api.yaml" ./
44+
container_id="$(docker create ghcr.io/ietf-tools/purple-backend:latest)"
45+
docker cp "${container_id}:/workspace/purple_api.yaml" ./
4646
docker rm "${container_id}"
4747
npx --yes @openapitools/openapi-generator-cli generate --generator-key purple
48-
tar cfz rpctracker_client.tgz -C client rpctracker_client
48+
tar cfz purple_client.tgz -C client purple_client
4949
5050
- name: Upload API
5151
uses: actions/upload-artifact@v4
5252
with:
5353
name: api-clients
5454
path: |
55-
purple-api.yaml
55+
purple_api.yaml
5656
rpcapi.yaml
57+
purple_client.tgz
5758
rpcapi_client.tgz
58-
rpctracker_client.tgz
5959
6060
- name: Build frontend image
6161
uses: docker/build-push-action@v6
@@ -67,4 +67,4 @@ jobs:
6767
file: dev/build/frontend.Dockerfile
6868
platforms: linux/amd64
6969
push: true
70-
tags: ghcr.io/ietf-tools/rpc-purple-frontend:latest
70+
tags: ghcr.io/ietf-tools/purple-frontend:latest

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ and all data in the RPC tool's database will be reset. The Datatracker _will not
9393

9494
This project uses two distinct HTTP APIs. Both are accessed using clients generated from OpenAPI specifications. The clients are generated using [OpenAPI Generator](https://openapi-generator.tech/).
9595

96-
### Front-end to Back-end: `rpctracker_api`
96+
### Front-end to Back-end: `purple_api`
9797

98-
This API is used by the Nuxt Client front end to communicate with the Django back end. This API is defined by this project through an OpenAPI specification in `rpctracker_api.json`. The API is implemented using the `django-rest-framework` and the spec is generated using `drf-spectacular`.
98+
This API is used by the Nuxt Client front end to communicate with the Django back end. This API is defined by this project through an OpenAPI specification in `purple_api.json`. The API is implemented using the `django-rest-framework` and the spec is generated using `drf-spectacular`.
9999

100100
### Back-end to Datatracker: `rpcapi`
101101

@@ -107,7 +107,7 @@ If changes are made to the APIs, you will need to update the clients. If this in
107107
```sh
108108
./update-rpcapi
109109
```
110-
This uses [OpenAPI Generator](https://openapi-generator.tech/) to regenerate `rpctracker_api.json` and builds both the API clients. It may take a minute or two. When it is done, restart the Django dev server. The Nuxt server normally picks up the changes automatically.
110+
This uses [OpenAPI Generator](https://openapi-generator.tech/) to regenerate `purple_api.json` and builds both the API clients. It may take a minute or two. When it is done, restart the Django dev server. The Nuxt server normally picks up the changes automatically.
111111
112112
## Cleanup
113113

client/components/AssignmentsTypes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Assignment, RfcToBe, RpcPerson, RpcRole } from '~/rpctracker_client'
1+
import type { Assignment, RfcToBe, RpcPerson, RpcRole } from '~/purple_client'
22

33
export type ResolvedAssignment = Omit<Assignment, 'person'> & {
44
person?: RpcPerson

client/components/BaseBadge.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</template>
1212

1313
<script setup lang="ts">
14-
import type { ColorEnum } from '~/rpctracker_client'
14+
import type { ColorEnum } from '~/purple_client'
1515
1616
type Props = {
1717
/**

client/components/DocComplexityCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<script setup lang="ts">
1717
18-
import type { Capability } from '~/rpctracker_client'
18+
import type { Capability } from '~/purple_client'
1919
2020
type Props = {
2121
capabilities: Capability[]

client/components/DocExceptionsCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</template>
1515

1616
<script setup lang="ts">
17-
import type { Label } from '~/rpctracker_client'
17+
import type { Label } from '~/purple_client'
1818
1919
type Props = { labels: Label[] }
2020

client/components/DocInfoCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</template>
5858

5959
<script setup lang="ts">
60-
import type { RfcToBe } from '~/rpctracker_client'
60+
import type { RfcToBe } from '~/purple_client'
6161
6262
type Props = {
6363
draft: (Record<PropertyKey, unknown> & RfcToBe) | null

client/components/DocumentTable.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
import { RpcLabel, Icon, NuxtLink } from '#components'
7171
import { isArray, isFunction, orderBy } from 'lodash-es'
7272
import type { Column, Row } from './DocumentTableTypes'
73-
import type { ColorEnum, Label } from '~/rpctracker_client'
73+
import type { ColorEnum, Label } from '~/purple_client'
7474
7575
const props = defineProps<{
7676
/**

client/components/DocumentTableTypes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { VNode } from 'vue'
2-
import type { ColorEnum } from '~/rpctracker_client'
2+
import type { ColorEnum } from '~/purple_client'
33

44
export type Value = unknown
55

client/components/RpcLabel.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</template>
77

88
<script setup lang="ts">
9-
import type { Label } from '~/rpctracker_client'
9+
import type { Label } from '~/purple_client'
1010
1111
type Props = {
1212
label?: Label

client/components/RpcLabelEditDialog.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
</template>
7373

7474
<script setup lang="ts">
75-
import { ColorEnum } from '~/rpctracker_client'
76-
import type { Label } from '~/rpctracker_client'
75+
import { ColorEnum } from '~/purple_client'
76+
import type { Label } from '~/purple_client'
7777
import { overlayModalMethodsKey } from '../providers/providerKeys'
7878
7979
const api = useApi()

client/components/RpcLabelPicker.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</template>
4242

4343
<script setup lang="ts">
44-
import type { Label } from '~/rpctracker_client'
44+
import type { Label } from '~/purple_client'
4545
4646
// work around hydration mismatch bug in Headless by explicitly generating stable IDs
4747
const comboboxLabelId = useId()

client/composables/useApi.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Configuration, RpcTrackerApi } from '~/rpctracker_client'
1+
import { Configuration, PurpleApi } from '~/purple_client'
22

33
const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE']
44

@@ -26,5 +26,5 @@ export const useApi = () => {
2626
}
2727
}]
2828
})
29-
return new RpcTrackerApi(configuration)
29+
return new PurpleApi(configuration)
3030
}

client/eslint.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default withNuxt(
4444
ignores: [
4545
'.nuxt/',
4646
'.output/',
47-
'rpctracker_client/'
47+
'purple_client/'
4848
]
4949
}
5050
)

client/pages/docs/[id]/enqueue.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
<script setup lang="ts">
4646
47-
import type { Capability, Label, RfcToBe } from '~/rpctracker_client'
47+
import type { Capability, Label, RfcToBe } from '~/purple_client'
4848
import type { Column } from '~/components/DocumentTableTypes'
4949
5050
const route = useRoute()

client/pages/docs/assignments.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
<script setup lang="ts">
7070
import type { ResolvedDocument, ResolvedPerson } from '~/components/AssignmentsTypes'
71-
import type { Assignment, RfcToBe, RpcPerson, RpcRole } from '~/rpctracker_client'
71+
import type { Assignment, RfcToBe, RpcPerson, RpcRole } from '~/purple_client'
7272
import { DateTime } from 'luxon'
7373
7474
const csrf = useCookie('csrftoken', { sameSite: 'strict' })

client/pages/docs/import.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<script setup lang="ts">
137137
import { DateTime } from 'luxon'
138138
import humanizeDuration from 'humanize-duration'
139-
import type { SourceFormatName, StdLevelName, StreamName, TlpBoilerplateChoiceName } from '~/rpctracker_client'
139+
import type { SourceFormatName, StdLevelName, StreamName, TlpBoilerplateChoiceName } from '~/purple_client'
140140
141141
const route = useRoute()
142142
const api = useApi()

client/pages/labels/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<script setup lang="ts">
4141
import { RpcLabelEditDialog } from '#components'
4242
import { overlayModalKey } from '~/providers/providerKeys'
43-
import type { Label } from '~/rpctracker_client'
43+
import type { Label } from '~/purple_client'
4444
4545
const api = useApi()
4646
const snackbar = useSnackbar()

client/pages/queue/[section].vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import { groupBy } from 'lodash-es'
5454
import { useSiteStore } from '@/stores/site'
5555
import Badge from '../../components/BaseBadge.vue'
5656
import type { Column, Row } from '~/components/DocumentTableTypes'
57-
import type { Assignment } from '~/rpctracker_client'
57+
import type { Assignment } from '~/purple_client'
5858
import type { Tab } from '~/components/TabNavTypes'
5959
6060
// ROUTING

client/pages/stats.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
3333
import { Duration } from 'luxon'
3434
import humanizeDuration from 'humanize-duration'
35-
import type { LabelStats } from '../rpctracker_client'
35+
import type { LabelStats } from '../purple_client'
3636
3737
const api = useApi()
3838

client/pages/team/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<script setup lang="ts">
6565
import { UserCreateDialog } from '#components'
6666
import { overlayModalKey } from '~/providers/providerKeys'
67-
import type { RpcPerson } from '~/rpctracker_client'
67+
import type { RpcPerson } from '~/purple_client'
6868
6969
const snackbar = useSnackbar()
7070
const _overlayModal = inject(overlayModalKey)

docker/app.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/ietf-tools/rpc-app-base:latest
1+
FROM ghcr.io/ietf-tools/purple-app-base:latest
22
LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>"
33

44
ENV DEBIAN_FRONTEND=noninteractive

manage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def main():
88
"""Run administrative tasks."""
9-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rpctracker.settings")
9+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "purple.settings")
1010
try:
1111
from django.core.management import execute_from_command_line
1212
except ImportError as exc:

openapitools.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"disallowAdditionalPropertiesIfNotPresent": false
1414
}
1515
},
16-
"rpctracker": {
16+
"purple": {
1717
"generatorName": "typescript-fetch",
18-
"inputSpec": "#{cwd}/rpctracker_api.yaml",
19-
"output": "#{cwd}/client/rpctracker_client",
18+
"inputSpec": "#{cwd}/purple_api.yaml",
19+
"output": "#{cwd}/client/purple_client",
2020
"additionalProperties": {
21-
"packageName": "rpctracker_client",
21+
"packageName": "purple_client",
2222
"disallowAdditionalPropertiesIfNotPresent": false
2323
}
2424
}
File renamed without changes.

rpctracker/openapi.py purple/openapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ class RpcAutoSchema(AutoSchema):
55
# pass
66
def get_tags(self):
77
# Override the default so that we get a single API tag
8-
return ["rpc_tracker"]
8+
return ["purple"]

rpctracker/settings.py purple/settings.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"simple_history.middleware.HistoryRequestMiddleware",
6161
]
6262

63-
ROOT_URLCONF = "rpctracker.urls"
63+
ROOT_URLCONF = "purple.urls"
6464

6565
TEMPLATES = [
6666
{
@@ -78,7 +78,7 @@
7878
},
7979
]
8080

81-
WSGI_APPLICATION = "rpctracker.wsgi.application"
81+
WSGI_APPLICATION = "purple.wsgi.application"
8282

8383

8484
# Database
@@ -138,13 +138,13 @@
138138
"DEFAULT_PARSER_CLASSES": [
139139
"rest_framework.parsers.JSONParser",
140140
],
141-
"DEFAULT_SCHEMA_CLASS": "rpctracker.openapi.RpcAutoSchema",
141+
"DEFAULT_SCHEMA_CLASS": "purple.openapi.RpcAutoSchema",
142142
}
143143

144144
# DRF OpenApi schema settings
145145
SPECTACULAR_SETTINGS = {
146-
"TITLE": "RpcTracker",
147-
"DESCRIPTION": "Backend API for the RpcTracker",
146+
"TITLE": "Purple",
147+
"DESCRIPTION": "Backend API for the Purple app",
148148
"VERSION": "0.1",
149149
"SCHEMA_PATH_PREFIX": "/api/rpc/",
150150
"COMPONENT_NO_READ_ONLY_REQUIRED": True,

rpctracker/urls.py purple/urls.py

File renamed without changes.

rpctracker/wsgi.py purple/wsgi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111

1212
from django.core.wsgi import get_wsgi_application
1313

14-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rpctracker.settings")
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "purple.settings")
1515

1616
application = get_wsgi_application()

update-rpcapi

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh -e
22
# Run this in the container after updating rpcapi.yaml!
33

4-
# Generate OpenAPI for the RpcTracker's api
5-
./manage.py spectacular --file rpctracker_api.yaml
4+
# Generate OpenAPI schema for the Purple api
5+
./manage.py spectacular --file purple_api.yaml
66

77
# Generate clients
88
# Configure the generator in openapitools.json

0 commit comments

Comments
 (0)