krzyk / datum

Zerocracy Project Data Model

Home Page:http://www.zerocracy.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EO principles respected here Managed by Zerocracy DevOps By Rultor.com We recommend RubyMine

Stability of Webhook Availability at SixNines Build Status

Information about current project status is kept in XML and text files. This repository contains full list of XSD Schemas for them and rules of usage.

Read our policy, it covers all processes in these XML files.

Any problems you have with Zerocracy please report here. We promise to do our best to resolve them as soon as possible.

Data model

A project has a list of members, with assigned roles to them. Each project member, also known as user is identified by his GitHub name, for example yegor256.

There is only one piece of work, which is called a job. A job can either be in scope or not. If the job is in scope, it is listed in the wbs.xml.

A job, which is in scope, may have an order assigned to it, as a record in orders.xml. An order has a performer. An order may be finished (success) or terminated (failure).

A job, which is in scope, may have an election in elections.xml, which is created by Zerocrat automatically. The election is used as a basis for the decision making of an order assignment.

An order may have an impediment, which is listed in impediments.xml. While the impediment exists, the order won't be terminated by delay.

Upgrades

When we modify XSD schemas here, production XML documents don't catch up automatically. If we introduce a new XML element in, say, wbs.xsd, XML documents wbs.xml in real production projects won't have it. Right after we switch to a new version of Datum, they all will become invalid.

In order to solve this problem we have a collection of "upgrades," which are XSL transformations. When Xocument opens an XML document, it checks the version attribute of its root element. If the version is lower than Xocument.VERSION, it applies all necessary XSL transformations. Right at that moment we have a chance to upgrade XML documents and add necessary elements or attributes (or delete deprecated ones).

Every time you introduce something new to an XSD schema, don't forget to add an upgrade XSL. The name of upgrade XSL file must start with a version, where it has to be applied.

How to contribute?

We keep XSD Schema files in the xsd directory. You can modify them as you wish. However, keep in mind that you need 1) to test them, 2) make sure existing XML files in the projects will be upgraded to your changes, and 3) modify XSL views.

First, in order to test an .xsd file you should create .xml files in the xml directory. You can make as many of them them there as you need. All of them will be tested against the XSD Schema. If the name of the .xml file starts with a dash, it is expected that the validation against the XSD Schema will fail. If it won't fail, the build will break.

Second, every time you introduce some changes to the .xsd file, make sure you add an XSL Transformation to the upgrades directory. Each .xsl file must be named as XXX-name.xsl, where XXX is the version number it upgrades an .xml file to. All versions are here (we're using semantic versioninig).

Third, don't forget to add or modify XSL views in upgrades directory.

After all changes are made, don't forget to run:

bundle update
rake

To make rake working you will need to install:

To install all dependencies for rake run in project directory:

bundle install
mvn dependency:get -DgroupId=net.sf.saxon -DartifactId=Saxon-HE -Dversion=9.8.0-8

License

Copyright (c) 2016-2018 Zerocracy

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to read the Software only. Permissions is hereby NOT GRANTED to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Zerocracy Project Data Model

http://www.zerocracy.com

License:Other


Languages

Language:XSLT 92.8%Language:Ruby 6.3%Language:HTML 1.0%