codecov[bot]: # [Codecov](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=h1) Report
> Merging [#211](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=desc) into [master](https://codecov.io/gh/glotzerlab/signac/commit/f83f86d7436ad7c362deeb541230c7d1e3ac5cff?src=pr&el=desc) will **decrease** coverage by `4.43%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/glotzerlab/signac/pull/211/graphs/tree.svg?width=650&token=FghbjTyzgM&height=150&src=pr)](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #211      +/-   ##
==========================================
- Coverage   65.12%   60.69%   -4.44%     
==========================================
  Files          37       37              
  Lines        5594     5579      -15     
==========================================
- Hits         3643     3386     -257     
- Misses       1951     2193     +242
```


| [Impacted Files](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [signac/contrib/import\_export.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvaW1wb3J0X2V4cG9ydC5weQ==) | `84.93% <100%> (ø)` | :arrow_up: |
| [signac/core/h5store.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvcmUvaDVzdG9yZS5weQ==) | `27.11% <0%> (-63.39%)` | :arrow_down: |
| [signac/core/dict\_manager.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvcmUvZGljdF9tYW5hZ2VyLnB5) | `41.86% <0%> (-48.84%)` | :arrow_down: |
| [signac/contrib/job.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvam9iLnB5) | `83.54% <0%> (-6.99%)` | :arrow_down: |
| [signac/contrib/project.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvcHJvamVjdC5weQ==) | `89.93% <0%> (-0.76%)` | :arrow_down: |
| [signac/contrib/schema.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvc2NoZW1hLnB5) | `89.16% <0%> (-0.27%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=footer). Last update [f83f86d...f5bf77f](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

codecov[bot]: # [Codecov](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=h1) Report
> Merging [#211](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=desc) into [master](https://codecov.io/gh/glotzerlab/signac/commit/f83f86d7436ad7c362deeb541230c7d1e3ac5cff?src=pr&el=desc) will **decrease** coverage by `4.43%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/glotzerlab/signac/pull/211/graphs/tree.svg?width=650&token=FghbjTyzgM&height=150&src=pr)](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #211      +/-   ##
==========================================
- Coverage   65.12%   60.69%   -4.44%     
==========================================
  Files          37       37              
  Lines        5594     5579      -15     
==========================================
- Hits         3643     3386     -257     
- Misses       1951     2193     +242
```


| [Impacted Files](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [signac/contrib/import\_export.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvaW1wb3J0X2V4cG9ydC5weQ==) | `84.93% <100%> (ø)` | :arrow_up: |
| [signac/core/h5store.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvcmUvaDVzdG9yZS5weQ==) | `27.11% <0%> (-63.39%)` | :arrow_down: |
| [signac/core/dict\_manager.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvcmUvZGljdF9tYW5hZ2VyLnB5) | `41.86% <0%> (-48.84%)` | :arrow_down: |
| [signac/contrib/job.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvam9iLnB5) | `83.54% <0%> (-6.99%)` | :arrow_down: |
| [signac/contrib/project.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvcHJvamVjdC5weQ==) | `89.93% <0%> (-0.76%)` | :arrow_down: |
| [signac/contrib/schema.py](https://codecov.io/gh/glotzerlab/signac/pull/211/diff?src=pr&el=tree#diff-c2lnbmFjL2NvbnRyaWIvc2NoZW1hLnB5) | `89.16% <0%> (-0.27%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=footer). Last update [f83f86d...f5bf77f](https://codecov.io/gh/glotzerlab/signac/pull/211?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

diff --git a/changelog.txt b/changelog.txt
index daf2b1c6..145174d3 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -27,6 +27,7 @@ next
  - Fix issue causing a failure of the automatic conversion of valid key types (#168, #205).
  - Improve the 'dots in keys' error message to make it easier to fix related issues (#170, #205).
  - Update the ``__repr__`` and ``__repr_html__`` implementations of the ``Project`, ``Job``, and ``JobsCursor`` classes (#193).
+ - Fix issue with rendering views from the command line for single job project (#208).
  - Fix issue with heterogeneous types in state point values that are lists (#209).
 
 [1.1.0] -- 2019-05-19
diff --git a/signac/contrib/import_export.py b/signac/contrib/import_export.py
index 8a5a6053..b63d9a08 100644
--- a/signac/contrib/import_export.py
+++ b/signac/contrib/import_export.py
@@ -44,7 +44,9 @@ def _make_schema_based_path_function(jobs, exclude_keys=None, delimiter_nested='
     "Generate schema based paths as a function of the given jobs."
     from .schema import _build_job_statepoint_index
     if len(jobs) <= 1:
-        return lambda job: ''
+        # The lambda must (optionally) take a format spec argument to match the
+        # signature of the path function below.
+        return lambda job, sep=None: ''
 
     index = [{'_id': job._id, 'statepoint': job.sp()} for job in jobs]
     jsi = _build_job_statepoint_index(jobs=jobs, exclude_const=True, index=index)

view function regression in latest version
<!-- Please replace the text in the individual sections below. -->

### Description

"...there appears to be a regression affecting the view function in the latest version." per @csadorf  in the Gitter signac lobby

### To reproduce
```
# init.py
import signac

project = signac.init('fmria_project')

sp = {'monomer':'nfa'}
job = project.open_job(sp)
job.init()
```
`$ python3 init.py`
`$ signac view`

### Error output

`Error: <lambda>() takes 1 positional argument but 2 were given`

### System configuration

Please complete the following information:

 - Operating System [e.g. macOS]: CentOS `6.10 (final)`
 - Version of Python [e.g. 3.7]: `3.7.3`
 - Version of signac [e.g. 1.0]: `1.1.0`

diff --git a/tests/test_shell.py b/tests/test_shell.py
index 0b33d92c..a7a9dd5c 100644
--- a/tests/test_shell.py
+++ b/tests/test_shell.py
@@ -142,6 +142,21 @@ class BasicShellTest(unittest.TestCase):
         self.assertIn('b', doc)
         self.assertEqual(doc['b'], 0)
 
+    def test_view_single(self):
+        """Check whether command line views work for single job workspaces."""
+        self.call('python -m signac init my_project'.split())
+        project = signac.Project()
+        sps = [{'a': i} for i in range(1)]
+        for sp in sps:
+            project.open_job(sp).init()
+        os.mkdir('view')
+        self.call('python -m signac view'.split())
+        for sp in sps:
+            self.assertTrue(os.path.isdir('view/job'))
+            self.assertEqual(
+                os.path.realpath('view/job'),
+                os.path.realpath(project.open_job(sp).workspace()))
+
     def test_view(self):
         self.call('python -m signac init my_project'.split())
         project = signac.Project()

pip install -e .[all]
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc
3.9
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup==1.2.2
iniconfig==2.1.0
packaging==24.2
pluggy==1.5.0
pytest==8.3.5
-e git+https://github.com/glotzerlab/signac.git@f83f86d7436ad7c362deeb541230c7d1e3ac5cff#egg=signac
tomli==2.2.1

name: signac
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - exceptiongroup==1.2.2
      - iniconfig==2.1.0
      - packaging==24.2
      - pluggy==1.5.0
      - pytest==8.3.5
      - tomli==2.2.1
prefix: /opt/conda/envs/signac

tests/test_shell.py::BasicShellTest::test_view_single
tests/test_shell.py::BasicShellTest::test_find tests/test_shell.py::BasicShellTest::test_index tests/test_shell.py::BasicShellTest::test_init_project tests/test_shell.py::BasicShellTest::test_init_project_in_project_root tests/test_shell.py::BasicShellTest::test_job_with_argument tests/test_shell.py::BasicShellTest::test_job_with_argument_create_workspace tests/test_shell.py::BasicShellTest::test_job_with_argument_workspace tests/test_shell.py::BasicShellTest::test_project_id tests/test_shell.py::BasicShellTest::test_project_workspace tests/test_shell.py::BasicShellTest::test_remove tests/test_shell.py::BasicShellTest::test_shell tests/test_shell.py::BasicShellTest::test_shell_with_jobs tests/test_shell.py::BasicShellTest::test_shell_with_jobs_and_selection tests/test_shell.py::BasicShellTest::test_shell_with_jobs_and_selection_only_one_job tests/test_shell.py::BasicShellTest::test_statepoint tests/test_shell.py::BasicShellTest::test_view
signac/contrib/import_export.py changelog.txt
signac/contrib/import_export.py changelog.txt