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

Change documentation to markdown #101

Merged
merged 75 commits into from
Jun 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
dbb7981
work in progress: create markdown-based manual
edyoung May 10, 2020
36ad2b3
finished first pass through manual.md
edyoung May 10, 2020
daf8c6e
exclude parsetab and lextab from pylint (#102)
mindhells May 14, 2020
3e02eea
Remove buildtools package (#104)
cjmayo May 21, 2020
20e156c
Add pylint singleton-comparison check (#105)
cjmayo May 21, 2020
abe81e6
Remove unused traceback import (#106)
cjmayo May 21, 2020
d063f6f
fix #107: wait until fd has something to read or fail (#108)
mindhells May 23, 2020
28362dd
Arbitrary precision formula experiment (#103)
mindhells May 23, 2020
cb68dd9
release prep for 4.2 (#111)
edyoung May 23, 2020
8eca801
Update http links in README.md and setup.py to https (#115)
cjmayo May 30, 2020
70ef79d
Starting point for a benchmark to compare multiple-precision libs (#112)
edyoung May 31, 2020
04772dd
tweak doc generation process
edyoung May 31, 2020
d719d1a
Check gnofract4d executable with pylint (#117)
cjmayo Jun 2, 2020
02d9c46
Install icons into the hicolor theme (#121)
cjmayo Jun 5, 2020
8baf153
Run pylint as a separate job (#118)
cjmayo Jun 5, 2020
73d0aa4
C++ Engine refactor (#116)
mindhells Jun 5, 2020
3292007
work in progress: create markdown-based manual
edyoung May 10, 2020
b713e8b
finished first pass through manual.md
edyoung May 10, 2020
ea304dc
tweak doc generation process
edyoung May 31, 2020
a3cac62
generate manual with hugo
edyoung May 31, 2020
8bca915
rest of hugo-based manual
edyoung May 31, 2020
8ab69d3
repoint to our copy of theme
edyoung Jun 6, 2020
be58cad
repoint to our version of theme
edyoung Jun 6, 2020
5b57a82
install hugo-generated manual
edyoung Jun 6, 2020
7ecf1b0
update submodule ref
edyoung Jun 6, 2020
97b38d9
ignorance
edyoung Jun 6, 2020
da012ef
delete docbook version of manual. so long!
edyoung Jun 6, 2020
0d1df54
Merge branch 'doc_update' of https://github.com/edyoung/gnofract4d in…
edyoung Jun 6, 2020
5cf80eb
fix test for doc version
edyoung Jun 6, 2020
aece4f3
fix submodule commit
edyoung Jun 6, 2020
885f184
install hugo in travis
edyoung Jun 6, 2020
cbd43a7
better errors on doc generation
edyoung Jun 6, 2020
bf70d2e
more debug output
edyoung Jun 6, 2020
c62baec
jfc
edyoung Jun 6, 2020
b832d36
apt version of hugo is too old, try this
edyoung Jun 6, 2020
cb7ea5b
maybe this
edyoung Jun 6, 2020
00a98ef
fold createdocs into setup
edyoung Jun 6, 2020
64d8458
delete old files
edyoung Jun 6, 2020
8b21f8f
work in progress: create markdown-based manual
edyoung May 10, 2020
7661041
finished first pass through manual.md
edyoung May 10, 2020
0da8655
tweak doc generation process
edyoung May 31, 2020
be9b5f9
work in progress: create markdown-based manual
edyoung May 10, 2020
1fb9a63
generate manual with hugo
edyoung May 31, 2020
1ecc21d
rest of hugo-based manual
edyoung May 31, 2020
cd587f5
repoint to our copy of theme
edyoung Jun 6, 2020
9dfd5d5
repoint to our version of theme
edyoung Jun 6, 2020
e12cb21
install hugo-generated manual
edyoung Jun 6, 2020
a847d46
update submodule ref
edyoung Jun 6, 2020
f27be20
ignorance
edyoung Jun 6, 2020
eae29a6
delete docbook version of manual. so long!
edyoung Jun 6, 2020
21ca8a9
fix test for doc version
edyoung Jun 6, 2020
c73d5c2
fix submodule commit
edyoung Jun 6, 2020
cacebfc
install hugo in travis
edyoung Jun 6, 2020
744730d
better errors on doc generation
edyoung Jun 6, 2020
6664245
more debug output
edyoung Jun 6, 2020
f098983
jfc
edyoung Jun 6, 2020
debeb41
apt version of hugo is too old, try this
edyoung Jun 6, 2020
40c62c4
maybe this
edyoung Jun 6, 2020
d26d6b7
fold createdocs into setup
edyoung Jun 6, 2020
921be35
delete old files
edyoung Jun 6, 2020
5df26ed
delete gui createdocs
edyoung Jun 7, 2020
f4a0613
setup.py updates
edyoung Jun 7, 2020
a762e7f
Merge branch 'doc_update' of https://github.com/edyoung/gnofract4d in…
edyoung Jun 7, 2020
214439a
merge madness
edyoung Jun 7, 2020
515bea7
build manual first
edyoung Jun 7, 2020
f03e7f4
custom build command doesn't work :-(
edyoung Jun 7, 2020
8ebbe93
back to generating docs separately
edyoung Jun 7, 2020
ffe6b77
checkin generated doc files for consistency
edyoung Jun 7, 2020
f0fd46c
restore css file
edyoung Jun 7, 2020
f7493a3
move css file inside fract4dgui
edyoung Jun 7, 2020
2bebd25
fix finding resources after install
edyoung Jun 7, 2020
321c725
guess which pylint to use
edyoung Jun 7, 2020
1337222
typo
edyoung Jun 7, 2020
d69b048
disable that darn test
edyoung Jun 7, 2020
487d7c7
fix pylint whining
edyoung Jun 7, 2020
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
17 changes: 12 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ token
.tox/*
build/*
dist/*
doc/gnofract4d-manual/C/commands.xml
doc/gnofract4d-manual/C/gnofract4d-manual.html
doc/gnofract4d-manual/C/gnofract4d-manual.pdf
doc/gnofract4d-manual/C/stdlib.xml
elephant-valley/*
experiments/*
fract4d/c/cmap_name.h
images/*
Expand All @@ -22,3 +17,15 @@ params/*

#autogenerated by compiler
fract4d_compiler/parser.out

# generated by hugo
manual/public/categories/*
manual/public/commands/*
manual/public/fonts/*
manual/public/katex/*
manual/public/tags/*
manual/public/stdlib/*
manual/resources/_gen/*

# edit
.vscode/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "manual/themes/book"]
path = manual/themes/book
url = https://github.com/fract4d/hugo-book
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ python:
- "3.5"
- "3.6"
- "3.7"
jobs:
include:
- env: TOXENV=pylint
before_install:
sudo apt-get install -y libgirepository1.0-dev gir1.2-gtk-3.0
- sudo apt-get install -y libgirepository1.0-dev gir1.2-gtk-3.0
- sudo snap install hugo --channel=extended
install:
- python setup.py build
- pip install tox-travis pylint
- pip install tox-travis
script:
- ./bin/pylint.sh || travis_terminate 1;
- tox
notifications:
email: false
30 changes: 5 additions & 25 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
include buildtools/*.py
include COPYING
include PKG-INFO
include createdocs.py
include debian/changelog
include debian/compat
include debian/control
include debian/copyright
include debian/docs
include debian/gnofract4d.install
include debian/gnofract4d.manpages
include debian/lintian/overrides/gnofract4d
include debian/menu
include debian/pycompat
include debian/rules
include debian/watch
include LICENSE
include doc/gnofract4d.1
include doc/gnofract4d-manual/C/*.css
include doc/gnofract4d-manual/C/*.html
include doc/gnofract4d-manual/C/*.xml
include doc/gnofract4d-manual/C/*.xsl
include doc/gnofract4d-manual/C/figures/*.png
include formulas/fractint-builtin.frm
include formulas/fractint-g4.frm
include formulas/fractint.cfrm
Expand All @@ -29,24 +9,24 @@ include formulas/gf4d.uxf
include formulas/standard.ucl
include formulas/tutorial.frm
include formulas/sterling2.frm
include formulas/test.cfrm
include formulas/test.frm
include formulas/test_bad_pp.frm
include fract4d/c/*.h
include fract4d/c/fract4dc/*.h
include fract4d/c/model/*.h
include fract4d/tests/*.py
include fract4d_compiler/tests/*.py
include fract4dgui/tests/*.py
include fract4dgui/ui.xml
include fract4dgui/gnofract4d.css
include gnofract4d
include gnofract4d-mime.xml
include gnofract4d.desktop
include manual/public/*.css
include manual/public/*.html
include manual/public/*.png
include maps/*.cs
include maps/*.map
include maps/*.ugr
include pixmaps/*.png
include pixmaps/*.xpm
include test.py
include testdata/animation.fcta
include testdata/chainsoflight.fct
Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Gnofract 4D is a program for drawing beautiful mathematically-based
images known as fractals. See the manual for more details.

The most recent version may be obtained from
http://github.com/fract4d/gnofract4d
https://github.com/fract4d/gnofract4d

Examples, screenshots etc are at http://fract4d.github.io/gnofract4d
Examples, screenshots etc are at https://fract4d.github.io/gnofract4d

Basic Installation
==================
Expand All @@ -17,10 +17,6 @@ Run:

./setup.py build

If you would like a copy of the manual:

./createdocs.py

You can then run Gnofract4D in the local directory:

./gnofract4d
Expand Down Expand Up @@ -80,14 +76,24 @@ On MacOS you might find an error regarding the number of opened files, you can i
Linting
=======

Pylint is being used to detect code that doesn't follow the [PEP8 style](https://www.python.org/dev/peps/pep-0008/) guide and potentially erroneus code in Python.
Pylint is being used to detect code that doesn't follow the [PEP8 style](https://www.python.org/dev/peps/pep-0008/) guide and potentially erroneous code in Python.
You can run it in two ways:
- Directly (firstly you should install pylint throw pip3):
- Directly (firstly you should install pylint through pip3):
```
$ sudo pip3 install pylint
$ ./bin/pylint.sh
```
- Using docker (same enviorment as pipeline):
- Using docker (same environment as pipeline):
```
$ ./docker/bin/run_lint.sh
```

Generating Documentation
========================

You can only regenerate the docs if you clone the Gnofract 4D git repo - the source dist packages contain the generated docs but not the input files for the generation process. To regenerate the docs:

1. Make sure you're starting from a git clone not a source .zip - you need the files under manual/content
1. Install hugo (Ubuntu 18.04 has an older version. Run `snap install hugo` instead of apt-get install hugo)
1. Run `./createdocs.py`

10 changes: 8 additions & 2 deletions bin/pylint.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/bash

pylint --rcfile pylintrc *.py fract4d fract4d_compiler fract4dgui
if [ -x "$(command -v pylint3)" ]; then
PYLINT=pylint3
else
PYLINT=pylint
fi

$PYLINT --rcfile pylintrc *.py gnofract4d fract4d fract4d_compiler fract4dgui
if [[ $? > 0 ]]
then
exit 1
fi

pylint --rcfile pylintrc_new fract4d/fract4d_new
$PYLINT --rcfile pylintrc_new fract4d/fract4d_new
if [[ $? > 0 ]]
then
exit 1
Expand Down
2 changes: 0 additions & 2 deletions buildtools/__init__.py

This file was deleted.

52 changes: 0 additions & 52 deletions buildtools/my_build_ext.py

This file was deleted.

24 changes: 0 additions & 24 deletions buildtools/my_install_lib.py

This file was deleted.

57 changes: 24 additions & 33 deletions createdocs.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
#!/usr/bin/env python3

# run this to update some tables in the documentation

# making this a separate cmd (not part of setup.py) because importing
# gtk was causing "setup.py build" to crash - inexplicable...

# also the other python versions don't have gtk as a module,
# so were reporting errors.

import sys
import os

def create_stdlib_docs():
'Autogenerate docs'
try:
# create list of stdlib functions
from fract4d import createdocs as cd1
cd1.main("doc/gnofract4d-manual/C/stdlib.xml")

# create list of mouse and GUI commands
import fract4dgui.createdocs
fract4dgui.createdocs.main("doc/gnofract4d-manual/C/commands.xml") # pylint: disable=no-value-for-parameter

# create HTML version of docs for them as don't have yelp
os.chdir("doc/gnofract4d-manual/C")
retval = os.system("xsltproc --nonet --output gnofract4d-manual.html --stringparam html.stylesheet docbook.css gnofract4d.xsl gnofract4d-manual.xml")
if retval != 0:
raise Exception("error processing xslt")
except Exception as err:
print("Problem creating docs. Online help will be incomplete.", file=sys.stderr)
print(err, file=sys.stderr)
sys.exit(1)

create_stdlib_docs()
# Used to generate the documentation, in 2 phases:
# 1) run python script to list all the functions in the standard library
# 2) invoke Hugo static file generator to create HTML docs which are written to manual/public

# This is a separate step from the normal build because not everyone will want to
# install those tools. The 'sdist' packages (gnofract4d-4.2.zip etc) contain the output from this step
# but not all the input. To build the docs you need to clone the git repo

import subprocess

# create list of stdlib functions
from fract4d import createdocs as cd1
cd1.main("manual/content/stdlib.html")

print("Generating docs")
result = subprocess.run(
["hugo", "-b", ""],
cwd="manual",
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)

if result.returncode != 0:
raise RuntimeError("Error generating docs: %d\nStderr\n%s\nStdout\n%s" %
(result.returncode, result.stderr.decode('utf8'), result.stdout.decode('utf8')))
9 changes: 0 additions & 9 deletions doc/Makefile.am

This file was deleted.

7 changes: 0 additions & 7 deletions doc/gnofract4d-manual/C/Makefile.am

This file was deleted.

39 changes: 0 additions & 39 deletions doc/gnofract4d-manual/C/docbook.css

This file was deleted.

Binary file removed doc/gnofract4d-manual/C/figures/hybrid.png
Binary file not shown.
Loading