-
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.
- Loading branch information
Showing
20 changed files
with
59 additions
and
59 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
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,15 +1,15 @@ | ||
# MetaSynth plugin template | ||
# metasyn plugin template | ||
|
||
Template for creating plugins for the MetaSynth library. Follow these steps to create a new plugin from this template: | ||
Template for creating plugins for the metasyn library. Follow these steps to create a new plugin from this template: | ||
|
||
- Install cookiecutter: `pip install cookiecutter` on the command line. | ||
- Use the template: `cookiecutter https://github.com/sodascience/metasynth-plugin-template` | ||
- Use the template: `cookiecutter https://github.com/sodascience/metasyn-plugin-template` | ||
|
||
The template is now ready to use. To finish your plugin, edit the following modules: | ||
|
||
- `metasynthcontrib.{plugin_name}.privacy`: If you are writing a new privacy plugin, edit the `__init__` and `to_dict` methods. Otherwise delete this file. | ||
- `metasynthcontrib.{plugin_name}.base`: Change the `privacy` class variable if necessary. | ||
- `metasynthcontrib.{plugin_name}.categorical/continuous/datetime/string/discrete`: Implement distributions here. | ||
- `metasynthcontrib.{plugin_name}.provider`: Add the newly implemented distributions. | ||
- `metasyncontrib.{plugin_name}.privacy`: If you are writing a new privacy plugin, edit the `__init__` and `to_dict` methods. Otherwise delete this file. | ||
- `metasyncontrib.{plugin_name}.base`: Change the `privacy` class variable if necessary. | ||
- `metasyncontrib.{plugin_name}.categorical/continuous/datetime/string/discrete`: Implement distributions here. | ||
- `metasyncontrib.{plugin_name}.provider`: Add the newly implemented distributions. | ||
|
||
Your plugin should now be ready to go. GitHub actions is part of the template, so after pushing your new plugin to GitHub it should automatically start testing your code. |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"plugin_name": "Differential Privacy", | ||
"user_name": "Raoul Schram", | ||
"email": "[email protected]", | ||
"__plugin_slug": "metasynth-{{ cookiecutter.plugin_name|lower|replace(' ', '-') }}", | ||
"__plugin_slug": "metasyn-{{ cookiecutter.plugin_name|lower|replace(' ', '-') }}", | ||
"__package_name": "{{ cookiecutter.plugin_name|lower|replace(' ', '_') }}", | ||
"__plugin_camel": "{{ cookiecutter.plugin_name|replace(' ', '') }}", | ||
"privacy": "{{ cookiecutter.__package_name }}" | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
include metasynthcontrib/{{ cookiecutter.__package_name }}/py.typed | ||
include metasyncontrib/{{ cookiecutter.__package_name }}/py.typed |
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
1 change: 1 addition & 0 deletions
1
...ookiecutter.__plugin_slug }}/metasyncontrib/{{ cookiecutter.__package_name }}/__init__.py
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
"""{{ cookiecutter.plugin_name|lower }} plugin for metasyn.""" |
2 changes: 1 addition & 1 deletion
2
...{{ cookiecutter.__package_name }}/base.py → ...{{ cookiecutter.__package_name }}/base.py
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
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
2 changes: 1 addition & 1 deletion
2
...cookiecutter.__package_name }}/privacy.py → ...cookiecutter.__package_name }}/privacy.py
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
4 changes: 2 additions & 2 deletions
4
...ookiecutter.__package_name }}/provider.py → ...ookiecutter.__package_name }}/provider.py
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
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
... cookiecutter.__package_name }}/string.py → ... cookiecutter.__package_name }}/string.py
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
1 change: 0 additions & 1 deletion
1
...kiecutter.__plugin_slug }}/metasynthcontrib/{{ cookiecutter.__package_name }}/__init__.py
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