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

address issue #282 #283

Merged
merged 10 commits into from
Aug 23, 2023
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: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ Cargo.lock

# rattler
.prefix

# pixi
.pixi/
pixi.lock
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Contributing 😍

We would love to have you contribute!
For a good list of things you could help us with, take a look at our [*good first issues*](https://github.com/mamba-org/rattler/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
If you want to go deeper though, any [open issue](https://github.com/mamba-org/rattler/issues) is up for grabs.
Just let us know what you start on something.

For questions, requests or a casual chat, we are very active on our discord server.
You can [join our discord server via this link][chat-url].

## Development
If you'd like to contribute code, then you may want to manage the build depends with a tool, we suggest pixi, but conda/mamba will also work.

### Virtual env with pixi
You can use [pixi](https://github.com/prefix-dev/pixi) for setting up the environment needed for building and testing rattler, (as a fun fact, pixi uses rattler as a dependency!). The spec in `pixi.toml` in the project root will set up the environment. After installing, run the install command from the project root directory, shown below.
YeungOnion marked this conversation as resolved.
Show resolved Hide resolved
```sh
❱ pixi install # installs dependencies into the virtual env
❱ pixi run build # calls "build" task specified in pixi.toml, "cargo build", using cargo in pixi venv
```

### Virtual env with conda/mamba
The environment can also be managed with conda using the spec in `environments.yml` in the project root.
As below,
```sh
❱ mamba create -n name_of_your_rattler_env --file='environments.yml' && mamba activate name_of_your_rattler_env
❱ cargo build # uses cargo from your mamba venv
❱ mamba deactivate # don't forget you're in the venv
```



6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ Try it!
## Contributing 😍

We would love to have you contribute!
For a good list of things you could help us with, take a look at our [*good first issues*](https://github.com/mamba-org/rattler/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
If you want to go deeper though, any [open issue](https://github.com/mamba-org/rattler/issues) is up for grabs.
Just let us know what you start on something.
See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server.
You can [join our discord server via this link][chat-url].

For questions, requests or a casual chat, we are very active on our discord server. You can [join our discord server via this link][chat-url].

## Components

Expand Down
20 changes: 20 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[project]
name = "rattler"
version = "0.7.0"
description = "Rust library to install conda environments"
authors = ["Wolf Vollprecht <wolf@prefix.dev>", "Bas Zalmstra <bas@prefix.dev>", "Tim de Jager <tim@prefix.dev>", "Ruben Arts <ruben@prefix.dev>"]
channels = ["conda-forge"]
platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"]

[tasks]
build = "cargo build"
YeungOnion marked this conversation as resolved.
Show resolved Hide resolved
fmt = "cargo fmt"
lint = "cargo clippy"

[dependencies]
cxx-compiler = "~=1.6.0"
openssl = "~=3.1.2"
make = "~=4.3"
pkg-config = "~=0.29.2"
rust = "~=1.71.1"
cmake = "~=3.26.4"