grav-toolbox


Namegrav-toolbox JSON
Version 0.2.7 PyPI version JSON
download
home_pagehttps://github.com/ahellers/GravTools
SummaryGravity survey utility tools
upload_time2024-02-21 13:47:08
maintainer
docs_urlNone
authorAndreas Hellerschmied
requires_python
licenseGNU GPLv3
keywords gravity gravimeter least squares adjustment geodesy geophysics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GravTools
GravTools is an open source software toolbox for processing relative gravity surveys developed at the Austrian
Federal Office of Metrology and Surveying (BEV).  

 - The source code is hosted on github.com: https://github.com/ahellers/GravTools
 - The python package is hosted at: https://pypi.org/project/grav-toolbox/

# Installation

## Install python package with pip:
`pip install grav-toolbox`

### Optional dependency for GIS data export
GravTools allows to export station- und observation-results to shapefiles for import and analysis in GIS programs.
To enable these features the optional package "geopandas" needs to be installed by executing:
`pip install grav-toolbox[gis]`
 
## Installation issues on Centos 8:
* **1. Carry out installation steps describes above** 
* **2. Install QT5, if required**
  * `sudo yum install qt5-qtbase-devel.x86_64`
  
## Installation issues on Ubuntu 20.04:
After just installing PyQt5 with pip3 the following error occurred when trying to actually run a PyQt GUI: qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This issue was resolved by installing the QT dev tools (Designer, etc.): 
`sudo apt-get install qttools5-dev-tools`

## Test installation
In a virtual environment.

* Editable installation with pip: `pip install -e .`
  * Or: `make test_pack`
* Uninstall: `pip uninstall grav-toolbox`
  * Or: `test_pack_uninstall`

# Packaging
With setuptools and the build package.

## Create a source and binary distribution (sdist and wheel)
* Set up setup.cfg and pyproject.toml in the project root directory
* With make and the predefined makefile: `make build`
* Without make: `python3 -m build`

The created package (wheel and source distribution) is located in the "dist" directory.

## Push package to pypi.org
Define user credentials in /home/.pypirc

* `twine upload --verbose dist/*` or
* `make pypi_push`


