Skip to content
Open
Show file tree
Hide file tree
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
91 changes: 91 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Contributor Covenant 3.0 Code of Conduct

## Our Pledge

We pledge to make our community welcoming, safe, and equitable for all.

We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.


## Encouraged Behaviors

While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.

With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:

1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
2. Engaging **kindly and honestly** with others.
3. Respecting **different viewpoints** and experiences.
4. **Taking responsibility** for our actions and contributions.
5. Gracefully giving and accepting **constructive feedback**.
6. Committing to **repairing harm** when it occurs.
7. Behaving in other ways that promote and sustain the **well-being of our community**.


## Restricted Behaviors

We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.

1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
3. **Stereotyping or discrimination.** Characterizing anyone's personality or behavior on the basis of immutable identities or traits.
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
7. Behaving in other ways that **threaten the well-being** of our community.

### Other Restrictions

1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.


## Reporting an Issue

Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.

When an incident does occur, it is important to report it promptly. To report a possible violation, please email the micro-sam maintainers, who act as Community Moderators for this project, at anwai.archit@uni-goettingen.de or constantin.pape@informatik.uni-goettingen.de.

Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.


## Addressing and Repairing Harm

If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.

1) Warning
1) Event: A violation involving a single incident or series of incidents.
2) Consequence: A private, written warning from the Community Moderators.
3) Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
2) Temporarily Limited Activities
1) Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
2) Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
3) Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
3) Temporary Suspension
1) Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
2) Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
3) Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
4) Permanent Ban
1) Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
2) Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
3) Repair: There is no possible repair in cases of this severity.

This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.


## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

For micro-sam, community spaces include the [GitHub repository](https://github.com/computational-cell-analytics/micro-sam) (issues, pull requests, and discussions) and conversations about micro-sam on the [image.sc forum](https://forum.image.sc/tag/micro-sam).


## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).

Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)

For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla's code of conduct team](https://github.com/mozilla/inclusion).
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to micro-sam

We welcome new contributions! This page is a short overview to get you started.
The full contribution guide, which also covers documentation builds and performance profiling, lives in [doc/contributing.md](doc/contributing.md) and is rendered as part of [our documentation](https://computational-cell-analytics.github.io/micro-sam/micro_sam.html#contribution-guide).

Everyone participating in this project is expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md).

## Questions and bug reports

