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

The contributor guide #1597

Merged
merged 5 commits into from
Aug 1, 2022

Conversation

nanjekyejoannah
Copy link
Contributor

@nanjekyejoannah nanjekyejoannah commented Jun 28, 2022

This is the first draft for the contribution guide, whose issue is tracked here #1574

Dont review until we have had our meeting with @LPereira95 tommorrow.

I want to clarify about:

  • Tests
  • Templates for PRs and issues and
  • Benchmarks and
  • Triaging

@nanjekyejoannah nanjekyejoannah changed the title WIP: The contributor guide The contributor guide Jun 28, 2022
@nanjekyejoannah
Copy link
Contributor Author

Create the issue template and include it in the docs.

@nanjekyejoannah
Copy link
Contributor Author

nanjekyejoannah commented Jun 29, 2022

Benchmarks stability still under review, we will hold until we find a way of documenting how to run them. We will chat with sateja

@nanjekyejoannah
Copy link
Contributor Author

This PR is ready for review.

Copy link
Collaborator

@adele-myers adele-myers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all is great! 😄 Thank you for all your hard work! I have made a few comments and suggestions.

Code is not the only way to help the project:
The instrcutions in this section detail the step-by-step
process on setting up your development environment before
contribution. One can also us it as a development checklist
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 17: us -> use

6. At this point you should have the Geomstats code on your macine ready for development.
To continue development, create a new development branch:

$ git checkout -b feature-branch
Copy link
Collaborator

@adele-myers adele-myers Jul 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment isn't very important, but if we are making this tutorial for people who are very new to git, it might be helpful to change feature_branch to your-branch-name or something like that. When i am reading through tutorials, i find it helpful when people make it super obvious where i am supposed to add my own "name" or something like that. But again, this is not very important.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a different section for git intro, check dev setup where I use your-branch-name, this is about working on a new feature. Please look with this context and advise if we should still make this change.


1. Using your browser, go to https://github.com and create an account if you dont have one.
2. While there, navigate to https://github.com/geomstats/geomstats.
3. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to split up this sentence to make it clearer: "Fork the repository so that you will have your own copy. You can do this by clicking a button in the top righthand corner of the git webpage..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new commit has this change


$ git checkout -b feature-branch

7. Verify tat you are on the new branch:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 67 typo: tat -> that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

---------------------------------------

We recommend using the conda virtual environment to create separation between your development environment
from aany other Geomstats versions installed on your system. Create a virtual environment with conda using:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 86 typo: aany -> any

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


use the syntax::

my_function_with_a_very_long_name(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha I laughed at "my_function_with_a_very_long_name" 🤣 .

of the function is changed.

These guidelines can be revised and modified at any time, the only constraint
is that they should remain consistent through the codebase. To change geomstats
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geomstats -> Geomstats' (with apostrophe at the end)

@luisfpereira luisfpereira marked this pull request as ready for review July 19, 2022 16:46
@luisfpereira luisfpereira self-requested a review July 19, 2022 16:46
Copy link
Collaborator

@Jules-Deschamps Jules-Deschamps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks super helpful! Thank you, I have left some comments (mostly unimportant typos I think)

- working on the website and improving the documentation,
- reference the project in your articles,
- or simply star it to say "I use it",
The instrcutions in this section detail the step-by-step
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instructions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


.. _filing_bugs:
#. Using your browser, go to `github.com <https://github.com>`_ and create an account if you dont have one.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


.. code-block:: bash

$ pip install geomstats[<backend_name>]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add an example (just so people do not literally write <backend_name> (I know I could have several years ago)) but this is really unimportant

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 think its common convention to use fillers like these especially if we have many option. Inclined to keep as is.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @nanjekyejoannah.


$ numpy tests

Run a test file:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some test files that you can run with pytest checking whether or not the associated scripts do not raise any error. For example if you run test_hypersphere with pytest it will test that hypersphere runs properly (that everything works if the test file is well-written) I hope this makes sense. This is explained later on I think but maybe it would make sense to put it before?


In the first few steps, we explain how to locally install geomstats, and
how to set up your git repository:
Use an `asert` statement to check that the function under test returns
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert I assume?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@luisfpereira luisfpereira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nanjekyejoannah!

Very nice contribution. Looking forward for the continuation of this work.

.. note::
For more basic information about the `git` command line client, refer to
this `detailed tutorial <https://docs.github.com/en/get-started/using-git/about-git>`_.
You can also checkout other GUI options like `tortoise git <https://tortoisegit.org/>`_
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about providing a list of guis instead of specifying? e.g. https://git-scm.com/downloads/guis


How to Write a Good Bug Report
==============================
#. | Fork the repository, obtaining your own copy. You can do this using a button at the top right corner on github, under your username:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"[...] under you username. The following link will become available then:"

Something like this? otherwise I think there's lack of continuity in the sentence.


Contributing: Adding a new geometry or manifold
-----------------------------------------------
$ git checkout -b feature-branch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe: <branch-name>?

Comment on lines 662 to 664
9. Use double quotes " and not single quotes ' for strings.

10. If you need several lines for a function call,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this guidelines may have became outdated with the use of black.

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 suggest we handle this in another PR, to avoid scope creep.


We are glad to accept any sort of documentation: function docstrings,
reStructuredText documents (like this one), tutorials, etc. reStructuredText
documents live in the source code repository under the ``docs/`` directory.

Building the Documentation
==========================
documentation

Building the documentation requires installing sphinx::

pip3 install sphinx
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above.

To build the documentation, you need to be in the main ``geomstats`` folder. You can do this with::

sphinx-build docs/ docs/html
To build the documentation, follow the steps discussed in `build the docs`_ to install other dependecies
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependencies

==================
-------------------

**Intro to Docstrings**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the rendering of a meaningful example, as we've discussed.

Reporting bugs and features
===========================

Sharing bugs and potential new features for the geomstats project is an equally significant conteibution.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contribution

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we differentiate the other section of workflow of a contribution? I am inclined to name this something similar to bugs/features etc

@nanjekyejoannah
Copy link
Contributor Author

I have addressed the requested changes from @LPereira95 , for what I havent handled, i left a comment.

@luisfpereira
Copy link
Collaborator

Thanks @nanjekyejoannah! I've made small changes to your PR.

I'll merge it now.

We can proceed this part by splitting the contributing guide in sections, as discussed, and then going deeper in the important sections (read tests, backends and docstrings).

@luisfpereira luisfpereira merged commit 9076d69 into geomstats:master Aug 1, 2022
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.

4 participants