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

Reduce argument passing-down in the API #843

Open
trexfeathers opened this issue Jun 20, 2024 · 3 comments
Open

Reduce argument passing-down in the API #843

trexfeathers opened this issue Jun 20, 2024 · 3 comments
Labels
type: enhancement Auto-labelled for feat/* and feature/* branches

Comments

@trexfeathers
Copy link
Collaborator

Something for the future - too early while the API is still in flux

There are quite a lot of parameters that appear in MANY operations, because they are needed by something deeper in the call stack. Examples include: radius/zlevel/zscale and rtol/atol. This creates a lot of bloat and duplication across the public API.

I think it would be good if we could come up with alternative solutions so that we can simplify the signatures of a lot of GeoVista operations. The solution will depend on the circumstance, but here are some examples:

  • Move more obscure tweaks into **kwargs, which could be documented in a single place
  • Contain linked arguments (e.g. rtol and atol) in a named tuple of settings
  • Activate settings using a context manager instead
  • Restructure to make greater use of classes so that the settings become class attributes
@trexfeathers trexfeathers added new: issue Highlight a new community raised "generic" issue type: enhancement Auto-labelled for feat/* and feature/* branches labels Jun 20, 2024
@bjlittle bjlittle removed the new: issue Highlight a new community raised "generic" issue label Jun 20, 2024
@bjlittle bjlittle moved this to 🆕 Candidate in 🦊 GeoVista v0.6.0 Aug 1, 2024
Copy link
Contributor

In order to maintain a backlog of relevant issues, we automatically label them as stale after 180 days of inactivity.

If this issue is still important to you, then please comment on this issue and the stale label will be removed.

Otherwise this issue will be automatically closed in 28 days time.

@github-actions github-actions bot added the stale A stale issue/pull-request label Dec 18, 2024
@trexfeathers
Copy link
Collaborator Author

@bjlittle do you have any opinions on this?

@bjlittle bjlittle removed the stale A stale issue/pull-request label Dec 18, 2024
@bjlittle
Copy link
Owner

@trexfeathers At the moment this isn't a high priority, but my expectation is that this will be refactored when we extend the PoC baseline capability of CRS support within geovista . So this is still an important issue.

There are a few other core features that I want to see introduced first. At that point I think it'll be somewhat clearer how to shape the API, then we can refactor with confidence 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Auto-labelled for feat/* and feature/* branches
Projects
None yet
Development

No branches or pull requests

2 participants