Skip to content

Commit

Permalink
Everything but network classes (#1)
Browse files Browse the repository at this point in the history
* update the name

* * updating yml examples
* updating names
* remove dependency reqs.txt
* abstract measurements
* implemented measurements

* removed testing folder

* subclassing, implementing methods

* * updated setup config
* reimplementing measurements
* adding necessary calculations for measurements

* * removed orientation_dir for future
* updated much repeated code
* implemented angle

* updated changelog
  • Loading branch information
jankovicgd authored Jun 1, 2020
1 parent 388479f commit 3cd3576
Show file tree
Hide file tree
Showing 35 changed files with 575 additions and 410 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = lsgeonetadj
source = lsgeolib
# omit = bad_file.py

[paths]
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ MANIFEST

# Per-project virtualenvs
.venv*/
venv/

# Other
.pylintrc
test_notebooks
.vscode/
.vscode/
testing/
8 changes: 3 additions & 5 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
Changelog
=========

Version 0.1
===========
Version 0.0.1
=============

- Feature A added
- FIX: nasty bug #1729 fixed
- add your changes here!
- Added building blocks for networks - Measurements
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ lsgeolib
===========


Object oriented python implementation for geodetic network adjustment using the least square adjustment Gauss-Markov model.
Python library for geodetic network adjustment using the least square adjustment defined by the Gauss-Markov model.


Description
===========

A longer description of your project goes here...
The functional model is built using the parametric adjustment. Currently supported networks are:

* 1D with height differences
* 2D with distances, directions and angles


Note
Expand Down
4 changes: 2 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ PAPER =
BUILDDIR = _build
AUTODOCDIR = api
AUTODOCBUILD = sphinx-apidoc
PROJECT = lsGeoNetAdj
MODULEDIR = ../src/lsgeonetadj
PROJECT = lsgeolib
MODULEDIR = ../src/lsgeolib

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $?), 1)
Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from sphinx import apidoc

output_dir = os.path.join(__location__, "api")
module_dir = os.path.join(__location__, "../src/lsgeonetadj")
module_dir = os.path.join(__location__, "../src/lsgeolib")
try:
shutil.rmtree(output_dir)
except FileNotFoundError:
Expand Down Expand Up @@ -81,7 +81,7 @@
master_doc = 'index'

# General information about the project.
project = u'lsGeoNetAdj'
project = u'lsgeolib'
copyright = u'2018, jankovic_gd'

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -151,7 +151,7 @@
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
try:
from lsgeonetadj import __version__ as version
from lsgeolib import __version__ as version
except ImportError:
pass
else:
Expand Down Expand Up @@ -216,7 +216,7 @@
# html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'lsgeonetadj-doc'
htmlhelp_basename = 'lsgeolib-doc'


# -- Options for LaTeX output --------------------------------------------------
Expand All @@ -235,7 +235,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'user_guide.tex', u'lsGeoNetAdj Documentation',
('index', 'user_guide.tex', u'lsgeolib Documentation',
u'jankovic_gd', 'manual'),
]

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
===========
lsGeoNetAdj
lsgeolib
===========

This is the documentation of **lsGeoNetAdj**.
This is the documentation of **lsgeolib**.

.. note::

Expand Down
66 changes: 32 additions & 34 deletions examples/data_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,38 @@ points:
y: 1367.459
state: approximate
measurements:
directions:
dir1:
from: T0
to: 1
value: 0.0
dir2:
from: T0
to: 2
value: 90.000833
dir3:
from: T0
to: 3
value: 179.9975
dir4:
from: T0
to: 4
value: 270.000833
distances:
dist1:
from: T0
to: 1
value: 453.446
dist2:
from: T0
to: 2
value: 679.682
dist3:
from: T0
to: 3
value: 453.452
dist4:
from: T0
to: 4
value: 679.642
- type: direction
from: T0
to: p1
value: 0.0
- type: direction
from: T0
to: p2
value: 90.000833
- type: direction
from: T0
to: p3
value: 179.9975
- type: direction
from: T0
to: p4
value: 270.000833
- type: distance
from: T0
to: p1
value: 453.446
- type: distance
from: T0
to: p2
value: 679.682
- type: distance
from: T0
to: p3
value: 453.452
- type: distance
from: T0
to: p4
value: 679.642
standards:
directions:
angular_seconds: 3
Expand Down
28 changes: 14 additions & 14 deletions examples/data_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ points:
z: 100.012
state: fixed
measurements:
height_difs:
h1:
from: R1
height_differences:
- from: R1
to: R2
value: 1.024
h2:
from: R2
- from: R2
to: R3
value: 40.846
h3:
from: R1
- from: R1
to: R3
value: 41.879
standards:
height_difs_no_stations:
n11:
value: 10
n22:
value: 21
n3:
value: 29
number_of_measurements_between_points:
- from: R1
to: R2
number_of_measurements: 10
- from: R1
to: R2
number_of_measurements: 21
- from: R1
to: R2
number_of_measurements: 29
17 changes: 0 additions & 17 deletions requirements.txt

