Skip to content

Commit 531eb3f

Browse files
authored
Merge pull request #1 from MrClock8163/feature-changing-to-click
Feature changing to click
2 parents 6141143 + a23dac2 commit 531eb3f

File tree

28 files changed

+2250
-1598
lines changed

28 files changed

+2250
-1598
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
* text eol=lf
4+
5+
*.png binary
6+
*.jpeg binary
7+
*.jpg binary
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publishing package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.x"
20+
21+
- name: Build release distributions
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install --group development
25+
python -m pip install build
26+
python -m build
27+
28+
- name: Upload distributions
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: release-dists
32+
path: dist/
33+
34+
pypi-publish:
35+
runs-on: ubuntu-latest
36+
needs:
37+
- build
38+
permissions:
39+
id-token: write
40+
41+
environment:
42+
name: pypi
43+
url: https://pypi.org/project/instrumentman/${{ github.event.release.name }}
44+
45+
steps:
46+
- name: Retrieve release distributions
47+
uses: actions/download-artifact@v4
48+
with:
49+
name: release-dists
50+
path: dist/
51+
52+
- name: Publish release distributions to PyPI
53+
uses: pypa/gh-action-pypi-publish@release/v1
54+
with:
55+
packages-dir: dist/

.github/workflows/run-tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Automated testing
2+
3+
on: push
4+
5+
env:
6+
FORCE_COLOR: 1
7+
MYPY_FORCE_COLOR: 1
8+
9+
jobs:
10+
linting:
11+
name: Linting
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
tool: ["flake8", "mypy"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Setup Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.x
24+
25+
- name: Build and install package
26+
run: python -m pip install .
27+
28+
- name: Running ${{ matrix.tool }}
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install --group linting
32+
python -c "print('=========== ${{ matrix.tool }} ===========')"
33+
python -m ${{ matrix.tool }} src/

.gitignore

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
dev*
2+
_version.py
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
cover/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
.pybuilder/
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
# For a library or package, you might want to ignore these files since the code is
90+
# intended to run in multiple environments; otherwise, check them in:
91+
# .python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# poetry
101+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102+
# This is especially recommended for binary packages to ensure reproducibility, and is more
103+
# commonly ignored for libraries.
104+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105+
#poetry.lock
106+
107+
# pdm
108+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109+
#pdm.lock
110+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111+
# in version control.
112+
# https://pdm.fming.dev/#use-with-ide
113+
.pdm.toml
114+
115+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116+
__pypackages__/
117+
118+
# Celery stuff
119+
celerybeat-schedule
120+
celerybeat.pid
121+
122+
# SageMath parsed files
123+
*.sage.py
124+
125+
# Environments
126+
.env
127+
.venv
128+
env/
129+
venv/
130+
ENV/
131+
env.bak/
132+
venv.bak/
133+
134+
# Spyder project settings
135+
.spyderproject
136+
.spyproject
137+
138+
# Rope project settings
139+
.ropeproject
140+
141+
# mkdocs documentation
142+
/site
143+
144+
# mypy
145+
.mypy_cache/
146+
.dmypy.json
147+
dmypy.json
148+
149+
# Pyre type checker
150+
.pyre/
151+
152+
# pytype static type analyzer
153+
.pytype/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161+
# and can be added to the global gitignore or merged into this file. For a more nuclear
162+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163+
#.idea/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 MrClock
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# I-man
2+
3+
[![PyPI - Version](https://img.shields.io/pypi/v/instrumentman)](https://pypi.org/project/instrumentman/)
4+
[![Python Version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FMrClock8163%2FInstrumentman%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)](https://pypi.org/project/instrumentman/)
5+
[![MIT](https://img.shields.io/github/license/mrclock8163/instrumentman)](https://opensource.org/license/mit)
6+
[![Typed](https://img.shields.io/pypi/types/geocompy)](https://pypi.org/project/geocompy/)
7+
8+
Instrumentman (or I-man for short) is a Python CLI package, that is a
9+
collection of automated measurement programs and related utilities for
10+
surveying instruments (mainly Leica robotic total stations).
11+
12+
- **Download:** https://pypi.org/project/instrumentman/
13+
- **Documentation:** https://instrumentman.readthedocs.io/
14+
- **Source:** https://github.com/MrClock8163/Instrumentman
15+
- **Bug reports:** https://github.com/MrClock8163/Instrumentman/issues
16+
17+
## Main features
18+
19+
- Pure Python implementation
20+
- Support for type checkers
21+
- Command line applications
22+
23+
## Requirements
24+
25+
To use the package, Python 3.11 or higher is required.
26+
27+
I-man relies on the
28+
[GeoComPy](https://github.com/MrClock8163/GeoComPy) package for the
29+
implementation of the various remote command protocols.
30+
31+
The individual commands require a number of other packages for command line
32+
argument parsing, JSON manipulation, calculations and other functions.
33+
34+
## Installation
35+
36+
The preferred method to install I-man is through PyPI, where both wheel
37+
and source distributions are made available.
38+
39+
```shell
40+
python -m pip install instrumentman
41+
```
42+
43+
If not yet published changes/fixes are needed, that are only available in
44+
source, I-man can also be installed locally from source, without any
45+
external tools. Once the repository is cloned to a directory, it can be
46+
installed with pip.
47+
48+
```shell
49+
git clone https://github.com/MrClock8163/Instrumentman.git
50+
cd Instrumentman
51+
python -m pip install .
52+
```
53+
54+
## License
55+
56+
I-man is free and open source software, and it is distributed under the terms of the
57+
[MIT License](https://opensource.org/license/mit).

0 commit comments

Comments
 (0)