Skip to content
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

Merged
merged 3 commits into from Sep 10, 2021
Merged

268 quickstart #276

merged 3 commits into from Sep 10, 2021

Conversation

pdurbin
Copy link
Contributor

@pdurbin pdurbin commented Sep 9, 2021

closes #268


.. code-block:: bash

% pip install opendp
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

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)
Copy link
Member

@Shoeboxam Shoeboxam Sep 10, 2021

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?

Copy link
Member

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.

Copy link
Member

@andrewvyrros andrewvyrros left a 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.

@andrewvyrros andrewvyrros merged commit af7b2d9 into main Sep 10, 2021
@andrewvyrros andrewvyrros deleted the 268-quickstart branch September 10, 2021 15:21
github-actions bot pushed a commit that referenced this pull request Sep 10, 2021
Shoeboxam pushed a commit that referenced this pull request Sep 13, 2021
* base quickstart off getting started (simplify a bit) #268

* prevent TypeError: make_identity() got an unexpected keyword argument 'T' #268

Co-authored-by: Andrew Vyrros <6577271+andrewvyrros@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs Update -- Quickstart
3 participants