Package: dcicsnovault
ImportantDCIC Snovault is a FORK ofsnovaultcreated at theENCODE DCC project at Stanford.
Our fork supports other projects of the4D Nucleome Data Coordination and Integration Center (4DN-DCIC).
Although this software is available as open source software,
its primary function is to support our layered projects,
and we are not at this time able to offer any active support for other uses.
In particular, this fork does not purport to supersede
the originalsnovault.
we just have a different use case that we are actively exploring.OverviewDCIC Snovault is a JSON-LD Database Framework that serves as the backend for the 4DN Data portal and CGAP. Check out our full documentationhere.NoteThis repository contains a core piece of functionality shared amongst several projects
in the 4DN-DCIC. It is meant to be used internally by the DCIC team
in support ofFourfront,
the 4DN data portal, and at this point in time it is not expected to be useful
in a standalone/plug-and-play way to others.Installation in 4DN componentsDCIC Snovault is pip installable as thedcicsnovaultpackage with:$ pip install dcicsnovault``However, at the present time, the functionality it provides might only be useful in conjunction
with other 4DN-DCIC components.NOTE: If you’d like to enable Elasticsearch mapping with type=nested, set the environment variable “MAPPINGS_USE_NESTED”
or set the registry setting “mappings.use_nested”.Installation for DevelopmentCurrently these are for Mac OSX using homebrew. If using linux, install dependencies with a different package manager.Step 0: Install XcodeInstall Xcode (from App Store) and homebrew:http://brew.shStep 1: Verify Homebrew ItselfVerify that homebrew is working properly:$ brew doctorStep 2: Install Homebrewed DependenciesInstall or update dependencies:$ brew install libevent libmagic libxml2 libxslt openssl postgresql graphviz python3
$ brew install freetype libjpeg libtiff littlecms webp  # Required by Pillow
$ brew cask install adoptopenjdk8
$ brew install elasticsearch@5.6NOTES:If installation of adtopopenjdk8 fails due to an ambiguity, it should work to do this instead:$ brew cask install homebrew/cask-versions/adoptopenjdk8If you try to invoke elasticsearch and it is not found,
you may need to link the brew-installed elasticsearch:$ brew link --force elasticsearch@5.6If you need to update dependencies:$ brew update
$ rm -rf encoded/eggsIf you need to upgrade brew-installed packages that don’t have pinned versions,
you can use the following. However, take care because there is no command to directly
undo this effect:$ brew update
$ brew upgrade
$ rm -rf encoded/eggsStep 3: Running PoetryTo locally install using versions of Python libraries that have worked before, use this:$ poetry installUpdating dependenciesTo update the version dependencies, use:$ poetry updateThis command also takes space-separated names of specific packages to update. For more information, do:$ poetry help updateManaging poetry.lock after updateThere may be situations where you do this with no intent to check in the resulting updates,
but once you have checked that the updates are sound, you may wish to check the resultingpoetry.lockfile.PublishingNormally, a successful build on a tagged branch (including a branch tagged as a beta)
will cause publication automatically. The process begins by obtaining the version. You might do$ head pyproject.tomlto see the first few lines ofpyproject.toml, which will contain a line likeversion = 100.200.300, which
is thesnovaultversion.  You should prepend the lettervto that version, and create the tag and push
it to the GitHub server:$ git tag v100.200.300
$ git push origin v100.200.300Please do NOT use some other syntax forgit pushthat pushes all of your tags. That might pick up tags that
do not belong on the server and can generally cause tag pollution. Push specifically the tag you intend to publish.Pushing such a tag should trigger publication automatically within a few minutes.Manual PublicationThere might be rare occasions where you need to do the publication manually, but normally it is not necessary
or desirable. In most cases, it will either fail or will cause the automatic publication step to fail. The main
case where this is known to be needed is where publication has failed on a tagged branch for reasons other than
the fact of that tag being already published (e.g., a network interruption or a premature shutdown of the GitHub
Actions task). An incomplete publication on GitHub Actions cannot be easily retried, so only in that case you may
need to do:$ make publishHowever, to do this command locally, you would need appropriate credentials on PyPi for such publication to succeed.
As presently configured, these credentials need to be in the environment variablesPYPI_USERandPYPI_PASSWORD.
The script that runs if you manually attemptmake publishchecks that you have properly declared credentials
before it attempts to publish. Note that GitHub Actions is already configured with credentials, so you do not
need to worry about them if you just push a tag and let the pre-defined action do the publication.Running testsTo run specific tests locally:$ bin/test -k test_nameTo run with a debugger:$ bin/test --pdbSpecific tests to run locally for schema changes:$ bin/test -k test_load_workbookRun the Pyramid tests with:$ bin/test