Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
298 commits
Select commit Hold shift + click to select a range
2899a8f
Add pre-commit configuration file with hooks for code quality checks …
romaingrx Oct 16, 2025
52b8245
Refactor class names and method calls for consistency across charge a…
romaingrx Oct 16, 2025
fa47976
Update imports in __main__.py to include final_c2m_driver, improving …
romaingrx Oct 16, 2025
1624d73
Split classes
choglass Oct 16, 2025
205bb92
Update .gitignore
choglass Oct 16, 2025
6bad86f
Update pyproject.toml and uv.lock
choglass Oct 16, 2025
46cd861
Cleanup class objects
choglass Oct 21, 2025
4f218aa
Cleanup classes
choglass Oct 22, 2025
e8ffbf4
Remove unused functions
choglass Oct 22, 2025
3329c6a
Cleanup unused functions
choglass Oct 22, 2025
6fa3dd7
feat(pydantic): initial working pydantic dump as json of cell
romaingrx Oct 22, 2025
40b3237
Update pyproject.toml
choglass Oct 24, 2025
65dff78
Fix bugs in assign_charges_for_molecule
choglass Oct 28, 2025
c64fd4a
Add Cells to handle reference and unitcell
choglass Nov 3, 2025
eeec542
Dry run for refcell
choglass Nov 5, 2025
eb2217e
Fix coordination_correction_for_haptic in case exist_cif_bond_moiety
choglass Nov 5, 2025
2fb7f88
Fix check_missingH
choglass Nov 5, 2025
c136a29
Fix get_reference_molecules_from_moiety
choglass Nov 5, 2025
6d60dbc
Update compare_with_CIF and get_reference_molecules_from_moiety
choglass Nov 5, 2025
254cdbf
Check class attributes
choglass Nov 12, 2025
76d2845
Fix error in model dump json
choglass Nov 12, 2025
5818f9a
adding initial CITATION document
Dec 8, 2025
7e6affe
Update author affiliations and reorder entries
choglass Dec 9, 2025
c5e3d11
Merge pull request #8 from lcmd-epfl/citation
choglass Dec 9, 2025
6dddf0e
Fix citation (#9)
briling Dec 9, 2025
bc86077
chore: add support for UUID-based circular references in deserialization
romaingrx Dec 10, 2025
95c9d2e
chore: update type annotations to use NDArray for coordinates and radii
romaingrx Dec 10, 2025
dd11aa4
chore: add JSON and pickle format support for saving/loading Cells
romaingrx Dec 10, 2025
52e1710
Fix NumPy array and list mismatch error
choglass Dec 22, 2025
3c72545
Refine the refcell
choglass Dec 22, 2025
d4c7f06
fix: implement object deduplication in BaseModel serialization
romaingrx Dec 22, 2025
5ce3885
fix: refactor serialization to use central object store pattern
romaingrx Dec 22, 2025
03acf79
chore: add type conversion and default handling in model deserialization
romaingrx Dec 23, 2025
dacc5bf
fix: simplify circular reference serialization by avoiding Pydantic h…
romaingrx Dec 23, 2025
0c11b27
refactor: extract serialization utilities into separate modules
romaingrx Dec 23, 2025
1c08090
feat: migrate Bond class to use new Ref[T] wrapper type
romaingrx Dec 23, 2025
ef8af4e
refactor: use Pydantic schema for custom types
romaingrx Dec 23, 2025
29f7c96
refactor: simplify reference type aliases
romaingrx Dec 23, 2025
b1d0b96
refactor: remove Ref wrapper, simplify Bond class
romaingrx Dec 24, 2025
4249309
ci: add code quality workflow with LFS for test fixtures
romaingrx Dec 24, 2025
fb7f572
Clean up code and merge
choglass Dec 24, 2025
49d98cd
Add SubType in my_types.py
choglass Dec 24, 2025
4b974ec
Delete .DS_Store
choglass Dec 24, 2025
45a67da
Delete cell2mol/.DS_Store
choglass Dec 24, 2025
d69afe4
reformat my_types
choglass Dec 25, 2025
18c5f8f
Improve debugging output
choglass Dec 26, 2025
ec59e65
Add configuration and default values for runtime settings
choglass Dec 30, 2025
0cf3e43
Add print-config option in args.py
choglass Dec 30, 2025
8db6906
Refactor xyz2mol.py to enhance logging and remove commented code
choglass Dec 30, 2025
2558bc8
remove read_write.py and split it into read_cif.py and write_results.py
choglass Jan 1, 2026
5927348
Clean up cell.py
choglass Jan 1, 2026
46b18e7
Clean up atom.py
choglass Jan 1, 2026
ed6da0e
Clean up group.py
choglass Jan 1, 2026
cbca758
Clean up ligand.py
choglass Jan 1, 2026
db9e34a
Clean up metal.py
choglass Jan 1, 2026
0419c44
Clean up specie.py
choglass Jan 1, 2026
ac43e0b
Clean up molecule.py
choglass Jan 1, 2026
fc40bb6
Clean up charge_state.py
choglass Jan 1, 2026
b2a6106
Clean up protonation.py
choglass Jan 1, 2026
7c8d5de
Update hydrogen.py
choglass Jan 1, 2026
e05aa97
Update xyz2mol.py
choglass Jan 1, 2026
f63851f
Clean up refcell.py
choglass Jan 1, 2026
5b7cc09
Clean up unitcell.py
choglass Jan 1, 2026
af57b12
refactor: move utility functions to operations module
choglass Jan 1, 2026
3c7a2f3
refactor: update logging configuration in parsing_arguments function
choglass Jan 1, 2026
cfda970
feat: implement comparison functions for atoms, metals, and species
choglass Jan 1, 2026
672535f
refactor: enhance logging and clean up debug statements in coordinati…
choglass Jan 1, 2026
b3c9312
refactor: replace print statements with logger.debug/info in extract_…
choglass Jan 1, 2026
27892c6
feat: add element utility functions for chemical element classificati…
choglass Jan 1, 2026
fef597d
feat: add build_adjacency and refactor connectivity module
choglass Jan 1, 2026
ea0adb9
refactor: rename add_atom_old to add_atom for clarity
choglass Jan 1, 2026
6091fad
refactor: reorganize imports for better clarity and structure
choglass Jan 1, 2026
4a3989e
refactor: replace print statements with logger calls
choglass Jan 1, 2026
6a59299
refactor: update logger initialization and reorganize import statements
choglass Jan 1, 2026
0d12720
wip: update cell_reconstruction module
choglass Jan 2, 2026
fffbed0
refactor: remove commented-out code
choglass Jan 2, 2026
c91610f
refactor: rename has_cif_bond_moiety to exist_cif_bond_moiety for con…
choglass Jan 2, 2026
567ddf9
refactor: remove unused imports and update parameter handling in buil…
choglass Jan 3, 2026
217a13e
refactor: enhance shape_measure
choglass Jan 3, 2026
3c53c34
refactor: streamline use_bond_info handling and improve logging get_c…
choglass Jan 3, 2026
10484a3
refactor: add get_adjacency_parameters method and update build_adjmat…
choglass Jan 3, 2026
f57596f
refactor: improve logging and streamline ligand/metal analysis in get…
choglass Jan 3, 2026
397b9d7
refactor: fix indent error in reset_mconnec
choglass Jan 3, 2026
2fb75ed
refactor: update logging format in parsing_arguments function
choglass Jan 3, 2026
f65e3ae
wip: streamline unit cell reconstruction
choglass Jan 3, 2026
a879b7d
refactor: rename cell_reconstruction module to unitcell_reconstruction
choglass Jan 4, 2026
bd508f0
feat: implement protonation state enumeration for ligands and non-com…
choglass Jan 4, 2026
fcfbad7
feat: add charge state enumeration functionality for Specie class
choglass Jan 4, 2026
65ba079
refactor: remove Specie parameter from enumerate_charge_states function
choglass Jan 4, 2026
11386ef
refactor: change Specie type hints to object in protonation state fun…
choglass Jan 4, 2026
07f8a05
refactor: remove ProtonationGroupResult from TypeRegistry test
choglass Jan 4, 2026
a7a0c5e
Add Random Forest model implementation for spin state prediction
choglass Jan 16, 2026
572b738
Remove charge assignment modules
choglass Jan 16, 2026
468e64f
Implement charge assignment pipeline for cell2mol
choglass Jan 16, 2026
5ffa17e
Refactor logging messages and improve code structure
choglass Jan 16, 2026
8aabd18
refactor: rename refcell.py to reference.py
choglass Jan 16, 2026
884091b
refactor: rename unitcell_reconstruction.py to construction.py
choglass Jan 16, 2026
b846693
refactor: rename molecule.py to process_xyz.py
choglass Jan 16, 2026
fdf2bcf
refactor: rename screening_cif to detect_cif_issues and improve logic
choglass Jan 16, 2026
6a61c92
refactor: improve output printing and error messaging
choglass Jan 16, 2026
b0c83f7
refactor: update function imports and rename processing functions for…
choglass Jan 16, 2026
9276a68
refactor: update import path for atomic_valence and clean up debug lo…
choglass Jan 16, 2026
a6ddf53
refactor: enhance logging and improve coordination handling in non-ha…
choglass Jan 16, 2026
fbf09e4
refactor: add get_moiety_indices_from_labels function and improve err…
choglass Jan 16, 2026
6346c87
refactor: streamline spin assignment functions and enhance logging
choglass Jan 16, 2026
0596a98
refactor: update interpret_unitcell function for improved charge assi…
choglass Jan 16, 2026
8e09076
chore: update cells file
choglass Jan 16, 2026
cbb4b5f
chore: upload Cells_YOXKUS.cell
choglass Jan 16, 2026
2cd3ece
chore: upload Cells_YOXKUS.cell
choglass Jan 16, 2026
07921a5
saving unit cell data
choglass Jan 16, 2026
5c8d151
remove files
choglass Jan 16, 2026
0640c9f
refactor: update haptic type handling and add pretty print mappings
choglass Jan 19, 2026
825edce
refactor: improve argument help text and logging configuration
choglass Jan 19, 2026
5e09807
fix: correct error in add_hydrogen (hydrogen.py)
choglass Jan 19, 2026
826e934
refactor: clean up debug logging
choglass Jan 19, 2026
a1b6ce3
refactor: enhance logging messages and adjust debug statements in Met…
choglass Jan 19, 2026
052ca3c
refactor: improve logging messages in split_ligand method for better …
choglass Jan 19, 2026
d5f8a40
refactor: enhance fragment subtype handling in reconstruct_fragments …
choglass Jan 19, 2026
5e56ca3
refactor: enhance logging clarity in smiles_handler.py
choglass Jan 19, 2026
4472c5c
fix(coordination_sphere): correct handle_haptic_coordination logic
choglass Jan 19, 2026
9d54241
refactor(charge): improve log messages and comment retry logic in cha…
choglass Jan 19, 2026
fd03c16
refactor(write_results): improve error messages and update write_uniq…
choglass Jan 19, 2026
1769197
refactor(cell): streamline attributes and enhance error handling in c…
choglass Jan 19, 2026
83a7ba0
refactor(molecule, process_xyz): enhance error handling and logging, …
choglass Jan 19, 2026
4d262a8
refactor(reference, unitcell): enhance unit cell and reference handli…
choglass Jan 19, 2026
ca74fcb
chore: upload Cells_YOXKUS.cell
choglass Jan 19, 2026
f03b653
refactor(cli): update warning filters
choglass Jan 20, 2026
d816006
refactor(element_utils, operations): add functions for identifying me…
choglass Jan 20, 2026
aece0aa
refactor: standardize naming for alkali and alkaline earth metal chec…
choglass Jan 20, 2026
2db6c17
refactor(reference, write_results): enhance error handling for metal …
choglass Jan 20, 2026
2447a06
chore: upload Cells_YOXKUS.cell
choglass Jan 20, 2026
299283a
refactor(compare): comment out debug logging statements for compariso…
choglass Jan 20, 2026
19dd791
refactor(operations): restructure metal limit checks and enhance logg…
choglass Jan 20, 2026
dec4966
refactor(compare): update compare_cif_with_reference to handle discre…
choglass Jan 20, 2026
246be2e
refactor(write_results): add warning messages for reference cell
choglass Jan 20, 2026
13599bf
refactor(unitcell): streamline charge balancing process and enhance e…
choglass Jan 20, 2026
4a6c1c0
refactor(cell, reference): enhance warning handling for CIF discrepan…
choglass Jan 20, 2026
238deef
chore: upload Cells_YOXKUS.cell
choglass Jan 20, 2026
c7146fb
refactor(group): remove deprecated get_hapticity method and update ha…
choglass Jan 20, 2026
f3af3a3
refactor: remove version field from Atom, Bond, ChargeState, Protonat…
choglass Jan 20, 2026
1d8fa15
refactor: wrap main execution in __main__ guard for better module usa…
choglass Jan 20, 2026
474e2dc
feat: split Cell into specialized Reference and UnitCell classes
choglass Jan 20, 2026
1085ea7
refactor: improve logging format and error handling in charge balanci…
choglass Jan 20, 2026
4ec69f7
feat: add Reference and UnitCell to __all__ and model rebuild in classes
choglass Jan 20, 2026
4fb1f83
feat: refactor cif processing by process_reference and process_unitce…
choglass Jan 20, 2026
e941127
chore: upload Cells_YOXKUS.cell
choglass Jan 20, 2026
844faef
refactor: comment out unused error messages and JSON saving logic
choglass Jan 20, 2026
50f664c
feat: add is_mismatch_adjacency function to compare adjacency matrice…
choglass Jan 21, 2026
9015acd
refactor: add logging for unit cell construction process
choglass Jan 21, 2026
5849628
feat: enhance CIF parsing and integrate adjacency mismatch check in r…
choglass Jan 21, 2026
d82c629
feat: enhance CIF file reading with error handling and logging
choglass Jan 21, 2026
6cbec05
feat: add error handling for ASE parsing in interpret_molecule function
choglass Jan 21, 2026
f88fb01
feat: add adjacency mismatch handling and logging in reference proces…
choglass Jan 21, 2026
fe21ee9
chore: update binary fixture for Cells_YOXKUS.cell
choglass Jan 21, 2026
f43d227
feat: enhance metal counting with logging for mixed metal types and p…
choglass Jan 21, 2026
b6ca6d8
feat: refine remove_unspecified_atoms and extract_info_from_cif in CI…
choglass Jan 21, 2026
90b88fa
refactor: enhance string representation in Cell class
choglass Jan 21, 2026
4b683c0
refactor(process_reference): save Reference object when no reference …
choglass Jan 21, 2026
37b941a
chore: update binary fixture for Cells_YOXKUS.cell
choglass Jan 21, 2026
c205a25
feat: enhance atomic valence retrieval, is_single_ring for Group clas…
choglass Jan 21, 2026
147c327
feat: improve error handling by using exit_with_error_exception in un…
choglass Jan 22, 2026
384619d
feat: improve logging for atomic valence checks in xyz2mol and handle…
choglass Jan 22, 2026
2a14b38
feat: apply nonlocal-site limit during protonation enumeration to pre…
choglass Jan 22, 2026
d17a866
test: DEFAULT_COV_FACTOR 1.3
choglass Jan 22, 2026
71951d6
refactor: disable RDKit warnings in CLI
choglass Jan 22, 2026
cf472a6
feat: enhance logging in add_atom and handle_nonhaptic_coordination
choglass Jan 22, 2026
44615a2
refactor(process_reference): add write_possible_charges function for …
choglass Jan 22, 2026
de06263
feat: enhance logging in reset_mconnec and update ligand connectivity…
choglass Jan 22, 2026
f9fb9af
feat: move hydride ligand to manual charge assignment and update char…
choglass Jan 22, 2026
3c340b0
refactor(reference): enhance logging for isolated hydrogen and atom d…
choglass Jan 22, 2026
d59ff7e
update(defaults): update DEFAULT_COV_FACTOR and DEFAULT_METAL_FACTOR …
choglass Jan 22, 2026
0593cef
feat: add memory limit configuration and error handling in CLI
choglass Jan 23, 2026
808ddf1
fix: improve fragment counting in is_reconstruction_complete check
choglass Jan 23, 2026
dadd56a
feat: enhance logging and charge handling in charge state resolution …
choglass Jan 23, 2026
8a3f5f3
fix: update logging format for spin assignment in Metal class
choglass Jan 23, 2026
6cb504c
feat: introduce memory-efficient generator for valence combinations
choglass Jan 23, 2026
44f4f48
feat: implement memory and timeout handling in processing
choglass Jan 23, 2026
948f939
refactor(process_unitcell): streamline error handling in cell process…
choglass Jan 23, 2026
738ecfb
chore: update binary fixture for Cells_YOXKUS.cell
choglass Jan 23, 2026
26c15a1
feat(connectivity): add haptic mode identification and refactor singl…
choglass Jan 24, 2026
4747c92
feat(molecule): add coordination analysis and mapping of metal groups…
choglass Jan 24, 2026
e8e0564
feat(metal): enhance metal class with coordination sphere and connect…
choglass Jan 24, 2026
a18b065
feat(group): from_atom_list to create Group from list of Atom objects…
choglass Jan 24, 2026
a5e5e69
feat(ligand): remove split_ligand method
choglass Jan 24, 2026
f4517e6
feat(group): remove commented-out
choglass Jan 24, 2026
d6b7747
refactor: update logging
choglass Jan 24, 2026
3a7c776
feat(xyz2mol): enhance valence combination handling and logging
choglass Jan 24, 2026
19fbf67
feat(reference, construction): streamline coordination analysis by an…
choglass Jan 24, 2026
96ee1b3
feat(hydrogen): check adjacency with alkali and alkaline earth metals
choglass Jan 24, 2026
fce2de0
feat(protonation): enhance adjacency matrix handling for added atoms
choglass Jan 24, 2026
baf5f74
fix: update variable names in generate_tmc_rdkit_obj_smiles and updat…
choglass Jan 24, 2026
f333d38
feat(coordination): update metal coordination handling and improve lo…
choglass Jan 24, 2026
5651572
feat(atom): update reset_mconnec method in Molecule level
choglass Jan 24, 2026
32fbd93
feat(errors): enhance error handling and logging for reference and un…
choglass Jan 24, 2026
c75cdf8
chore: update binary fixture for Cells_YOXKUS.cell
choglass Jan 24, 2026
84c435d
update binary fixture for Cells_YOXKUS.cell
choglass Jan 24, 2026
b87a922
update binary fixture for Cells_YOXKUS.cell
choglass Jan 24, 2026
2f802de
feat(reference): refactor potential warning flags and enhance logging…
choglass Jan 24, 2026
929b8b7
feat(unitcell): enhance error handling and logging for unit cell proc…
choglass Jan 24, 2026
100fbc9
feat(process_reference): enhance warning handling and logging in refe…
choglass Jan 24, 2026
aabe727
feat(coordination_sphere): initialize metals attribute for ligands in…
choglass Jan 24, 2026
2b87a89
feat(operations): add function to verify metal coordination against b…
choglass Jan 24, 2026
bbdc7c4
feat(read_cif): improve logging for moiety extraction and handle miss…
choglass Jan 24, 2026
7ba39b9
feat(write_results): enhance warning message handling in get_referenc…
choglass Jan 24, 2026
1d031e3
feat(config): update timeout and memory limits in runtime configurati…
choglass Jan 24, 2026
726b477
feat(operations): add logging for molecules with no metals in coordin…
choglass Jan 24, 2026
4d245ff
feat(connectivity): remove split_group function
choglass Jan 24, 2026
c857437
feat(logging): enhance debug logging for protonation states and metal…
choglass Jan 24, 2026
84f54f5
feat(molecule): add hapticity and denticity retrieval for ligands in …
choglass Jan 24, 2026
bc700ba
feat(logging): reduce valences logging for cleaner output
choglass Jan 24, 2026
f425215
feat(unitcell): enhance error handling and refactor initialization in…
choglass Jan 24, 2026
064aca5
feat(cells, pydantic): add compatibility for Self type across Python …
choglass Jan 28, 2026
0c609a0
feat(unitcell): update return value in interpret_unitcell to return c…
choglass Jan 30, 2026
31e0f54
feat(hydrogen, process_xyz, pydantic, write_results): refactor hydrog…
choglass Jan 30, 2026
3624549
feat(construction): remove final_merge parameter and update logic for…
choglass Jan 30, 2026
bac9bc0
feat(exceptions): introduce ASEParseError for better error handling i…
choglass Jan 30, 2026
aa18aeb
feat(xyz2mol): refine warning messages for valence checks in AC2BO fu…
choglass Jan 30, 2026
42f11e8
refactor: handle np.mean warning
choglass Jan 31, 2026
d8b0192
feat(process_reference): initialize error_cases for missing reference…
choglass Jan 31, 2026
3a82035
refactor: update summary file extensions from .out to .txt
choglass Jan 31, 2026
8fce90b
feat(pydantic): enhance to_json method to support custom separators
choglass Jan 31, 2026
d3cd65d
feat(process_reference): improve error handling in interpret_referenc…
choglass Jan 31, 2026
e9a9f4e
feat(hydrogen): detect missing hydrogens in carbon atoms in ligands
choglass Feb 2, 2026
97e9510
feat(atom): add atom site label to string representation
choglass Feb 2, 2026
60221e7
feat(hydrogen): enhance missing hydrogen detection logging for carbon…
choglass Feb 2, 2026
a2793c1
feat(cli): move prefilter_cif function to interpret_reference in proc…
choglass Feb 2, 2026
3c1a1cc
feat(connectivity): enhance adjacency matrix logging and add topology…
choglass Feb 2, 2026
d69b2e5
feat(types): refactor haptic_type to use string for Group and list ty…
choglass Feb 2, 2026
d5e6c09
feat(charge_state): enhance debug logging, fix error in corr_atom_cha…
choglass Feb 2, 2026
8563349
feat(protonation_enumerator): enhance _handle_haptic_group in protona…
choglass Feb 2, 2026
bf35f1f
feat(process_reference): enhance CIF processing with prefiltering and…
choglass Feb 2, 2026
84c8a36
feat(connectivity): enhance analyze_topology to include ring_sets and…
choglass Feb 2, 2026
a95610e
feat(tests): update Cells_YOXKUS.cell
choglass Feb 2, 2026
b26bbac
feat(logging): replace print statements with logger.debug in _handle_…
choglass Feb 2, 2026
f96edf3
feat: fix bugs and warnings
choglass Feb 3, 2026
6ea3388
feat(connectivity): enhance ring detection logic and improve logging …
choglass Feb 3, 2026
be69a34
feat(protonation_enumerator): enhance logging for ligand analysis and…
choglass Feb 3, 2026
529e384
feat(charge_state): comment out debug logging statements for added li…
choglass Feb 3, 2026
cf39937
feat(molecule): comment out pure carbon group checks in merge_connect…
choglass Feb 3, 2026
16d2cd8
feat(protonation): enhance debug logging and clean up print statements
choglass Feb 3, 2026
586bad8
refactor(config): update timeout and memory limit values for runtime …
choglass Feb 3, 2026
339dc65
feat(coordination): add get_denticity for Group object in handle_meta…
choglass Feb 3, 2026
41da647
feat(hydrogen): enhance check_missing_hydrogens to handle multiple co…
choglass Feb 4, 2026
b53e457
feat(coordination_sphere): enhance atom sorting in validate_coordinat…
choglass Feb 4, 2026
0c26e4e
refactor: update protonation handling and improve logging details
choglass Feb 4, 2026
9dbc72c
feat(protonation_enumerator): update enumerate_protonation_states and…
choglass Feb 4, 2026
e7c3818
feat(protonation): update Protonation class to improve proton handlin…
choglass Feb 4, 2026
3079b49
feat(charge_state): update ChargeState to incorporate new protonation…
choglass Feb 4, 2026
47e9d58
feat(tests): update Cells_YOXKUS.cell
choglass Feb 4, 2026
089e4c3
feat(errors): enhance error handling and logging for CIF file processing
choglass Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ RUN conda run -p /env python -m pip install --no-deps /pkg
SHELL ["conda", "run", "-p", "/env", "/bin/bash", "-c" ]
RUN python -m ipykernel install --name cell2mol --display-name "cell2mol env"
USER ${NB_USER}


1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/fixtures/*.cell filter=lfs diff=lfs merge=lfs -text
23 changes: 23 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Setup dev environment"
description: "Setup Python development environment with uv"

inputs:
uv-version:
description: "Version of uv to install"
required: false
default: "0.8.17"

runs:
using: "composite"
steps:
- name: Install uv
uses: astral-sh/setup-uv@v6.7.0
with:
version: ${{ inputs.uv-version }}
enable-cache: true
cache-dependency-glob: uv.lock

- name: Set up Python
uses: actions/setup-python@v5.4.0
with:
python-version-file: pyproject.toml
36 changes: 36 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Code quality checks

on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: Lint & Test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
lfs: true

- name: Setup environment
uses: ./.github/actions/setup

# TODO: add ruff check
# - name: Ruff check
# run: uv run --dev ruff check cell2mol --output-format=github

- name: Ruff format
run: uv run --dev ruff format --check

- name: Pre-commit hooks
if: ${{ !cancelled() }}
run: SKIP=ruff-format uv run --dev pre-commit run --all-files

- name: Run unit tests
if: ${{ !cancelled() }}
run: uv run --group test pytest
45 changes: 0 additions & 45 deletions .github/workflows/python-package-conda.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
*.out

__pycache__/
*.pyc
.coverage
.mypy_cache
.pytest_cache
.ipynb_checkpoints/*
.ipynb_checkpoints/
playground/*

# Distribution/packaging
build/
Expand Down
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
default_stages: [pre-commit, commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.1
hooks:
# - id: ruff-check
# args: [--fix]
- id: ruff-format
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"charliermarsh.ruff"
]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
Loading