项目作者: Watershed-Function-SFA

项目描述 :
DISCONTINUED. Go to https://github.com/BASIN-3D
高级语言: Python
项目地址: git://github.com/Watershed-Function-SFA/BASIN-3D.git
创建时间: 2017-08-17T15:56:55Z
项目社区:https://github.com/Watershed-Function-SFA/BASIN-3D

开源协议:Other

下载


======================

This archive is has been DISCONTINUED and is read-only.
The core synthesis functionality has been moved to https://github.com/BASIN-3D/basin3d.
The django web application framework has been moved to https://github.com/BASIN-3D/django-basin3d.

======================

BASIN-3D

Broker for Assimilation, Synthesis and Integration of eNvironmental Diverse, Distributed Datasets

Development Practices

  • BASIN-3D uses the GitFlow model
    of branching and code versioning in git.
  • Code development will be peformed in a forked copy of the repo. Commits will not be made directly to the basin-3d repo. Developers will submit a pull request that is then merged by another team member, if another team member is available.
  • Each pull request should contain only related modifications to a feature or bug fix.
  • Sensitive information (secret keys, usernames etc) and configuration data (e.g database host port) should not be checked in to the repo.
  • A practice of rebasing with the main repo should be used rather that merge commmits.

Getting Started

Prerequisities

BASIN-D3 is a Django application which requires:

  • Python (>= 3.6)
  • Django (>=2.0,<2.1)**

** BASIN-3D may work on later versions of Django Application Framework, but it has not been tested.

Get the code

These instructions will get you a copy of the project up and running on your local machine for
development and testing purposes.

  1. $ git clone git@bitbucket.org:<your bitbucket username>/basin-3d.git
  2. $ cd basin-3d

Develop

Setup virtualenv for development and testing purposes. All basin-3d tests
are in basin3d.tests. They can be

Example Django Project

There is an example project for testing in directory example-django.

Create an Anaconda environment

  1. conda create -y -n basin3d python=3.6.5

Activate the new environment and prepare it for development

  1. source activate basin3d
  2. conda develop -npf -n basin3d .

Install BASIN-3D and its dependencies

  1. python setup.py develop
  2. pip install $(cat requirements.txt ) pytest-django pytest-cov

BASIN-3D stores datasource credentials. This requires an encryption secrect key.

  1. cd example-django
  2. mkdir -p .keyset
  3. keyczart create --location=.keyset --purpose=crypt --name=basin3d
  4. keyczart addkey --location=.keyset --status=primary

Migrate the database

  1. ./manage.py migrate

Run the tests

  1. pytest -v --cov basin3d tests

Run the server

  1. ./manage.py runserver

Create a superuser

  1. ./manage.py createsuperuser

Documentation

Sphinx is used to generate documentation. You first need
to create a virtual environment for generating the docs.

  1. $ source activate basin3d
  2. $ pip install sphinx sphinx-autodoc-typehints

Generate the documentation

  1. $ cd docs
  2. $ make html

Review the generated documentation

  1. $ open _build/html/index.html

Install

Install a source distribution with pip:

  1. $ pip install BASIN-3D-<version>.tar.gz

To get started read the setup documentation

Versioning

We use SemVer for versioning. For the versions available,
see the tags on this repository.

Workflow for tagging and building release:

  1. checkout the version to tag from master
  2. git tag -a v[version]-[release] -m "Tagging release v[version]-[release]"
  3. build distribution with setup.py
  4. git push origin v[version]-[release]

Authors

  • Charuleka Varadharajan - LBL
  • Valerie Hendrix - LBL
  • Danielle Svehla Christianson - LBL

See also the list of contributors who
participated in this project.

Broker for Assimilation, Synthesis and Integration of eNvironmental Diverse, Distributed Datasets (BASIN-3D) Copyright (c) 2019, The
Regents of the University of California, through Lawrence Berkeley National
Laboratory (subject to receipt of any required approvals from the U.S.
Dept. of Energy). All rights reserved.

If you have questions about your rights to use or distribute this software,
please contact Berkeley Lab’s Intellectual Property Office at
IPO@lbl.gov.

NOTICE. This Software was developed under funding from the U.S. Department
of Energy and the U.S. Government consequently retains certain rights. As
such, the U.S. Government has been granted for itself and others acting on
its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the
Software to reproduce, distribute copies to the public, prepare derivative
works, and perform publicly and display publicly, and to permit other to do
so.

License

See LICENSE.md file for licensing details

Acknowledgments

This research is supported as part of the Watershed Function Scientific Focus Area funded by the U.S. Department of Energy, Office of Science, Office of Biological and Environmental Research under Award no. DE-AC02-05CH11231. This research used resources of the National Energy Research Scientific Computing Center (NERSC), U.S. Department of Energy Office of Science User Facility operated under Contract No. DE-AC02-05CH11231.