Audit use/structure of data classes

Open
#60 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
cli

Research direction

Start by reviewing issues #11 and #32, then audit the data-class usages and the AerieClient methods that expose them. Compare the API and client classes, including to_api_create and from_api_read mappings, against the proposed serialization rules. Done means the class boundaries and usage conventions are codified and the affected usages follow them.

Written by the indexing model from the issue text.

Description

breaking change enhancement question

Inspired by the goal of cleaning up the data classes as much as possible (see #11 and #32), we should audit everywhere they're used, everywhere they aren't but should, and how they're structured.

I'm particularly interested in codifying the difference between the "API" and "client" data classes. My current ideas are:

  • "API" data classes should contain exclusively serializable data types so that we don't need any custom (de)serialization defined for those classes. They could use default JSON serialization and go straight into the GQL queries.
  • Any custom mapping would happen in the "client" to_api_create and from_api_read methods.
  • Only "client" data classes would be exposed as input/return types on AerieClient methods. "API" data classes are only used behind the scenes.
  • "API" data classes are then only created/used in cases where we need custom (de)serialization. Otherwise, we can directly use the "client" data class.
Dominant language
Python
Stars
5
Forks
7
Avg merge
3d 14h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NASA-AMMOS/plandev-cli

All issues in NASA-AMMOS/plandev-cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.