Skip to content

Commit

Permalink
Merge pull request #4 from lsst-ts/u/jonathansick/fix-setup
Browse files Browse the repository at this point in the history
Improve repository set up
  • Loading branch information
pothiers authored Aug 27, 2024
2 parents 79c9f50 + 6d6953d commit 198dd93
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 789 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python CI

env:
PYTHON_VERSION: "3.12" # Default Python version

"on":
merge_group: {}
pull_request: {}
push:
branches-ignore:
# These should always correspond to pull requests, so ignore them for
# the push trigger and let them be triggered by the pull_request
# trigger, avoiding running the workflow twice. This is a minor
# optimization so there's no need to ensure this is comprehensive.
- "dependabot/**"
- "renovate/**"
- "tickets/**"
- "u/**"

jobs:

lint:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# ts_logging_and_reporting

Project-wide Logging and Reporting

## Set up

For local development, create a virtual environment and install the required packages:

```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

This repository uses pre-commit hooks to ensure code is formatted correctly and that notebooks are cleared of outputs before committing. To set up the pre-commit hooks, run the following command in the root directory of the repository:

```bash
pre-commit install
```
Loading

0 comments on commit 198dd93

Please sign in to comment.