OpenCannabis is a multilateral industrial effort to bring order to cannabis data, via the power of collaborative spec design. The project covers expression of cannabis-related data in myriad supply chain circumstances, including cultivation, distribution, distillation (manufacturing), retail, and consumer-facing software.
This specification has been designed over time principally in the California cannabis market, which is one of the most competitive retail and wholesale cannabis markets in the world. Contributors and adopters include some of the best and brightest cannabis operators, who have condensed much of their knowledge into this model, and leveraged it for concrete operational gains.
NASCAR wall coming soon.
This repository is the main spec repo, and it is a monorepo. All other OpenCannabis documentation, RFC content, and source code material flows from this central repository (that's where the mono comes from in monorepo). Changes are proposed at this level only by invited specification Editors and Contributors.
This central repository is meant only for spec Editors and Contributors. However, contributions can be made on public leaf repositories as outlined below (and these repositories also eventually get the latest changes from upstream).
Governance for the project itself also occurs through RFCs! Project change processes/policies, contribution guidelines and agreements, and other policies are mutable and meant to evolve. Changes to these can simply be proposed like any other change to the specification.
Once a PR is proposed, reviewed, and merged into master
, a CD bot kicks in that migrates those changes to each public
leaf repository using Copybara. So, changes here are sufficient to see changes in
public, post-merge.
Leaf repositories include raw sources (for instance, the Protocol Definitions), and language-specific SDKs / facades (for example, OpenCannabis SDK for Python).
When a PR is proposed in a leaf repository, it also kicks in a CI bot that proposes a PR in the upstream repository. This allows easy collaborative development without the need to (1) duplicate PRs, or (2) risk public access to the private spec workspace.
Tooling for this repo, and downstream repos, is mainly provided by Google (including
Copybara, Protocol Buffers, and
Bazel). There is usually also a Makefile
which can be invoked, that delegates
to repo-specific tools. It's usually advisable to use make
.
Each repository's Makefile
can be queried with make help
, which lists commands at the developer's disposal (access
permitting). Here is a preview of that help for this repo:
OpenCannabis v1.9.5-alpha1:
all Build and test the specification.
build Build all specification targets.
clean Clean built targets (safe).
distclean Clean built targets and dependencies.
env Bootstrap the local environment.
forceclean Clean everything, then sanitize changes (DANGEROUS).
help Show this help text.
migrate Perform a migration via Copybara.
test Run all spec and SDK tests.
Coming soon.