If you run into a problem or have a question about using micro-sam, please [open an issue](https://github.com/computational-cell-analytics/micro-sam/issues/new/choose) or reach out via [image.sc](https://forum.image.sc/) using the tag `micro-sam`.
You do not need to write code to help us: good bug reports and documentation improvements are valuable contributions.

## Discuss your ideas first

Before you start working on a larger change, please open a [new issue](https://github.com/computational-cell-analytics/micro-sam/issues/new) to discuss your idea.
This lets you ask questions, and lets the current developers suggest the best way to implement it before you invest time in it.

## Set up a development environment

We use [git](https://git-scm.com/) for version control and [conda](https://docs.conda.io/en/latest/) to manage environments.
Clone the repository and check out the development branch:
```bash
$ git clone https://github.com/computational-cell-analytics/micro-sam.git
$ cd micro-sam
$ git checkout dev
```

Then create the environment, install the user and developer dependencies, and install micro-sam as an editable installation:
```bash
$ conda env create -f environment.yaml
$ conda activate sam
$ python -m pip install -r requirements-dev.txt
$ python -m pip install -e .
```

## Make your changes

Changes are made branching off from the development branch:
```bash
$ git checkout dev
$ git checkout -b my-new-feature
```

We use [google style python docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) for all new code.
The [Python library documentation](https://computational-cell-analytics.github.io/micro-sam/micro_sam.html#using-the-python-library) is a good starting point for understanding how the micro-sam code is organized.

## Run the tests

The tests are run with [pytest](https://docs.pytest.org/):
```bash
$ pytest
```

New code needs tests to go with it. We prefer small unit tests over integration tests; if your code is hard to unit test, it usually needs to be broken into smaller functions.
See the [full guide](doc/contributing.md#writing-your-own-tests) for details on testing napari-based code and on code coverage.

## Open a pull request

Once your changes are ready, [open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) against the `dev` branch, not `main`.
You can [mark it as a draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests) while you are still working on it and still discuss the best approach with the maintainers.

Please describe what your pull request changes and why, and link the issue it addresses.
The continuous integration runs the tests for your pull request; a maintainer will review it and may ask for changes before merging.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
[![PyPI](https://img.shields.io/pypi/v/micro_sam.svg)](https://pypi.org/project/micro_sam/)
[![Conda](https://anaconda.org/conda-forge/micro_sam/badges/version.svg)](https://anaconda.org/conda-forge/micro_sam)
[![codecov](https://codecov.io/gh/computational-cell-analytics/micro-sam/graph/badge.svg?token=7ETPP5CABP)](https://codecov.io/gh/computational-cell-analytics/micro-sam)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7919746.svg)](https://doi.org/10.5281/zenodo.7919746)
[![Image.sc forum][imagesc-img]][imagesc-url]
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.7919746-blue.svg)](https://doi.org/10.5281/zenodo.7919746)

# Segment Anything for Microscopy

Expand Down Expand Up @@ -30,9 +31,12 @@ Please check [the documentation](https://computational-cell-analytics.github.io/

## Contributing

We welcome new contributions!
We always welcome new contributions!

If you are interested in contributing to `micro-sam`, please see the [contributing guide](https://computational-cell-analytics.github.io/micro-sam/micro_sam.html#contribution-guide). The first step is to [discuss your idea in a new issue](https://github.com/computational-cell-analytics/micro-sam/issues/new) with the current developers.
If you just want to suggest a documentation edit, [you can do this directly here, on GitHub][edit-files-on-github].
For more complex changes, see [CONTRIBUTING.md][contributing] or the [contributing guide](https://computational-cell-analytics.github.io/micro-sam/micro_sam.html#contribution-guide) in our documentation for details. The first step is to [discuss your idea in a new issue](https://github.com/computational-cell-analytics/micro-sam/issues/new) with the current developers.

Everyone participating in this project is expected to follow our [Code of Conduct][code-of-conduct].


## Citation
Expand All @@ -42,6 +46,7 @@ If you are using this repository in your research please cite
- and the original [Segment Anything publication](https://arxiv.org/abs/2304.02643).
- If you use `vit-tiny` models please also cite [Mobile SAM](https://arxiv.org/abs/2306.14289).
- If you use automatic tracking, please also cite [Trackastra](https://arxiv.org/abs/2405.15700).
- If you use automatic prompt generation (APG), please also cite [our APG paper](https://openreview.net/forum?id=xFO3DFZN45).


## Related Projects
Expand All @@ -62,3 +67,9 @@ We have also built follow-up work that is based on `micro_sam`:
## Release Overview

You can find an overview of changes introduced in previous releases [here](https://github.com/computational-cell-analytics/micro-sam/blob/main/RELEASE_OVERVIEW.md).

[imagesc-img]: https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftags%2Fmicro-sam.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC
[imagesc-url]: https://forum.image.sc/tag/micro-sam
[contributing]: https://github.com/computational-cell-analytics/micro-sam/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/computational-cell-analytics/micro-sam/blob/main/CODE_OF_CONDUCT.md
[edit-files-on-github]: https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files
6 changes: 3 additions & 3 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ We use [conda](https://docs.conda.io/en/latest/) to [manage our environments](ht

Now you can create the environment, install user and developer dependencies, and micro-sam as an editable installation:
```bash
conda env create environment.yaml
conda env create -f environment.yaml
conda activate sam
python -m pip install requirements-dev.txt
python -m pip install -r requirements-dev.txt
python -m pip install -e .
```

Expand All @@ -55,7 +55,7 @@ $ git checkout -b my-new-feature

We use [google style python docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) to create documentation for all new code.

You may also find it helpful to look at this [developer guide](#for-developers), which explains the organization of the micro-sam code.
You may also find it helpful to look at the [Python library documentation](#using-the-python-library), which explains the organization of the micro-sam code.

## Testing

Expand Down
1 change: 1 addition & 0 deletions doc/start_page.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ If you are using `micro_sam` in your research please cite
- and the original [Segment Anything publication](https://arxiv.org/abs/2304.02643).
- If you use a `vit-tiny` models, please also cite [Mobile SAM](https://arxiv.org/abs/2306.14289).
- If you use automatic tracking, please also cite [Trackastra](https://arxiv.org/abs/2405.15700).
- If you use automatic prompt generation (APG), please also cite [our APG paper](https://openreview.net/forum?id=xFO3DFZN45).
Loading