Skip to content

Commit

Permalink
Spruce up the contribution guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu committed Dec 17, 2024
1 parent 78fa073 commit 70a3707
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 78 deletions.
27 changes: 26 additions & 1 deletion docs/contact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,30 @@ making our products better, or pretty much anything else, reach out!

* Open an issue in our github repo for lsdb
* https://github.com/astronomy-commons/lsdb/issues/new
* Start a new github discussion
* https://github.com/astronomy-commons/lsdb/discussions/new/choose
* If you're on LSSTC slack, so are we!
`#lincc-frameworks-qa <https://lsstc.slack.com/archives/C062LG1AK1S>`_
* `#lincc-frameworks-qa <https://lsstc.slack.com/archives/C062LG1AK1S>`_
* `#lincc-frameworks-lsdb <https://lsstc.slack.com/archives/C04610PQW9F>`_
* Join the working group, where we discuss HATS standardization and early results
* Google group: `[email protected] <https://groups.google.com/g/hipscat-wg>`_
* You can listen in to demo meetings, or ask questions during co-working sessions.
Events are published on a google calendar, embedded below.
* Key:
* "HATS/LSDB Working Meeting" - Drop-in co-working/office hours.
* "HATS/LSDB Europe Working group" - Intended as European time zone friendly
discussion of HATS and LSDB. Generally open.
* "HATS/LSDB Monthly Demos" - A more structured telecon, with updates from
developers and collaborators, and HATS standardization planning.
* "LINCC Tech Talk" - Tech Talk series for software spanning LSST.
* "LINCC Frameworks Office Hours" - General office hours for anything
related to software maintained by LINCC Frameworks, during LINCC
incubators, or general software advice.

.. raw:: html

<iframe src="https://calendar.google.com/calendar/embed?height=600&wkst=1&ctz=America%2FNew_York&showPrint=0&src=Y180YTU1MTFiMDJiNjQ0OTlkNzIxNGE3Y2Y1NWY3NTE3NTY5YmE5NjQ1Y2FiMWM0YzA4YTdjYTQxYTIwNDE3YWQ1QGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20&src=NWI3MDkyYTAxOTZlMjkwODQ4ODEwOGYzMTk2NjM3Yjg0MzU4ZWNlNjIwMzJkYTVhYzY4ZWRjMGIwNGM5ZWFkNUBncm91cC5jYWxlbmRhci5nb29nbGUuY29t&color=%23F4511E&color=%23F09300" style="border:solid 1px #777" width="800" height="600" frameborder="0" scrolling="no"></iframe>

However you reach out, we want to make sure that any discourse is open and
inclusive, and we ask that everyone involved read and adhere to the
`LINCC Frameworks Code of Conduct <https://lsstdiscoveryalliance.org/programs/lincc-frameworks/code-conduct/>`_
118 changes: 41 additions & 77 deletions docs/developer/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Contributing to LSDB
===============================================================================

HATS and LSDB are primarily written and maintained by LINCC Frameworks, but we
would love to turn it over to the open-source scientific community!! We want to
make sure that any discourse is open and inclusive, and we ask that everyone
involved read and adhere to the
`LINCC Frameworks Code of Conduct <https://lsstdiscoveryalliance.org/programs/lincc-frameworks/code-conduct/>`_

Installation from Source
------------------------

Expand All @@ -11,15 +17,8 @@ To install the latest development version of LSDB you will want to build it from
git clone https://github.com/astronomy-commons/lsdb
cd lsdb/
To install the package and a minimum number of dependencies you can run:

.. code-block:: bash
python -m pip install .
python -m pip install pytest # to validate package installation
In alternative, you can execute the `setup_dev` script which installs all the additional requirements
to setup a development environment.
To install the package and dependencies you can run the ``setup_dev`` script which installs all
the requirements to setup a development environment.

.. code-block:: bash
Expand All @@ -44,6 +43,14 @@ a description.
You can reach the team with bug reports, feature requests, and general inquiries
by creating a new GitHub issue.

Note that you may need to make changes in multiple repos to fully implement new
features or bug fixes! See related projects:

* HATS (`on GitHub <https://github.com/astronomy-commons/hats>`_
and `on ReadTheDocs <https://hats.readthedocs.io/en/stable/>`_)
* HATS Import (`on GitHub <https://github.com/astronomy-commons/hats-import>`_
and `on ReadTheDocs <https://hats-import.readthedocs.io/en/stable/>`_)

