Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dandi/dandi-archive into …
Browse files Browse the repository at this point in the history
…footer
  • Loading branch information
kabilar committed Feb 3, 2025
2 parents 34a0262 + 741b5ac commit cbb6f0a
Show file tree
Hide file tree
Showing 54 changed files with 1,207 additions and 342 deletions.
122 changes: 122 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,125 @@
# v0.4.14 (Tue Jan 28 2025)

#### 🐛 Bug Fix

- Use `Unaccent` with dandiset search filter [#2142](https://github.com/dandi/dandi-archive/pull/2142) ([@jjnesbitt](https://github.com/jjnesbitt))
- `Upload` and `AssetBlob` garbage collection implementation [#2087](https://github.com/dandi/dandi-archive/pull/2087) ([@mvandenburgh](https://github.com/mvandenburgh))

#### Authors: 2

- Jacob Nesbitt ([@jjnesbitt](https://github.com/jjnesbitt))
- Mike VanDenburgh ([@mvandenburgh](https://github.com/mvandenburgh))

---

# v0.4.13 (Thu Jan 23 2025)

#### 🐛 Bug Fix

- Empty commit to trigger a release [#2152](https://github.com/dandi/dandi-archive/pull/2152) ([@waxlamp](https://github.com/waxlamp))
- Add `/handbook` redirect to `docs.dandiarchive.org` [#2151](https://github.com/dandi/dandi-archive/pull/2151) ([@kabilar](https://github.com/kabilar) [@waxlamp](https://github.com/waxlamp))

#### Authors: 2

- Kabilar Gunalan ([@kabilar](https://github.com/kabilar))
- Roni Choudhury ([@waxlamp](https://github.com/waxlamp))

---

# v0.4.12 (Wed Jan 22 2025)

#### 🐛 Bug Fix

- Move Google analytics tag to environment variable to prevent DANDI clones using by accident [#2126](https://github.com/dandi/dandi-archive/pull/2126) (aaronkanzer@dhcp-10-31-181-194.dyn.MIT.EDU [@aaronkanzer](https://github.com/aaronkanzer))

#### Authors: 2

- [@aaronkanzer](https://github.com/aaronkanzer)
- Aaron Kanzer (aaronkanzer@dhcp-10-31-181-194.dyn.MIT.EDU)

---

# v0.4.11 (Wed Jan 22 2025)

#### 🐛 Bug Fix

- Upgrade `dandischema` version to 0.11.0 [#2132](https://github.com/dandi/dandi-archive/pull/2132) ([@kabilar](https://github.com/kabilar))
- Add Netlify link to footer [#2133](https://github.com/dandi/dandi-archive/pull/2133) ([@kabilar](https://github.com/kabilar))
- Add Terms, Policies, and Code of Conduct to footer [#2135](https://github.com/dandi/dandi-archive/pull/2135) ([@kabilar](https://github.com/kabilar) [@waxlamp](https://github.com/waxlamp))
- Add Code of Conduct [#2130](https://github.com/dandi/dandi-archive/pull/2130) ([@kabilar](https://github.com/kabilar) [@waxlamp](https://github.com/waxlamp))

#### Authors: 2

- Kabilar Gunalan ([@kabilar](https://github.com/kabilar))
- Roni Choudhury ([@waxlamp](https://github.com/waxlamp))

---

# v0.4.10 (Wed Jan 22 2025)

#### 🐛 Bug Fix

- Update URL for DANDI Docs [#2137](https://github.com/dandi/dandi-archive/pull/2137) ([@kabilar](https://github.com/kabilar) [@waxlamp](https://github.com/waxlamp))

#### Authors: 2

- Kabilar Gunalan ([@kabilar](https://github.com/kabilar))
- Roni Choudhury ([@waxlamp](https://github.com/waxlamp))

---

# v0.4.9 (Wed Jan 22 2025)

#### 🐛 Bug Fix

- Update URL for DANDI About site [#2138](https://github.com/dandi/dandi-archive/pull/2138) ([@kabilar](https://github.com/kabilar))

#### Authors: 1

- Kabilar Gunalan ([@kabilar](https://github.com/kabilar))

---

# v0.4.8 (Tue Jan 21 2025)

#### 🐛 Bug Fix

- Move to 2025 from 2024 in the footer [#2144](https://github.com/dandi/dandi-archive/pull/2144) ([@yarikoptic](https://github.com/yarikoptic))

#### Authors: 1

- Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))

---

# v0.4.7 (Wed Jan 08 2025)

#### 🐛 Bug Fix

- Prevent duplicate serialization of dandiset in detail view [#2125](https://github.com/dandi/dandi-archive/pull/2125) ([@jjnesbitt](https://github.com/jjnesbitt))
- Fix reactivity bug in meditor [#2127](https://github.com/dandi/dandi-archive/pull/2127) ([@mvandenburgh](https://github.com/mvandenburgh))

#### Authors: 2

- Jacob Nesbitt ([@jjnesbitt](https://github.com/jjnesbitt))
- Mike VanDenburgh ([@mvandenburgh](https://github.com/mvandenburgh))

---

# v0.4.6 (Wed Jan 08 2025)

#### 🐛 Bug Fix

- Create permissions service layer [#2115](https://github.com/dandi/dandi-archive/pull/2115) ([@jjnesbitt](https://github.com/jjnesbitt))
- Design doc for Upload/AssetBlob garbage collection [#2068](https://github.com/dandi/dandi-archive/pull/2068) ([@mvandenburgh](https://github.com/mvandenburgh))

#### Authors: 2

- Jacob Nesbitt ([@jjnesbitt](https://github.com/jjnesbitt))
- Mike VanDenburgh ([@mvandenburgh](https://github.com/mvandenburgh))

---

# v0.4.5 (Fri Jan 03 2025)

#### 🐛 Bug Fix
Expand Down
135 changes: 135 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public 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.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
community@dandiarchive.org. The community@dandiarchive.org email is sent
to Kabilar Gunalan, Roni Choudhury, Satrajit Ghosh, and Yaroslav Halchenko. If
you would like to report an incident to an individual person, emails can be
found on the [Team Page](https://about.dandiarchive.org/team).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DANDI Archive

![](https://www.dandiarchive.org/assets/dandi_logo.svg)
![](https://about.dandiarchive.org/assets/dandi_logo.svg)

## DANDI: Distributed Archives for Neurophysiology Data Integration

Expand All @@ -19,7 +19,7 @@ Vue-based [frontend](web/) to provide a user interface to the archive.
## Resources

* To learn how to interact with the archive,
see [the handbook](https://www.dandiarchive.org/handbook/).
see the [DANDI Docs](https://docs.dandiarchive.org).

* To get help:
- ask a question: https://github.com/dandi/helpdesk/discussions
Expand Down
6 changes: 6 additions & 0 deletions dandiapi/api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
AssetBlob,
AuditRecord,
Dandiset,
GarbageCollectionEvent,
Upload,
UserMetadata,
Version,
Expand Down Expand Up @@ -266,3 +267,8 @@ def has_change_permission(self, request, obj=None):

def has_delete_permission(self, request, obj=None):
return False


@admin.register(GarbageCollectionEvent)
class GarbageCollectionEventAdmin(admin.ModelAdmin):
pass
6 changes: 4 additions & 2 deletions dandiapi/api/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from django.template.loader import render_to_string
from django.utils.html import strip_tags

from dandiapi.api.services.permissions.dandiset import get_dandiset_owners

if TYPE_CHECKING:
from collections.abc import Iterable

Expand Down Expand Up @@ -207,7 +209,7 @@ def build_dandiset_unembargoed_message(dandiset: Dandiset):
subject='Your Dandiset has been unembargoed!',
message=strip_tags(html_message),
html_message=html_message,
to=[owner.email for owner in dandiset.owners],
to=[owner.email for owner in get_dandiset_owners(dandiset)],
)


Expand All @@ -229,7 +231,7 @@ def build_dandiset_unembargo_failed_message(dandiset: Dandiset):
subject=f'DANDI: Unembargo failed for dandiset {dandiset.identifier}',
message=strip_tags(html_message),
html_message=html_message,
to=[owner.email for owner in dandiset.owners],
to=[owner.email for owner in get_dandiset_owners(dandiset)],
bcc=[settings.DANDI_DEV_EMAIL],
reply_to=[ADMIN_EMAIL],
)
Expand Down
3 changes: 2 additions & 1 deletion dandiapi/api/management/commands/extract_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from dandiapi.api.models import Asset, Dandiset, Version
from dandiapi.api.services.asset import change_asset
from dandiapi.api.services.permissions.dandiset import get_dandiset_owners

if TYPE_CHECKING:
from django.db.models import QuerySet
Expand Down Expand Up @@ -55,7 +56,7 @@ def extract_asset_metadata(asset: Asset, draft_version: Version):

# Use dandiset owner, default to some admin user
user = (
draft_version.dandiset.owners.first()
get_dandiset_owners(draft_version.dandiset).first()
or User.objects.filter(is_superuser=True, is_staff=True).first()
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generated by Django 4.2.17 on 2024-12-11 17:17
from __future__ import annotations

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
dependencies = [
('api', '0013_remove_assetpath_consistent_slash_and_more'),
]

operations = [
migrations.CreateModel(
name='GarbageCollectionEvent',
fields=[
(
'id',
models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name='ID'
),
),
('timestamp', models.DateTimeField(auto_now_add=True)),
(
'type',
models.CharField(
help_text='The model name of the records that were garbage collected.',
max_length=255,
),
),
],
),
migrations.CreateModel(
name='GarbageCollectionEventRecord',
fields=[
(
'id',
models.BigAutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name='ID'
),
),
(
'record',
models.JSONField(
help_text='JSON serialization of the record that was garbage collected.'
),
),
(
'event',
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name='records',
to='api.garbagecollectionevent',
),
),
],
),
]
Loading

0 comments on commit cbb6f0a

Please sign in to comment.