From 088369b439eb30c51bffc53a581c5984f469e217 Mon Sep 17 00:00:00 2001 From: Riccardo Bertossa Date: Sat, 28 Dec 2024 12:23:59 +0000 Subject: [PATCH] updating ci, removed np.array on ckeys addressed ci message: Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@v1. Please update your workflow to use either v3 or v4 --- .github/workflows/ci.yml | 12 ++++++------ sportran/i_o/read_lammps_dump.py | 2 +- sportran/i_o/read_lammps_log.py | 2 +- sportran/i_o/read_tablefile.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 864840d..a24f2ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,11 +9,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache python dependencies id: cache-pip - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/pip key: pip-pre-commit-${{ hashFiles('**/setup.json') }} @@ -21,7 +21,7 @@ jobs: pip-pre-commit- - name: Set up Python 3.9 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.9' @@ -43,11 +43,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Cache python dependencies id: cache-pip - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ~/.cache/pip key: pip-pre-commit-${{ hashFiles('**/setup.json') }} @@ -55,7 +55,7 @@ jobs: pip-pre-commit- - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/sportran/i_o/read_lammps_dump.py b/sportran/i_o/read_lammps_dump.py index c3908d5..89d6807 100644 --- a/sportran/i_o/read_lammps_dump.py +++ b/sportran/i_o/read_lammps_dump.py @@ -144,7 +144,7 @@ def _read_ckeys(self, group_vectors=True, preload_timesteps=True): line = self.file.readline() if len(line) == 0: # EOF raise RuntimeError('Reached EOF, no ckeys found.') - values = np.array(line.split()) + values = line.split() if (values[0] == 'ITEM:'): if (values[1] == 'TIMESTEP'): self.current_timestep = int(self.file.readline()) diff --git a/sportran/i_o/read_lammps_log.py b/sportran/i_o/read_lammps_log.py index c58a7e6..ea79052 100755 --- a/sportran/i_o/read_lammps_log.py +++ b/sportran/i_o/read_lammps_log.py @@ -231,7 +231,7 @@ def _read_ckeys(self, run_keyword, group_vectors=True): nlines += 1 if len(line) == 0: # EOF raise RuntimeError('Reached EOF, no ckeys found.') - values = np.array(line.split()) + values = line.split() # find the column headers line if (len(values) and (is_string(values[0])) and (values[0] == 'Step')): log.write_log(' column headers found at line {:d}. Reading data...'.format(nlines)) diff --git a/sportran/i_o/read_tablefile.py b/sportran/i_o/read_tablefile.py index c58be04..ebf4ebd 100644 --- a/sportran/i_o/read_tablefile.py +++ b/sportran/i_o/read_tablefile.py @@ -191,7 +191,7 @@ def _read_ckeys(self, group_vectors=True): line = self.file.readline() if len(line) == 0: # EOF raise RuntimeError('Reached EOF, no ckeys found.') - values = np.array(line.split()) + values = line.split() # text line: read variables names and save indexes in ckey if (is_string(values[0]) and (values[0].find('#') < 0)): self.header += line[:-1]