rubyforgood / applied-conservation Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
GIVEN David has created a target with the target health attribute Flow
When he is on the target show page
THEN he should see the Flow attribute name as a clickable link
AND WHEN he clicks the name
THEN he is on the Flow target health attribute show page
AND he sees an Edit link (that does not work)
**Note: This is set up for the next story where he should be able to edit the target health attribute by clicking that edit link on the show page. We will also eventually display the rating descriptions on this page. So it will not be as useless as it is now :)
GIVEN David is on the New Target form
AND he has chosen "Freshwater Ecosystem" as the target type
AND There are 5 HealthAttributes belonging to the Freshwater Ecosystem TargetType (see list below)
WHEN David saves the Target
THEN he sees a 'Health Attributes' link next to the Target's name in the index
AND WHEN he clicks the link
THEN he sees the name/description of all 5 health attributes
Flows - amount, timing, and duration of freshwater flows (surface water and/or groundwater)
Riparian Vegetation - composition, structure and extent
Native Aquatic Animals (fish, amphibians, other) - composition and abundance
Physical Integrity - physical alteration of bank or wetland; channel morphology
Water Quality - dissolved oxygen, sediment, nutrients, toxins
GIVEN David is looking at the target health attribute index on the target show page
THEN he should see a 'Delete' link in each table row
AND WHEN he clicks the Delete link for a target health attribute
THEN the page should refresh and the target health attribute should no longer be in the table
**Note: This should actually delete the target health attribute from the DB
Add an 'Edit Photo' link below the default photo. That should pop up an image upload modal.
Make it look like the other indicies
When David is working on a task
They want to be able to mark it as completed
So that they keep track of work status
Given that a task exists
When David clicks done
Then the task is marked complete
The target create form should display the following static hints in text bubbles to the right of the form (maybe make them move to be below the form as the page size is reduced... totally optional)
Use a “coarse-filter/ fine-filter” approach to identifying conservation targets. First, focus on the selection of ecological systems or communities. These act as the "coarse-filter" that capture most species of special interest. If you conserve the ecosystems at your area, you will conserve these species at your area. (Species of special interest will be listed later as “Nested Targets.”).
Then, teams may need to add species with unique ecological requirements or threats that are not already reflected by the ecological systems in which they are embedded. These are considered “fine-filter” targets with special conservation needs that go beyond conserving the ecosystem.
When in doubt, lump co-occurring targets. It’s easy enough to split out the targets later if needed. Examples: rare fish assemblage; longleaf pine woodland and associated communities. See “Helper” for assistance.
If migratory birds, fish or other animal species are selected as targets, the life-stage of the species at the project area should be explicitly identified as the target. A project team cannot be responsible for conserving a species across its range, but rather only for that part of the species life cycle when it resides in the project area. Turbo-CAP also suggests that project teams make the habitat the target rather than the species itself – e.g. Mule deer wintering habitat instead over Over-wintering mule deer.
“Keystone” species are species that drive major ecological processes; if it were removed the ecosystem would change dramatically. Keystone species may be “apex predators” (e.g., wolves in Yellowstone, major herbivores (e.g., elephants in African savanna), or filters (e.g., oysters in Chesapeake Bay).
An “umbrella” species is a species that has habitat needs which reflect the needs of many other species in the area, and as such is selected to represent many species, or even an ecosystem. For example, the greater sage grouse is often considered an umbrella species for its associated sagebrush ecosystems – i.e., if the sage grouse population is healthy in an area, its ecosystems are most likely to be healthy (but perhaps not some other sagebrush obligate species that have special requirements). Similarly, “focal” species involves choosing a suite of species within a landscape whose functional requirements collectively encompass those of most other species in the landscape. turboCAP recommends caution - there is some scientific debate on using umbrella species and focal species for conservation planning.
GIVEN There is a health_attribute with name 'Flow' belonging to target_type 'Fresh water'
AND David selects 'Fresh water' from the type drop-down on a new target form
WHEN David saves the form
THEN he is on the target show page
AND he sees a list of target_health_attribute_ratings with one item
AND the target_health_attribute_rating has name 'Flow'
AND the target_health_attribute_rating has no rating
**Note: rename grades to ratings
**Note: drop target_health_attributes table
We should decide on if we are using lets or before blocks for our specs...
This article makes an argument for using lets unless it is a before_all block (https://www.ombulabs.com/blog/rails/rspec/ruby/let-vs-instance.html)
should work like editing targets... edit link next to the page-heading
This will involve adding an admin module to allow Greg to manage multiple models...
I have used the active admin gem in the past to do this and it has worked well: https://activeadmin.info/
Since we do not have user roles yet, it is probably OK to just route the /admin endpoint to go to the admin module
David should be able to go to the admin and edit the list of target hints.
The list is currently hardcoded in app/views/targets/_hints.html.erb
. Let's make that list dynamic and make them editable via the admin UI.
David can create a Target Health Rating
Would you add Greg's brother, Richard Low (rlow), to the repo, please?
Still unsure about this name, but …
Join model between a Target
and a HealthRating
body
Pull out all user login logic (including Warden test helpers) into a shared login_macros file
GIVEN David is creating a new Target
WHEN he clicks on the Target Name
THEN he sees a list of Name suggestions in a dropdown
AND WHEN he starts typing in the input field
THEN the list of suggestions only shows suggestions containing the input value
AND WHEN he selects a suggestion
THEN that suggestion is populated in the input
AND WHEN he clicks save
THEN he sees the value in the input as the Target name
GIVEN David has created a target
WHEN he goes to the target show page
THEN he should see a 'Add new Health Attribute' link below the target health attribute index (please style to look like all other add links)
AND WHEN he clicks the Add link
THEN he is on the new target health attribute page
AND he can fill in the Name text input with 'New Attr'
AND WHEN he clicks save
THEN he is back on the target show page
AND he sees 'New Attr' in the Health attributes index
**Note: Eventually we will want to be able to assign the rating on creation. If that data model isn't nailed down yet we can still create new target health attributes with just names
Put a 'Documents' section on the project show page. The section can contain an index of uploaded document names and an add 'Upload New Document' link
GIVEN David has created a Target and is on the target view page with the list of health attributes
THEN the rating dropdown should include the rating name followed by a dash and then the description (i.e. Poor - Flows are highly altered...)
THEN he should see the description for a Poor Flow rating next to the word Poor
You can find the list of target health grades in this spreadsheet under the "starter set" tabs: https://docs.google.com/spreadsheets/d/11tFSX8PY6arTx5Hji1brEcvxu-nwuxY6lPFVRj59xI0/edit#gid=0
WHEN David attempts to save a target without giving it a name
THEN he remains on the new target form
AND he sees an error toast message with message: 'Name is required'
AND WHEN he enters a name and saves again
THEN he is able to successfully save the target
When I go to the root URL
Then I see a list (index) of all projects
""note: no need to add design
""note: for now, let's use hard-coded seed data to populate the Projects
GIVEN David is on the Project view page
THEN he sees a 'Add Task' button (below the list of targets)
AND WHEN he clicks the button
THEN he is redirected to the New Task form
AND he sees a name input field
AND a user dropdown
AND a due date
AND when he clicks save
THEN he is redirected back to the project view page
AND he sees the newly created task
name
: stringWith DB seeds:
User currently belongs_to
a Project. Let's turn this into a many-to-many relationship.
GIVEN Project named Chena Valley exists
WHEN David views the list of targets
THEN he sees a button with text 'Add Target'
AND WHEN he clicks the Add Target button
THEN he sees a form with Title 'New Target'
AND he sees a Name input
AND a Type dropdown (see target module spec for dropdown options)
AND a description textarea
AND WHEN he clicks save button (bottom of form)
THEN he is redirected to the targets index
AND he sees the newly added target in the index
Get with Design to put together some digital mockups for the project view
Each form should have
consistent spacing between labels/inputs
submit button in bottom right
back link in bottom left
new/edit task form
new/edit target form
new/edit project form
**Note: New task form has the most up to date styles
users should be redirected to the login page when accessing turboCAP. Login page should require email and password.
users are redirected to the projects index upon logging in
Note: value and weight are not needed on the form, because these two fields are now stored in the grade_templates table.
David can view the Tasks of a Project
Tasks with no assigned user have an "Assign" link
David can select the link and the Task user is updated with his user id
David's name is now associated with Task
Same schema as HealthRating
model in #30 except for the target association. This will be the template for HealthRating
to be applied to a target.
Check out the Project health module spec/ talk to Greg to understand more about how target health scorecards are generated
As the user
WHEN David is on the project show page
AND he clicks the View all targets link
THEN he sees a list of all targets for that project
AND I do not see any targets that do not belong to that project
**Note: no design yet
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.