This file was deleted.

71 changes: 33 additions & 38 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,75 +1,74 @@
# This file is used to configure your project.
# Read more about the various options under:
# http://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files

[metadata]
name = lsGeoNetAdj
description = Add a short description here!
name = lsgeolib
description = Library for defining Geodetic Networks and performing least square adjustments.
author = jankovic_gd
author-email = [email protected]
license = mit
url = https://pyscaffold.org/
long-description = file: README.rst
# Change if running only on Windows, Mac or Linux (comma-separated)
platforms = any
# Add here all kinds of additional classifiers as defined under
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords = geodesy, least squares, adjustment, network
classifiers =
Development Status :: 4 - Beta
Programming Language :: Python
Development Status :: 2 - Pre-Alpha
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
License :: OSI Approved :: MIT
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Mathematics
Topic :: Education
Intended Audience :: Developers
Intended Audience :: Education

[options]
zip_safe = False
packages = find:
include_package_data = True
package_dir =
=src
# DON'T CHANGE THE FOLLOWING LINE! IT WILL BE UPDATED BY PYSCAFFOLD!
setup_requires = pyscaffold>=3.1a0,<3.2a0
# Add here dependencies of your project (semicolon/line-separated), e.g.
install_requires = pandas; pyyaml
# The usage of test_requires is discouraged, see `Dependency Management` docs
# tests_require = pytest; pytest-cov
# Require a specific Python version, e.g. Python 2.7 or >= 3.4
# python_requires = >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
install_requires =
pandas>=1.0.0,<1.1
pyyaml>=5.3,<5.4
tests_require =
pytest
pytest-cov
python_requires = >=3.7.*

[options.packages.find]
where = src
exclude =
tests

[options.extras_require]
# Add here additional requirements for extra features, to install with:
# `pip install lsGeoNetAdj[PDF]` like:
# PDF = ReportLab; RXP
# Add here test requirements (semicolon/line-separated)
testing =
pytest
pytest-cov
dev =
black
flake8
all =
pytest
pytest-cov
black
flake8

[options.entry_points]
# Add here console scripts like:
# console_scripts =
# script_name = lsgeonetadj.module:function
# script_name = lsgeolib.module:function
# For example:
# console_scripts =
# fibonacci = lsgeonetadj.skeleton:run
# fibonacci = lsgeolib.skeleton:run
# And any other entry points, for example:
# pyscaffold.cli =
# awesome = pyscaffoldext.awesome.extension:AwesomeExtension

[test]
# py.test options when running `python setup.py test`
# addopts = --verbose
extras = True

[tool:pytest]
# Options for py.test:
# Specify command line options as you would do when invoking py.test directly.
# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
# in order to write a coverage file that can be read by Jenkins.
addopts =
--cov lsgeonetadj --cov-report term-missing
--cov lsgeolib --cov-report term-missing
--verbose
norecursedirs =
dist
Expand All @@ -82,30 +81,26 @@ build = bdist_wheel
release = build upload

[bdist_wheel]
# Use this option if your package is pure-python
universal = 1

[build_sphinx]
source_dir = docs
build_dir = docs/_build

[devpi:upload]
# Options for the devpi: PyPI server and packaging tool
# VCS export must be deactivated since we are using setuptools-scm
no-vcs = 1
formats = bdist_wheel

[flake8]
# Some sane defaults for the code style checker flake8
exclude =
.tox
build
dist
.eggs
docs/conf.py
max-line-length = 89


[pyscaffold]
# PyScaffold's parameters when the project was created.
# This will be used when updating. Do not change!
version = 3.1
package = lsgeonetadj
package = lsgeolib
Loading

0 comments on commit 3cd3576

Please sign in to comment.