From b1521227c1ef143967a68b5b4a05ca11d93af8a9 Mon Sep 17 00:00:00 2001 From: Fabrice Salvaire Date: Sun, 23 Dec 2018 14:45:08 +0100 Subject: [PATCH] GCode -> Gcode --- .gitignore | 2 +- MANIFEST.in | 2 +- .../Gcode}/Lexer.py | 16 +++--- .../Gcode}/Parser.py | 14 ++--- .../Gcode}/__init__.py | 2 +- .../Machine/__init__.py | 0 .../Machine/data/make-yaml.py | 0 .../data/rs274-default-parameter-file.yaml | 0 .../Machine/data/rs274-execution-order.yaml | 0 .../Machine/data/rs274-gcodes.yaml | 0 .../Machine/data/rs274-modal-groups.yaml | 0 .../data/rs274-word-starting-letter.yaml | 0 .../PythonLexYacc/__init__.py | 0 .../PythonLexYacc/lex.py | 0 .../__init__.py | 0 README.txt | 12 ++-- doc/sphinx/source/conf.py | 22 ++++---- doc/sphinx/source/development.rst | 12 ++-- doc/sphinx/source/donate.rst | 2 +- doc/sphinx/source/faq.rst | 18 +++--- doc/sphinx/source/how-to-refer.rst | 14 ++--- doc/sphinx/source/index.rst | 16 +++--- doc/sphinx/source/installation.rst | 28 +++++----- doc/sphinx/source/overview.rst | 24 ++++---- doc/sphinx/source/project-links.txt | 56 +++++++++---------- doc/sphinx/source/reference-manual.rst | 4 +- doc/sphinx/source/roadmap.rst | 2 +- .../layout.html | 0 .../piwik.html | 0 .../static/css/PythonicGcodeMachine.css} | 4 +- .../static/css/theme.css | 0 .../static/getthecode.js | 0 .../static/jquery.min.js | 0 .../theme.conf | 2 +- gh-pages/README.rst | 2 +- gh-pages/update-gh-pages | 10 ++-- setup.py | 6 +- setup_data.py | 6 +- tools/license-model-gpl.py | 2 +- tools/make-api-doc | 9 ++- unit-test/{GCode => Gcode}/test_Parser.py | 22 ++++---- 41 files changed, 156 insertions(+), 153 deletions(-) rename {PythonicGCodeMachine/GCode => PythonicGcodeMachine/Gcode}/Lexer.py (93%) rename {PythonicGCodeMachine/GCode => PythonicGcodeMachine/Gcode}/Parser.py (97%) rename {PythonicGCodeMachine/GCode => PythonicGcodeMachine/Gcode}/__init__.py (99%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/Machine/__init__.py (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/Machine/data/make-yaml.py (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/Machine/data/rs274-default-parameter-file.yaml (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/Machine/data/rs274-execution-order.yaml (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/Machine/data/rs274-gcodes.yaml (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/Machine/data/rs274-modal-groups.yaml (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/Machine/data/rs274-word-starting-letter.yaml (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/PythonLexYacc/__init__.py (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/PythonLexYacc/lex.py (100%) rename {PythonicGCodeMachine => PythonicGcodeMachine}/__init__.py (100%) rename doc/sphinx/source/themes/{PythonicGCodeMachineRtd => PythonicGcodeMachineRtd}/layout.html (100%) rename doc/sphinx/source/themes/{PythonicGCodeMachineRtd => PythonicGcodeMachineRtd}/piwik.html (100%) rename doc/sphinx/source/themes/{PythonicGCodeMachineRtd/static/css/PythonicGCodeMachine.css => PythonicGcodeMachineRtd/static/css/PythonicGcodeMachine.css} (96%) rename doc/sphinx/source/themes/{PythonicGCodeMachineRtd => PythonicGcodeMachineRtd}/static/css/theme.css (100%) rename doc/sphinx/source/themes/{PythonicGCodeMachineRtd => PythonicGcodeMachineRtd}/static/getthecode.js (100%) rename doc/sphinx/source/themes/{PythonicGCodeMachineRtd => PythonicGcodeMachineRtd}/static/jquery.min.js (100%) rename doc/sphinx/source/themes/{PythonicGCodeMachineRtd => PythonicGcodeMachineRtd}/theme.conf (86%) rename unit-test/{GCode => Gcode}/test_Parser.py (87%) diff --git a/.gitignore b/.gitignore index 05a2810..2e04976 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ lextab.py parser.out parsetab.py -PythonicGCodeMachine/PythonLexYacc/yacc.py +PythonicGcodeMachine/PythonLexYacc/yacc.py ressources TOFIX.txt diff --git a/MANIFEST.in b/MANIFEST.in index 95b6893..89418aa 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -15,7 +15,7 @@ include setup_data.py include requirements.txt requirements-dev.txt include .travis.yml include bower/bower.json -recursive-include PythonicGCodeMachine *.py *.yml *py.in +recursive-include PythonicGcodeMachine *.py *.yml *py.in recursive-include doc * recursive-include doc/sphinx/source/_static * recursive-include doc/sphinx/source/_templates * diff --git a/PythonicGCodeMachine/GCode/Lexer.py b/PythonicGcodeMachine/Gcode/Lexer.py similarity index 93% rename from PythonicGCodeMachine/GCode/Lexer.py rename to PythonicGcodeMachine/Gcode/Lexer.py index 90777df..0df8ff3 100644 --- a/PythonicGCodeMachine/GCode/Lexer.py +++ b/PythonicGcodeMachine/Gcode/Lexer.py @@ -1,6 +1,6 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify @@ -18,7 +18,7 @@ # #################################################################################################### -__all__ = ['GCodeLexerError', 'GCodeLexer, '] +__all__ = ['GcodeLexerError', 'GcodeLexer, '] #################################################################################################### @@ -27,16 +27,16 @@ import re try: import ply.lex as lexer except ModuleNotFoundError: - import PythonicGCodeMachine.PythonLexYacc.lex as lexer + import PythonicGcodeMachine.PythonLexYacc.lex as lexer #################################################################################################### -class GCodeLexerError(ValueError): +class GcodeLexerError(ValueError): pass #################################################################################################### -class GCodeLexer: +class GcodeLexer: """Class to implement a CGode lexer. @@ -177,7 +177,7 @@ class GCodeLexer: value = t.value[1:-1] position = value.find('(') if position != -1: - raise GCodeLexerError(t.lexpos + position +1) + raise GcodeLexerError(t.lexpos + position +1) t.value = value return t @@ -192,8 +192,8 @@ class GCodeLexer: def t_error(self, t): 'Error handling rule' # t.lexer.skip(1) - # raise GCodeLexerError("Illegal character @{} '{}'".format(t.lexpos, t.value)) - raise GCodeLexerError(t.lexpos) + # raise GcodeLexerError("Illegal character @{} '{}'".format(t.lexpos, t.value)) + raise GcodeLexerError(t.lexpos) ############################################## diff --git a/PythonicGCodeMachine/GCode/Parser.py b/PythonicGcodeMachine/Gcode/Parser.py similarity index 97% rename from PythonicGCodeMachine/GCode/Parser.py rename to PythonicGcodeMachine/Gcode/Parser.py index af082f9..5e2e0c4 100644 --- a/PythonicGCodeMachine/GCode/Parser.py +++ b/PythonicGcodeMachine/Gcode/Parser.py @@ -1,6 +1,6 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify @@ -18,23 +18,23 @@ # #################################################################################################### -__all__ = ['GCodeParserError', 'GCodeParser'] +__all__ = ['GcodeParserError', 'GcodeParser'] #################################################################################################### # https://rply.readthedocs.io/en/latest/ from ply import yacc -from .Lexer import GCodeLexer, GCodeLexerError +from .Lexer import GcodeLexer, GcodeLexerError #################################################################################################### -class GCodeParserError(ValueError): +class GcodeParserError(ValueError): pass #################################################################################################### -class GCodeParser: +class GcodeParser: """Class to implement a CGode parser. @@ -256,7 +256,7 @@ class GCodeParser: ############################################## def p_error(self, p): - raise GCodeParserError(p.lexpos) + raise GcodeParserError(p.lexpos) ############################################## @@ -268,7 +268,7 @@ class GCodeParser: def _build(self, **kwargs): """Build the parser""" - self._lexer = GCodeLexer() + self._lexer = GcodeLexer() self.tokens = self._lexer.tokens self._parser = yacc.yacc( module=self, diff --git a/PythonicGCodeMachine/GCode/__init__.py b/PythonicGcodeMachine/Gcode/__init__.py similarity index 99% rename from PythonicGCodeMachine/GCode/__init__.py rename to PythonicGcodeMachine/Gcode/__init__.py index 8d8bdfc..37fdd45 100644 --- a/PythonicGCodeMachine/GCode/__init__.py +++ b/PythonicGcodeMachine/Gcode/__init__.py @@ -1,6 +1,6 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify diff --git a/PythonicGCodeMachine/Machine/__init__.py b/PythonicGcodeMachine/Machine/__init__.py similarity index 100% rename from PythonicGCodeMachine/Machine/__init__.py rename to PythonicGcodeMachine/Machine/__init__.py diff --git a/PythonicGCodeMachine/Machine/data/make-yaml.py b/PythonicGcodeMachine/Machine/data/make-yaml.py similarity index 100% rename from PythonicGCodeMachine/Machine/data/make-yaml.py rename to PythonicGcodeMachine/Machine/data/make-yaml.py diff --git a/PythonicGCodeMachine/Machine/data/rs274-default-parameter-file.yaml b/PythonicGcodeMachine/Machine/data/rs274-default-parameter-file.yaml similarity index 100% rename from PythonicGCodeMachine/Machine/data/rs274-default-parameter-file.yaml rename to PythonicGcodeMachine/Machine/data/rs274-default-parameter-file.yaml diff --git a/PythonicGCodeMachine/Machine/data/rs274-execution-order.yaml b/PythonicGcodeMachine/Machine/data/rs274-execution-order.yaml similarity index 100% rename from PythonicGCodeMachine/Machine/data/rs274-execution-order.yaml rename to PythonicGcodeMachine/Machine/data/rs274-execution-order.yaml diff --git a/PythonicGCodeMachine/Machine/data/rs274-gcodes.yaml b/PythonicGcodeMachine/Machine/data/rs274-gcodes.yaml similarity index 100% rename from PythonicGCodeMachine/Machine/data/rs274-gcodes.yaml rename to PythonicGcodeMachine/Machine/data/rs274-gcodes.yaml diff --git a/PythonicGCodeMachine/Machine/data/rs274-modal-groups.yaml b/PythonicGcodeMachine/Machine/data/rs274-modal-groups.yaml similarity index 100% rename from PythonicGCodeMachine/Machine/data/rs274-modal-groups.yaml rename to PythonicGcodeMachine/Machine/data/rs274-modal-groups.yaml diff --git a/PythonicGCodeMachine/Machine/data/rs274-word-starting-letter.yaml b/PythonicGcodeMachine/Machine/data/rs274-word-starting-letter.yaml similarity index 100% rename from PythonicGCodeMachine/Machine/data/rs274-word-starting-letter.yaml rename to PythonicGcodeMachine/Machine/data/rs274-word-starting-letter.yaml diff --git a/PythonicGCodeMachine/PythonLexYacc/__init__.py b/PythonicGcodeMachine/PythonLexYacc/__init__.py similarity index 100% rename from PythonicGCodeMachine/PythonLexYacc/__init__.py rename to PythonicGcodeMachine/PythonLexYacc/__init__.py diff --git a/PythonicGCodeMachine/PythonLexYacc/lex.py b/PythonicGcodeMachine/PythonLexYacc/lex.py similarity index 100% rename from PythonicGCodeMachine/PythonLexYacc/lex.py rename to PythonicGcodeMachine/PythonLexYacc/lex.py diff --git a/PythonicGCodeMachine/__init__.py b/PythonicGcodeMachine/__init__.py similarity index 100% rename from PythonicGCodeMachine/__init__.py rename to PythonicGcodeMachine/__init__.py diff --git a/README.txt b/README.txt index 4d14257..17453c6 100644 --- a/README.txt +++ b/README.txt @@ -4,7 +4,7 @@ .. include:: abbreviation.txt ============ - PythonicGCodeMachine + PythonicGcodeMachine ============ |Pypi License| @@ -12,21 +12,21 @@ |Pypi Version| -* Quick Link to `Production Branch `_ -* Quick Link to `Devel Branch `_ +* Quick Link to `Production Branch `_ +* Quick Link to `Devel Branch `_ Overview ======== -What is PythonicGCodeMachine ? +What is PythonicGcodeMachine ? --------------------- -PythonicGCodeMachine is a Python module which implements ... +PythonicGcodeMachine is a Python module which implements ... Where is the Documentation ? ---------------------------- -The documentation is available on the |PythonicGCodeMachineHomePage|_. +The documentation is available on the |PythonicGcodeMachineHomePage|_. What are the main features ? ---------------------------- diff --git a/doc/sphinx/source/conf.py b/doc/sphinx/source/conf.py index 5afee91..9698523 100644 --- a/doc/sphinx/source/conf.py +++ b/doc/sphinx/source/conf.py @@ -2,14 +2,14 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # #################################################################################################### #################################################################################################### # -# PythonicGCodeMachine documentation build configuration file, created by +# PythonicGcodeMachine documentation build configuration file, created by # sphinx-quickstart on Fri Apr 8 16:54:03 2018. # # This file is execfile()d with the current directory set to its containing dir. @@ -45,12 +45,12 @@ logger = logging.getLogger(__name__) # documentation root, use os.path.abspath to make it absolute, like shown here. # for directory in ,: -PythonicGCodeMachine_path = os.path.abspath(os.path.join(__file__, *['..']*4)) -sys.path.insert(0, PythonicGCodeMachine_path) +PythonicGcodeMachine_path = os.path.abspath(os.path.join(__file__, *['..']*4)) +sys.path.insert(0, PythonicGcodeMachine_path) #################################################################################################### -exec(compile(open(os.path.join(PythonicGCodeMachine_path, 'setup_data.py')).read(), 'setup_data.py', 'exec')) +exec(compile(open(os.path.join(PythonicGcodeMachine_path, 'setup_data.py')).read(), 'setup_data.py', 'exec')) #################################################################################################### # @@ -88,7 +88,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = 'PythonicGCodeMachine' +project = 'PythonicGcodeMachine' copyright = '{0.year}, Fabrice Salvaire'.format(datetime.now()) # The version info for the project you're documenting, acts as replacement for @@ -157,8 +157,8 @@ autodoc_default_flags = [ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -#html_theme = 'PythonicGCodeMachine' -html_theme = 'PythonicGCodeMachineRtd' +#html_theme = 'PythonicGcodeMachine' +html_theme = 'PythonicGcodeMachineRtd' # html_theme = 'sphinx_rtd_theme' # on_rtd is whether we are on readthedocs.org @@ -241,7 +241,7 @@ html_static_path = ['_static'] # html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'PythonicGCodeMachine' +htmlhelp_basename = 'PythonicGcodeMachine' #################################################################################################### # @@ -259,7 +259,7 @@ latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'PythonicGCodeMachine.tex', 'PythonicGCodeMachine Documentation', 'Fabrice Salvaire', 'manual'), + ('index', 'PythonicGcodeMachine.tex', 'PythonicGcodeMachine Documentation', 'Fabrice Salvaire', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -293,7 +293,7 @@ latex_logo = None # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'PythonicGCodeMachine', 'PythonicGCodeMachine Documentation', ['Fabrice Salvaire'], 1) + ('index', 'PythonicGcodeMachine', 'PythonicGcodeMachine Documentation', ['Fabrice Salvaire'], 1) ] # Example configuration for intersphinx: refer to the Python standard library. diff --git a/doc/sphinx/source/development.rst b/doc/sphinx/source/development.rst index 135360c..7d4167b 100644 --- a/doc/sphinx/source/development.rst +++ b/doc/sphinx/source/development.rst @@ -4,11 +4,11 @@ Development & Community ========================= -PythonicGCodeMachine is an open-source project, and relies on its community of users to keep getting better. +PythonicGcodeMachine is an open-source project, and relies on its community of users to keep getting better. -PythonicGCodeMachine source code and issues are managed on `Github `_. +PythonicGcodeMachine source code and issues are managed on `Github `_. -**Note to Packagers: Please don't create PythonicGCodeMachine package (PiPY do the job)** +**Note to Packagers: Please don't create PythonicGcodeMachine package (PiPY do the job)** How you can help ? ------------------ @@ -18,9 +18,9 @@ As an open source project, anyone is welcome to contribute in whatever form they .. , which can include taking part in discussions, filing bug reports, proposing improvements, contributing code or documentation, and testing it. -* Promote PythonicGCodeMachine on the web and all around you +* Promote PythonicGcodeMachine on the web and all around you * Fill bug reports -* Test PythonicGCodeMachine on Linux, Windows and OS X +* Test PythonicGcodeMachine on Linux, Windows and OS X * Check for errors on the documentation * Propose improvements * Implement missing features @@ -29,4 +29,4 @@ As an open source project, anyone is welcome to contribute in whatever form they Contributors ------------ -The list of contributors is available at https://github.com/FabriceSalvaire/PythonicGCodeMachine/graphs/contributors +The list of contributors is available at https://github.com/FabriceSalvaire/PythonicGcodeMachine/graphs/contributors diff --git a/doc/sphinx/source/donate.rst b/doc/sphinx/source/donate.rst index d7637db..217e1b9 100644 --- a/doc/sphinx/source/donate.rst +++ b/doc/sphinx/source/donate.rst @@ -4,7 +4,7 @@ How to Help Further ? ======================= -If you like PythonicGCodeMachine, you can donate for its developement to my `PayPal account +If you like PythonicGcodeMachine, you can donate for its developement to my `PayPal account `_. This budget could help me to mainly finance a domain, a vps to host a site, a forum (*) and also to diff --git a/doc/sphinx/source/faq.rst b/doc/sphinx/source/faq.rst index 0493f1f..8236b67 100644 --- a/doc/sphinx/source/faq.rst +++ b/doc/sphinx/source/faq.rst @@ -12,19 +12,19 @@ How to get help or report an issue ? .. There is no mailing list or forum actually, so you can either contact me or fill an issue on Github. -If you want to **discuss or ask questions on PythonicGCodeMachine**, you can subscribe and post messages on the -**PythonicGCodeMachine User** mailing list. +If you want to **discuss or ask questions on PythonicGcodeMachine**, you can subscribe and post messages on the +**PythonicGcodeMachine User** mailing list. There is actually three lists running on Google Groups (*): -`User List `_ - List for PythonicGCodeMachine users -`Announce List `_ - List for announcements regarding PythonicGCodeMachine releases and development -`Devel List `_ - List for developers of PythonicGCodeMachine +`User List `_ + List for PythonicGcodeMachine users +`Announce List `_ + List for announcements regarding PythonicGcodeMachine releases and development +`Devel List `_ + List for developers of PythonicGcodeMachine -**If you encounter an issue, please fill an issue** on the `Issue Tracker `_. +**If you encounter an issue, please fill an issue** on the `Issue Tracker `_. (*) Despite Google Groups has many drawbacks, I don't have actually enough resources to run GNU Mailman or Discourse on my own IT infrastructure. diff --git a/doc/sphinx/source/how-to-refer.rst b/doc/sphinx/source/how-to-refer.rst index 2a7d758..b103fff 100644 --- a/doc/sphinx/source/how-to-refer.rst +++ b/doc/sphinx/source/how-to-refer.rst @@ -1,30 +1,30 @@ .. _how-to-refer-page: =========================== - How to Refer to PythonicGCodeMachine ? + How to Refer to PythonicGcodeMachine ? =========================== -Up to now, the official url for PythonicGCodeMachine is @project_url@ +Up to now, the official url for PythonicGcodeMachine is @project_url@ *A permanent redirection will be implemented if the domain change in the future.* -On Github, you can use the **PythonicGCodeMachine** `topic `_ for repository related to PythonicGCodeMachine. +On Github, you can use the **PythonicGcodeMachine** `topic `_ for repository related to PythonicGcodeMachine. A typical `BibTeX `_ citation would be, for example: .. code:: bibtex - @software{PythonicGCodeMachine, + @software{PythonicGcodeMachine, author = {Fabrice Salvaire}, % actual author and maintainer - title = {PythonicGCodeMachine}, + title = {PythonicGcodeMachine}, url = {@project_url@}, version = {x.y}, date = {yyyy-mm-dd}, % set to the release date } - @Misc{PythonicGCodeMachine, + @Misc{PythonicGcodeMachine, author = {Fabrice Salvaire}, - title = {PythonicGCodeMachine}, + title = {PythonicGcodeMachine}, howpublished = {\url{@project_url@}}, year = {yyyy} } diff --git a/doc/sphinx/source/index.rst b/doc/sphinx/source/index.rst index b8b25e8..717f29c 100644 --- a/doc/sphinx/source/index.rst +++ b/doc/sphinx/source/index.rst @@ -42,7 +42,7 @@ ######## .. image:: /_static/logo.png - :alt: PythonicGCodeMachine logo + :alt: PythonicGcodeMachine logo :width: 750 .. important:: @@ -52,15 +52,15 @@ Overview ******** -PythonicGCodeMachine is a free and open source (*) Python module which interface |Python|_ ... +PythonicGcodeMachine is a free and open source (*) Python module which interface |Python|_ ... .. rst-class:: small-text - (*) PythonicGCodeMachine is licensed under GPLv3 therms. + (*) PythonicGcodeMachine is licensed under GPLv3 therms. -PythonicGCodeMachine requires Python 3 and works on Linux, Windows and OS X. +PythonicGcodeMachine requires Python 3 and works on Linux, Windows and OS X. -:ref:`To read more on PythonicGCodeMachine ` +:ref:`To read more on PythonicGcodeMachine ` .. raw:: html @@ -80,7 +80,7 @@ What's changed in versions :ref:`Installation-page` ======================== -How to install PythonicGCodeMachine on your system +How to install PythonicGcodeMachine on your system .. rst-class:: column column2 @@ -94,7 +94,7 @@ Answers to frequent questions :ref:`examples-page` ==================== -Many examples to learn how to use PythonicGCodeMachine. +Many examples to learn how to use PythonicGcodeMachine. .. rst-class:: column column2 @@ -115,7 +115,7 @@ Technical reference material, for classes, methods, APIs, commands. :ref:`how-to-refer-page` ======================== -Guidelines to cite PythonicGCodeMachine +Guidelines to cite PythonicGcodeMachine .. rst-class:: column column2 diff --git a/doc/sphinx/source/installation.rst b/doc/sphinx/source/installation.rst index 4090ed5..31a8f01 100644 --- a/doc/sphinx/source/installation.rst +++ b/doc/sphinx/source/installation.rst @@ -7,7 +7,7 @@ Installation ============== -**Note to Packagers: Please don't create PythonicGCodeMachine package (PiPY do the job)** +**Note to Packagers: Please don't create PythonicGcodeMachine package (PiPY do the job)** On Windows ---------- @@ -17,18 +17,18 @@ as to get a full featured Python 3 environment. Then open the `Anaconda Navigator `_ and launch a console for your root environment. -You can now run *pip* to install PythonicGCodeMachine in your root environment using this command: +You can now run *pip* to install PythonicGcodeMachine in your root environment using this command: .. code-block:: sh - pip install PythonicGCodeMachine + pip install PythonicGcodeMachine On Linux -------- Firstly, you have to install Python 3 from your distribution. -Then you can install PythonicGCodeMachine using *pip* or from source. See supra. +Then you can install PythonicGcodeMachine using *pip* or from source. See supra. On OSX ------ @@ -40,18 +40,18 @@ There are several ways to get Python on OSX: * install the `Anaconda Distribution `_. * install from Brew `brew install python3` **(reported to work)** -You can install PythonicGCodeMachine using *pip* or from source. See supra. +You can install PythonicGcodeMachine using *pip* or from source. See supra. Installation from PyPi Repository --------------------------------- -PythonicGCodeMachine is available on the Python Packages |Pypi|_ repository at |PythonicGCodeMachine@pypi| +PythonicGcodeMachine is available on the Python Packages |Pypi|_ repository at |PythonicGcodeMachine@pypi| Run this command in the console to install the latest release: .. code-block:: sh - pip install PythonicGCodeMachine + pip install PythonicGcodeMachine Install a more recent version from Github ----------------------------------------- @@ -61,28 +61,28 @@ commands to install the stable or devel branch: .. code-block:: sh - pip install git+https://github.com/FabriceSalvaire/PythonicGCodeMachine + pip install git+https://github.com/FabriceSalvaire/PythonicGcodeMachine - pip install git+https://github.com/FabriceSalvaire/PythonicGCodeMachine@devel + pip install git+https://github.com/FabriceSalvaire/PythonicGcodeMachine@devel Installation from Source ------------------------ -The PythonicGCodeMachine source code is hosted at |PythonicGCodeMachine@github| +The PythonicGcodeMachine source code is hosted at |PythonicGcodeMachine@github| .. add link to pages ... You have to solution to get the source code, the first one is to clone the repository, but if you -are not familiar with Git then you can simply download an archive either from the PythonicGCodeMachine Pypi page +are not familiar with Git then you can simply download an archive either from the PythonicGcodeMachine Pypi page (at the bottom) or the GitHub page (see clone or download button). To clone the Git repository, run this command in a console: .. code-block:: sh - git clone https://github.com/FabriceSalvaire/PythonicGCodeMachine.git + git clone https://github.com/FabriceSalvaire/PythonicGcodeMachine.git -Then to build and install PythonicGCodeMachine run these commands: +Then to build and install PythonicGcodeMachine run these commands: .. code-block:: sh @@ -92,7 +92,7 @@ Then to build and install PythonicGCodeMachine run these commands: Dependencies ------------ -PythonicGCodeMachine requires the following dependencies: +PythonicGcodeMachine requires the following dependencies: * |Python|_ 3 * |Numpy|_ diff --git a/doc/sphinx/source/overview.rst b/doc/sphinx/source/overview.rst index f228eef..2a8ae18 100644 --- a/doc/sphinx/source/overview.rst +++ b/doc/sphinx/source/overview.rst @@ -7,36 +7,36 @@ Overview ========== -What is PythonicGCodeMachine ? +What is PythonicGcodeMachine ? --------------------- -PythonicGCodeMachine is an open source Python module which provides a |Python|_ .... +PythonicGcodeMachine is an open source Python module which provides a |Python|_ .... -How is PythonicGCodeMachine licensed ? +How is PythonicGcodeMachine licensed ? ----------------------------- -PythonicGCodeMachine is licensed under the `GPLv3 `_. +PythonicGcodeMachine is licensed under the `GPLv3 `_. -Going further with PythonicGCodeMachine +Going further with PythonicGcodeMachine ------------------------------ -The best way to know what you can do with PythonicGCodeMachine, and to learn it, is to look at the examples: +The best way to know what you can do with PythonicGcodeMachine, and to learn it, is to look at the examples: - * :ref:`PythonicGCodeMachine Reference Manual ` + * :ref:`PythonicGcodeMachine Reference Manual ` * :ref:`Bibliography ` -Which platforms are supported by PythonicGCodeMachine ? +Which platforms are supported by PythonicGcodeMachine ? ---------------------------------------------- -PythonicGCodeMachine runs on Linux, Windows 64-bit and Mac OS X. +PythonicGcodeMachine runs on Linux, Windows 64-bit and Mac OS X. -How to install PythonicGCodeMachine ? +How to install PythonicGcodeMachine ? ---------------------------- -The procedure to install PythonicGCodeMachine is described in the :ref:`Installation Manual `. +The procedure to install PythonicGcodeMachine is described in the :ref:`Installation Manual `. Which version of Python is required ? ------------------------------------- -PythonicGCodeMachine requires Python 3 and the version 3.5 is recommended so as to benefit from the new *@* syntax +PythonicGcodeMachine requires Python 3 and the version 3.5 is recommended so as to benefit from the new *@* syntax for units. diff --git a/doc/sphinx/source/project-links.txt b/doc/sphinx/source/project-links.txt index c56fe63..321c116 100644 --- a/doc/sphinx/source/project-links.txt +++ b/doc/sphinx/source/project-links.txt @@ -1,13 +1,13 @@ .. -*- Mode: rst -*- .. - |PythonicGCodeMachineUrl| - |PythonicGCodeMachineHomePage|_ - |PythonicGCodeMachineDoc|_ - |PythonicGCodeMachine@github|_ - |PythonicGCodeMachine@readthedocs|_ - |PythonicGCodeMachine@readthedocs-badge| - |PythonicGCodeMachine@pypi|_ + |PythonicGcodeMachineUrl| + |PythonicGcodeMachineHomePage|_ + |PythonicGcodeMachineDoc|_ + |PythonicGcodeMachine@github|_ + |PythonicGcodeMachine@readthedocs|_ + |PythonicGcodeMachine@readthedocs-badge| + |PythonicGcodeMachine@pypi|_ .. |ohloh| image:: https://www.openhub.net/accounts/230426/widgets/account_tiny.gif :target: https://www.openhub.net/accounts/fabricesalvaire @@ -15,35 +15,35 @@ :height: 15px :width: 80px -.. |PythonicGCodeMachineUrl| replace:: @project_url@ +.. |PythonicGcodeMachineUrl| replace:: @project_url@ -.. |PythonicGCodeMachineHomePage| replace:: PythonicGCodeMachine Home Page -.. _PythonicGCodeMachineHomePage: @project_url@ +.. |PythonicGcodeMachineHomePage| replace:: PythonicGcodeMachine Home Page +.. _PythonicGcodeMachineHomePage: @project_url@ -.. |PythonicGCodeMachine@readthedocs-badge| image:: https://readthedocs.org/projects/PythonicGCodeMachine/badge/?version=latest - :target: http://PythonicGCodeMachine.readthedocs.org/en/latest +.. |PythonicGcodeMachine@readthedocs-badge| image:: https://readthedocs.org/projects/PythonicGcodeMachine/badge/?version=latest + :target: http://PythonicGcodeMachine.readthedocs.org/en/latest -.. |PythonicGCodeMachine@github| replace:: https://github.com/FabriceSalvaire/PythonicGCodeMachine -.. .. _PythonicGCodeMachine@github: https://github.com/FabriceSalvaire/PythonicGCodeMachine +.. |PythonicGcodeMachine@github| replace:: https://github.com/FabriceSalvaire/PythonicGcodeMachine +.. .. _PythonicGcodeMachine@github: https://github.com/FabriceSalvaire/PythonicGcodeMachine -.. |PythonicGCodeMachine@pypi| replace:: https://pypi.python.org/pypi/PythonicGCodeMachine -.. .. _PythonicGCodeMachine@pypi: https://pypi.python.org/pypi/PythonicGCodeMachine +.. |PythonicGcodeMachine@pypi| replace:: https://pypi.python.org/pypi/PythonicGcodeMachine +.. .. _PythonicGcodeMachine@pypi: https://pypi.python.org/pypi/PythonicGcodeMachine -.. |Build Status| image:: https://travis-ci.org/FabriceSalvaire/PythonicGCodeMachine.svg?branch=master - :target: https://travis-ci.org/FabriceSalvaire/PythonicGCodeMachine - :alt: PythonicGCodeMachine build status @travis-ci.org +.. |Build Status| image:: https://travis-ci.org/FabriceSalvaire/PythonicGcodeMachine.svg?branch=master + :target: https://travis-ci.org/FabriceSalvaire/PythonicGcodeMachine + :alt: PythonicGcodeMachine build status @travis-ci.org -.. |Pypi Version| image:: https://img.shields.io/pypi/v/PythonicGCodeMachine.svg - :target: https://pypi.python.org/pypi/PythonicGCodeMachine - :alt: PythonicGCodeMachine last version +.. |Pypi Version| image:: https://img.shields.io/pypi/v/PythonicGcodeMachine.svg + :target: https://pypi.python.org/pypi/PythonicGcodeMachine + :alt: PythonicGcodeMachine last version -.. |Pypi License| image:: https://img.shields.io/pypi/l/PythonicGCodeMachine.svg - :target: https://pypi.python.org/pypi/PythonicGCodeMachine - :alt: PythonicGCodeMachine license +.. |Pypi License| image:: https://img.shields.io/pypi/l/PythonicGcodeMachine.svg + :target: https://pypi.python.org/pypi/PythonicGcodeMachine + :alt: PythonicGcodeMachine license -.. |Pypi Python Version| image:: https://img.shields.io/pypi/pyversions/PythonicGCodeMachine.svg - :target: https://pypi.python.org/pypi/PythonicGCodeMachine - :alt: PythonicGCodeMachine python version +.. |Pypi Python Version| image:: https://img.shields.io/pypi/pyversions/PythonicGcodeMachine.svg + :target: https://pypi.python.org/pypi/PythonicGcodeMachine + :alt: PythonicGcodeMachine python version .. coverage test .. https://img.shields.io/pypi/status/Django.svg diff --git a/doc/sphinx/source/reference-manual.rst b/doc/sphinx/source/reference-manual.rst index 6ad4a61..e829129 100644 --- a/doc/sphinx/source/reference-manual.rst +++ b/doc/sphinx/source/reference-manual.rst @@ -6,7 +6,7 @@ API Documentation =================== -This is the API documentation for the PythonicGCodeMachine library. +This is the API documentation for the PythonicGcodeMachine library. .. warning:: The API documentation is automatically generated from the docstrings in the source using the |Sphinx| tool. This way to produce the documentation is know to be perfectible @@ -17,7 +17,7 @@ Contents: .. toctree:: :maxdepth: 2 - api/PythonicGCodeMachine + api/PythonicGcodeMachine Indexes ------- diff --git a/doc/sphinx/source/roadmap.rst b/doc/sphinx/source/roadmap.rst index aa8b57d..ecb8aa3 100644 --- a/doc/sphinx/source/roadmap.rst +++ b/doc/sphinx/source/roadmap.rst @@ -7,4 +7,4 @@ Roadmap ========= -`Roadmap @Github `_ +`Roadmap @Github `_ diff --git a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/layout.html b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/layout.html similarity index 100% rename from doc/sphinx/source/themes/PythonicGCodeMachineRtd/layout.html rename to doc/sphinx/source/themes/PythonicGcodeMachineRtd/layout.html diff --git a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/piwik.html b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/piwik.html similarity index 100% rename from doc/sphinx/source/themes/PythonicGCodeMachineRtd/piwik.html rename to doc/sphinx/source/themes/PythonicGcodeMachineRtd/piwik.html diff --git a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/css/PythonicGCodeMachine.css b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/css/PythonicGcodeMachine.css similarity index 96% rename from doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/css/PythonicGCodeMachine.css rename to doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/css/PythonicGcodeMachine.css index b0c418a..f9b0920 100644 --- a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/css/PythonicGCodeMachine.css +++ b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/css/PythonicGcodeMachine.css @@ -2,11 +2,11 @@ /* ----------------------------------------------------------------------------------------------- * * - * PythonicGCodeMachine stylesheet + * PythonicGcodeMachine stylesheet * * :copyright: Copyright 2017 Fabrice Salvaire * - * This file is part of the PythonicGCodeMachine software. + * This file is part of the PythonicGcodeMachine software. * */ diff --git a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/css/theme.css b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/css/theme.css similarity index 100% rename from doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/css/theme.css rename to doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/css/theme.css diff --git a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/getthecode.js b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/getthecode.js similarity index 100% rename from doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/getthecode.js rename to doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/getthecode.js diff --git a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/jquery.min.js b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/jquery.min.js similarity index 100% rename from doc/sphinx/source/themes/PythonicGCodeMachineRtd/static/jquery.min.js rename to doc/sphinx/source/themes/PythonicGcodeMachineRtd/static/jquery.min.js diff --git a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/theme.conf b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/theme.conf similarity index 86% rename from doc/sphinx/source/themes/PythonicGCodeMachineRtd/theme.conf rename to doc/sphinx/source/themes/PythonicGcodeMachineRtd/theme.conf index 98aa7eb..eb6efe6 100644 --- a/doc/sphinx/source/themes/PythonicGCodeMachineRtd/theme.conf +++ b/doc/sphinx/source/themes/PythonicGcodeMachineRtd/theme.conf @@ -1,6 +1,6 @@ [theme] inherit = sphinx_rtd_theme -stylesheet = css/PythonicGCodeMachine.css +stylesheet = css/PythonicGcodeMachine.css # pygments_style = sphinx [options] diff --git a/gh-pages/README.rst b/gh-pages/README.rst index 1a05d47..11256b8 100644 --- a/gh-pages/README.rst +++ b/gh-pages/README.rst @@ -1,3 +1,3 @@ -This branch contains the GitHub Pages for PythonicGCodeMachine. +This branch contains the GitHub Pages for PythonicGcodeMachine. These pages are generated by the documentation tool. diff --git a/gh-pages/update-gh-pages b/gh-pages/update-gh-pages index 4c9e033..7f16958 100755 --- a/gh-pages/update-gh-pages +++ b/gh-pages/update-gh-pages @@ -9,7 +9,7 @@ source_gh_pages=${root_dir}/gh-pages echo Source Path: ${root_dir} echo HTML Build Path: ${html_build} -origin='git@github.com:FabriceSalvaire/PythonicGCodeMachine.git' +origin='git@github.com:FabriceSalvaire/PythonicGcodeMachine.git' #################################################################################################### @@ -18,13 +18,13 @@ if [ -e ${tmp_dir} ]; then pushd ${tmp_dir} # To create gh-pages branch - # git clone ${origin} PythonicGCodeMachine-gh-pages - # pushd PythonicGCodeMachine-gh-pages + # git clone ${origin} PythonicGcodeMachine-gh-pages + # pushd PythonicGcodeMachine-gh-pages # git checkout --orphan gh-pages # git rm --cached -r . - git clone ${origin} PythonicGCodeMachine-gh-pages --branch gh-pages --single-branch - pushd PythonicGCodeMachine-gh-pages + git clone ${origin} PythonicGcodeMachine-gh-pages --branch gh-pages --single-branch + pushd PythonicGcodeMachine-gh-pages # sync with origin if already cloned # git fetch origin git checkout gh-pages diff --git a/setup.py b/setup.py index fe421b2..cd2576d 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify @@ -31,7 +31,7 @@ setuptools_available = True #################################################################################################### if sys.version_info < (3,): - print('PythonicGCodeMachine requires Python 3', file=sys.stderr) + print('PythonicGcodeMachine requires Python 3', file=sys.stderr) sys.exit(1) exec(compile(open('setup_data.py').read(), 'setup_data.py', 'exec')) @@ -51,7 +51,7 @@ setup_dict.update(dict( # 'bin/...', # ], package_data={ - 'PythonicGCodeMachine.Config': ['logging.yml'], + 'PythonicGcodeMachine.Config': ['logging.yml'], }, platforms='any', diff --git a/setup_data.py b/setup_data.py index b6b111a..4bc248a 100644 --- a/setup_data.py +++ b/setup_data.py @@ -1,6 +1,6 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify @@ -71,13 +71,13 @@ else: #################################################################################################### setup_dict = dict( - name='PythonicGCodeMachine', + name='PythonicGcodeMachine', version='0.1.0', author='Fabrice Salvaire', author_email='fabrice.salvaire@orange.fr', description='...', license='GPLv3', keywords= 'foo bar', - url='https://github.com/FabriceSalvaire/PythonicGCodeMachine', + url='https://github.com/FabriceSalvaire/PythonicGcodeMachine', long_description=long_description, ) diff --git a/tools/license-model-gpl.py b/tools/license-model-gpl.py index 5ccca81..680b314 100644 --- a/tools/license-model-gpl.py +++ b/tools/license-model-gpl.py @@ -1,6 +1,6 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify diff --git a/tools/make-api-doc b/tools/make-api-doc index e4b8a38..c6e5380 100755 --- a/tools/make-api-doc +++ b/tools/make-api-doc @@ -1,14 +1,17 @@ #! /usr/bin/bash -find PythonicGCodeMachine -name "flycheck*.py" -exec rm {} \; -find PythonicGCodeMachine -name "parsetab.py" -exec rm {} \; +find PythonicGcodeMachine -name "flycheck*.py" -exec rm {} \; +find PythonicGcodeMachine -name "parsetab.py" -exec rm {} \; + +# rm -r doc/build +# rm -r doc/sphinx/source/api api=doc/sphinx/source/api rm -rf ${api} echo echo Generate RST API files -pyterate-rst-api PythonicGCodeMachine +pyterate-rst-api PythonicGcodeMachine echo echo Run Sphinx diff --git a/unit-test/GCode/test_Parser.py b/unit-test/Gcode/test_Parser.py similarity index 87% rename from unit-test/GCode/test_Parser.py rename to unit-test/Gcode/test_Parser.py index dc9f411..fc0515e 100644 --- a/unit-test/GCode/test_Parser.py +++ b/unit-test/Gcode/test_Parser.py @@ -1,6 +1,6 @@ #################################################################################################### # -# PythonicGCodeMachine - @licence_header_description@ +# PythonicGcodeMachine - @licence_header_description@ # Copyright (C) 2018 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify @@ -24,8 +24,8 @@ import unittest #################################################################################################### -from PythonicGCodeMachine.GCode.Lexer import GCodeLexer, GCodeLexerError -from PythonicGCodeMachine.GCode.Parser import GCodeParser, GCodeParserError +from PythonicGcodeMachine.Gcode.Lexer import GcodeLexer, GcodeLexerError +from PythonicGcodeMachine.Gcode.Parser import GcodeParser, GcodeParserError #################################################################################################### @@ -37,7 +37,7 @@ def print_rule(): #################################################################################################### -class TestGCodeLexer(unittest.TestCase): +class TestGcodeLexer(unittest.TestCase): ############################################## @@ -45,7 +45,7 @@ class TestGCodeLexer(unittest.TestCase): print_rule() - lexer = GCodeLexer() + lexer = GcodeLexer() for gcode in ( 'G0 X0 Y0 Z0', @@ -68,7 +68,7 @@ class TestGCodeLexer(unittest.TestCase): try: tokens = lexer.tokenize(gcode) print(list(tokens)) - except GCodeLexerError as exception: + except GcodeLexerError as exception: position, = exception.args print(' ' * position + '^') print('Lexer Error') @@ -77,12 +77,12 @@ class TestGCodeLexer(unittest.TestCase): for gcode in ( 'G0 (comment (wrong) 2) X0', ): - with self.assertRaises(GCodeLexerError): + with self.assertRaises(GcodeLexerError): list(lexer.tokenize(gcode)) #################################################################################################### -class TestGCodeParser(unittest.TestCase): +class TestGcodeParser(unittest.TestCase): ############################################## @@ -90,7 +90,7 @@ class TestGCodeParser(unittest.TestCase): print_rule() - parser = GCodeParser() + parser = GcodeParser() for gcode in ( 'G0 X0 Y0 Z0', @@ -115,7 +115,7 @@ class TestGCodeParser(unittest.TestCase): print(gcode) try: parser.parse(gcode) - except GCodeParserError as exception: + except GcodeParserError as exception: position, = exception.args print(' ' * position + '^') print('Parser Error') @@ -124,7 +124,7 @@ class TestGCodeParser(unittest.TestCase): # for gcode in ( # 'G0 (comment (wrong) 2) X0', # ): - # with self.assertRaises(GCodeLexerError): + # with self.assertRaises(GcodeLexerError): # list(lexer.tokenize(gcode)) #################################################################################################### -- GitLab