Code Monkey home page Code Monkey logo

Comments (5)

mpu-creare avatar mpu-creare commented on June 8, 2024

I prefer the more categorical/hierarchical approach.

import podpac
['algorithm',
 'algorithmlib',
 'compositor',
 'coordinate',
 'data',
 'datalib',,
 'Node',
 'pipeline',
 'Units',
 'UnitsDataArray',
 'core',
 'settings']

dir(podpac.algorithm)
[
'Algorithm',
'Arithmetic',
 'Convolution',
 'Count',
 'ExpandCoordinates',
 'Kurtosis',
 'Max',
 'Mean',
 'Median',
 'Min',
 'SinCoords',
 'Skew',
 'SpatialConvolution',
 'StandardDeviation',
 'Sum',
 'TimeConvolution',
 'Variance',
]

dir(podpac.compositor)
[
'Compositor',
 'OrderedCompositor',
]

dir(podpac.data)
[
'DataSource', 
'NumpyArray', 
'WCS', 
...
]

dir(podpac.pipeline)
[
 'Pipeline',
 'PipelineError',
]

dir(podpac.coordinate)
[
'Coordinate', 
'Coord', 
'MonotonicCoord', 
'UniformCoord', 
'coord_linspace', 
...
]

etcetera.

from podpac.

mpu-creare avatar mpu-creare commented on June 8, 2024

@jmilloy @mlshapiro @drc-creare and DS what do you think?

from podpac.

jmilloy avatar jmilloy commented on June 8, 2024

I wouldn't be strict one way or the other.

Note that providing a flat structure doesn't prevent nested use (e.g. you can use either Median or algorithm.Median or algorithm.stats.Algorithm in a pipeline), but I do think that the toplevel namespace will get too cluttered.

Currently we have a mix: for example, the nodes in the various algorithm submodules are all exposed at the algorithm level (so not entirely flattened but not entirely nested either), which I think makes sense. So I would honestly expose highly common things at the podpac level (e.g. from podpac import Coordinate, but from podpac.core.coordinate import Coord).

from podpac.

jmilloy avatar jmilloy commented on June 8, 2024

(This made me think about the np.array method, which is fairly general and returns an np.ndarray object, and using that as a model for Coordinate. I would love to simplify the podpac.core.coordinate.Coordinate class and require more explicit arguments during initialization (UniformCoord instead of a tuple, np.datetime64 instead of strings) with a toplevel popdac.coordinate function that accepts all of the various shortcuts that make it easy to use and returns a Coordinate type. Any thoughts on that?)

from podpac.

mlshapiro avatar mlshapiro commented on June 8, 2024

Documented in contributing in cbaa498

from podpac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.