ソースを参照

Removed old DOCS folder and moved GOVERNANCE to root; added provision to it on university ownership.

Nathan Schneider 2 年 前
コミット
ccc8c40cd7
4 ファイル変更0 行追加237 行削除
  1. 0 15
      modpol/DOCS/GOVERNANCE.md
  2. 0 35
      modpol/DOCS/Predefinitions.txt
  3. 0 50
      modpol/DOCS/ledgers
  4. 0 137
      modpol/DOCS/orgs

+ 0 - 15
modpol/DOCS/GOVERNANCE.md

@@ -1,15 +0,0 @@
-One administrator, @ntnsndr, holds ultimate decision-making power over the project. This is a temporary arrangement while we build trust as a community and adopt a more inclusive structure.
-
-* **Autocracy** The administrator holds ultimate decision-making power in the community.
-    * **Executive** The administrator is responsible for implementing—or delegating implementation of—policies and other decisions.
-    * **Lobbying** If participants are not happy with the administrator's leadership, they may voice their concerns or leave the community.
-* **Do-ocracy** Those who step forward to do a given task can decide how it should be done, in ongoing consultation with each other and the administrator.
-    * **Membership** Participation is open to anyone who wants to contribute. The administrator can remove misbehaving participants at will for the sake of the common good.
-* **Code of Conduct** Participants are expected to abide by the Contributor Covenant (contributor-covenant.org).
-
----
-
-Created by [Nathan Schneider](https://gitlab.com/medlabboulder/modpol)
-
-[![CommunityRule derived](https://communityrule.info/assets/CommunityRule-derived-000000.svg)](https://communityrule.info)   
-[Creative Commons BY-SA](https://creativecommons.org/licenses/by-sa/4.0/)

+ 0 - 35
modpol/DOCS/Predefinitions.txt

@@ -1,35 +0,0 @@
-When calling modpol.lua from another file, one may wish to use 
-different functions than those included by default. 
-
-So far, 2 definitions need to be made BEFORE calling modpol.lua, the rest can be overwritten
-after calling modpol.lua .
-
-setup:
-----------------
-Define the global modpol table:
-modpol = {}
-
-the following 2 items *may* be defined, if they are not, then defaults will be used:
-========================
---------------------
-modpol.get_script_dir()
---------------------
-type: function
-
-defaults to: a function that can only work in linux
-
-usage: must return the file path of the modpol directory. If modpol is in a
-larger directory, such as a mod filesystem, make sure that the path returned is the "base" 
-modpol folder, i.e. the folder with all the original modpol files.
-========================
---------------------
-modpol.storage_file_path
---------------------
-type: string
-
-defaults to: topdir .. "/storage/storage-local.lua", 
-where topdir is the directory defined by modpol.storage_file_path 
-
-usage: if you wish to use another method of storage than that provided by default, 
-then you can save a filepath to the storage script here. 
-

+ 0 - 50
modpol/DOCS/ledgers

@@ -1,50 +0,0 @@
-Ledger
-**************************
-
-a legder is a table of records that holds the history of an org, and of modpol itself.
-
-its structure is a table of legder entries.
-
-Every org has one, starting with the entry recording its creation.
-
-Ledger Entry
-**************************
-a legder entry is a table with the following properties:
-
-timestamp = nil,
-entrytype = nil,
-action_msg = '',
-
-the timestamp will hold the output of os.time at the moment the entry was created.
-
-the entrytype is optional; it can hold an identifier of the kind of entry it is (e.g. 'org_init', 'new_user', etc etc.)
-
-action_msg is the record output itself.
-
-
-
-Entrytypes
-**************************
-
-These are the entrytypes that modpol uses. Each additional module should document whatever entrytypes it adds.
-
-'org_init'
-type used when an org is created
-
-'org_purge'
-type used when all orgs are purged. -- will only be found in the main modpol ledger.
-
-'org_remove'
-type used when removing an individual org
-
-'add_member'
-type used when adding a member to an org
-
-'remove_member'
-type used when removing a member from an org
-
-
-
-Old orgs
-**************************
-when an org is removed, its ledger is stored in modpol.old_legders = {} Note that multiple ledgers may exist here with the same org name.

+ 0 - 137
modpol/DOCS/orgs

@@ -1,137 +0,0 @@
-== Dev note ===
-*note, see doc ledgers for info about org ledgers.
-they are *not* just a message in a table anymore... they have a timestamp and more.
-===============
-
-
-Orgs are stored in modpol.orgs by the key 'org_id', a unique integer
-
-Old ledgers of deleted orgs are stored in modpol.old_ledgers, 
-if preserve records is enabled
-
-An org is a table with the following properties:
-
-{
-   name = '', -- a unique name... 
-        this is a reference to the key used to store the org table. Changing this does not change the org name. 
-   policies = {}, -- a table to store the org's policies
-   members = {}, -- a table that contains the member names 
-        or the org, in no particular order (TKTK: maybe change it so that members have a name:properties table?)
-   ledger = {}, -- a table of ledger entries. See the ledger docs
-   parent = nil, -- the name of the org that spawned this org.
-        removing a parent org removes its children
-   children = {}, -- a table of strings of org names of child orgs
-   properties = { -- good for modules to store arbitrary info about the org here.
-      
-   },
-
-}
-
-
-API functions for orgs
-======================
-
-a local variable setting 'preserve_records' determines whether 
-to store old ledgers when an org is deleted. It is set to true. 
-It would be possible to extend this to a settings file later.
-
---==oo888888888888888888888888888888oo==--
-Function: modpol.record(org_id, msg, type)
--- Params: strings msg, type, org_id (number)
--- Outputs:
--- "msg" specifies an event and/or status message.
--- "org" specifies an "org" name.
--- "type" -- optional type of legder entry. Could be e.g. 'election_result', 'add_member', etc
-
-
--- This  function adds  the message to a  global ledger  and, if "org"
--- specifies a valid "org", to an "org"-specific ledger. Both the mem-
--- ory-resident and on-disk copies of the data structures used are up-
--- dated.
--- the type input is used to be able to search ledgers for specific events
-
---==oo888888888888888888888888888888oo==--
-
-Function: modpol.add_org(org_id, members, parent, properties)
--- Params:   org)id (number), table members, string parent, table properties
--- Parent must be an existing org, defaults to 'instance', properties 
--- are arbitrary properties to initialize the org with
-
--- Output:
--- This function creates an "org".  It returns a boolean success indicator and
--- either an error message starting with "Error:" or a success message.
---
---
--- The string parameter specifies the "org" name.
---
--- The members table should  be an  integer-indexed array of member
--- names.
-
--- parent should be nil or a valid existing org name. If nil, defaults to 
--- 'instance'
-
--- properties defaults to an empty table. Use it to initialize the org 
--- with arbitrary properties
-
---==oo888888888888888888888888888888oo==--
-
--- Function: modpol.remove_org(org_id, reason)
--- Params:   org_id (number), opt string reason
--- Output:
---
--- This function removes an "org".  It returns a boolean
--- success indicator and either an error message
--- starting with "Error:" or a success message. It also recursively 
--- removes all child orgs, with 'remove parent org' as reason. If 
--- preserve_records is enabled, it logs the removal in the org ledger,
--- and stores the ledger in modpol.old_legders
---
--- The string parameter specifies the "org" name.
---
--- The reason is an optional string to additionally include in the 
--- log as reason for removal
-
---==oo888888888888888888888888888888oo==--
-
-Function: modpol.list_orgs()
--- Params:   None
--- Output:
--- This function returns a text-format list of "orgs".  The list shows
--- one "org" per line in the following format:
--- org_name (member, member, ...)
--- If there are no "orgs", the output is an empty string.
-
---==oo888888888888888888888888888888oo==--
-
-
-Function: modpol.reset_orgs()
--- Params:   None
--- Removes all orgs and recreates blank org "instance" with all
--- current users
--- returns confirmation message
--- if preserve_records is enabled, stores all org ledgers
--- in modpol.old_ledgers
-
---==oo888888888888888888888888888888oo==--
-
-Function: modpol.add_member(org_id, member)
--- Params: org_id (number), member (string)
--- Output:
--- Adds the specified member to the specified org
--- Returns a boolean success indicator and
--- either a confirmation or error message
-
---==oo888888888888888888888888888888oo==--
-
-Function: modpol.is_member
--- Params: org (number), member (string)
--- Output: boolean, or nil and error message if not applicable. (org nonexistent)
-
-
---==oo888888888888888888888888888888oo==--
-
-Function: modpol.remove_member
--- Params: org (number), member (string)
--- Output:
--- Removes the specified member from the specified org
--- Returns confirmation or error message