finalcif 158__tar.gz → 160__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.
- finalcif-160/.githooks/pre-push +39 -0
- {finalcif-158 → finalcif-160}/.run/compile_ui_files.run.xml +1 -1
- finalcif-160/AGENTS.md +58 -0
- {finalcif-158 → finalcif-160}/PKG-INFO +7 -7
- {finalcif-158 → finalcif-160}/README.md +4 -4
- finalcif-160/finalcif/__init__.py +3 -0
- {finalcif-158 → finalcif-160}/finalcif/appwindow.py +200 -142
- {finalcif-158 → finalcif-160}/finalcif/cif/checkcif/checkcif.py +25 -22
- {finalcif-158 → finalcif-160}/finalcif/cif/cif_file_io.py +16 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/text.py +86 -51
- finalcif-160/finalcif/cif/vrf_entry.py +92 -0
- {finalcif-158 → finalcif-160}/finalcif/equip_property/author_loop_templates.py +92 -15
- {finalcif-158 → finalcif-160}/finalcif/equip_property/equipment.py +73 -1
- {finalcif-158 → finalcif-160}/finalcif/equip_property/properties.py +60 -1
- {finalcif-158 → finalcif-160}/finalcif/gui/cif_table_view.py +16 -1
- {finalcif-158 → finalcif-160}/finalcif/gui/finalcif_gui_ui.py +21 -78
- {finalcif-158 → finalcif-160}/finalcif/gui/finalcif_gui_ui.ui +19 -136
- {finalcif-158 → finalcif-160}/finalcif/gui/import_selector.py +3 -2
- {finalcif-158 → finalcif-160}/finalcif/gui/loop_creator.py +3 -0
- finalcif-160/finalcif/gui/loops.py +555 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/vrf_classes.py +72 -75
- {finalcif-158 → finalcif-160}/finalcif/report/templated_report.py +112 -13
- finalcif-160/finalcif/template/report.tex +240 -0
- {finalcif-158 → finalcif-160}/finalcif/template/report.tmpl +4 -3
- finalcif-160/finalcif/template/report2.tex +249 -0
- finalcif-160/finalcif/template/report_default.docx +0 -0
- finalcif-160/finalcif/template/template_text.docx +0 -0
- finalcif-160/finalcif/template/template_without_text.docx +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/templates.py +4 -3
- finalcif-160/finalcif/template/unicode2latex/FakePlasTeX/FakeContext.py +77 -0
- finalcif-160/finalcif/template/unicode2latex/FakePlasTeX/FakeTokenizer.py +493 -0
- finalcif-160/finalcif/template/unicode2latex/FakePlasTeX/README.md +4 -0
- finalcif-160/finalcif/template/unicode2latex/FakePlasTeX/TokenizerPassThru.py +190 -0
- finalcif-160/finalcif/template/unicode2latex/LICENSE +25 -0
- finalcif-160/finalcif/template/unicode2latex/u2l.py +647 -0
- finalcif-160/finalcif/template/unicode2latex/unicode-math-table.tex +2469 -0
- finalcif-160/finalcif/template/unicode2latex/unicode-math-xetex.sty +3882 -0
- {finalcif-158 → finalcif-160}/finalcif/template/xsl/convert.py +24 -2
- finalcif-160/finalcif/template/xsl/xmltolatex.xsl +85 -0
- finalcif-160/finalcif/tools/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/options.py +12 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/settings.py +27 -1
- {finalcif-158 → finalcif-160}/finalcif/tools/space_groups.py +21 -0
- {finalcif-158 → finalcif-160}/pyproject.toml +3 -3
- finalcif-160/screenshots/loops_column_buttons.png +0 -0
- {finalcif-158 → finalcif-160}/uv.lock +101 -85
- finalcif-158/AGENTS.md +0 -31
- finalcif-158/finalcif/__init__.py +0 -2
- finalcif-158/finalcif/gui/loops.py +0 -332
- finalcif-158/finalcif/template/report_default.docx +0 -0
- finalcif-158/finalcif/template/template_text.docx +0 -0
- finalcif-158/finalcif/template/template_without_text.docx +0 -0
- {finalcif-158 → finalcif-160}/.gitattributes +0 -0
- {finalcif-158 → finalcif-160}/.gitignore +0 -0
- {finalcif-158 → finalcif-160}/.python-version +0 -0
- {finalcif-158 → finalcif-160}/.ruff.toml +0 -0
- {finalcif-158 → finalcif-160}/.run/Make Documentation MAC.run.xml +0 -0
- {finalcif-158 → finalcif-160}/.run/make documentation Windows.run.xml +0 -0
- {finalcif-158 → finalcif-160}/CODE_OF_CONDUCT.md +0 -0
- {finalcif-158 → finalcif-160}/CONTRIBUTING.md +0 -0
- {finalcif-158 → finalcif-160}/Finalcif_installer_win.spec +0 -0
- {finalcif-158 → finalcif-160}/Finalcif_linux_onefile.spec +0 -0
- {finalcif-158 → finalcif-160}/Finalcif_mac.spec +0 -0
- {finalcif-158 → finalcif-160}/LICENSE +0 -0
- {finalcif-158 → finalcif-160}/finalcif/app_path.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/all_cif_dicts.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/atoms.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/checkcif/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cif_dict_foo.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cif_order.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cod/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cod/deposit.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cod/deposit_check.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cod/deposition_list.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cod/doi.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cod/upload.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/cod/website_parser.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/core_dict.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/hkl.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/modulation_dict.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/powder_dict.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/reference.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/restraints_dict.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/cif/twin_dict.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/ciforder/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/ciforder/order.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/ciforder/order_ui.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/ciforder/order_ui.ui +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/bruker_data.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/bruker_frame.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/ccdc_mail.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/data.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/p4p_reader.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/sadabs.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/saint.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/shelx_lst.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/datafiles/utils.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/displaymol/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/displaymol/vtk_molecule.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/equip_property/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/equip_property/tools.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/finalcif_start.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/block_combobox.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/cif_table_model.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/combobox.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/custom_classes.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/dialogs.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/edit_button.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/equipmenttable.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/file_editor.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/import_selector_ui.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/import_selector_ui.ui +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/loop_creator_ui.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/loop_creator_ui.ui +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/mainstackwidget.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/mixins.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/new_key_dialog.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/new_key_dialog_ui.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/new_key_dialog_ui.ui +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/plaintextedit.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/playground.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/propertytable.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/spell_check_edit.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/syntax_highlighter.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/text_templates_ui.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/text_templates_ui.ui +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/text_value_editor.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/validators.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/gui/vzs_viewer.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/icon/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/icon/finalcif.png +0 -0
- {finalcif-158 → finalcif-160}/finalcif/icon/finalcif2.ico +0 -0
- {finalcif-158 → finalcif-160}/finalcif/icon/finalcif2.png +0 -0
- {finalcif-158 → finalcif-160}/finalcif/icon/multitable.ico +0 -0
- {finalcif-158 → finalcif-160}/finalcif/icon/multitable.png +0 -0
- {finalcif-158 → finalcif-160}/finalcif/icon/multitable.xcf +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/archive_report.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/gui/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/gui/mainwindow.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/gui/mainwindow.ui +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/mtools.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/references.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/report_text.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/symm.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/report/tables.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/bootstrap/bootstrap.min.css +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/machines/D8_VENTURE.cif +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/mathml2omml.xsl +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/template1.docx +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/template_for_multitable.docx +0 -0
- {finalcif-158/finalcif/tools → finalcif-160/finalcif/template/unicode2latex}/__init__.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/template/xsl/xmltohtml.xsl +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/chemparse.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/download.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/dsrmath.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/misc.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/platon.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/pupdate.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/shred.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/spgr_format.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/statusbar.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif/tools/sumformula.py +0 -0
- {finalcif-158 → finalcif-160}/finalcif.exe +0 -0
- {finalcif-158 → finalcif-160}/platon/README.txt +0 -0
- {finalcif-158 → finalcif-160}/platon/compile_platon.bat +0 -0
- {finalcif-158 → finalcif-160}/platon/platon_special.exe +0 -0
- {finalcif-158 → finalcif-160}/platon/platon_special.f +0 -0
- {finalcif-158 → finalcif-160}/pylock.toml +0 -0
- {finalcif-158 → finalcif-160}/run_finalcif +0 -0
- {finalcif-158 → finalcif-160}/run_finalcif.bat +0 -0
- {finalcif-158 → finalcif-160}/screenshots/finalcif_checkcif.png +0 -0
- {finalcif-158 → finalcif-160}/screenshots/finalcif_details.png +0 -0
- {finalcif-158 → finalcif-160}/screenshots/finalcif_loops.png +0 -0
- {finalcif-158 → finalcif-160}/screenshots/finalcif_loops2.png +0 -0
- {finalcif-158 → finalcif-160}/screenshots/finalcif_main.png +0 -0
- {finalcif-158 → finalcif-160}/screenshots/finalcif_report.png +0 -0
- {finalcif-158 → finalcif-160}/screenshots/finalcif_responses.png +0 -0
- {finalcif-158 → finalcif-160}/update.exe +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# pre-push hook: rejects pushing a version tag whose version
|
|
3
|
+
# does not match VERSION in finalcif/__init__.py.
|
|
4
|
+
#
|
|
5
|
+
# Activate with:
|
|
6
|
+
# git config core.hooksPath .githooks
|
|
7
|
+
|
|
8
|
+
INIT_FILE="finalcif/__init__.py"
|
|
9
|
+
|
|
10
|
+
# Extract VERSION from source (pure shell, no Python dependency)
|
|
11
|
+
get_source_version() {
|
|
12
|
+
grep -m1 '^VERSION' "$INIT_FILE" | sed 's/^VERSION[[:space:]]*=[[:space:]]*\([0-9]*\).*/\1/'
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
# Read stdin for refs being pushed
|
|
16
|
+
while read -r local_ref local_sha remote_ref remote_sha; do
|
|
17
|
+
# Only check version tags (refs/tags/*)
|
|
18
|
+
if [[ "$local_ref" == refs/tags/* ]]; then
|
|
19
|
+
tag_version="${local_ref#refs/tags/}"
|
|
20
|
+
tag_version="${tag_version#v}" # remove leading v if any
|
|
21
|
+
|
|
22
|
+
# Only process if tag is an integer
|
|
23
|
+
if [[ "$tag_version" =~ ^[0-9]+$ ]]; then
|
|
24
|
+
source_version=$(get_source_version)
|
|
25
|
+
if [ $? -ne 0 ] || [ -z "$source_version" ]; then
|
|
26
|
+
echo "ERROR: Could not extract VERSION from ${INIT_FILE}" >&2
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
if [ "$tag_version" != "$source_version" ]; then
|
|
30
|
+
echo "ERROR: Tag ${tag_version} does not match VERSION = ${source_version} in ${INIT_FILE}" >&2
|
|
31
|
+
echo "Update VERSION before tagging, or fix the tag name." >&2
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
fi
|
|
35
|
+
fi
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
exit 0
|
|
39
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<component name="ProjectRunConfigurationManager">
|
|
2
2
|
<configuration default="false" name="compile_ui_files" type="PythonConfigurationType" factoryName="Python" activateToolWindowBeforeRun="false" nameIsGenerated="true">
|
|
3
|
-
<module name="
|
|
3
|
+
<module name="finalcif" />
|
|
4
4
|
<option name="ENV_FILES" value="" />
|
|
5
5
|
<option name="INTERPRETER_OPTIONS" value="" />
|
|
6
6
|
<option name="PARENT_ENVS" value="true" />
|
finalcif-160/AGENTS.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# FinalCif AI Developer Instructions
|
|
2
|
+
|
|
3
|
+
## General Principles
|
|
4
|
+
- **No Assumptions:** If information or code is missing, ask for it. Do not make assumptions.
|
|
5
|
+
- **Refuse over Guessing:** Prefer refusing over guessing. If you don't know how to complete the code, say you don't know.
|
|
6
|
+
- **Require Specifications:** If the user asks you to write code, ask for a detailed specification first. Do not write code until you have a detailed specification.
|
|
7
|
+
- **Quality Standards:** Follow the rules of 'Refactoring' and 'Clean Code' as described by Martin Fowler and Robert C. Martin, respectively.
|
|
8
|
+
|
|
9
|
+
## Core Setup Conventions
|
|
10
|
+
- **Language/Runtime:** Use Python >=3.12 (`pyproject.toml`), with CI tested on 3.12/3.13/3.14 (`.github/workflows/python_tests.yml`).
|
|
11
|
+
- **UI Framework:** Assume PySide6. UI imports in the codebase are typically routed through `qtpy` (note that UI files are compiled locally via bindings).
|
|
12
|
+
- **Qt Binding Selection:** Set `QT_API=pyside6` before `qtpy` imports (see `finalcif/finalcif_start.py`).
|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+
- **Desktop Application:** FinalCif is a crystallographic information file (CIF) editor built with a Qt frontend.
|
|
16
|
+
- **Entry Point:** The application starts from `finalcif/finalcif_start.py` (registered as `finalcif` in `pyproject.toml`).
|
|
17
|
+
- **Main Window:** `AppWindow` (QMainWindow) in `finalcif/appwindow.py` is the orchestrator wiring all subsystems; UI defined in `finalcif/gui/finalcif_gui_ui.ui`.
|
|
18
|
+
- **Subpackage Map:**
|
|
19
|
+
- `finalcif/cif/` — CIF I/O via `gemmi.cif` wrapped in `CifContainer` (`cif_file_io.py`); dict definitions (core/powder/modulation/twin/restraints); subpackages `checkcif/` (IUCr CheckCIF HTML/PDF parsing) and `cod/` (COD/CCDC deposition: `deposit.py`, `upload.py`, `doi.py`, `website_parser.py`).
|
|
20
|
+
- `finalcif/ciforder/` — CIF key ordering dialog.
|
|
21
|
+
- `finalcif/datafiles/` — raw instrument data importers: Bruker (`bruker_data.py`, `bruker_frame.py`), SAINT, SADABS, SHELX `.lst` (`shelx_lst.py`), `.p4p`, CCDC deposition mail parser (`ccdc_mail.py`).
|
|
22
|
+
- `finalcif/displaymol/` — 3D molecular display (`vtk_molecule.py`) is not used; 2D rendering is provided by the external `fastmolwidget` package (custom widget in `finalcif_gui_ui.ui`).
|
|
23
|
+
- `finalcif/equip_property/` — Equipment/Properties/AuthorLoops template tables (`equipment.py`, `properties.py`, `author_loop_templates.py`).
|
|
24
|
+
- `finalcif/gui/` — Qt widgets; `.ui` files compiled to sibling `*_ui.py` modules.
|
|
25
|
+
- `finalcif/report/` — DOCX report generation via `docxtpl` (`DocxTemplate`, `RichText`, `InlineImage`) in `templated_report.py`; also archive reports, tables, references, symmetry.
|
|
26
|
+
- `finalcif/template/` — Report template infrastructure (`ReportTemplates`).
|
|
27
|
+
- `finalcif/tools/` — cross-cutting helpers: `platon.py` (`PlatonRunner`), `shred.py`, `space_groups.py`, `sumformula.py`, `settings.py` (`FinalCifSettings` QSettings wrapper), `download.py`, `pupdate.py` (auto-updater), `statusbar.py`, `chemparse.py`, `dsrmath.py`.
|
|
28
|
+
- **External Tool Integration:**
|
|
29
|
+
- Offline CheckCIF uses PLATON via `finalcif/tools/platon.py`; executable resolution checks bundled `platon/platon_special.exe`, then `C:\pwt\platon.exe` (Windows), then `platon` on `PATH`.
|
|
30
|
+
- Online CheckCIF (IUCr) via HTTP in `finalcif/cif/checkcif/checkcif.py`.
|
|
31
|
+
- CCDC/COD deposition in `finalcif/cif/cod/` (`deposit.py`, `upload.py`, `deposit_check.py`); deposition email parsing in `finalcif/datafiles/ccdc_mail.py`.
|
|
32
|
+
- DOI / CrossRef lookups via `crossrefapi` (see `finalcif/cif/cod/doi.py`).
|
|
33
|
+
- SHELX parsing via the external `shelxfile` package (used in `report/templated_report.py`); in-tree `.lst` parser in `datafiles/shelx_lst.py`.
|
|
34
|
+
- **CIF Parsing:** Standardized on `gemmi` (>=0.7.5); `gemmi.set_leak_warnings(False)` is set at startup.
|
|
35
|
+
|
|
36
|
+
## Conventions
|
|
37
|
+
- **UI Files:** Edit `.ui` files in Qt Designer (`scripts/designer.py`), then regenerate via `python scripts/compile_ui_files.py`. Never hand-edit generated `*_ui.py`.
|
|
38
|
+
- **qtpy Imports:** `from qtpy import QtCore, QtGui, QtWebEngineWidgets, QtWidgets, compat` — `QtWebEngine` is used and requires `PySide6-Addons`.
|
|
39
|
+
- **App Bootstrap:** `appwindow.py` uses `QApplication.instance() or QApplication([])` with `app.setStyle("windowsvista")`. A `DEBUG` flag in `finalcif_start.py` toggles the crash hook; crash reports are written to `~/finalcif-crash.txt` by `my_exception_hook`.
|
|
40
|
+
- **Settings:** Persisted via `FinalCifSettings` (QSettings wrapper) in `finalcif/tools/settings.py`.
|
|
41
|
+
|
|
42
|
+
## Workflow & Commands
|
|
43
|
+
- **Dependency Management:** The project uses `uv` for package management (`uv.lock`, `pylock.toml`, `pyproject.toml`).
|
|
44
|
+
- *Setup:* `uv sync --all-extras --dev`
|
|
45
|
+
- **Testing:**
|
|
46
|
+
- *Command:* `uv run pytest tests`
|
|
47
|
+
- *CI/Linux Headless:* run tests with `QT_QPA_PLATFORM=offscreen` (see `.github/workflows/python_tests.yml`).
|
|
48
|
+
- *Network-Gated Tests:* set `NO_NETWORK=1` to skip network-dependent checks (CheckCIF/DOI/deposit/PLATON; see `tests/test_checkcif.py`, `tests/test_doi.py`).
|
|
49
|
+
- *Helpers:* shared base class `AppWindowTestCase` and `processevents()` in `tests/helpers.py`; `get_platon_exe()` resolves `C:\pwt\platon.exe` on Windows or `which('platon')`. Fixtures live in `tests/examples/`, `tests/statics/`, `tests/checkcif_results/`, and top-level `test-data/`.
|
|
50
|
+
- **Linting:**
|
|
51
|
+
- *Command (local):* `ruff check .` — configured via `.ruff.toml` (line-length 120, target py312).
|
|
52
|
+
- *CI Lint:* GitHub Actions runs `flake8` in `.github/workflows/python_tests.yml` (ruff is not invoked in CI).
|
|
53
|
+
- **UI Compilation:**
|
|
54
|
+
- *Command:* `python scripts/compile_ui_files.py` (discovers `.ui` files, compiles them, and hot-fixes imports to `qtpy`).
|
|
55
|
+
- **Build/Releases:**
|
|
56
|
+
- Packaged with `hatchling`; tag pushes trigger `.github/workflows/python-dist.yml` which runs `uv build` and publishes to PyPI via trusted publishing.
|
|
57
|
+
- Desktop installers built with PyInstaller specs (`Finalcif_installer_win.spec`, `Finalcif_linux_onefile.spec`, `Finalcif_mac.spec`) plus `scripts/_make_win_release.py`, `scripts/make_win_release.bat`, and Inno Setup `scripts/finalcif-install_win64.iss`.
|
|
58
|
+
- Dev launchers: `run_finalcif.bat` / `run_finalcif` / `scripts/finalcif-start.sh`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: finalcif
|
|
3
|
-
Version:
|
|
3
|
+
Version: 160
|
|
4
4
|
Summary: CIF file editor
|
|
5
5
|
Project-URL: Homepage, https://dkratzert.de/finalcif.html
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/dkratzert/FinalCif/issues
|
|
@@ -17,11 +17,11 @@ Requires-Dist: chardet
|
|
|
17
17
|
Requires-Dist: charset-normalizer
|
|
18
18
|
Requires-Dist: crossrefapi
|
|
19
19
|
Requires-Dist: docxtpl[subdoc]>=0.20.2
|
|
20
|
-
Requires-Dist: fastmolwidget
|
|
20
|
+
Requires-Dist: fastmolwidget>=0.9.3
|
|
21
21
|
Requires-Dist: gemmi>=0.7.5
|
|
22
22
|
Requires-Dist: hatchling
|
|
23
23
|
Requires-Dist: html2text
|
|
24
|
-
Requires-Dist: lxml==6.0
|
|
24
|
+
Requires-Dist: lxml==6.1.0
|
|
25
25
|
Requires-Dist: numpy<2.4,>=2.3.5
|
|
26
26
|
Requires-Dist: packaging
|
|
27
27
|
Requires-Dist: pefile
|
|
@@ -38,7 +38,7 @@ Requires-Dist: urllib3
|
|
|
38
38
|
Requires-Dist: wheel
|
|
39
39
|
Description-Content-Type: text/markdown
|
|
40
40
|
|
|
41
|
-

|
|
42
42
|
[](https://github.com/dkratzert/FinalCif/actions/workflows/python_tests.yml)
|
|
43
43
|

|
|
44
44
|
[](https://repology.org/project/python:finalcif/versions)
|
|
@@ -49,7 +49,7 @@ Description-Content-Type: text/markdown
|
|
|
49
49
|
|
|
50
50
|
# FinalCif
|
|
51
51
|
|
|
52
|
-
FinalCif helps you to get a complete [CIF](https://www.iucr.org/resources/cif) file from a single-
|
|
52
|
+
FinalCif helps you to get a complete [CIF](https://www.iucr.org/resources/cif) file from a single-crystal X-ray diffraction experiment. See here [https://dkratzert.de/finalcif.html](https://dkratzert.de/finalcif.html) for details.
|
|
53
53
|
|
|
54
54
|
For tables from multiple CIF files, you may want to use the program [multitable](https://github.com/dkratzert/multitable).
|
|
55
55
|
|
|
@@ -75,6 +75,6 @@ You only need them if you want to make report tables that differ from the defaul
|
|
|
75
75
|
|
|
76
76
|

|
|
77
77
|
|
|
78
|
-

|
|
79
79
|
|
|
80
|
-

|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-

|
|
2
2
|
[](https://github.com/dkratzert/FinalCif/actions/workflows/python_tests.yml)
|
|
3
3
|

|
|
4
4
|
[](https://repology.org/project/python:finalcif/versions)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
# FinalCif
|
|
11
11
|
|
|
12
|
-
FinalCif helps you to get a complete [CIF](https://www.iucr.org/resources/cif) file from a single-
|
|
12
|
+
FinalCif helps you to get a complete [CIF](https://www.iucr.org/resources/cif) file from a single-crystal X-ray diffraction experiment. See here [https://dkratzert.de/finalcif.html](https://dkratzert.de/finalcif.html) for details.
|
|
13
13
|
|
|
14
14
|
For tables from multiple CIF files, you may want to use the program [multitable](https://github.com/dkratzert/multitable).
|
|
15
15
|
|
|
@@ -35,6 +35,6 @@ You only need them if you want to make report tables that differ from the defaul
|
|
|
35
35
|
|
|
36
36
|

|
|
37
37
|
|
|
38
|
-

|
|
39
39
|
|
|
40
|
-

|