Skip to content

Commit

Permalink
Fix docs yml workflow (#523)
Browse files Browse the repository at this point in the history
* no black

* no poetry

* documentation

* authors
  • Loading branch information
ismael-mendoza authored Jan 28, 2025
1 parent 686ee3c commit 1824cc0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
shell: bash -l {0}
run: |
cd docs
poetry run make html
make html
if [ $? = 2 ]; then exit 1;fi
cd build/html
touch .nojekyll
Expand Down
28 changes: 10 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ Once you have some code you wish to contribute, you can follow this procedure to

- Fork the `BTK` repository under your own account, using the **Fork** button on the top right of the [GitHub page](https://github.com/LSSTDESC/BlendingToolKit).

- We use [poetry](https://python-poetry.org/docs/) for managing the dependencies of the project. You can install it with:

```bash
curl -sSL https://install.python-poetry.org | python3 -
```

- Clone and pip install your fork of the repository like so:

```bash
git clone https://github.com/YOUR_USERNAME/BlendingToolKit
cd BlendingToolKit
poetry install
poetry shell # activate the virtual environment
conda create -n btk python=3.xx # create a virtual env with conda or something else
conda activate btk
pip install -e .
pip install -e ".[dev]"
```

This will install your local fork in editable mode, meaning you can directly modify source files in this folder without having to reinstall the package for them to be taken into account.
Expand All @@ -44,7 +40,7 @@ Once you have some code you wish to contribute, you can follow this procedure to
- Add your changes to the code using your favorite editor. You may at any moment test that everything is still working by running the test suite. From the root folder of the repository, run:

```bash
poetry run pytest # or poetry shell; pytest
pytest
```

- Once you are happy with your modifications, commit them, and push your changes to GitHub:
Expand Down Expand Up @@ -75,15 +71,15 @@ Before submitting your PR, have a look at the procedure documented below.
- Make sure the unit tests still work:

```bash
poetry run pytest
pytest
```

Ideally there should be some new unit tests for the new functionality, unless the work is completely covered by existing unit tests.

- Make sure your code conforms to the [Black](https://github.com/psf/black) style:
- Make sure your code conforms to our formatter:

```bash
black .
ruff check btk/ tests/
```

- If your changes contain multiple commits, we encourage you to squash them into a single (or very few) commit, before opening the PR. To do so, you can using this command:
Expand Down Expand Up @@ -120,11 +116,7 @@ git rebase -i
### Code Style
In this project we follow the [Black](https://github.com/psf/black) code formatting guidelines` (Any color you like...) This means that all code should be automatically formatted using Black and CI will fail if that's not the case.

Black should be automatically installed when you install the project with `poetry install`.

And run it manually from the root directory of your local clone with `black .`
We use `ruff` for formatting with the settings specified in the `pyproject.toml` file.
We highly recommend installing `pre-commit`, which will take care of trailing whitespace, checking for large files, and stripping
notebook metadata (keeping output).
Expand All @@ -137,7 +129,7 @@ And that's all you need to do from now on.

### Documentation style

BlendingToolKit follows the google format: <https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings>
BlendingToolKit follows the google format for docstrings: <https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings>

## Credit

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![notebooks](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/notebooks.yml/badge.svg?branch=main)](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/notebooks.yml)
[![docs](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/docs.yml/badge.svg?branch=main)](https://github.com/LSSTDESC/BlendingToolKit/actions/workflows/docs.yml)
[![codecov](https://codecov.io/gh/LSSTDESC/BlendingToolKit/branch/main/graph/badge.svg)](https://codecov.io/gh/LSSTDESC/BlendingToolKit)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![PyPI][pypi-badge]][pypi]

Expand Down
2 changes: 1 addition & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The required packages for ``btk`` are:
* sep
* tqdm

and their specific versions are listed in the `pyproject.toml <https://github.com/LSSTDESC/BlendingToolKit/blob/main/pyproject.toml>`_ under the ``[tool.poetry.dependencies]`` section.
and their specific versions are listed in the `pyproject.toml <https://github.com/LSSTDESC/BlendingToolKit/blob/main/pyproject.toml>`_ under the ``dependencies`` section.

Install GalSim
-------------------------------
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ authors = [
{ name = "Andrii Torychlo" },
{ name = "Somwya Kamath" },
{ name = "Maxime Paillasa" },
{ name = "Alexandre Boucaud" },
{ name = "Biswajit Biswas" },
{ name = "Prakruth Adari" },
{ name = "Remy Joseph" },
{ name = "Patricia Burchat" },
{ name = "Cyrille Doux" },
{ name = "Eric Aubourg" },
]
maintainers = [{ name = "Ismael Mendoza", email = "imendoza@umich.edu" }]
classifiers = [
Expand Down

0 comments on commit 1824cc0

Please sign in to comment.