Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEP-0001 #1

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
.vscode/
sep-0000.txt
sep-0000.rst
sep-????.html
__pycache__
*.pyc
*.pyo
*~
*env
.vscode
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "3.7-dev"

sudo: false
cache: pip

before_install:
- pip install docutils
script:
- make -j
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
72 changes: 72 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Contributing Guidelines
=======================

To learn more about the purpose of SEPs and how to go about writing a SEP, please
start reading at SEP 1 (`sep-0001.rst <./sep-0001.rst>`_ in this repo).


Before writing a new SEP
------------------------

Has this idea been proposed on `SD Development`_ or `SD Governance`_
and received general acceptance as being an idea worth pursuing? (if not then
please start a discussion there before submitting a pull request).

More details about it in `SEP 1 <./sep-0001.rst#start-with-an-idea-for-space-decentral>`_
and `submitting a sep <./sep-0001.rst#submitting-a-sep>`_.

Do you have an implementation of your idea? (this is important for when you
propose this SEP to `SD Development`_ or `SD Governance`_
as code and content maintenance is a critical aspect of all SEP proposals prior to a
final decision; in special circumstances an implementation can be deferred)

Once you've read the guidelines for submitting a sep, you may `Submit a pull request`_


Submit a pull request
---------------------

1. Fork this repo, e.g., https://github.com/yourusername/seps/fork
2. Create a branch that follows the naming convention [sep-number; new seps should use "sep-9999"]-[sep description], e.g., ``sep-1701-prime-directive-exceptions``
3. Add a clear and succinct commit message. Extended description is optional, but encouraged, e.g.:
"Added distress calls to prime directive exceptions

A society that sent a general distress call to any
space-faring culture could be exempt from
Starfleet's General Order 1 (a.k.a., prime
directive), 'No starship may interfere with the
normal development of any alien life or society.'"
4. Commit changes
5. Create a new Pull Request


Commit messages
---------------

When committing to a SEP, please always include the SEP number in the subject
title. For example, ``SEP NNN: <summary of changes>``.


Sign the CLA
------------

When you hit "Create pull request", you will be asked to sign the following
Contributor License Agreement, to ensure that this project can legally accept
your contribution:

https://cla-assistant.io/spacedecentral/seps

Thanks again to your contribution and we look forward to looking at it!


Code of Conduct
---------------

All interactions for this project are covered by the
`Code of Conduct <./CODE_OF_CONDUCT.md>`_. Everyone is
expected to be open, considerate, and respectful of others no matter their
position within the project.

.. _SD Development: https://riot.im/app/#/room/#spacedecentral-dev:matrix.org

.. _SD Governance: https://riot.im/app/#/room/#spacedecentral-governance:matrix.org
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Rules to only make the required HTML versions, not all of them,
# without the user having to keep track of which.
#
# Not really important, but convenient.

SEP2HTML=sep2html.py

PYTHON=python3

.SUFFIXES: .txt .html .rst

.txt.html:
@$(PYTHON) $(SEP2HTML) $<

.rst.html:
@$(PYTHON) $(SEP2HTML) $<

TARGETS= $(patsubst %.rst,%.html,$(wildcard sep-????.rst)) $(patsubst %.txt,%.html,$(wildcard sep-????.txt)) sep-0000.html

all: sep-0000.rst $(TARGETS)

$(TARGETS): sep2html.py

sep-0000.rst: $(wildcard sep-????.txt) $(wildcard sep-????.rst) $(wildcard sep0/*.py) gensepindex.py
$(PYTHON) gensepindex.py .

# rss:
# $(PYTHON) sep2rss.py .

# install:
# echo "Installing is not necessary anymore. It will be done in post-commit."

# clean:
# -rm sep-0000.rst
# -rm sep-0000.txt
# -rm *.html

# update:
# git pull https://github.com/spacedecentral/seps.git

# venv:
# $(PYTHON) -m venv venv
# ./venv/bin/python -m pip install -U docutils
22 changes: 21 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
Space Decentral Enhancement Proposals
=====================================
=====================================

.. image:: https://travis-ci.com/spacedecentral/seps.svg
:target: https://travis-ci.com/spacedecentral/seps

To learn more about the purpose of
SEPs and how to go about writing a SEP, please start reading at SEP 1
(`sep-0001.rst <./sep-0001.rst>`_ in this repo).


Contributing to SEPs
====================

See the `Contributing Guidelines <./CONTRIBUTING.rst>`_.


reStructuredText for SEPs
=========================

Original SEP source should be written in reStructuredText format,
which is a constrained version of plaintext.
74 changes: 74 additions & 0 deletions gensepindex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env python
"""Auto-generate SEP 0 (SEP index).

Generating the SEP index is a multi-step process. To begin, you must first
parse the SEP files themselves, which in and of itself takes a couple of steps:

1. Parse metadata.
2. Validate metadata.

With the SEP information collected, to create the index itself you must:

1. Output static text.
2. Format an entry for the SEP.
3. Output the SEP (both by category and numerical index).

"""
from __future__ import absolute_import, with_statement
from __future__ import print_function

import sys
import os
import codecs

from operator import attrgetter

from sep0.output import write_sep0
from sep0.sep import SEP, SEPError


def main(argv):
if not argv[1:]:
path = "."
else:
path = argv[1]

seps = []
if os.path.isdir(path):
for file_path in os.listdir(path):
if file_path.startswith("sep-0000."):
continue
abs_file_path = os.path.join(path, file_path)
if not os.path.isfile(abs_file_path):
continue
if file_path.startswith("sep-") and file_path.endswith((".txt", "rst")):
with codecs.open(abs_file_path, "r", encoding="UTF-8") as sep_file:
try:
sep = SEP(sep_file)
if sep.number != int(file_path[4:-4]):
raise SEPError(
"SEP number does not match file name",
file_path,
sep.number,
)
seps.append(sep)
except SEPError as e:
errmsg = "Error processing SEP %s (%s), excluding:" % (
e.number,
e.filename,
)
print(errmsg, e, file=sys.stderr)
sys.exit(1)
seps.sort(key=attrgetter("number"))
elif os.path.isfile(path):
with open(path, "r") as sep_file:
seps.append(SEP(sep_file))
else:
raise ValueError("argument must be a directory or file path")

with codecs.open("sep-0000.rst", "w", encoding="UTF-8") as sep0_file:
write_sep0(seps, sep0_file)


if __name__ == "__main__":
main(sys.argv)
6 changes: 6 additions & 0 deletions pyramid-sep-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!--
This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new
SEP, see sep-0001 for instructions and links
to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE!
-->
%(body)s
Binary file added sep-0001-process_flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading