New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
268 quickstart #276
268 quickstart #276
Conversation
|
||
.. code-block:: bash | ||
|
||
% pip install opendp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This percent reminds me of the %pip
magic command from notebooks. But the percent is not necessary in a terminal. Why is the percent here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an Andy-ism. Now that I know sphinx a little better, I think the right thing to do is this:
.. prompt:: bash
pip install opendp
That requires the sphinx-prompt plugin, which I'm adding in #270. As part of that, I can come back and tweak this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same thought but let it go (it was copied from the Getting Started page). I typically see $
instead of %
for my shell prompt. That said, I like the idea of simply removing it.
Even without the sphinx-prompt plugin (I haven't heard of it), we can still do .. code-block:: bash
. There are examples on the Logistics page in the Dev Guide.
>>> from opendp.trans import make_identity | ||
>>> from opendp.typing import SubstituteDistance | ||
|
||
>>> identity = make_identity(M=SubstituteDistance, TA=str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The identity transformation seems like a simple transform, but the nature of the function is so unconstrained that it has many free variables. We also generally work with SymmetricDistance, so using SubstituteDistance in the quickstart may be confusing. The identity function also doesn't have much of a use. Perhaps we could switch to clamp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also my cruft from an old example. We need a simple example for #270 also, so let's figure out something for that, then update this afterward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may need a little TLC after the User Guide intro is updated in #270, but I'd like to get something in ASAP instead of the current placeholder, so merging now.
closes #268