add installation docs and code of conduct

This commit is contained in:
Laura Klünder 2016-12-18 22:32:08 +01:00
parent b688076b23
commit 72b5e5b95b
4 changed files with 259 additions and 1 deletions

74
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,74 @@
# 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 c3nav@codingcatgirl.de. All complaints will
be reviewed and investigated and will result in a response that is deemed
necessary and 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/

View file

@ -1,2 +1,10 @@
# c3nav
New improved implementation of c3nav. Work in Progress. Installation docs coming soon.
indoor navigation for chaos and other events. See it live at [c3nav.de](https://c3nav.de/).
## Installation
- [Manually](doc/manual.md)
- [Usig docker](doc/docker.md)
*Please note that this project is released with a [Code of Conduct](CODE_OF_CONDUCT.md) that applies to all project-related communication. By participating in this project you agree to abide by its terms.*

44
doc/docker.md Normal file
View file

@ -0,0 +1,44 @@
# Install c3nav using docker
The easiest way to try out install c3nav. Here's how to do it. This is just a simple temporary setup. There will be more information soon about setting up a production setup with docker.
After installing docker, create a folder for all your c3nav stuff, clone the c3nav repository and build the docker image:
```
mkdir c3nav
cd c3nav
git clone git@github.com:c3nav/c3nav.git
cd c3nav
docker build -t c3nav .
```
Select the map packages you want to use. For the 33c3, this would be c3nav-cch and c3nav-33c3:
```
cd ..
mkdir maps
cd maps
git clone git@github.com:c3nav/c3nav-cch.git
git clone git@github.com:c3nav/c3nav-33c3.git
```
You can now start c3nav by starting the docker container. Don't forget to change the package paths (everything before the colon) according to your setup. You can change the name of the container to your liking.
```
docker run --rm --name c3nav-33c3 -p 8345:8000 \
-v ~/c3nav/maps/c3nav-cch:/data/map/c3nav-cch \
-v ~/c3nav/maps/c3nav-33c3:/data/map/c3nav-33c3 \
c3nav all
```
This will read all the map data into a temporary SQLite database, render the map, build the graph and start a development server at http://localhost:8345/.
To add a custom file (to use a proper database, memcached, celery and so on, you can!) Create an empty folder with your c3nav.cfg file in it and it as an additional volume to your docker command. : `-v ~/c3nav/33c3-config:/etc/pretix`
Other options (instead of `all`) are:
- `editor`: just start a development server without rendering the map and building the graph first. this is sufficient to use the editor.
- `checkmap`: check if the package files are valid and formatted/indented currectly and optionally reindent them correctly (do this if you altered map package files manually).
- `build`: render the map and build the graph
Every command will read all map packages into the database and overwrite all changes. There is currently no way to export the changes made with the editor into the package folders (with docker) yet, but there will be soon.

132
doc/manual.md Normal file
View file

@ -0,0 +1,132 @@
# Install c3nav manually
## Installation
This is just a simple temporary setup. There will be more information soon.
### Install dependencies
Install the needed dependencies.
#### Debian
```
apt-get install -y python3 python3-pip python3-venv python3-dev build-essential \
libpq-dev libmysqlclient-dev libmemcached-dev libgeos-dev gettext librsvg2-bin
```
Feel free to add guides for other operating systems.
### Clone the repository
Create a folder for all your c3nav stuff and clone the c3nav repository.
```
mkdir c3nav
cd c3nav
git clone git@github.com:c3nav/c3nav.git
cd c3nav
```
### Create a virtual environment
This will create a virtual environment so the installed python packages are not installed globally on your system.
```
virtualenv -p python3 env
source env/bin/activate
```
Always run the latter command before executing anything from c3nav.
### Install python dependencies
```
cd src/
pip3 install -U pip wheel setuptools
pip3 install -r requirements.txt -r requirements/mysql.txt -r requirements/postgres.txt \
-r requirements/memcached.txt -r requirements/redis.txt gunicorn
```
### Add Configuration
You need this to configure your own database, memcached, and the message queue. You can skip this step for now for a development setup everything will work out of the box.
### Migrate the database
This will create the needed database tables (and a temporary database, if you did not configure a different one) or update the database layout if needed. You should always execute this command after pulling from upstream.
```
python3 manage.py migrate
```
This also creates the data folder for c3nav.
### Clone the map packages
For the 33c3, this would be c3nav-cch and c3nav-33c3:
```
cd data/maps/
git clone git@github.com:c3nav/c3nav-cch.git
git clone git@github.com:c3nav/c3nav-33c3.git
```
### Load the map packages
```
cd ../../
python3 manage.py loadmap
```
Confirm loading the map packages. You can always execute this command to update the map data in the database. This will also overwrite unexported mapdata in the database.
### Render the map and build the routing graph
Always do this after updating the mapdata. You can skip this step if you only want to use the Editor.
```
python3 manage.py rendermap
python3 manage.py builder
```
FYI: You can find the renderings in the following folder: `data/render/`
### Run a development server
```
python3 manage.py runserver
```
You can now reach your c3nav instance at http://localhost:8000/. The editor can be found at http://localhost:8000/editor/.
## Other things you can do now:
### Export map data
After changing stuff with the editor, you may want to export the changes into the map package folders to submit a pull request. You can do so by running.
```
python3 manage.py dumpmap
```
### Check map data
After manually editing map package files, you may want to check if the identation follows the style guide. Please to so if you manually edited files and want to submit a pull request.
```
python3 manage.py checkmap
```
### Draw the routing graph
Want to look at the routing graph? You can! Just run the following command, and graph renderings will appear in the render folder.
```
python3 manage.py drawgraph
```
## Production setup.
More information coming soon. If you already know Django, you will have no problems setting up for production yourself. Running c3nav any other way than with `runserver` (DEBUG=False) will automatically deactivate directly editing mapdata with the editor.