Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions docs/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ SPRAS contributions:
or `10 minutes to pandas
<https://pandas.pydata.org/pandas-docs/stable/user_guide/10min.html>`__

Before getting started, verify your environment is ready with these
checks:

.. code:: bash

docker --version

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we want to have these checks, should we also add the expected output? The specific output will be different depending on what each contributor has installed, but I think we should give some guidance about how someone can tell if everything is ready or not. Maybe the signal is that they don't get errors?

docker run hello-world
docker login
conda --version
git --version
python -c "import spras; print('SPRAS import successful')"

If the commands above run without errors, your environment is ready.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should we also add a check to make sure SPRAS conda env is ready?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

python -c "import spras; print('SPRAS import successful')" is what is in the spras tutorial.

*************************************************
Step 0: Fork the repository and create a branch
*************************************************
Expand Down Expand Up @@ -202,8 +216,9 @@ and explore the nodes and interactome.
.. code:: python

> from spras.dataset import Dataset
> dataset_dict = {'label': 'data0', 'node_files': ['node-prizes.txt', 'sources.txt', 'targets.txt'], 'edge_files': ['network.txt'], 'other_files': [], 'data_dir': 'input'}
> data = Dataset(dataset_dict)
> from spras.config.dataset import DatasetSchema
> dataset_schema = DatasetSchema(label='data0', node_files=['node-prizes.txt', 'sources.txt', 'targets.txt'], edge_files=['network.txt'], other_files=[], data_dir='input')
> data = Dataset(dataset_schema)
> data.node_table.head()
NODEID prize active sources targets
0 C 5.7 True NaN True
Expand Down Expand Up @@ -331,6 +346,13 @@ its contents before rerunning the Snakemake command.
Step 5: Add Local Neighborhood to the tests
*********************************************

.. note::

These tests modify files in ``.github/workflows/``. If you push over
HTTPS using a Personal Access Token, make sure the token has
permission to modify GitHub Actions workflows. Otherwise, GitHub may
reject the push. SSH push works without this restriction.

Add test functions to the test file ``test/test_ln.py``. This file
already has existing tests to test the correctness of the Local
Neighborhood implementation that was added to the Docker image. The new
Expand Down
Loading