-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: rename to xmmutablemap * docs: setup * build: add testpypi Signed-off-by: nstarman <[email protected]>
- Loading branch information
Showing
17 changed files
with
89 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ email: [email protected] | |
full_name: Galactic Dynamics Maintainers | ||
license: MIT | ||
org: GalacticDynamics | ||
project_name: immutable_map_jax | ||
project_name: xmmutablemap | ||
project_short_description: Immutable Map, compatible with JAX & Equinox | ||
url: https://github.com/GalacticDynamics/immutable_map_jax | ||
url: https://github.com/GalacticDynamics/xmmutablemap | ||
vcs: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,4 +85,3 @@ repos: | |
hooks: | ||
- id: check-dependabot | ||
- id: check-github-workflows | ||
- id: check-readthedocs |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,59 @@ | ||
# immutable_map_jax | ||
<h1 align='center'> xmmutablemap </h1> | ||
<h2 align="center"><cod>Jax</code>-compatible Immutable Map</h2> | ||
|
||
[![Actions Status][actions-badge]][actions-link] | ||
[![Documentation Status][rtd-badge]][rtd-link] | ||
JAX prefers immutable objects but neither Python nor JAX provide an immutable | ||
dictionary. 😢 </br> This repository defines a light-weight immutable map | ||
(lower-level than a dict) that JAX understands as a PyTree. 🎉 🕶️ | ||
|
||
## Installation | ||
|
||
[![PyPI version][pypi-version]][pypi-link] | ||
[![Conda-Forge][conda-badge]][conda-link] | ||
[![PyPI platforms][pypi-platforms]][pypi-link] | ||
[![PyPI version][pypi-version]][pypi-link] | ||
|
||
<!-- [![Conda-Forge][conda-badge]][conda-link] --> | ||
|
||
```bash | ||
pip install xmmutablemap | ||
``` | ||
|
||
## Documentation | ||
|
||
[![GitHub Discussion][github-discussions-badge]][github-discussions-link] | ||
<!-- [![Documentation Status][rtd-badge]][rtd-link] --> | ||
|
||
`xmutablemap` provides the class `ImmutableMap`, which is a full implementation | ||
of | ||
[Python's `Mapping` ABC](https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes). | ||
If you've used a `dict` then you already know how to use `ImmutableMap`! The | ||
things `ImmutableMap` adds is 1) immutability (and related benefits like | ||
hashability) and 2) compatibility with `JAX`. | ||
|
||
```python | ||
from xmmutablemap import ImmutableMap | ||
|
||
print(ImmutableMap(a=1, b=2, c=3)) | ||
# ImmutableMap({'a': 1, 'b': 2, 'c': 3}) | ||
|
||
print(ImmutableMap({"a": 1, "b": 2.0, "c": "3"})) | ||
# ImmutableMap({'a': 1, 'b': 2.0, 'c': '3'}) | ||
``` | ||
|
||
## Development | ||
|
||
[![Actions Status][actions-badge]][actions-link] | ||
|
||
<!-- SPHINX-START --> | ||
We welcome contributions! | ||
|
||
<!-- prettier-ignore-start --> | ||
[actions-badge]: https://github.com/GalacticDynamics/immutable_map_jax/workflows/CI/badge.svg | ||
[actions-link]: https://github.com/GalacticDynamics/immutable_map_jax/actions | ||
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/immutable_map_jax | ||
[conda-link]: https://github.com/conda-forge/immutable_map_jax-feedstock | ||
[github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github | ||
[github-discussions-link]: https://github.com/GalacticDynamics/immutable_map_jax/discussions | ||
[pypi-link]: https://pypi.org/project/immutable_map_jax/ | ||
[pypi-platforms]: https://img.shields.io/pypi/pyversions/immutable_map_jax | ||
[pypi-version]: https://img.shields.io/pypi/v/immutable_map_jax | ||
[rtd-badge]: https://readthedocs.org/projects/immutable_map_jax/badge/?version=latest | ||
[rtd-link]: https://immutable_map_jax.readthedocs.io/en/latest/?badge=latest | ||
[actions-badge]: https://github.com/GalacticDynamics/xmmutablemap/workflows/CI/badge.svg | ||
[actions-link]: https://github.com/GalacticDynamics/xmmutablemap/actions | ||
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/xmmutablemap | ||
[conda-link]: https://github.com/conda-forge/xmmutablemap-feedstock | ||
<!-- [github-discussions-badge]: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github | ||
[github-discussions-link]: https://github.com/GalacticDynamics/xmmutablemap/discussions --> | ||
[pypi-link]: https://pypi.org/project/xmmutablemap/ | ||
[pypi-platforms]: https://img.shields.io/pypi/pyversions/xmmutablemap | ||
[pypi-version]: https://img.shields.io/pypi/v/xmmutablemap | ||
[zenodo-badge]: https://zenodo.org/badge/755708966.svg | ||
[zenodo-link]: https://zenodo.org/doi/10.5281/zenodo.10850557 | ||
|
||
<!-- prettier-ignore-end --> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build" | |
|
||
|
||
[project] | ||
name = "immutable_map_jax" | ||
name = "xmmutablemap" | ||
authors = [ | ||
{ name = "Galactic Dynamics Maintainers", email = "[email protected]" }, | ||
] | ||
|
@@ -44,24 +44,17 @@ dev = [ | |
"pytest >=6", | ||
"pytest-cov >=3", | ||
] | ||
docs = [ | ||
"sphinx>=7.0", | ||
"myst_parser>=0.13", | ||
"sphinx_copybutton", | ||
"sphinx_autodoc_typehints", | ||
"furo>=2023.08.17", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/GalacticDynamics/immutable_map_jax" | ||
"Bug Tracker" = "https://github.com/GalacticDynamics/immutable_map_jax/issues" | ||
Discussions = "https://github.com/GalacticDynamics/immutable_map_jax/discussions" | ||
Changelog = "https://github.com/GalacticDynamics/immutable_map_jax/releases" | ||
Homepage = "https://github.com/GalacticDynamics/xmmutablemap" | ||
"Bug Tracker" = "https://github.com/GalacticDynamics/xmmutablemap/issues" | ||
Discussions = "https://github.com/GalacticDynamics/xmmutablemap/discussions" | ||
Changelog = "https://github.com/GalacticDynamics/xmmutablemap/releases" | ||
|
||
|
||
[tool.hatch] | ||
version.source = "vcs" | ||
build.hooks.vcs.version-file = "src/immutable_map_jax/_version.py" | ||
build.hooks.vcs.version-file = "src/xmmutablemap/_version.py" | ||
|
||
[tool.hatch.envs.default] | ||
features = ["test"] | ||
|
@@ -82,7 +75,7 @@ testpaths = [ | |
|
||
|
||
[tool.coverage] | ||
run.source = ["immutable_map_jax"] | ||
run.source = ["xmmutablemap"] | ||
report.exclude_also = [ | ||
'\.\.\.', | ||
'if typing.TYPE_CHECKING:', | ||
|
@@ -99,7 +92,7 @@ disallow_untyped_defs = false | |
disallow_incomplete_defs = false | ||
|
||
[[tool.mypy.overrides]] | ||
module = "immutable_map_jax.*" | ||
module = "xmmutablemap.*" | ||
disallow_untyped_defs = true | ||
disallow_incomplete_defs = true | ||
|
||
|
Oops, something went wrong.