Mapof
This open-source, MIT-licensed package is a core part of the Mapof ecosystem. This framework allow for representing various features of (computational) problem instances in the context of the instance structure in a visually appealing way. Mapof is a direct successor of mapel, which will be deprecated in the (unforeseen) future.
Mapel is abandoned, long live Mapof!!!
We've successively substituted mapel packages present when we decided to start Mapof and have abandoned active development of mapel. Here is a map of the old and new projects:
mapel-core==> Mapofmapel-elections==> Mapof-electionsmapel-roommates==> Mapof-roommatesmapel-marriagess==> Mapof-marriages
Hence, this package, Mapof, is a direct successor of mapel-core.
Installation of Mapof
There are in principle three (standard to python packages) ways to install Mapof. We strongly recommend installing the package from PyPi but you can also: use the code as a local package or install the package from the local code using some package manager.
Installation from PyPi
We recommend installing Mapof in a separate virtual environment (we use venv
but any reasonable environment manager should do). Installation from Pypi with
one of Python's package managers allows a seamless usage of Mapof with its
remaining modules, that are to come soon, which all declare Mapof as
dependency. A drawback is here that one cannot edit the Mapof code easily. If
you use pip type pip install mapof to get the newest version and your are
ready to go. If you use other package managers, do whatever it usually takes to
install packages from PyPi.
If pip drops executables into a user-local directory (for example
~/Library/Python/3.13/bin on macOS), add it to your shell PATH so commands
like tqdm are available:
export PATH="$HOME/Library/Python/3.13/bin:$PATH"
Patching installation from PyPi
To patch function mapof.bar.foo you can define your own function my_foo and
then assign it using mapof.bar.foo = mapof.bar.my_foo. If you do this before
calling mapof.bar.foo, then each call to mapof.bar.foo will actually run
your my_foo function.
Using code locally without package managers
Using the code as a local package is another option. Doing so, by downloading the package and importing different modules directly, comes with an easy way to edit Mapof files. However, it enforces usage of all other Mapof packages in the very same way. Trying installing other packages via some package manger will most likely result in that you will be using the manager-downloaded PyPi version of the Mapof module instead of your handcrafted one (there are workarounds, but you probably know these tricks very well if you ever want to take this path).
Using code locally with package manager
A somewhat compromise solution is to fork the repo and install the package into the package management system using your locally stored (perhaps edited) code. This might have a drawback that you need to update your installation after every change you make in the Mapof code.
However pip offers a handy solution here, the editable mode. Overall, using
pip you can pass to pip install the path to the project (where
pyproject.toml resides) and the -e switch. By this you get the best of two
worlds Mapof is managed by pip and your modifications of the package are
reflected immediately in the code that uses Mapof. This approach also have its
limitations but in most cases it should just work well. In case you experience
troubles, you should see what the pip documentation has to say about the
editable mode.
Documentation
The complete documentation is available here.
Contribution
Feel free to contribute to Mapof using pull requests. We use black to enforce a coherent code style.
Acknowledgments
This project is part of the PRAGMA project which has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 101002854).
Metadata
Release files for mapof 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mapof-0.1.6.tar.gz | 2.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mapof-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.1 MB
Release files / mapof-0.1.6.tar.gz
| Download URL | mapof-0.1.6.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb1064276a4592b41b1f2af07e57376d45b1892da678acdaa50c527b9f4ecb39
|
|
BLAKE2b-256 checksum How to use checksums |
b25a1bcba8091f62a56fd224a6ec612a1b7e62b9c5739cdfd35e6b0495693255
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 17, 2025.
Transparency logRelease files / mapof-0.1.6-py3-none-any.whl
| Download URL | mapof-0.1.6-py3-none-any.whl |
|---|---|
| Size | 49.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c616c25d242632c9c7fe8f4f80fad389bdf4dff4d2fc5daffd36fd3edd80b164
|
|
BLAKE2b-256 checksum How to use checksums |
add6e7c2d0437936529678d23549f7e015fb85edaecdb371055b3dca9f9d4c2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 17, 2025.
Transparency log