{"id":19825312,"url":"https://github.com/yegor256/datum","last_synced_at":"2025-05-01T13:32:22.118Z","repository":{"id":77668925,"uuid":"75261597","full_name":"yegor256/datum","owner":"yegor256","description":"Zerocracy Project Data Model","archived":true,"fork":false,"pushed_at":"2024-05-14T01:43:10.000Z","size":2923,"stargazers_count":33,"open_issues_count":34,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-28T20:46:05.885Z","etag":null,"topics":["artificial-intelligence","bot","management","project-management","xml","xsd","zerocracy"],"latest_commit_sha":null,"homepage":"http://datum.zerocracy.com/","language":"XSLT","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yegor256.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2016-12-01T06:15:29.000Z","updated_at":"2024-08-30T07:59:10.000Z","dependencies_parsed_at":"2023-12-11T13:13:47.216Z","dependency_job_id":"6fb7915f-17e4-4386-aedd-349498c20f40","html_url":"https://github.com/yegor256/datum","commit_stats":null,"previous_names":["yegor256/datum"],"tags_count":152,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fdatum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fdatum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fdatum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fdatum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/datum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251881776,"owners_count":21659165,"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":["artificial-intelligence","bot","management","project-management","xml","xsd","zerocracy"],"created_at":"2024-11-12T11:07:16.332Z","updated_at":"2025-05-01T13:32:21.618Z","avatar_url":"https://github.com/yegor256.png","language":"XSLT","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://www.zerocracy.com/logo.svg\" width=\"64px\" height=\"64px\"/\u003e\n\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](http://www.rultor.com/b/zerocracy/datum)](http://www.rultor.com/p/zerocracy/datum)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/zerocracy/datum/actions/workflows/rake.yml/badge.svg)](https://github.com/zerocracy/datum/actions/workflows/rake.yml)\n[![Hits-of-Code](https://hitsofcode.com/github/zerocracy/datum)](https://hitsofcode.com/view/github/zerocracy/datum)\n\nInformation about current project status is kept in XML and text\nfiles. This repository contains full list of XSD Schemas for them\nand rules of usage.\n\nRead [our policy](http://www.zerocracy.com/policy.html),\nit covers all processes in these XML files.\n\nAny problems you have with [Zerocracy](http://www.zerocracy.com)\nplease report [here](https://github.com/zerocracy/farm/issues).\nWe promise to do our best to resolve them as soon as possible.\n\n## Data model\n\nA project has a list of members, with assigned roles to them. Each project\nmember, also known as **user** is identified by his GitHub name, for example\n[yegor256](https://github.com/yegor256).\n\nThere is only one piece of work, which is called a **job**. A job\ncan either be in scope or not. If the job is in scope, it is listed\nin the `wbs.xml`.\n\nA job, which is in scope, may have an **order** assigned to it, as a record in `orders.xml`.\nAn order has a **performer**. An order may be finished (success) or terminated (failure).\n\nA job, which is in scope, may have an **election** in `elections.xml`,\nwhich is created by Zerocrat automatically. The election is used as a basis\nfor the decision making of an order assignment.\n\nAn order may have an **impediment**, which is listed in `impediments.xml`. While\nthe impediment exists, the order won't be terminated\n[by delay](http://www.zerocracy.com/policy.html#8).\n\n## Upgrades\n\nWhen we modify XSD schemas here, production XML documents don't catch up\nautomatically. If we introduce a new XML element in, say, `wbs.xsd`, XML\ndocuments `wbs.xml` in real production projects won't have it. Right after\nwe switch to a new version of Datum, they all will become invalid.\n\nIn order to solve this problem we have a collection of \"upgrades,\"\nwhich are XSL transformations. When\n[`Xocument`](https://github.com/zerocracy/farm/blob/0.21.1/src/main/java/com/zerocracy/Xocument.java)\nopens an XML document, it checks the `version` attribute of its root element.\nIf the version is lower than [`Xocument.VERSION`](https://github.com/zerocracy/farm/blob/0.21.1/src/main/java/com/zerocracy/Xocument.java#L71),\nit applies all necessary XSL transformations. Right at that moment\nwe have a chance to upgrade XML documents and add necessary elements or attributes\n(or delete deprecated ones).\n\nEvery time you introduce something new to an XSD schema, don't forget to add\nan upgrade XSL. The name of upgrade XSL file must start with a version,\nwhere it has to be applied.\n\n## How to contribute?\n\nWe keep XSD Schema files in the [`xsd`](https://github.com/zerocracy/datum/tree/master/xsd)\ndirectory. You can modify them as you wish. However, keep in mind that you\nneed 1) to test them, 2) make sure existing XML files in the projects will\nbe upgraded to your changes, and 3) modify XSL views.\n\nFirst, in order to test an `.xsd` file you should create `.xml` files\nin the [`xml`](https://github.com/zerocracy/datum/tree/master/xml) directory.\nYou can make as many of them them there as you need. All of them will be\ntested against the XSD Schema. If the name of the `.xml` file starts with\na dash, it is expected that the validation against the XSD Schema will fail.\nIf it won't fail, the build will break.\n\nSecond, every time you introduce some changes to the `.xsd` file, make sure\nyou add an XSL Transformation to the\n[`upgrades`](https://github.com/zerocracy/datum/tree/master/upgrades) directory.\nEach `.xsl` file must be named as `XXX-name.xsl`, where `XXX` is the version\nnumber it upgrades an `.xml` file to. All versions are\n[here](https://github.com/zerocracy/datum/releases) (we're using\n[semantic versioninig](http://semver.org/)).\n\nThird, don't forget to add or modify XSL views in\n[`upgrades`](https://github.com/zerocracy/datum/tree/master/xsl) directory.\n\nAfter all changes are made, don't forget to run:\n\n```\n$ bundle update\n$ bundle exec rake\n```\n\nTo make `rake` working you will need to install:\n - Ruby 2.6+\n - [rake](https://github.com/ruby/rake) (`gem install rake`)\n - [bundler](https://bundler.io/)  (`gem install bundler`)\n - [maven](https://maven.apache.org/)\n\nTo install all dependencies for `rake` run in project directory:\n\n```sh\n$ bundle install\n$ mvn dependency:get -DgroupId=net.sf.saxon -DartifactId=Saxon-HE -Dversion=9.8.0-8\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fdatum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Fdatum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fdatum/lists"}