Add pyproject.toml
so that other projects can reference it
#107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Some Python packages in this repo need to be referenced by other projects such as
nomos-simulations
.Although the simulations and PoCs need to be done in prior to writing executable specs in this repo, some simulations need to be based on existing specs defined in repo. For example, the mixnet simulation is based on some code in this repo that was defined long time ago.
So, instead of maintaining the same code in different repos, I made this repo can be referenced by other projects.
Changes.
I added
pyproject.toml
. Although we are not going to publish this repo to PyPI right now, we need this file, so that other projects can reference it by specifying the following dependency in theirrequirements.txt
.Then, they can import packages like:
This
pyproject.toml
includes only Python packages (mixnet
,cryptarchia
,da
), not Rust packages (cl
,goas
).I tested this in my local. The related PR is coming soon in the
nomos-simulations
repo.Notes
According to PEP 8 style guide, it's better to move all subpackages into the new
nomos_specs
directory, so that they can be imported byfrom nomos_specs.mixnet.config import MixnetConfig
. But, I didn't change the directory structure in this PR for now to make changes simpler. I think it's not bad to dofrom mixnet....
because we are not publishing this to PyPI. Later, we can reorganize the directory structure if needed.