{"id":26716027,"url":"https://github.com/smnorris/bcfishpass","last_synced_at":"2025-04-14T00:55:04.793Z","repository":{"id":39853588,"uuid":"310742611","full_name":"smnorris/bcfishpass","owner":"smnorris","description":"Model and monitor aquatic habitat connectivity in BC. Tools to plan and prioritize the assessment and remediation of barriers.","archived":false,"fork":false,"pushed_at":"2025-04-11T23:41:28.000Z","size":35135,"stargazers_count":8,"open_issues_count":58,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T00:29:31.877Z","etag":null,"topics":["british-columbia","connectivity","culverts","digital-road-atlas","dra","fish-habitat-models","fish-observation","fish-passage","freshwater-atlas","fwa","gradient-barriers","pscis","restoration","roads","stream-network"],"latest_commit_sha":null,"homepage":"https://smnorris.github.io/bcfishpass","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smnorris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-07T01:26:03.000Z","updated_at":"2025-04-11T23:41:32.000Z","dependencies_parsed_at":"2023-12-17T05:19:41.684Z","dependency_job_id":"0965ced3-69e8-4879-ac71-fcb6a4b648e9","html_url":"https://github.com/smnorris/bcfishpass","commit_stats":{"total_commits":1181,"total_committers":13,"mean_commits":90.84615384615384,"dds":0.06011854360711266,"last_synced_commit":"27e72b4390d30a5519715a73815ff8585a410b7e"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smnorris%2Fbcfishpass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smnorris%2Fbcfishpass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smnorris%2Fbcfishpass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smnorris%2Fbcfishpass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smnorris","download_url":"https://codeload.github.com/smnorris/bcfishpass/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804783,"owners_count":21164131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["british-columbia","connectivity","culverts","digital-road-atlas","dra","fish-habitat-models","fish-observation","fish-passage","freshwater-atlas","fwa","gradient-barriers","pscis","restoration","roads","stream-network"],"created_at":"2025-03-27T14:52:29.678Z","updated_at":"2025-04-14T00:55:04.766Z","avatar_url":"https://github.com/smnorris.png","language":"PLpgSQL","readme":"# bcfishpass\n\n`bcfishpass` is a collection of scripts to create and maintain an aquatic connectivity / fish passage database for British Columbia to:\n\n- track known barriers to fish passage (eg dams, waterfalls)\n- work with assessed BC Provincial Stream Crossing Information System (PSCIS) crossings\n- model potential barriers to fish passage (stream gradient, road/rail stream crossings)\n- model passability/accessibility of streams based on species swimming ability\n- model streams with potential for spawning and rearing activity (for select species)\n- report on habitat/connectivity based indicators to support prioritization of assessment and remediation\n- support mapping in office and field via a comprehensive QGIS layer file\n\n\nSee the [Documentation](https://smnorris.github.io/bcfishpass/) for details.\n\n## General requirements\n\n- bash\n- GDAL\n- PostgreSQL / PostGIS\n- Python\n- [bcdata](https://github.com/smnorris/bcdata)\n- [fwapg](https://github.com/smnorris/fwapg)\n- [bcfishobs](https://github.com/smnorris/bcfishobs)\n\n## Development setup\n\n`bcfishpass` is a collection of shell/sql/Python scripts. To download and use the latest:\n\n    git clone https://github.com/smnorris/bcfishpass.git\n    cd bcfishpass\n\nAll scripts presume the path to an existing PostGIS enabled database is defined by the environment variable `$DATABASE_URL`:\n\n    export DATABASE_URL=postgresql://postgres@localhost:5432/bcfishpass\n\nInstall all other required tools/dependencies using your preferred package manager or via Docker.\nA `conda` environment and a `Dockerfile` are provided:\n\n#### Conda\n\n    conda env create -f environment.yml\n    conda activate bcfishpass\n    jobs/\u003cscript\u003e\n\n#### Docker\n\n    docker compose build\n    docker compose up -d\n    docker compose run --rm runner jobs/\u003cscript\u003e\n\nDocker is configured to write the database to `postgres-data` - even if containers are deleted, the database will be retained here.\nIf you have shut down Docker or the container, start it up again with this command:\n\n    docker-compose up -d\n\nConnect to the db from your host OS via the port specified in `docker-compose.yml`:\n\n    psql -p 8001 -U postgres bcfishpass\n\nStop the containers (without deleting):\n\n    docker compose stop\n\nDelete the containers:\n\n    docker compose down\n\nTo build/load/dump a small database for development/testing:\n\n    docker compose build\n    docker compose up -d\n    cd test\n    docker compose run --rm runner build_db.sh\n\nNote that `build_db.sh` dumps all required inputs to a postgresql dump file - once it has been run once, a testing database can be quickly restored from the dump rather than loading from scratch:\n\n    cd ..\n    docker compose down           # shut down the vm\n    rm -rf postgres-data          # remove the testing db data folder\n    docker compose up -d          # restart docker, create_db is automatically run\n    pg_restore -d $DATABASE_URL test/bcfishpass_test.dump  # call restore from local OS\n\nRun the models on the testing watershed groups:\n\n    docker compose run --rm runner test.sh\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmnorris%2Fbcfishpass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmnorris%2Fbcfishpass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmnorris%2Fbcfishpass/lists"}