Skip to content

Commit

Permalink
updating ci, removed np.array on ckeys
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rikigigi committed Dec 28, 2024
1 parent 4d03467 commit 088369b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ 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') }}
restore-keys:
pip-pre-commit-

- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.9'

Expand All @@ -43,19 +43,19 @@ 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') }}
restore-keys:
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 }}

Expand Down
2 changes: 1 addition & 1 deletion sportran/i_o/read_lammps_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion sportran/i_o/read_lammps_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion sportran/i_o/read_tablefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 088369b

Please sign in to comment.