picometer 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {picometer-0.1.0 → picometer-0.1.1}/PKG-INFO +59 -30
- {picometer-0.1.0 → picometer-0.1.1}/README.md +58 -29
- picometer-0.1.1/picometer/__main__.py +29 -0
- {picometer-0.1.0 → picometer-0.1.1}/pyproject.toml +11 -7
- {picometer-0.1.0 → picometer-0.1.1}/LICENSE +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/__init__.py +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/atom.py +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/models.py +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/process.py +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/routine.py +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/settings.py +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/settings.yaml +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/shapes.py +0 -0
- {picometer-0.1.0 → picometer-0.1.1}/picometer/utility.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: picometer
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Precisely define and calculate measurements across multiple crystal structures
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Daniel Tchoń
|
|
@@ -19,22 +19,33 @@ Description-Content-Type: text/markdown
|
|
|
19
19
|
|
|
20
20
|
# picometer
|
|
21
21
|
|
|
22
|
+
[](https://pypi.org/project/picometer/)
|
|
23
|
+
[](https://www.python.org/downloads/)
|
|
22
24
|
[](https://codecov.io/gh/Baharis/picometer)
|
|
23
25
|
[](https://www.codefactor.io/repository/github/baharis/picometer)
|
|
24
26
|
[](https://picometer.readthedocs.io/en/stable/?badge=stable)
|
|
27
|
+
[](https://gitmoji.dev)
|
|
28
|
+
[](https://github.com/Baharis/picometer/actions/workflows/ci-cd.yml)
|
|
29
|
+
|
|
30
|
+
Picometer is a Python 3.10+ package which allows to define
|
|
31
|
+
and calculate various metrics across multiple crystal structures
|
|
32
|
+
in a clear and reproducible fashion.
|
|
33
|
+
It is supposed to be used in tandem with a GUI program
|
|
34
|
+
such as [Mercury](https://www.ccdc.cam.ac.uk/solutions/software/mercury/)
|
|
35
|
+
or [Olex2](https://www.olexsys.org/olex2/)
|
|
36
|
+
and applied on a series of cif files with consistent labelling.
|
|
25
37
|
|
|
26
|
-
This is a little Python 3.10+ suite which aims to precisely define
|
|
27
|
-
and calculate measurements across multiple crystal structures.
|
|
28
38
|
This is a software for you if you have ever:
|
|
29
|
-
- Misclicked
|
|
30
|
-
- Tried to fit or calculate
|
|
39
|
+
- Misclicked and lost your 250-atom selection,
|
|
40
|
+
- Tried to fit or calculate metrics for any plane or line,
|
|
31
41
|
- Spent a day measuring distances and angles in tens of similar structures,
|
|
32
|
-
- Had to redo measurements because of
|
|
42
|
+
- Had to redo measurements because of an offensively minor change,
|
|
33
43
|
|
|
34
|
-
Instead of relying on a graphical interface
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
The results are output in a form
|
|
44
|
+
Instead of relying on a graphical interface, picometer reads settings
|
|
45
|
+
and instructions from an input [`.yaml`](https://en.wikipedia.org/wiki/YAML)
|
|
46
|
+
file to probe one or many consistently-named structures concurrently.
|
|
47
|
+
The results are output in a form
|
|
48
|
+
of a [`.csv`](https://en.wikipedia.org/wiki/Comma-separated_values) file,
|
|
38
49
|
which can be then opened in a spreadsheet editor for further analysis.
|
|
39
50
|
Because of that, picometer is a handy tool to save time
|
|
40
51
|
on dumb repeatable labor and focus on what really matters.
|
|
@@ -42,16 +53,26 @@ on dumb repeatable labor and focus on what really matters.
|
|
|
42
53
|
|
|
43
54
|
## Installation
|
|
44
55
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
If you are installing python solely to run picometer or are not concerned
|
|
57
|
+
about introducing additional dependencies,
|
|
58
|
+
installing picometer is as simple as running:
|
|
59
|
+
```commandline
|
|
60
|
+
pip install picometer
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
However, it is advised to install picometer in a designated
|
|
64
|
+
[virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments).
|
|
65
|
+
This is best achieved by following the linked instructions,
|
|
66
|
+
but can be otherwise summarised as follows:
|
|
67
|
+
1) Make sure you have Python 3.10+ installed:
|
|
68
|
+
`python --version`
|
|
69
|
+
2) Create a virtual environment using i.e. venv:
|
|
49
70
|
`python -m venv /path/to/virtual_environment`
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
`source /path/to/virtual_environment`
|
|
53
|
-
|
|
54
|
-
|
|
71
|
+
3) Activate your virtual environment:
|
|
72
|
+
- Windows: `\path\to\virtual_environment\Scripts\activate`
|
|
73
|
+
- Unix/macOS: `source /path/to/virtual_environment/bin/activate`
|
|
74
|
+
4) Install `picometer` and its dependencies: `pip install picometer`
|
|
75
|
+
|
|
55
76
|
|
|
56
77
|
The code is currently updated with an intention to be available for download
|
|
57
78
|
directly from pip:
|
|
@@ -67,7 +88,7 @@ created during installation following instructions therein.
|
|
|
67
88
|
Running the program with no arguments produces the help string.
|
|
68
89
|
|
|
69
90
|
```shell
|
|
70
|
-
python
|
|
91
|
+
python -m picometer
|
|
71
92
|
```
|
|
72
93
|
```text
|
|
73
94
|
usage: picometer [-h] filename
|
|
@@ -83,12 +104,15 @@ options:
|
|
|
83
104
|
Author: Daniel Tchoń, baharis @ GitHub
|
|
84
105
|
```
|
|
85
106
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
107
|
+
Picometer inputs its settings and instructions from an input
|
|
108
|
+
[`.yaml`](https://en.wikipedia.org/wiki/YAML) file.
|
|
109
|
+
The file can contain a dictionary of `settings`,
|
|
110
|
+
as well as a list of `instructions`.
|
|
111
|
+
The list of instructions, called also a "routine", must include
|
|
112
|
+
only single-element maps in the `- instruction: detail`
|
|
113
|
+
or `- instruction: {details}` format.
|
|
114
|
+
Examples of instruction files are available in the `tests` directory.
|
|
115
|
+
The easiest way to generate your file is to prepare it based
|
|
92
116
|
on the example provided.
|
|
93
117
|
|
|
94
118
|
|
|
@@ -123,15 +147,17 @@ The following instructions are currently supported by picometer:
|
|
|
123
147
|
|
|
124
148
|
## Contributing
|
|
125
149
|
|
|
126
|
-
Interested in contributing? Check out the
|
|
127
|
-
|
|
150
|
+
Interested in contributing? Check out the
|
|
151
|
+
[contributing guidelines](CONTRIBUTING.md).
|
|
152
|
+
Please note that this project is released with
|
|
153
|
+
a [Code of Conduct](CONDUCT.md).
|
|
128
154
|
By contributing to this project, you agree to abide by its terms.
|
|
129
155
|
|
|
130
156
|
|
|
131
157
|
## License
|
|
132
158
|
|
|
133
159
|
`picometer` was created by Daniel Tchoń.
|
|
134
|
-
It is licensed under the terms of the MIT license.
|
|
160
|
+
It is licensed under the terms of the [MIT license](LICENSE).
|
|
135
161
|
|
|
136
162
|
|
|
137
163
|
## Credits
|
|
@@ -144,5 +170,8 @@ All contributions and suggestions are heartily welcome!
|
|
|
144
170
|
`picometer` was created with the help of
|
|
145
171
|
[`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/)
|
|
146
172
|
and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
|
|
147
|
-
It is published with the help of
|
|
173
|
+
It is published with the help of
|
|
174
|
+
[`poetry`](https://python-poetry.org/),
|
|
175
|
+
[Python Semantic Versioning](https://python-semantic-release.readthedocs.io/en/latest/),
|
|
176
|
+
and [Gitmoji](https://gitmoji.dev/).
|
|
148
177
|
|
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
# picometer
|
|
2
2
|
|
|
3
|
+
[](https://pypi.org/project/picometer/)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
3
5
|
[](https://codecov.io/gh/Baharis/picometer)
|
|
4
6
|
[](https://www.codefactor.io/repository/github/baharis/picometer)
|
|
5
7
|
[](https://picometer.readthedocs.io/en/stable/?badge=stable)
|
|
8
|
+
[](https://gitmoji.dev)
|
|
9
|
+
[](https://github.com/Baharis/picometer/actions/workflows/ci-cd.yml)
|
|
10
|
+
|
|
11
|
+
Picometer is a Python 3.10+ package which allows to define
|
|
12
|
+
and calculate various metrics across multiple crystal structures
|
|
13
|
+
in a clear and reproducible fashion.
|
|
14
|
+
It is supposed to be used in tandem with a GUI program
|
|
15
|
+
such as [Mercury](https://www.ccdc.cam.ac.uk/solutions/software/mercury/)
|
|
16
|
+
or [Olex2](https://www.olexsys.org/olex2/)
|
|
17
|
+
and applied on a series of cif files with consistent labelling.
|
|
6
18
|
|
|
7
|
-
This is a little Python 3.10+ suite which aims to precisely define
|
|
8
|
-
and calculate measurements across multiple crystal structures.
|
|
9
19
|
This is a software for you if you have ever:
|
|
10
|
-
- Misclicked
|
|
11
|
-
- Tried to fit or calculate
|
|
20
|
+
- Misclicked and lost your 250-atom selection,
|
|
21
|
+
- Tried to fit or calculate metrics for any plane or line,
|
|
12
22
|
- Spent a day measuring distances and angles in tens of similar structures,
|
|
13
|
-
- Had to redo measurements because of
|
|
23
|
+
- Had to redo measurements because of an offensively minor change,
|
|
14
24
|
|
|
15
|
-
Instead of relying on a graphical interface
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
The results are output in a form
|
|
25
|
+
Instead of relying on a graphical interface, picometer reads settings
|
|
26
|
+
and instructions from an input [`.yaml`](https://en.wikipedia.org/wiki/YAML)
|
|
27
|
+
file to probe one or many consistently-named structures concurrently.
|
|
28
|
+
The results are output in a form
|
|
29
|
+
of a [`.csv`](https://en.wikipedia.org/wiki/Comma-separated_values) file,
|
|
19
30
|
which can be then opened in a spreadsheet editor for further analysis.
|
|
20
31
|
Because of that, picometer is a handy tool to save time
|
|
21
32
|
on dumb repeatable labor and focus on what really matters.
|
|
@@ -23,16 +34,26 @@ on dumb repeatable labor and focus on what really matters.
|
|
|
23
34
|
|
|
24
35
|
## Installation
|
|
25
36
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
If you are installing python solely to run picometer or are not concerned
|
|
38
|
+
about introducing additional dependencies,
|
|
39
|
+
installing picometer is as simple as running:
|
|
40
|
+
```commandline
|
|
41
|
+
pip install picometer
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
However, it is advised to install picometer in a designated
|
|
45
|
+
[virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments).
|
|
46
|
+
This is best achieved by following the linked instructions,
|
|
47
|
+
but can be otherwise summarised as follows:
|
|
48
|
+
1) Make sure you have Python 3.10+ installed:
|
|
49
|
+
`python --version`
|
|
50
|
+
2) Create a virtual environment using i.e. venv:
|
|
30
51
|
`python -m venv /path/to/virtual_environment`
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`source /path/to/virtual_environment`
|
|
34
|
-
|
|
35
|
-
|
|
52
|
+
3) Activate your virtual environment:
|
|
53
|
+
- Windows: `\path\to\virtual_environment\Scripts\activate`
|
|
54
|
+
- Unix/macOS: `source /path/to/virtual_environment/bin/activate`
|
|
55
|
+
4) Install `picometer` and its dependencies: `pip install picometer`
|
|
56
|
+
|
|
36
57
|
|
|
37
58
|
The code is currently updated with an intention to be available for download
|
|
38
59
|
directly from pip:
|
|
@@ -48,7 +69,7 @@ created during installation following instructions therein.
|
|
|
48
69
|
Running the program with no arguments produces the help string.
|
|
49
70
|
|
|
50
71
|
```shell
|
|
51
|
-
python
|
|
72
|
+
python -m picometer
|
|
52
73
|
```
|
|
53
74
|
```text
|
|
54
75
|
usage: picometer [-h] filename
|
|
@@ -64,12 +85,15 @@ options:
|
|
|
64
85
|
Author: Daniel Tchoń, baharis @ GitHub
|
|
65
86
|
```
|
|
66
87
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
88
|
+
Picometer inputs its settings and instructions from an input
|
|
89
|
+
[`.yaml`](https://en.wikipedia.org/wiki/YAML) file.
|
|
90
|
+
The file can contain a dictionary of `settings`,
|
|
91
|
+
as well as a list of `instructions`.
|
|
92
|
+
The list of instructions, called also a "routine", must include
|
|
93
|
+
only single-element maps in the `- instruction: detail`
|
|
94
|
+
or `- instruction: {details}` format.
|
|
95
|
+
Examples of instruction files are available in the `tests` directory.
|
|
96
|
+
The easiest way to generate your file is to prepare it based
|
|
73
97
|
on the example provided.
|
|
74
98
|
|
|
75
99
|
|
|
@@ -104,15 +128,17 @@ The following instructions are currently supported by picometer:
|
|
|
104
128
|
|
|
105
129
|
## Contributing
|
|
106
130
|
|
|
107
|
-
Interested in contributing? Check out the
|
|
108
|
-
|
|
131
|
+
Interested in contributing? Check out the
|
|
132
|
+
[contributing guidelines](CONTRIBUTING.md).
|
|
133
|
+
Please note that this project is released with
|
|
134
|
+
a [Code of Conduct](CONDUCT.md).
|
|
109
135
|
By contributing to this project, you agree to abide by its terms.
|
|
110
136
|
|
|
111
137
|
|
|
112
138
|
## License
|
|
113
139
|
|
|
114
140
|
`picometer` was created by Daniel Tchoń.
|
|
115
|
-
It is licensed under the terms of the MIT license.
|
|
141
|
+
It is licensed under the terms of the [MIT license](LICENSE).
|
|
116
142
|
|
|
117
143
|
|
|
118
144
|
## Credits
|
|
@@ -125,4 +151,7 @@ All contributions and suggestions are heartily welcome!
|
|
|
125
151
|
`picometer` was created with the help of
|
|
126
152
|
[`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/)
|
|
127
153
|
and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
|
|
128
|
-
It is published with the help of
|
|
154
|
+
It is published with the help of
|
|
155
|
+
[`poetry`](https://python-poetry.org/),
|
|
156
|
+
[Python Semantic Versioning](https://python-semantic-release.readthedocs.io/en/latest/),
|
|
157
|
+
and [Gitmoji](https://gitmoji.dev/).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from argparse import ArgumentParser, Namespace
|
|
2
|
+
from picometer.routine import Routine
|
|
3
|
+
from picometer.process import process
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def parse_args() -> Namespace:
|
|
8
|
+
"""Parse provided arguments if program was run directly from the CLI"""
|
|
9
|
+
desc = 'Precisely define and measure across multiple crystal structures'
|
|
10
|
+
author = 'Author: Daniel Tchoń, baharis @ GitHub'
|
|
11
|
+
ap = ArgumentParser(prog='picometer', description=desc, epilog=author)
|
|
12
|
+
ap.add_argument('filename', help='Path to yaml file with routine '
|
|
13
|
+
'settings and instructions')
|
|
14
|
+
if len(sys.argv) == 1:
|
|
15
|
+
ap.print_help(sys.stderr)
|
|
16
|
+
sys.exit(1)
|
|
17
|
+
return ap.parse_args()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main() -> int:
|
|
21
|
+
args = parse_args()
|
|
22
|
+
if filename := args.filename:
|
|
23
|
+
routine = Routine.from_yaml(filename)
|
|
24
|
+
process(routine)
|
|
25
|
+
return 0
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
if __name__ == '__main__':
|
|
29
|
+
sys.exit(main())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "picometer"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.1"
|
|
4
4
|
description = "Precisely define and calculate measurements across multiple crystal structures"
|
|
5
5
|
authors = ["Daniel Tchoń"]
|
|
6
6
|
license = "MIT"
|
|
@@ -25,14 +25,18 @@ myst-nb = {version = ">=1.1.2", python = ">=3.10"}
|
|
|
25
25
|
sphinx-autoapi = ">=3.3.2"
|
|
26
26
|
sphinx-rtd-theme = ">=3.0.1"
|
|
27
27
|
jupyter = ">=1.1.0"
|
|
28
|
+
python-semantic-release = {version = "^9.11.1", python = "^3.10"}
|
|
28
29
|
|
|
29
30
|
[tool.semantic_release]
|
|
30
|
-
version_toml = [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
version_toml = ["pyproject.toml:tool.poetry.version", ] # version location
|
|
32
|
+
branch = "master" # branch to make releases of
|
|
33
|
+
changelog_file = "CHANGELOG.md" # changelog file
|
|
34
|
+
build_command = "pip install poetry && poetry build" # build dists
|
|
35
|
+
commit_parser = "emoji" # default EmojiCommitParser
|
|
36
|
+
|
|
37
|
+
[tool.semantic_release.branches]
|
|
38
|
+
master = { publish = true } # Stable release branch (master)
|
|
39
|
+
development = { publish = false } # Used for version checking only
|
|
36
40
|
|
|
37
41
|
[build-system]
|
|
38
42
|
requires = ["poetry-core>=1.0.0"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|