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

Next Release v0.4.2 #721

Merged
merged 15 commits into from
Oct 3, 2022
Merged
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# ANY CHANGES REQURIE A NEW RELEASE

FROM python:3.8

# system maintenance
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://travis-ci.com/angelolab/ark-analysis.svg?branch=master)](https://travis-ci.com/angelolab/ark-analysis)
[![Coverage Status](https://coveralls.io/repos/github/angelolab/ark-analysis/badge.svg?branch=master)](https://coveralls.io/github/angelolab/ark-analysis?branch=master)
[![Build Status](https://travis-ci.com/angelolab/ark-analysis.svg?branch=main)](https://travis-ci.com/angelolab/ark-analysis)
[![Coverage Status](https://coveralls.io/repos/github/angelolab/ark-analysis/badge.svg?branch=main)](https://coveralls.io/github/angelolab/ark-analysis?branch=main)
![Docker Image Version (latest by date)](https://img.shields.io/docker/v/angelolab/ark-analysis?arch=amd64&color=%23469ae5&label=Docker%20Version&sort=date)

# ark-analysis
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ help:
%: Makefile
@$(SPHINXAPIDOC) $(MISCDOCFLAGS) -s $(DOCOUTPUT) -o $(OUTPUTDIR) $(SRCPROJECT) $(IGNORE)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
git checkout master -- _rtd/landing.md
git checkout main -- _rtd/landing.md
6 changes: 3 additions & 3 deletions docs/_rtd/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ You should create a branch specific to the current design doc you're working on,
### Step 4: Coding time
Now that you're ready to get to work, you can make the necessary modifications to our codebase to address your issue.

There are a few important details to keep in mind as you're writing your code. The first is that we follow [the google styleguide](https://google.github.io/styleguide/pyguide.html) for python code. It's good to take a look through here if you aren't familiar with it, to get a sense for what we expect. You can also look through our [source code](https://github.com/angelolab/ark-analysis/tree/master/ark) to see how we've implemented these suggestions.
There are a few important details to keep in mind as you're writing your code. The first is that we follow [the google styleguide](https://google.github.io/styleguide/pyguide.html) for python code. It's good to take a look through here if you aren't familiar with it, to get a sense for what we expect. You can also look through our [source code](https://github.com/angelolab/ark-analysis/tree/main/ark) to see how we've implemented these suggestions.

The second important concept is [modular code](https://opensource.com/article/19/7/get-modular-python-functions). Breaking your code up into small pieces will make it easier to read, easier to understand, and easier to reuse. Before submitting your PR, take a look through your code to see if it could be broken up into smaller, logical pieces that work together, rather than a few large chunks that do everything at once.

The third important concept is [testing](https://realpython.com/python-testing/). All of the code that gets added to our repository must be tested! This allows us to make sure that it's working as intended. Even more importantly, it means that if someone makes a change in the future that causes the code to break, we'll identify that problem in advance so that it can be fixed. Once you've finished creating your code, it's important to write test functions to ensure that it's behaving as expected. For an example of what that looks like, you can take a look at our [data_utils](https://github.com/angelolab/ark-analysis/blob/master/ark/utils/data_utils.py) and the [associated test code](https://github.com/angelolab/ark-analysis/blob/master/ark/utils/data_utils_test.py).
The third important concept is [testing](https://realpython.com/python-testing/). All of the code that gets added to our repository must be tested! This allows us to make sure that it's working as intended. Even more importantly, it means that if someone makes a change in the future that causes the code to break, we'll identify that problem in advance so that it can be fixed. Once you've finished creating your code, it's important to write test functions to ensure that it's behaving as expected. For an example of what that looks like, you can take a look at our [data_utils](https://github.com/angelolab/ark-analysis/blob/main/ark/utils/data_utils.py) and the [associated test code](https://github.com/angelolab/ark-analysis/blob/main/ark/utils/data_utils_test.py).

### Step 5: Submit your code to be reviewed
Once you think you have a version that's ready for us to look at, you can submit a pull request for us to look at. For more details on how this works, see the [previous link](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests) on using github.
Expand All @@ -40,6 +40,6 @@ This means that some of the tests didn't pass. You can click on the link for mor
Once all of the tests have passed, you should request a review from someone on our team. Chances are, the person who you were communicating with on the linked issue is the best person to review your PR.

### Step 6: Respond to review comments
No one writes perfect code the first time. Chances are, your reviewer will have some suggested changes for your code. Take the time to carefully read through their comments, and make sure to ask any clarifying questions. Then, once you understand what's being asked of you, update your PR with the requested changes. You can continue to make commits to the existing branch that you used to create your PR. As you push new commits to that branch, the PR will automatically update, and Travis will automatically re-run to test this new code. Once you've addressed the comments made during review, you can click the 're-request review' button on the top. Once your reviewer is satisfied with your changes, they will approve your PR and merge it into the master branch.
No one writes perfect code the first time. Chances are, your reviewer will have some suggested changes for your code. Take the time to carefully read through their comments, and make sure to ask any clarifying questions. Then, once you understand what's being asked of you, update your PR with the requested changes. You can continue to make commits to the existing branch that you used to create your PR. As you push new commits to that branch, the PR will automatically update, and Travis will automatically re-run to test this new code. Once you've addressed the comments made during review, you can click the 're-request review' button on the top. Once your reviewer is satisfied with your changes, they will approve your PR and merge it into the main branch.
srivarra marked this conversation as resolved.
Show resolved Hide resolved

Thanks in advance for contributing to our project!
38 changes: 27 additions & 11 deletions docs/_rtd/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ Note that you will not have access to `ark` or the other libraries inside `requi

You're now set to start working with `ark-analysis`! Please look at [our contributing guidelines](contributing.html) for more information about development. For detailed explanations of the functions available to you in `ark`, please consult the Libraries section of this documentation.

### Updating Ark Analysis in the Docker

**Note** that code changes aren't automatically propagated into the Docker Image.
However there may be times where you would like to work with and test out new changes and features.

You may update the current version of `ark-analysis` by running the following commands
in the Jupyter Lab terminal.

```sh
cd /opt/ark-analysis
git pull
pip install .
```

#### Using ark functions directly

If you will only be using functions in `ark` without developing on top of it, do not clone the repo. Simply run `pip install ark-analysis` inside the virtual environment to gain access to our functions. To verify installation, type `conda list ark-analysis` after completion. If `ark-analysis` is listed, the installation was successful. You can now access the `ark` library with `import ark`.
Expand Down Expand Up @@ -182,8 +196,9 @@ next_release_vX.Y.Z
1. If, in the release notes draft there are PRs that are not categorized, label them appropriately (usually based on the label of their respective Issue).
2. Make sure that all tests pass for `Ark` on Travis-CI.
3. In the `ark-analysis/start_docker.sh` script, change the image tag from
```
angelolab/ark-analysis:vA.B.C -> angelolab/ark-analysis:vX.Y.Z
```sh
docker run -it "${run_params[@]}" angelolab/ark-analysis:vA.B.C
-> docker run -it "${run_params[@]}" angelolab/ark-analysis:vX.Y.Z
```
4. Request a review and merge the `Ark` branch.
5. Next head to the most recent Drafted Release Notes:
Expand All @@ -194,19 +209,20 @@ next_release_vX.Y.Z
**Test Changes on Toffy**
1. Test the effects that changes in `Ark` have on `toffy` locally.
1. Install the new branch of `Ark` in your Python environment with
```
pip install -e <location/to/ark>
```
```
pip install -e <location/to/ark>
```
2. **As needed**, sync with `toffy` and `mibi-bin-tools`
1. Update relevant packages in these repos, such as `scikit-image` or `xarray`.
2. Locally, test that the new version works with `toffy`
3. If there are errors in `toffy` fix them in a separate branch named:
```
ark_vX.Y.Z_compatibility
```
```
ark_vX.Y.Z_compatibility
```
3. If necessary, change the version of ark-analysis in `toffy/requirements.txt`:
```
git+https://github.com/angelolab/ark-analysis.git@vA.B.C -> git+https://github.com/angelolab/ark-analysis.git@vX.Y.Z
```
```
git+https://github.com/angelolab/ark-analysis.git@vA.B.C -> git+https://github.com/angelolab/ark-analysis.git@vX.Y.Z
```

2. Once all errors have been ironed out create PRs for the respective changes in the effected repositories, and label them as `dependencies`.
3. Merge the compatibility PRs.
2 changes: 1 addition & 1 deletion docs/_rtd/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### When I run the notebook, it says "No module named 'ark'"

This error generally happens if you run the notebook outside of Docker. Simply running `jupyter notebook` or `jupyter lab` on a notebook will not start Docker for you. You need to explicitly run `bash start_docker.sh` and follow the prompts in our [README](https://github.com/angelolab/ark-analysis/blob/master/README.md).
This error generally happens if you run the notebook outside of Docker. Simply running `jupyter notebook` or `jupyter lab` on a notebook will not start Docker for you. You need to explicitly run `bash start_docker.sh` and follow the prompts in our [README](https://github.com/angelolab/ark-analysis/blob/main/README.md).

If you continue to run into issues, make sure you don't have any other Docker sessions running.

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# NOTE, a new release needs to be made every time a package gets updated.
cryptography>=3.4.8,<4
Cython>=0.29.24,<1
datasets>=2.4.0,<3.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

CYTHON_MACROS = [('CYTHON_TRACE', '1')] if CYTHON_DEBUG else None

VERSION = '0.4.1'
VERSION = '0.4.2'

PKG_FOLDER = path.abspath(path.join(__file__, pardir))

Expand Down
2 changes: 1 addition & 1 deletion start_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ run_params=(
)
[[ ! -z "$external" ]] && run_params+=(-v "$external:/data/external")

docker run -it "${run_params[@]}" angelolab/ark-analysis:v0.4.1
docker run -it "${run_params[@]}" angelolab/ark-analysis:v0.4.2
srivarra marked this conversation as resolved.
Show resolved Hide resolved