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

Add table for weather observation (Stacked PR) #3452

Draft
wants to merge 18 commits into
base: dev
Choose a base branch
from

Conversation

CloCkWeRX
Copy link
Collaborator

@CloCkWeRX CloCkWeRX commented Sep 16, 2023

#3453 first

A small part of:
#1165
#863

Also kind of like:
https://github.com/Growstuff/growstuff/pull/1307/files

Based on schemaorg/schemaorg#362

The idea would be to only record specific observations, with a source that have happened.

Ideally this would be from either:

  • Snapshots of various weather APIs with unit conversions as required
  • Directly out of home weather stations

Use cases:

As gardener with various observation tools
I would like to record a snapshot of weather (manually)
So that I have a history of what was happening in my own microclimate
And I can compare to crop yields.

As gardener with home automation
I would like to record a snapshot of weather
So that I have a history of what was happening in my own microclimate
And I can compare to crop yields.

@CloCkWeRX CloCkWeRX changed the base branch from dev to rubocop-todo September 16, 2023 08:03
@CloCkWeRX CloCkWeRX changed the title Add table for weather observation Add table for weather observation (Stacked PR) Sep 16, 2023
Base automatically changed from rubocop-todo to dev October 4, 2023 12:40
app/models/weather_observation.rb Dismissed Show dismissed Hide dismissed
app/controllers/weather_observations_controller.rb Dismissed Show dismissed Hide dismissed
app/views/weather_observations/index.html.haml Dismissed Show dismissed Hide dismissed
flash[:notice] = I18n.t('weather_observations.created') if @weather_observation.save
respond_with(@weather_observation)
end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected trailing spaces found.

flash[:notice] = I18n.t('weather_observations.updated') if @weather_observation.update(weather_observation_params)
respond_with(@weather_observation)
end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected trailing spaces found.

flash[:notice] = I18n.t('weather_observations.deleted')
redirect_to(member_weather_observations_path(@weather_observation.owner))
end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected trailing spaces found.

end

private

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected trailing spaces found.

params.require(:weather_observation).permit!
end
end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expected a newline at the end of the file.

params.require(:weather_observation).permit!
end
end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected trailing spaces found.

= render 'weather_observations/actions', weather_observation: weather_observation



Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected trailing spaces found.

%strong= @weather_observation
.col-md-3.col-12
= render 'weather_observations/actions', weather_observation: @weather_observation
.row
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line was indented 2 levels deeper than the previous line.

@@ -0,0 +1,18 @@
- if can?(:edit, garden)
.dropdown.garden-actions
%a#garden-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'} Actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [167/120]

@@ -0,0 +1,18 @@
- if can?(:edit, garden)
.dropdown.garden-actions
%a#garden-actions-button.btn.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", type: "button", href: '#'} Actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants