Skip to content

Commit

Permalink
docs: add contributing instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Croydon-Brixton committed Nov 25, 2024
1 parent 32a0432 commit e6686ea
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PYMOL_RPC_HOST=localhost
PYMOL_RPC_PORT=9123
LOG_LEVEL=INFO
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributors

## Special thanks for all the people who have helped this project so far:

* [Simon Mathis](https://github.com/Croydon-Brixton)
* [Martin Buttenschön](https://github.com/maabuu)

## I would like to join this list. How can I help the project?

We always welcome contributions to improve the project. Please have a look at the current github issues for information on where help could be needed.

### Getting set up:
The development environment for pymol-remote is detailed in the [`environment.yml` file](environment.yml).

For simplicity, you can set up the development environment using the `contribute.sh` script:

```bash
# NOTE: If you wish to use a different package manager than conda/etc. you can manually install the dependencies and set the .env file
./contribute.sh
```

You can then set the environment variables such as your localhosts's IP address in the `.env` file. Do not commit this file to github.

### Running the tests

To run the tests, you can use

```bash
# Run all tests
pytest tests/

# Run only the tests that do not require a running server
pytest tests/ -m "not requires_server"

# Run only the tests that do not require biotite on the client side
pytest tests/ -m "not client_requires_biotite"

```

### Test Categories

The test suite uses pytest markers to organize tests:

- `requires_server`: Tests that need a running PyMOL server
- `client_requires_biotite`: Tests that need biotite installed on the client side
10 changes: 0 additions & 10 deletions CONTRIBUTORS.md

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ This implementation is inspired by and based on the original [RDKit RPC](https:/

## 4. License
This code is licensed under the same terms as PyMOL. See [LICENSE](./LICENSE) for more details.


## 5. Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.
4 changes: 4 additions & 0 deletions contribute.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cp .env.sample .env
conda env create -f environment.yml
conda activate pymol-remote
pytest tests/
19 changes: 19 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: pymol-remote # development environment for pymol-remote

channels:
- conda-forge
- defaults

dependencies:
- python=3.10

- pymol-open-source
- pytest>=8.3.0,<9.0.0

- pip
- pip:
- biotite>=1.0
- ruff>=0.8.0,<0.9.0
- pytest-dotenv>=0.5.2
# ... install pymol-remote in editable mode
- -e .

0 comments on commit e6686ea

Please sign in to comment.