Map of Objects---essential parts
Project description
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.
Current status of mapof vs mapel
We successively substitute mapel packages present when we decided to start mapof and abandon active development of mapel. Here is the current status:
mapel-core==> mapofmapel-elections==> mapof-elections- mapel-roommates ==> development ongoing
- mapel-marriages ==> developmnet ongoing
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.
[!TIP] You can still patch mapof using the fact that functions are First-Class Citizens in Python. By separating changes from the actual mapof code, the changes can later be easily changed to pull requests. And we would be very happy if you contribute to mapof. For details, see the section below.
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
world 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.
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mapof-0.1.0b2.tar.gz
.
File metadata
- Download URL: mapof-0.1.0b2.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5309a9ecc73f3d3c9c9117dee682e28aac260f09a4074c1de6dc20380e1a306d |
|
MD5 | c6f71d691499c6b53884e3547a290a27 |
|
BLAKE2b-256 | a6a6c058f98aef752590acf2bf4fcbed28df6e4ec2d7d41b7e884c7e31fa3396 |
File details
Details for the file mapof-0.1.0b2-py3-none-any.whl
.
File metadata
- Download URL: mapof-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 45.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff1f6dbec571d5468dc44912fc7f1b7abce44b505ae345f47bae7636bc27a93e |
|
MD5 | 0ec83b1e9dd87f18dd997c1168501f60 |
|
BLAKE2b-256 | f08309e82d7e2e9306d912bfc0abbf61fc3299b9b488c85fef5491fbb7e954a3 |