Fork the repository
-------------------------------------------------------------------------------

Expand All @@ -53,74 +60,10 @@ the GitHub repository. The next steps assume the creation of branches and PRs ar
.. note::

If you are (or expect to be) a frequent contributor, you should consider requesting
access to the `hipscat-friends <https://github.com/orgs/astronomy-commons/teams/hipscat-friends>`_
access to the `hats-friends <https://github.com/orgs/astronomy-commons/teams/hats-friends>`_
working group. Members of this GitHub group should be able to create branches and PRs directly
on LSDB, hats and hats-import, without the need of a fork.

Create a branch
-------------------------------------------------------------------------------

It is preferable that you create a new branch with a name like
``issue/##/<short-description>``. GitHub makes it pretty easy to associate
branches and tickets, but it's nice when it's in the name.

Set up a development environment
-------------------------------------------------------------------------------

Before installing any dependencies or writing code, it's a great idea to create a
virtual environment. LINCC-Frameworks engineers primarily use `conda` to manage virtual
environments. If you have conda installed locally, you can run the following to
create and activate a new environment.

.. code-block:: bash
>> conda create -n <env_name> python=3.10
>> conda activate <env_name>
Once you have created a new environment, you can install this project for local
development using the following commands:

.. code-block:: bash
>> pip install -e .'[dev]'
>> pre-commit install
>> conda install pandoc
Notes:

1) The single quotes around ``'[dev]'`` may not be required for your operating system.
2) ``pre-commit install`` will initialize pre-commit for this local repository, so
that a set of tests will be run prior to completing a local commit. For more
information, see the Python Project Template documentation on
`pre-commit <https://lincc-ppt.readthedocs.io/en/stable/practices/precommit.html>`_.
3) Installing ``pandoc`` allows you to verify that automatic rendering of Jupyter notebooks
into documentation for ReadTheDocs works as expected. For more information, see
the Python Project Template documentation on
`Sphinx and Python Notebooks <https://lincc-ppt.readthedocs.io/en/stable/practices/sphinx.html#python-notebooks>`_.

.. tip::
Installing on Mac

Native prebuilt binaries for healpy on Apple Silicon Macs
`do not yet exist <https://healpy.readthedocs.io/en/latest/install.html#binary-installation-with-pip-recommended-for-most-other-python-users>`_,
so it's recommended to install via conda before proceeding to LSDB.

.. code-block:: bash
$ conda config --add channels conda-forge
$ conda install healpy
$ git clone https://github.com/astronomy-commons/lsdb
$ cd lsdb
$ pip install -e .
When installing dev dependencies, make sure to include the single quotes.

.. code-block:: bash
$ pip install -e '.[dev]'
Testing
-------------------------------------------------------------------------------

Expand All @@ -139,12 +82,26 @@ you can build the documentation locally with a command like:
cd docs
make html
We also have a handful of automated linters and checks using ``pre-commit``. You
can run against all staged changes with the command:

.. code-block:: bash
pre-commit
Create a branch
-------------------------------------------------------------------------------

It is preferable that you create a new branch with a name like
``issue/##/<short-description>``. GitHub makes it pretty easy to associate
branches and tickets, but it's nice when it's in the name.

Create your PR
-------------------------------------------------------------------------------

Please use PR best practices, and get someone to review your code. Feel free to
assign any of the active developers of LSDB (https://github.com/camposandro,
https://github.com/delucchi-cmu, or https://github.com/smcguire-cmu).
You will be required to get your code approved before merging into main.
If you're not sure who to send it to, you can use the round-robin assignment
to the ``astronomy-commons/lincc-frameworks`` group.

We have a suite of continuous integration checks that run on PR creation. Please
follow the code quality recommendations of the linter and formatter, and make sure
Expand All @@ -155,3 +112,10 @@ Merge your PR

When all the continuous integration checks have passed and upon receiving an
approving review, the author of the PR is welcome to merge it into the repository.

Release new version
-------------------------------------------------------------------------------

New versions are manually tagged and automatically released to pypi. To request
a new release of LSDB, HATS, and HATS import packages, create a
`release ticket <https://github.com/astronomy-commons/lsdb/issues/new?assignees=delucchi-cmu&labels=&projects=&template=4-release_tracker.md&title=Release%3A+>`_

0 comments on commit 70a3707

Please sign in to comment.