observational-dev / oawiki

Repository for wiki.observational.space
https://wiki.observational.space/
Creative Commons Attribution Share Alike 4.0 International
2 stars 5 forks source link
astronomy astrophotography education knowledgebase science website

:sparkles: Welcome to the OAWiki Repository! :telescope:

Welcome to the source for the OAWiki - https://wiki.observational.space ! If you are interested in contributing an article, thank you! The next two sections are just for you :)

Contributing - Authoring

The wiki pages are written in markdown. You might be familiar with it - **bold** and # heading and [link text](url) (for more, check out here). You can write markdown text anywhere; if you would like a suggestion that isn't here on GitHub, try https://hackmd.io

Some considerations as you write:

Contributing - Adding your Contribution

The Fast Way

The easiest way is to send your article or contribution in the discord, and ask a wiki maintainer to integrate it. This is recommended for first time contributors.

The DIY Way

You can also do that integration process yourself. At this GitHub, you'll open a pull request with your change, which will be approved by a maintainer and automatically made live on the site. You'll need to make an account on GitHub for this. Specifically, the process goes:

Building the Wiki Locally (optional)

For the nerds, here's how!

Setup

The site is built from markdown using sphinx. To build the site, you'll first need to install python via your favorite method. Then install the python dependencies:

pip install -r requirements.txt

Inside src/ you'll find a Makefile which helps orchestrate the build. Simply type

make html

to build the site; the output will be written to src/_build/html/. Using your browser, open src/_build/html/index.html to view the site.

Pre-commit hooks

pre-commit is a python tool which allows for formatting and linting tools to be run automatically when a git commit is called. Here, we use it to automatically

To enable these hooks, make sure the dependencies are installed:

pip install -r requirements.txt

Then install the hooks:

pre-commit install

Now, any time you do git commit, these checks will be automatically run. If pre-commit modifies your code, it will tell you that it automatically modified your code. If you git add those modified files and then call git commit again, the checks will run again. Once all the checks are passing, you'll be able to commit as normal.

If you temporarily want to disable the pre-commit hooks, you can do git commit -n to disable the hooks for just that commit.