chemql-python 1.2.5__tar.gz → 1.2.6__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.
- {chemql_python-1.2.5/src/chemql_python.egg-info → chemql_python-1.2.6}/PKG-INFO +6 -6
- {chemql_python-1.2.5 → chemql_python-1.2.6}/README.md +5 -5
- {chemql_python-1.2.5 → chemql_python-1.2.6}/pyproject.toml +1 -1
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/__init__.py +11 -3
- {chemql_python-1.2.5 → chemql_python-1.2.6/src/chemql_python.egg-info}/PKG-INFO +6 -6
- {chemql_python-1.2.5 → chemql_python-1.2.6}/LICENSE +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/setup.cfg +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/__main__.py +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/data/BondEnergies.json +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/data/MoleculeBonds.json +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/data/Molecules.json +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/data/PeriodicTableJSON.json +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/data/Reactions.json +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/data/THIRD_PARTY_LICENSES/PeriodicTableJSON.txt +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/data/THIRD_PARTY_LICENSES/RHEA.txt +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql/html/periodic_table.html +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql_python.egg-info/SOURCES.txt +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql_python.egg-info/dependency_links.txt +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql_python.egg-info/entry_points.txt +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql_python.egg-info/requires.txt +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/src/chemql_python.egg-info/top_level.txt +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/tests/test_external_molecule_lookup.py +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/tests/test_public_api.py +0 -0
- {chemql_python-1.2.5 → chemql_python-1.2.6}/tests/test_reactions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chemql-python
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.6
|
|
4
4
|
Summary: A chemistry-focused query language and REPL
|
|
5
5
|
Author-email: Mohammad Rakibul Islam <rakibulofficial1017@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -17,15 +17,15 @@ Dynamic: license-file
|
|
|
17
17
|
shell commands in one interactive environment.**
|
|
18
18
|
|
|
19
19
|
ChemQL is a command-line chemistry query language for exploring chemical
|
|
20
|
-
elements, molecules, and reactions. Version 1.2.
|
|
20
|
+
elements, molecules, and reactions. Version 1.2.6 combines database-style
|
|
21
21
|
chemistry queries, reaction tools, Python interoperability, reusable functions
|
|
22
22
|
and macros, and a persistent shell in one scriptable environment. It combines a small SQL-inspired
|
|
23
23
|
query syntax with a persistent Python environment, reaction utilities,
|
|
24
24
|
optional external molecule lookup, and tools for running repeatable
|
|
25
25
|
scripts.
|
|
26
26
|
|
|
27
|
-
> **Version covered by this README:** 1.2.
|
|
28
|
-
> The examples below describe the ChemQL 1.2.
|
|
27
|
+
> **Version covered by this README:** 1.2.6\
|
|
28
|
+
> The examples below describe the ChemQL 1.2.6 source. Dataset
|
|
29
29
|
> contents and external-service availability can affect individual
|
|
30
30
|
> lookup results.
|
|
31
31
|
|
|
@@ -538,7 +538,7 @@ queried or inspected from Python.
|
|
|
538
538
|
|
|
539
539
|
## Preprocessor, functions, and macros
|
|
540
540
|
|
|
541
|
-
ChemQL 1.2.
|
|
541
|
+
ChemQL 1.2.6 adds three ways to reuse values and logic. These declarations
|
|
542
542
|
are processed in source order: definitions affect later lines, not earlier
|
|
543
543
|
ones. They persist during the current ChemQL process/session; they are not
|
|
544
544
|
saved automatically between separate launches.
|
|
@@ -833,7 +833,7 @@ redirect a file into the command.
|
|
|
833
833
|
``` bash
|
|
834
834
|
chemql --version
|
|
835
835
|
chemql --upgrade
|
|
836
|
-
chemql --upgrade 1.2.
|
|
836
|
+
chemql --upgrade 1.2.6
|
|
837
837
|
```
|
|
838
838
|
|
|
839
839
|
`--upgrade` installs the latest published `chemql-python` release; supplying a
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
shell commands in one interactive environment.**
|
|
5
5
|
|
|
6
6
|
ChemQL is a command-line chemistry query language for exploring chemical
|
|
7
|
-
elements, molecules, and reactions. Version 1.2.
|
|
7
|
+
elements, molecules, and reactions. Version 1.2.6 combines database-style
|
|
8
8
|
chemistry queries, reaction tools, Python interoperability, reusable functions
|
|
9
9
|
and macros, and a persistent shell in one scriptable environment. It combines a small SQL-inspired
|
|
10
10
|
query syntax with a persistent Python environment, reaction utilities,
|
|
11
11
|
optional external molecule lookup, and tools for running repeatable
|
|
12
12
|
scripts.
|
|
13
13
|
|
|
14
|
-
> **Version covered by this README:** 1.2.
|
|
15
|
-
> The examples below describe the ChemQL 1.2.
|
|
14
|
+
> **Version covered by this README:** 1.2.6\
|
|
15
|
+
> The examples below describe the ChemQL 1.2.6 source. Dataset
|
|
16
16
|
> contents and external-service availability can affect individual
|
|
17
17
|
> lookup results.
|
|
18
18
|
|
|
@@ -525,7 +525,7 @@ queried or inspected from Python.
|
|
|
525
525
|
|
|
526
526
|
## Preprocessor, functions, and macros
|
|
527
527
|
|
|
528
|
-
ChemQL 1.2.
|
|
528
|
+
ChemQL 1.2.6 adds three ways to reuse values and logic. These declarations
|
|
529
529
|
are processed in source order: definitions affect later lines, not earlier
|
|
530
530
|
ones. They persist during the current ChemQL process/session; they are not
|
|
531
531
|
saved automatically between separate launches.
|
|
@@ -820,7 +820,7 @@ redirect a file into the command.
|
|
|
820
820
|
``` bash
|
|
821
821
|
chemql --version
|
|
822
822
|
chemql --upgrade
|
|
823
|
-
chemql --upgrade 1.2.
|
|
823
|
+
chemql --upgrade 1.2.6
|
|
824
824
|
```
|
|
825
825
|
|
|
826
826
|
`--upgrade` installs the latest published `chemql-python` release; supplying a
|
|
@@ -47,7 +47,7 @@ __all__ = [
|
|
|
47
47
|
"__version__"
|
|
48
48
|
]
|
|
49
49
|
|
|
50
|
-
__version__ = "1.2.
|
|
50
|
+
__version__ = "1.2.6"
|
|
51
51
|
|
|
52
52
|
# Persistent preprocessor/function state for the current ChemQL session.
|
|
53
53
|
DEFINITIONS = {}
|
|
@@ -222,11 +222,19 @@ def _call_function(name, arguments):
|
|
|
222
222
|
|
|
223
223
|
code = line[1:-1].strip()
|
|
224
224
|
|
|
225
|
+
# Function parameters must also be substituted in block
|
|
226
|
+
# headers, e.g. [for i in range(2, \1 + 1)].
|
|
227
|
+
resolved_header = (
|
|
228
|
+
"["
|
|
229
|
+
+ _expand_definitions(substitute_parameters(code))
|
|
230
|
+
+ "]"
|
|
231
|
+
)
|
|
232
|
+
|
|
225
233
|
if code.startswith("for "):
|
|
226
|
-
execute_for_block(
|
|
234
|
+
execute_for_block(resolved_header, block_body)
|
|
227
235
|
|
|
228
236
|
elif code.startswith("while "):
|
|
229
|
-
execute_while_block(
|
|
237
|
+
execute_while_block(resolved_header, block_body)
|
|
230
238
|
|
|
231
239
|
elif code.startswith("if "):
|
|
232
240
|
# Expand parameters and definitions before evaluating.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chemql-python
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.6
|
|
4
4
|
Summary: A chemistry-focused query language and REPL
|
|
5
5
|
Author-email: Mohammad Rakibul Islam <rakibulofficial1017@gmail.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -17,15 +17,15 @@ Dynamic: license-file
|
|
|
17
17
|
shell commands in one interactive environment.**
|
|
18
18
|
|
|
19
19
|
ChemQL is a command-line chemistry query language for exploring chemical
|
|
20
|
-
elements, molecules, and reactions. Version 1.2.
|
|
20
|
+
elements, molecules, and reactions. Version 1.2.6 combines database-style
|
|
21
21
|
chemistry queries, reaction tools, Python interoperability, reusable functions
|
|
22
22
|
and macros, and a persistent shell in one scriptable environment. It combines a small SQL-inspired
|
|
23
23
|
query syntax with a persistent Python environment, reaction utilities,
|
|
24
24
|
optional external molecule lookup, and tools for running repeatable
|
|
25
25
|
scripts.
|
|
26
26
|
|
|
27
|
-
> **Version covered by this README:** 1.2.
|
|
28
|
-
> The examples below describe the ChemQL 1.2.
|
|
27
|
+
> **Version covered by this README:** 1.2.6\
|
|
28
|
+
> The examples below describe the ChemQL 1.2.6 source. Dataset
|
|
29
29
|
> contents and external-service availability can affect individual
|
|
30
30
|
> lookup results.
|
|
31
31
|
|
|
@@ -538,7 +538,7 @@ queried or inspected from Python.
|
|
|
538
538
|
|
|
539
539
|
## Preprocessor, functions, and macros
|
|
540
540
|
|
|
541
|
-
ChemQL 1.2.
|
|
541
|
+
ChemQL 1.2.6 adds three ways to reuse values and logic. These declarations
|
|
542
542
|
are processed in source order: definitions affect later lines, not earlier
|
|
543
543
|
ones. They persist during the current ChemQL process/session; they are not
|
|
544
544
|
saved automatically between separate launches.
|
|
@@ -833,7 +833,7 @@ redirect a file into the command.
|
|
|
833
833
|
``` bash
|
|
834
834
|
chemql --version
|
|
835
835
|
chemql --upgrade
|
|
836
|
-
chemql --upgrade 1.2.
|
|
836
|
+
chemql --upgrade 1.2.6
|
|
837
837
|
```
|
|
838
838
|
|
|
839
839
|
`--upgrade` installs the latest published `chemql-python` release; supplying a
|
|
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
|
|
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
|