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

Indicator data input #245

Merged
merged 12 commits into from
Apr 12, 2022
Merged

Indicator data input #245

merged 12 commits into from
Apr 12, 2022

Commits on Apr 12, 2022

  1. Implement Layer dataclass for layers with data

    attached to itself.
    
    Factor out the layer classes from `base/indicator.py` to own module.
    matthiasschaub committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    3807ce7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2c9666 View commit details
    Browse the repository at this point in the history
  3. Indicators are initialized with a Layer object

    Instead of initializing an Indicator with a `layer_name` as string
    initialize an Indicator with a `layer` as Layer object.
    matthiasschaub committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    4fcccdb View commit details
    Browse the repository at this point in the history
  4. Add function create_indicator using custom Layer

    Also first instantiate a Layer object and then pass it as init parameter
    to the Indicator object.
    matthiasschaub committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    1ca9f28 View commit details
    Browse the repository at this point in the history
  5. If Layer has data attached return data immediately

    instead of making a request to the ohsome API to retrieve data
    
    Call ohsome.query function with args not kwargs.
    matthiasschaub committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    a445d66 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7dc26fd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d082788 View commit details
    Browse the repository at this point in the history
  8. Improve usage of generic function (singledispatch)

    Make usage of singledispatch more concise.
    
    Address review comments of the dispatch functions:
    - Adhere to convention to name overloaded func '_'
    - Remove # noqa comments
    - Rename 'kargs' to 'kwargs'
    - Add test cases for generic functions covering 'NotImplemented'
    matthiasschaub committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    99af1da View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f7830f8 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d80785f View commit details
    Browse the repository at this point in the history
  11. Various small improvements to the tests

    Ignore duplications in the tests fixtures.py
    
    Fix timestamp range in test fixtures
    
    Avoid loading the same fixture for each test case
    
    In test do not use empty string for layer name
    joker234 authored and matthiasschaub committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    b1ea2e4 View commit details
    Browse the repository at this point in the history
  12. Add layer name and description to request examples

    of the API instead of using empty strings.
    matthiasschaub committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    5662d55 View commit details
    Browse the repository at this point in the history