# Create a stand-alone Windows executable
For creating a Windows executable (stand-alone application, without python installation) the 
package "auto-py-to-exe" can be used (see: https://pypi.org/project/auto-py-to-exe/). This is a 
simple graphical user interface (based on the chrome browser) that allows to define all settings 
for the package "PyInstaller" (see: https://www.pyinstaller.org/). 

Creating a Windows executable with auto-py-to-exe was tested on Windows 10. 
Follow these steps to create an executable on a Windows machine:
* **1. Install Python3**
  * With installer from https://www.python.org/downloads/windows/
  * Add python3.x to the Windows search path and install pip!
* **2. Install virtualenv and create a virtual environment** in CMD
  * a. `pip install virtualenv`
  * b. Change to project directory (`cd ..`)
  * c. Create virtual environment: `virtualenv env`
  * d. Activate it: `env\Scripts\activate.bat`
    * Deactivate with `deactivate`
* **3. Install gravtools**: `pip install gravtools[gis]`
* **4. Install auto-py-to-exe**: `pip install auto-py-to-exe`
* **5. Try to run the GravTools**
  * Type `gt` in the command line interface (virtual environment must be active)
* **6. Create exe with auto-py-to-exe**
  * Run the CMD Window as administrator!
  * a. Start auto-py-to-exe in CMD: `auto-py-to-exe`
  * b. Select the script location (select: gravtools/scripts/run_gui.py)
  * c. Select "One File" and "Console based" (in addition to teh GUI a console will appear)
  * d. Start conversion py pressing the big blue button on the GUI bottom
  * e. The exe file will be save at a new "output" directory. Move the file to: "Windows_executables"

# Create HTML documentation with sphinx:
Sphinx is used to create an API documentation based on docstrings. Run make in the gravtools/doc directory: 
* `>>>make html_doc`

# Guidelines and conventions

## Code style:
* Respect the PEP conventions on python coding!
  * PEP 8 -- Style Guide for Python Code: https://www.python.org/dev/peps/pep-0008/
* The maximum line length is 120 characters
* Use **type hints**: https://www.python.org/dev/peps/pep-0484/
* Use docstrings according to the numpy standard: https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard
  * They are useful to generate the documentation automatically
  * Example: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html
* Comment code, if necessary!
* Use English language for the code, docstrings and comments

## Documentation and docstring style
* The API reference is created with sphinx (https://www.sphinx-doc.org/).
* Docstrings have to follow the numpy standard, see: https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard
  * Examples: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html
  * Contrary to the numpy standard license and copyright information is provided at least in the package and module docstrings.
* Package documentation via docstring in __ini__.py files
* Module documentation via docstring at first lines of py-file
* Documentation of classes, class methods and functions via docstrings
  
## Command line interface and executable scripts
* The command line interface is realized via entry points (console_scripts) in setuptools (python packaging tool)
  * Input arguments are handled with argparse
* Executable scripts are located in gravtools/scripts
  

# License and copyright

Copyright (C) 2021  Andreas Hellerschmied (<andreas.hellerschmied@bev.gv.at>)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ahellers/GravTools",
    "name": "grav-toolbox",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "gravity,gravimeter,least squares adjustment,geodesy,geophysics",
    "author": "Andreas Hellerschmied",
    "author_email": "andreas.hellerschmied@bev.gv.at",
    "download_url": "https://files.pythonhosted.org/packages/0f/23/e3b7310562de9c2f44760a898f90ed5d8451c66b46c716761567a6ddee34/grav-toolbox-0.2.7.tar.gz",
    "platform": null,
    "description": "# GravTools\nGravTools is an open source software toolbox for processing relative gravity surveys developed at the Austrian\nFederal Office of Metrology and Surveying (BEV).  \n\n - The source code is hosted on github.com: https://github.com/ahellers/GravTools\n - The python package is hosted at: https://pypi.org/project/grav-toolbox/\n\n# Installation\n\n## Install python package with pip:\n`pip install grav-toolbox`\n\n### Optional dependency for GIS data export\nGravTools allows to export station- und observation-results to shapefiles for import and analysis in GIS programs.\nTo enable these features the optional package \"geopandas\" needs to be installed by executing:\n`pip install grav-toolbox[gis]`\n \n## Installation issues on Centos 8:\n* **1. Carry out installation steps describes above** \n* **2. Install QT5, if required**\n  * `sudo yum install qt5-qtbase-devel.x86_64`\n  \n## Installation issues on Ubuntu 20.04:\nAfter just installing PyQt5 with pip3 the following error occurred when trying to actually run a PyQt GUI: qt.qpa.plugin: Could not load the Qt platform plugin \"xcb\" in \"\" even though it was found.\nThis issue was resolved by installing the QT dev tools (Designer, etc.): \n`sudo apt-get install qttools5-dev-tools`\n\n## Test installation\nIn a virtual environment.\n\n* Editable installation with pip: `pip install -e .`\n  * Or: `make test_pack`\n* Uninstall: `pip uninstall grav-toolbox`\n  * Or: `test_pack_uninstall`\n\n# Packaging\nWith setuptools and the build package.\n\n## Create a source and binary distribution (sdist and wheel)\n* Set up setup.cfg and pyproject.toml in the project root directory\n* With make and the predefined makefile: `make build`\n* Without make: `python3 -m build`\n\nThe created package (wheel and source distribution) is located in the \"dist\" directory.\n\n## Push package to pypi.org\nDefine user credentials in /home/.pypirc\n\n* `twine upload --verbose dist/*` or\n* `make pypi_push`\n\n\n# Create a stand-alone Windows executable\nFor creating a Windows executable (stand-alone application, without python installation) the \npackage \"auto-py-to-exe\" can be used (see: https://pypi.org/project/auto-py-to-exe/). This is a \nsimple graphical user interface (based on the chrome browser) that allows to define all settings \nfor the package \"PyInstaller\" (see: https://www.pyinstaller.org/). \n\nCreating a Windows executable with auto-py-to-exe was tested on Windows 10. \nFollow these steps to create an executable on a Windows machine:\n* **1. Install Python3**\n  * With installer from https://www.python.org/downloads/windows/\n  * Add python3.x to the Windows search path and install pip!\n* **2. Install virtualenv and create a virtual environment** in CMD\n  * a. `pip install virtualenv`\n  * b. Change to project directory (`cd ..`)\n  * c. Create virtual environment: `virtualenv env`\n  * d. Activate it: `env\\Scripts\\activate.bat`\n    * Deactivate with `deactivate`\n* **3. Install gravtools**: `pip install gravtools[gis]`\n* **4. Install auto-py-to-exe**: `pip install auto-py-to-exe`\n* **5. Try to run the GravTools**\n  * Type `gt` in the command line interface (virtual environment must be active)\n* **6. Create exe with auto-py-to-exe**\n  * Run the CMD Window as administrator!\n  * a. Start auto-py-to-exe in CMD: `auto-py-to-exe`\n  * b. Select the script location (select: gravtools/scripts/run_gui.py)\n  * c. Select \"One File\" and \"Console based\" (in addition to teh GUI a console will appear)\n  * d. Start conversion py pressing the big blue button on the GUI bottom\n  * e. The exe file will be save at a new \"output\" directory. Move the file to: \"Windows_executables\"\n\n# Create HTML documentation with sphinx:\nSphinx is used to create an API documentation based on docstrings. Run make in the gravtools/doc directory: \n* `>>>make html_doc`\n\n# Guidelines and conventions\n\n## Code style:\n* Respect the PEP conventions on python coding!\n  * PEP 8 -- Style Guide for Python Code: https://www.python.org/dev/peps/pep-0008/\n* The maximum line length is 120 characters\n* Use **type hints**: https://www.python.org/dev/peps/pep-0484/\n* Use docstrings according to the numpy standard: https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard\n  * They are useful to generate the documentation automatically\n  * Example: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html\n* Comment code, if necessary!\n* Use English language for the code, docstrings and comments\n\n## Documentation and docstring style\n* The API reference is created with sphinx (https://www.sphinx-doc.org/).\n* Docstrings have to follow the numpy standard, see: https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard\n  * Examples: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html\n  * Contrary to the numpy standard license and copyright information is provided at least in the package and module docstrings.\n* Package documentation via docstring in __ini__.py files\n* Module documentation via docstring at first lines of py-file\n* Documentation of classes, class methods and functions via docstrings\n  \n## Command line interface and executable scripts\n* The command line interface is realized via entry points (console_scripts) in setuptools (python packaging tool)\n  * Input arguments are handled with argparse\n* Executable scripts are located in gravtools/scripts\n  \n\n# License and copyright\n\nCopyright (C) 2021  Andreas Hellerschmied (<andreas.hellerschmied@bev.gv.at>)\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <https://www.gnu.org/licenses/>.\n\n\n",
    "bugtrack_url": null,
    "license": "GNU GPLv3",
    "summary": "Gravity survey utility tools",
    "version": "0.2.7",
    "project_urls": {
        "Homepage": "https://github.com/ahellers/GravTools"
    },
    "split_keywords": [
        "gravity",
        "gravimeter",
        "least squares adjustment",
        "geodesy",
        "geophysics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "287b767361c72873ba4207cc7d148f5c0cf9e72369c98290a0d3ae3f5939be85",
                "md5": "88ed598c1b04d93d3caccf6b3b1d1236",
                "sha256": "6b0ca0c25aefe1409552b53ae21eda1cdf8a53f93b7412cdce8630999fe831e6"
            },
            "downloads": -1,
            "filename": "grav_toolbox-0.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88ed598c1b04d93d3caccf6b3b1d1236",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 296247,
            "upload_time": "2024-02-21T13:46:56",
            "upload_time_iso_8601": "2024-02-21T13:46:56.812578Z",
            "url": "https://files.pythonhosted.org/packages/28/7b/767361c72873ba4207cc7d148f5c0cf9e72369c98290a0d3ae3f5939be85/grav_toolbox-0.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f23e3b7310562de9c2f44760a898f90ed5d8451c66b46c716761567a6ddee34",
                "md5": "fcb1a2ada28a48026e106e2a176362f4",
                "sha256": "f0238c5723870a1bcb47f2825f6df94ac9c8c442762243cf2c2f6f756164d933"
            },
            "downloads": -1,
            "filename": "grav-toolbox-0.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "fcb1a2ada28a48026e106e2a176362f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 242110,
            "upload_time": "2024-02-21T13:47:08",
            "upload_time_iso_8601": "2024-02-21T13:47:08.378739Z",
            "url": "https://files.pythonhosted.org/packages/0f/23/e3b7310562de9c2f44760a898f90ed5d8451c66b46c716761567a6ddee34/grav-toolbox-0.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-21 13:47:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ahellers",
    "github_project": "GravTools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "grav-toolbox"
}
        
Elapsed time: 0.18586s