Coder Social home page Coder Social logo

adamkruszewski / alloydocs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hwayne/alloydocs

0.0 1.0 0.0 299 KB

Proposed documentation for alloytools.org

License: MIT License

Python 84.84% CSS 0.42% Alloy 9.83% Makefile 2.14% Batchfile 2.78%

alloydocs's Introduction

Alloydocs

This is the repository for development of the Alloy documentation. The documentation is currently hosted here and the source lives here. This readme is for people who are interested in building and contributing it.

Building

The docs currently run on Sphinx. You can install Sphinx with these instructions. You will also need the theme:

python -m pip install sphinx-rtd-theme

Docs can be built with make html. Single file PDF version can be built with make latexpdf (requires LaTeX installed).

Development

The repo is standard Sphinx, using reStructured Text. Some things might use a bit too much rst as I was getting a feel for what worked and didn't here.

There are two customizations:

Custom Alloy Domain

Under utils/alloy.py. It has roles for functions, predicates, and properly indexes them. Sphinx's standard "this is a function" flag will add parens to docs, while Alloy uses brackets. So we make the brackets part of the function title and then split them off while indexing.

TODO: To speed up writing documentation I added an :also: param to functions that have "obvious" analogs. For example:

.. als:predicate:: lt[e1, e2: elem]

  :also: ``gt``, ``lte``, ``gte``

  True iff ``e1 in prevs[e2]``.

Functions defined in :also: don't have cross-references or indexes. We should change that.

TODO: Currently the alloy.py is pretty rickety and should be cleaned up/made more idiomatic.

advanced class

Some sections are marked as "Advanced":

.. rst-class:: advanced
.. _enums:

Enums
-----

Advanced sections have an indicator before them, currently [โ‹‡] , that marks them as unnecessary for beginners to learn. I have two TODOs I want to add:

  1. A tooltip saying "this is an advanced section" so people know what it means without having read the intro
  2. A button that toggles whether the advanced sections are visible at all

Other Misc Tasks

  • The reference currently isn't comprehensive.
  • Cross references are a bit inconsistent. Some are hyphen-cased, some use spaces. Both are valid, but I'd like to move everything to hyphens for consistency.
  • The location of certain topics might move around.
  • There are many todos in the docs. These are not visible in the "proper" version, but are there for internal discussion.

Contributing

TODO

alloydocs's People

Contributors

hwayne avatar casselc avatar lucasdicioccio avatar ruimaranhao avatar lorin avatar stroxler avatar adamkruszewski avatar awwx avatar oliverevans96 avatar ligurio avatar zsfre avatar victornoel avatar pmonson711 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.