lasp / lasp/latis-python-client

Improve error checking

Open
#12 0 comments 0 reactions 0 assignees View on GitHub

@pie-tras is already working on this.

Since Jun 21, 2023.

  • #22 by @pie-tras — open
Dominant language
Python
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Think about the ways users could misuse our code and add some error checking to guard against it.

Some examples to start:

  • In def data(), the returnType param could be an invalid string. Ways to guard against that include:
    • do a .lower() or .upper() on returnType before the comparison
    • before the comparison, check if the value of returnType is one of the supported values, and if it isn't, throw an error that tells the user what the valid options are
  • In def download(), the fileFormat param could be an invalid string.
    • Maybe check if fileFormat is one of the supported formats, and if it isn't, throw an error that tells the user what the valid formats are

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the data() and download() entry points and reading how their returnType and fileFormat parameters are currently compared. Check the linked pull request for work already underway; done means unsupported values produce errors that identify the valid options.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.