-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update target_selection build, linting, and formatting (#454)
* Replace setup.py with pyproject.tom with poetry backend * Remove flake8 linting configuration * Update RTD config * Add workflows for linting and releasing * Remove bin/target_selection * Use sdsstools.yanny for yanny_scraper * Add test workflow * Update sdsstools to 0.12.0 and click to 8.x * Apply ruff format to all files * Basic import testing * Fix Sphinx conf.py * Remove pep_440=True from get_package_version in __init__.py * Use language "en" as default for the documentation * name should be "sdss-target-selection" * Update CHANGELOG * Add check-lockfile workflow * Update README.md * Add note about updating package version
- Loading branch information
Showing
67 changed files
with
13,104 additions
and
8,537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Check lockfile | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
|
||
jobs: | ||
check-lockfile: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
|
||
- name: Install poetry | ||
run: | | ||
pipx install poetry | ||
- name: Check lockfile | ||
run: | | ||
poetry check --lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
|
||
- name: Lint with ruff | ||
run: | | ||
pip install ruff | ||
ruff check python/target_selection | ||
ruff format --check python/target_selection |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
name: Build wheels | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.12'] | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Create release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: target_selection ${{ github.ref_name }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel build | ||
- name: Build wheels | ||
run: | | ||
pyproject-build -w | ||
- name: Build source | ||
run: | | ||
pyproject-build -s | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install --upgrade wheel pip setuptools | ||
pip install . | ||
- name: Test with pytest | ||
run: | | ||
pip install pytest pytest-mock pytest-cov | ||
pytest tests/ |
Oops, something went wrong.