Skip to content

Commit

Permalink
Use synced_collections. (#924)
Browse files Browse the repository at this point in the history
* Use synced_collections.

* Add changelog entry.

* Use PyPI release.

* Update doc intersphinx links, pre-commit hooks, GitHub Actions, and test requirements to remove unneeded dependencies.

* Fix warning from changelog syntax.

* Update changelog.txt

Co-authored-by: Tommy Waltmann <53307607+tommy-waltmann@users.noreply.github.com>

---------

Co-authored-by: Tommy Waltmann <53307607+tommy-waltmann@users.noreply.github.com>
  • Loading branch information
bdice and tommy-waltmann committed May 19, 2023
1 parent a937490 commit 06739c6
Show file tree
Hide file tree
Showing 47 changed files with 31 additions and 6,465 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci-oldest-reqs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ h5py==2.10.0
numpy==1.19.0
packaging==15.0
pandas==1.0.0
pymongo==3.10.0
pytest==6.2.1
pytest-cov==2.10.1
pytest-xdist==2.5.0
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
- name: Install wheel
run:
python -m pip install signac --progress-bar off --no-index -f dist/
- name: Run MongoDB
uses: supercharge/mongodb-github-action@1.9.0
- name: Run Redis
uses: supercharge/redis-github-action@1.5.0
- name: Test with pytest
run:
python -m pytest -v tests/
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ jobs:
- name: Install the package
run: |
pip install -e .
- name: Run MongoDB
uses: supercharge/mongodb-github-action@1.9.0
if: ${{ matrix.os == 'ubuntu-latest' && matrix.config.dependencies != 'minimal' }}
- name: Run Redis
uses: supercharge/redis-github-action@1.5.0
if: ${{ matrix.os == 'ubuntu-latest' && matrix.config.dependencies != 'minimal' }}
- name: Test with pytest
run: |
pytest --cov=signac --cov-config=pyproject.toml --cov-report=xml tests/ -v
Expand Down
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ repos:
- id: mypy
additional_dependencies:
- types-filelock
- types-redis
10 changes: 9 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ The **signac** package follows `semantic versioning <https://semver.org/>`_.
Version 2
=========

[2.1.0] -- 2023-XX-XX
---------------------

Changed
+++++++

- signac's "synced collections" backend used for reading/writing JSON files has been moved to a separate package called ``synced_collections``. See https://github.com/glotzerlab/synced_collections (#924).

[2.0.0] -- 2023-03-30
---------------------

Expand Down Expand Up @@ -94,7 +102,7 @@ Changed
- Project names have a default in anticipation of removing names entirely. Project names will be removed in signac 2.0 (#644).
- ``Project.workspace`` is now a property, not a method (#685).
- Continuous integration uses GitHub Actions instead of CircleCI (#776, #788).
- Raise errors in testing when ``DeprecatedWarning``s or ``FutureWarning``s are raised (#713).
- Raise errors in testing when ``DeprecatedWarning`` or ``FutureWarning`` is raised (#713).
- Change GitHub PR to check for uncompleted tasks (i.e. unchecked checkboxes) (#686).

Deprecated
Expand Down
8 changes: 0 additions & 8 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,6 @@ signac.sync module
:undoc-members:
:show-inheritance:

signac.warnings module
----------------------

.. automodule:: signac.warnings
:members:
:undoc-members:
:show-inheritance:

signac.errors module
--------------------

Expand Down
28 changes: 5 additions & 23 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,8 @@
to show the default.
"""

import sys
from unittest.mock import MagicMock

import sphinx_rtd_theme


class Mock(MagicMock):
"""Mocks modules and their contained objects."""

@classmethod
def __getattr__(cls, name):
if name == "_mock_methods":
return []
if name == "version_tuple":
return (3, 0)
return Mock()


MOCK_MODULES = ["pymongo"]
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down Expand Up @@ -87,7 +68,7 @@ def __getattr__(cls, name):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -316,10 +297,11 @@ def __getattr__(cls, name):

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"pymongo": ("https://pymongo.readthedocs.io/en/stable/", None),
"synced_collections": (
"https://docs.signac.io/projects/synced-collections/en/latest/",
None,
),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"h5py": ("https://docs.h5py.org/en/stable/", None),
"zarr": ("https://zarr.readthedocs.io/en/stable", None),
"redis": ("https://redis-py.readthedocs.io/en/stable/", None),
"numcodecs": ("https://numcodecs.readthedocs.io/en/stable/", None),
}
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ dependencies = [
"filelock>=3.0",
# Used for version parsing and comparison
"packaging>=15.0",
# Synced collections for signac's backend
"synced_collections>=1.0.0",
# Progress bars
"tqdm>=4.10.0",
]
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
filelock>=3.0
packaging>=15.0
synced_collections>=1.0.0
tqdm>=4.10.0
3 changes: 0 additions & 3 deletions requirements/requirements-test-optional.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
h5py==3.8.0; implementation_name=='cpython'
numpy==1.24.3
pandas==2.0.1; implementation_name=='cpython'
pymongo==4.3.3; implementation_name=='cpython'
redis==4.5.4
ruamel.yaml==0.17.21
tables==3.8.0; implementation_name=='cpython'
zarr==2.14.2; platform_system!='Windows'
5 changes: 2 additions & 3 deletions signac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
collectively accessible.
"""

from synced_collections.backends.collection_json import BufferedJSONAttrDict as JSONDict

from . import errors, sync
from ._synced_collections.backends.collection_json import (
BufferedJSONAttrDict as JSONDict,
)
from .diff import diff_jobs
from .h5store import H5Store, H5StoreManager
from .project import Project, TemporaryProject, get_job, get_project, init_project
Expand Down
25 changes: 0 additions & 25 deletions signac/_synced_collections/__init__.py

This file was deleted.

81 changes: 0 additions & 81 deletions signac/_synced_collections/_caching.py

This file was deleted.

11 changes: 0 additions & 11 deletions signac/_synced_collections/backends/__init__.py

This file was deleted.

0 comments on commit 06739c6

Please sign in to comment.