From b9113c9558d26b5742fd324008eb1b066162f233 Mon Sep 17 00:00:00 2001 From: Henry Webel Date: Mon, 9 Sep 2024 14:29:11 +0200 Subject: [PATCH] :sparkles: add dev dependencies and --- .github/workflows/cicd.yml | 7 +++++-- README.md | 4 ++-- pyproject.toml | 7 ++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a7909a3..0d2f1b2 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: psf/black@stable lint: - name: Lint with ruff + name: Format and Lint with ruff runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -36,6 +36,9 @@ jobs: run: | # stop the build if there are Python syntax errors or undefined names ruff check . + - name: Format with ruff + run: | + ruff format src --diff test: name: Test runs-on: ubuntu-latest @@ -126,4 +129,4 @@ jobs: # remove repository key to set the default to pypi (not test.pypi.org) repository-url: https://test.pypi.org/legacy/ user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.md b/README.md index 8f39f58..e222061 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ docs\conf.py: Install package so that new code is picked up in a restared python interpreter: ``` -pip install -e . +pip install -e ".[dev]" ``` ## TestPyPI @@ -143,4 +143,4 @@ The documentation is build using readthedocs automatically. See [project on Readthedocs](https://readthedocs.org/projects/rasmussenlab-python-package/). - make sure to enable build from PRs in the settings (advanded settings) -- checkout configuration file: [`.readthedocs.yaml`](.readthedocs.yaml) \ No newline at end of file +- checkout configuration file: [`.readthedocs.yaml`](.readthedocs.yaml) diff --git a/pyproject.toml b/pyproject.toml index 1ca1dc2..d3ed587 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] authors = [ - {name = "Jakob Nybo Nissen", email = "jakobnybonissen@gmail.com"}, - {name = "Henry Webel", email = "henry.webel@sund.ku.dk"}, + { name = "Jakob Nybo Nissen", email = "jakobnybonissen@gmail.com" }, + { name = "Henry Webel", email = "henry.webel@sund.ku.dk" }, ] description = "A small example package" name = "rasmussenlab-mockup" @@ -31,10 +31,11 @@ docs = [ "sphinx-new-tab-link!=0.2.2", "jupytext", ] +dev = ["black", "ruff", "pytest"] # Configure the Ruff linter: Ignore error number 501 [tool.ruff] -ignore = ["E501"] +lint.ignore = ["E501"] [build-system] build-backend = "setuptools.build_meta"