Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/app 47 read corpus type information via admin service #274

Merged

Conversation

katybaulch
Copy link
Contributor

Description

Add /all and /get routes for corpus types in the admin service.

Proposed version

Please select the option below that is most relevant from the list below. This
will be used to generate the next tag version name during auto-tagging.

  • Skip auto-tagging
  • Patch
  • Minor version
  • Major version

Visit the Semver website to understand the
difference between MAJOR, MINOR, and PATCH versions.

Notes:

  • If none of these options are selected, auto-tagging will fail
  • Where multiple options are selected, the most senior option ticked will be
    used -- e.g. Major > Minor > Patch
  • If you are selecting the version in the list above using the textbox, make
    sure your selected option is marked [x] with no spaces in between the
    brackets and the x

Type of change

Please select the option(s) below that are most relevant:

  • Bug fix
  • New feature
  • Breaking change
  • GitHub workflow update
  • Documentation update
  • Remove legacy code
  • Dependency update

How Has This Been Tested?

Please describe the tests that you added to verify your changes.

Reviewer Checklist

  • DB_CLIENT DEPENDENCY IS ON THE LATEST VERSION
  • The PR represents a single feature (small drive-by fixes are also ok)
  • The PR includes tests that are sufficient for the level of risk
  • The code is sufficiently commented, particularly in hard-to-understand areas
  • Any required documentation updates have been made
  • Any TODOs added are captured in future tickets
  • No FIXMEs remain

@katybaulch katybaulch requested a review from a team as a code owner January 2, 2025 11:14
Copy link

linear bot commented Jan 2, 2025

@katybaulch katybaulch enabled auto-merge (squash) January 2, 2025 13:40
Copy link
Contributor

@jamesgorrie jamesgorrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I just wonder about using the corpus_type_name as the identifier.

I don't think this API is used outside navigator-admin ecosystem, so it shouldn't expose a breaking change outside of this scope, so maybe not a problem?

app/api/api_v1/routers/corpus_type.py Show resolved Hide resolved
tests/integration_tests/corpus/test_update.py Show resolved Hide resolved
tests/integration_tests/corpus_type/test_get.py Outdated Show resolved Hide resolved
@katybaulch
Copy link
Contributor Author

Looks good, but I just wonder about using the corpus_type_name as the identifier.

I don't think this API is used outside navigator-admin ecosystem, so it shouldn't expose a breaking change outside of this scope, so maybe not a problem?

Corpus types don't have IDs believe it or not 😬 The name is the primary key. We won't be allowing the corpus type name to be changed in the admin service (at least at the moment) - just the corpus type description.

@katybaulch katybaulch requested a review from jamesgorrie January 2, 2025 16:02
@jamesgorrie
Copy link
Contributor

We won't be allowing the corpus type name to be changed in the admin service

Feels like something we should get to sooner rather than later - minting and IDing our objects. This is probably something that should percolate through the system too.

But that's something that will need a more abstract design, outside the scope of this PR.

Copy link
Contributor

@jamesgorrie jamesgorrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fab - thanks for the insight from your answers!

@katybaulch
Copy link
Contributor Author

We won't be allowing the corpus type name to be changed in the admin service

Feels like something we should get to sooner rather than later - minting and IDing our objects. This is probably something that should percolate through the system too.

But that's something that will need a more abstract design, outside the scope of this PR.

Yeah very much agreed!

@katybaulch katybaulch merged commit a1c53b6 into main Jan 2, 2025
10 checks passed
@katybaulch katybaulch deleted the feature/app-47-read-corpus-type-information-via-admin-service branch January 2, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants