Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci_support/environment-old.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
channels:
- conda-forge
dependencies:
- hatchling
- hatch-vcs
- ase =3.22.1
- h5py =3.9.0
- numpy =1.26.0
Expand Down
3 changes: 2 additions & 1 deletion .ci_support/environment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
channels:
- conda-forge
dependencies:
- hatchling
- hatch-vcs
- ase =3.25.0
- h5py =3.14.0
- numpy =2.3.1
- pandas =2.3.1
- scipy =1.16.0
- setuptools
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
cp .ci_support/environment-old.yml environment.yml
python .ci_support/release.py; cat pyproject.toml
pip install versioneer[toml]==0.29
python setup.py sdist bdist_wheel
git update-index --assume-unchanged pyproject.toml pyiron_lammps/_version.py
hatchling build -t sdist -t wheel
Comment on lines +35 to +36
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Fragile Git index hack; prefer proper VCS-versioning setup.

git update-index --assume-unchanged is a local hack that doesn’t affect sdist contents and can hide real changes. Also, hatchling build is likely not the intended CLI; typically use hatch build or python -m build.

Proposed changes in this step:

-        git update-index --assume-unchanged pyproject.toml pyiron_lammps/_version.py
-        hatchling build -t sdist -t wheel
+        # Ensure a clean state; no index hacks needed
+        # Build using the front-end or hatch CLI
+        python -m pip install --upgrade build
+        python -m build --sdist --wheel

If you prefer Hatch:

  • Add hatch to the environment and run hatch build.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
git update-index --assume-unchanged pyproject.toml pyiron_lammps/_version.py
hatchling build -t sdist -t wheel
# Ensure a clean state; no index hacks needed
# Build using the front-end or hatch CLI
python -m pip install --upgrade build
python -m build --sdist --wheel
🤖 Prompt for AI Agents
In .github/workflows/deploy.yml at lines 35-36, remove the fragile git index
hack using 'git update-index --assume-unchanged' as it does not affect sdist
contents and can hide changes. Replace the 'hatchling build -t sdist -t wheel'
command with 'hatch build' after ensuring 'hatch' is installed in the
environment. This aligns with proper VCS-versioning and standard build
practices.

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
7 changes: 1 addition & 6 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:
shell: bash -l {0}
timeout-minutes: 30
run: |
pip install versioneer[toml]==0.29
pip install . --no-deps --no-build-isolation
coverage run
coverage xml
Expand All @@ -89,7 +88,6 @@ jobs:
shell: bash -l {0}
timeout-minutes: 30
run: |
pip install versioneer[toml]==0.29
pip install . --no-deps --no-build-isolation
python -m unittest discover tests

Expand All @@ -112,7 +110,6 @@ jobs:
- name: Test
shell: bash -l {0}
run: |
pip install versioneer[toml]==0.29
pip install . --no-deps --no-build-isolation
cd notebooks
../.ci_support/build_notebooks.sh
Expand All @@ -135,7 +132,7 @@ jobs:
- name: Pip check
shell: bash -l {0}
run: |
pip install versioneer[toml]==0.29 tomlkit
pip install tomlkit
python .ci_support/check.py
cat pyproject.toml
pip install . --no-deps --no-build-isolation
Expand Down Expand Up @@ -179,7 +176,6 @@ jobs:
shell: bash -l {0}
timeout-minutes: 30
run: |
pip install versioneer[toml]==0.29
pip install . --no-deps --no-build-isolation
python -m unittest discover tests

Expand All @@ -201,7 +197,6 @@ jobs:
shell: bash -l {0}
timeout-minutes: 30
run: |
pip install versioneer[toml]==0.29
pip install . --no-deps --no-build-isolation
python -m unittest discover tests

Expand Down
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 71 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/pyiron_lammps.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ dependencies:
- pandas =2.3.1
- scipy =1.16.0
- lammps =2024.08.29=*_mpi_openmpi_*
- hatchling =1.27.0
- hatch-vcs =0.4.0
5 changes: 2 additions & 3 deletions pyiron_lammps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import pyiron_lammps._version
from pyiron_lammps.output import parse_lammps_output as parse_lammps_output_files
from pyiron_lammps.structure import write_lammps_datafile as write_lammps_structure

from . import _version

DUMP_COMMANDS = [
"dump 1 all custom 100 dump.out id type xsu ysu zsu fx fy fz vx vy vz\n",
'dump_modify 1 sort id format line "%d %d %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g %20.15g"\n',
Expand All @@ -14,7 +13,7 @@
"thermo 100\n",
]

__version__ = _version.get_versions()["version"]
__version__ = pyiron_lammps._version.__version__
__all__ = [
"parse_lammps_output_files",
"write_lammps_structure",
Expand Down
Binary file added pyiron_lammps/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added pyiron_lammps/__pycache__/_version.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added pyiron_lammps/__pycache__/units.cpython-312.pyc
Binary file not shown.
Loading
Loading