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

Align develop and main #2069

Merged
merged 1 commit into from
Dec 19, 2024
Merged
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
4 changes: 2 additions & 2 deletions .conda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This folder defines the conda package build for Linux and Windows. There are run
To build, first go to the base repo directory and install the build environment:

```
mamba env create -f environment_build.yml -n sleap_build && conda activate sleap_build
conda env create -f environment_build.yml -n sleap_build && conda activate sleap_build
```

And finally, run the build command pointing to this directory:
Expand All @@ -15,7 +15,7 @@ conda build .conda --output-folder build -c conda-forge -c nvidia -c https://con
To install the local package:

```
mamba create -n sleap_0 -c conda-forge -c nvidia -c ./build -c https://conda.anaconda.org/sleap/ -c anaconda sleap=x.x.x
conda create -n sleap_0 -c conda-forge -c nvidia -c ./build -c https://conda.anaconda.org/sleap/ -c anaconda sleap=x.x.x
```

replacing x.x.x with the version of SLEAP that you just built.
1 change: 1 addition & 0 deletions .conda/condarc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
channels:
- conda-forge
- nvidia
- https://conda.anaconda.org/sleap/label/dev
- sleap
- anaconda
32 changes: 21 additions & 11 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source:
path: ../

build:
number: 1
number: 0

requirements:
host:
Expand All @@ -32,12 +32,12 @@ requirements:
# unnecessary pypi packages are installed via the build script (bld.bat, build.sh)
- conda-forge::attrs ==21.4.0
- conda-forge::cattrs ==1.1.1
- conda-forge::h5py ==3.1 # [not win]
- conda-forge::imgaug ==0.4.0
- conda-forge::h5py ==3.7.0
- conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg
- conda-forge::jsmin
- conda-forge::jsonpickle ==1.2
- conda-forge::networkx
- conda-forge::opencv
- conda-forge::opencv <4.9.0
- conda-forge::pandas
- conda-forge::pillow >=8.3.2
- conda-forge::psutil
Expand All @@ -53,20 +53,24 @@ requirements:
- conda-forge::scikit-learn ==1.0
- conda-forge::scikit-video
- conda-forge::seaborn
- conda-forge::qudida
- conda-forge::albumentations
- conda-forge::ndx-pose <0.2.0
- conda-forge::importlib-metadata ==4.11.4
run:
- conda-forge::python ==3.7.12 # Run into _MAX_WINDOWS_WORKERS not found if <
- conda-forge::attrs ==21.4.0
- conda-forge::cattrs ==1.1.1
- conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg
- conda-forge::cudatoolkit ==11.3.1
- conda-forge::cudnn=8.2.1
- nvidia::cuda-nvcc=11.3
- conda-forge::h5py ==3.1 # [not win]
- conda-forge::imgaug ==0.4.0
- conda-forge::h5py ==3.7.0
- conda-forge::jsmin
- conda-forge::jsonpickle ==1.2
- conda-forge::networkx
- numpy >=1.19.5,<1.23.0 # Linux likes anaconda, windows likes conda-forge
- conda-forge::opencv
- conda-forge::opencv <4.9.0
- conda-forge::pandas
- conda-forge::pillow >=8.3.2
- conda-forge::psutil
Expand All @@ -82,9 +86,15 @@ requirements:
- conda-forge::scikit-learn ==1.0
- conda-forge::scikit-video
- conda-forge::seaborn
- sleap::tensorflow >=2.6.3,<2.11 # No windows GPU support for >2.10, sleap channel has 2.6.3
- sleap/label/dev::tensorflow ==2.7.0 # TODO: Switch to main label when updated
- conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446
- conda-forge::qudida
- conda-forge::albumentations
- conda-forge::ndx-pose <0.2.0
- conda-forge::importlib-metadata ==4.11.4

test:
imports:
- sleap
# This no longer works so we have moved it to the build workflow
# https://github.com/talmolab/sleap/pull/1744
# test:
# imports:
# - sleap
1 change: 0 additions & 1 deletion .conda_mac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# Install anything that didn't get conda installed via pip.
# We need to turn pip index back on because Anaconda turns it off for some reason.

export PIP_NO_INDEX=False
export PIP_NO_DEPENDENCIES=False
export PIP_IGNORE_INSTALLED=False
Expand Down
1 change: 0 additions & 1 deletion .conda_mac/condarc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This file is not used at the moment, but when github actions can be used to build the package, it needs to be listed.
# https://github.com/github/roadmap/issues/528

channels:
Expand Down
28 changes: 17 additions & 11 deletions .conda_mac/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ about:
summary: {{ data.get('description') }}

build:
number: 1
number: 0

source:
path: ../

requirements:
host:
- conda-forge::python ~=3.9
- conda-forge::python >=3.9.0, <3.10.0
- anaconda::numpy >=1.19.5,<1.23.0
- conda-forge::setuptools
- conda-forge::packaging
Expand All @@ -34,11 +34,11 @@ requirements:
- conda-forge::attrs >=21.2.0
- conda-forge::cattrs ==1.1.1
- conda-forge::h5py
- conda-forge::imgaug ==0.4.0
- conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg
- conda-forge::jsmin
- conda-forge::jsonpickle ==1.2
- conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos
- conda-forge::networkx
- conda-forge::networkx <3.3
- conda-forge::opencv
- conda-forge::pandas
- conda-forge::pillow
Expand All @@ -55,17 +55,20 @@ requirements:
- conda-forge::scikit-learn ==1.0
- conda-forge::scikit-video
- conda-forge::seaborn
- conda-forge::qudida
- conda-forge::albumentations
- conda-forge::ndx-pose <0.2.0

run:
- conda-forge::python ~=3.9
- conda-forge::python >=3.9.0, <3.10.0
- conda-forge::attrs >=21.2.0
- conda-forge::cattrs ==1.1.1
- conda-forge::h5py
- conda-forge::imgaug ==0.4.0
- conda-forge::imageio-ffmpeg # Required for imageio to read/write videos with ffmpeg
- conda-forge::jsmin
- conda-forge::jsonpickle ==1.2
- conda-forge::keras <2.10.0,>=2.9.0rc0 # Required by tensorflow-macos
- conda-forge::networkx
- conda-forge::networkx <3.3
- anaconda::numpy >=1.19.5,<1.23.0
- conda-forge::opencv
- conda-forge::pandas
Expand All @@ -83,8 +86,11 @@ requirements:
- conda-forge::scikit-learn ==1.0
- conda-forge::scikit-video
- conda-forge::seaborn
- conda-forge::tensorflow-hub
# - conda-forge::tensorflow-hub # pulls in tensorflow cpu from conda-forge
- conda-forge::qudida
- conda-forge::albumentations
- conda-forge::ndx-pose <0.2.0

test:
imports:
- sleap
# test:
# imports:
# - sleap
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Tell us a little about the system you're using.
Please include information about how you installed.
-->

- OS:
- OS:
<!-- [e.g. ubuntu 20.04, macOS 11.0] -->
- Version(s):
<!-- e.g. [SLEAP v1.3.3, python 3.8] --->
- SLEAP installation method (listed [here](https://sleap.ai/installation.html#)):
- [ ] [Conda from package](https://sleap.ai/installation.html#conda-package)
- [ ] [Conda from source](https://sleap.ai/installation.html#conda-from-source)
- [ ] [pip package](https://sleap.ai/installation.html#pip-package)
- [ ] [Apple Silicon Macs](https://sleap.ai/installation.html#apple-silicon-macs)
- Version(s):
<!-- e.g. [SLEAP v1.4.1, python 3.8] --->
- SLEAP installation method (listed [here](https://sleap.ai/installation.html#)):
- [ ] [Conda from package](https://sleap.ai/installation.html#conda-package)
- [ ] [Conda from source](https://sleap.ai/installation.html#conda-from-source)
- [ ] [pip package](https://sleap.ai/installation.html#pip-package)
- [ ] [Apple Silicon Macs](https://sleap.ai/installation.html#apple-silicon-macs)

<details><summary>Environment packages</summary>
<!-- For reproduction, it's useful to have the full environment. For example, the output of `pip freeze` or `conda list` --->
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/archive/comment-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Reusable Comment Workflow

on:
workflow_call:
inputs:
subject_id:
required: true
type: string
body_prefix:
required: true
type: string
comment_type:
required: true
type: string

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Post a comment
uses: actions/github-script@v6
with:
script: |
const { owner, repo } = context.repo;
const subject_id = '${{ inputs.subject_id }}';
const comment_type = '${{ inputs.comment_type }}';
const baseBody = `
We appreciate your input and will review it soon.

> [!WARNING]
> A friendly reminder that this is a public forum. Please be cautious when clicking links, downloading files, or running scripts posted by others.
>
> - Always verify the credibility of links and code.
> - Avoid running scripts or installing files from untrusted sources.
> - If you're unsure, ask for clarification before proceeding.

Stay safe and happy SLEAPing!

Best regards,
The Team
`;
const body = `${{ inputs.body_prefix }}\n\n${baseBody}`;

const mutation = comment_type === 'discussion'
? `
mutation($discussionId: ID!, $body: String!) {
addDiscussionComment(input: {discussionId: $discussionId, body: $body}) {
comment {
id
}
}
}
`
: `
mutation($issueId: ID!, $body: String!) {
addComment(input: {subjectId: $issueId, body: $body}) {
commentEdge {
node {
id
body
}
}
}
}
`;

const variables = comment_type === 'discussion'
? { discussionId: subject_id, body: body.trim() }
: { issueId: subject_id, body: body.trim() };

await github.graphql(mutation, variables);
24 changes: 24 additions & 0 deletions .github/workflows/archive/comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Comment on New Discussions and Issues

on:
discussion:
types: [created]
issues:
types: [opened]

jobs:
comment_on_discussion:
if: github.event_name == 'discussion'
uses: ./.github/workflows/comment-template.yml
with:
subject_id: ${{ github.event.discussion.node_id }}
body_prefix: "Thank you for starting a new discussion!"
comment_type: "discussion"

comment_on_issue:
if: github.event_name == 'issues'
uses: ./.github/workflows/comment-template.yml
with:
subject_id: ${{ github.event.issue.node_id }}
body_prefix: "Thank you for opening a new issue!"
comment_type: "issue"
Loading
Loading