Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python 3.10.11
uses: actions/setup-python@v3
with:
python-version: "3.10.11"

- name: Check Python Version
run: python --version

- name: Install dependencies
run: |
python -m pip install ".[docs]"

- name: Build API documentation
run: |
make -C docs clean
make -C docs html

- name: Deploy API documentation
uses: peaceiris/[email protected]
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cd_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python 3.10.11
uses: actions/setup-python@v3
with:
python-version: "3.10.11"

- name: Check Python Version
run: python --version

- name: Install dependencies
run: |
python -m pip install ".[docs]"

- name: Build API documentation
run: |
make -C docs clean
make -C docs html

- name: Archive documentation as artifact
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install ".[test]"

- name: Test with pytest
run: python -m pytest

4 changes: 2 additions & 2 deletions .github/workflows/ci_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
steps:
- name:
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install ".[test]"

- name: Test with pytest
run: python -m pytest
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# .pre-commit-config.yaml
# WaveDiff pre-commit configuration
# Globally excludes notebooks and historical papers directories

default_stages: [commit]

# Apply globally to all hooks
exclude: '(^papers/|\.ipynb$)'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
- id: check-yaml
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.10.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]

- id: ruff-format

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black==24.10.0]
args: [-l, '120', -t, py312]

- repo: local
hooks:
- id: check-scriv-fragment
name: Ensure Scriv fragment exists for PR
entry: bash -c
args:
- |
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E "\.py$|\.md$|\.rst$|\.yaml$" | grep -v "^docs/")
FRAGMENTS=$(git diff --cached --name-only --diff-filter=ACM | grep "^changelog.d/")
if [ -n "$CHANGED_FILES" ] && [ -z "$FRAGMENTS" ]; then
echo "ERROR: Please add a Scriv changelog fragment in changelog.d/ for this PR."
exit 1
fi
language: system
42 changes: 21 additions & 21 deletions DEV_WORKFLOW.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# **WaveDiff Development Plan**

## 1. **Define a Milestone**


* **Purpose**: Milestones mark the completion of project cycles and achievement of predefined goals. A milestone is a timeline point marking the end of a project cycle, where a set of goals defined at the start of the cycle have been completed.  Goals could be tasks associated with feature development, testing phase completion, etc. List & Open issues. 

* **Types of Milestones:** Differentiate between major, minor and patch release releases to track progress effectively.


Make a milestone related to a release on possibly a minor release schedule (e.g. monthly schedule). Differentiate between the different types of releases (minor, major, patch).

## 2. **Git Workflow Branching Model (Made with** [**mermaid**](https://mermaid.js.org)**)**
![](assets/Git-Branching-Model.png)

* **main**: Stores official release history with tagged version numbers (see top row in the diagram above).

* **develop**: This branch is the integration branch for features.

* **feature**: Branch off of `develop` for new feature development.  Features get merged to `develop` (never to main).
Expand All @@ -30,7 +30,7 @@ Make a milestone related to a release on possibly a minor release schedule (e.g.


## 3. **New Branch naming conventions**


Branches created for the purpose of a Pull Request should be directly related to an open issue within the project’s issue tracker.  This ensures that all code changes are tied to specific tasks or features, facilitating better organisation and tracking of contributions. Below are the branch naming conventions:

Expand All @@ -51,41 +51,41 @@ Branches created for the purpose of a Pull Request should be directly related to
Replace with the corresponding issue number and provide a brief description of the changes in \`short\_description\`.

## 4. **Feature branch creation** 


* Pull the latest changes from the remote repository

* Checkout `develop`

* Create a new feature branch

* Ensure the feature branch’s commits align with the defined scope


**Tip**: Keep feature branch development focused on the defined scope outlined in the corresponding issue. Avoid introducing unrelated changes. Instead, open a new issue for out-of-scope features or bugs, creating a separate branch for their development.

## 5. **Completion of development** 


* Run training and metrics validation tests locally to confirm no breaking behaviour or errors were introduced.  Include test reports as per the PR template.

* Open a Pull Request to start the review process, ensuring to map the branch correctly to the target branch (i.e. `feature` -> `develop` or `hotfix` -> `main`).

* In the description of the Pull Request, explicitly state whether the PR resolves or closes an open issue by using one of the following formats:

* "Solves #"

* "Closes #"


Example: "Solves #12345" or "Closes #8679".

* Ensure that the PR meets the defined requirements and passes Continuous Integration (CI) tests.

* Assign a reviewer, assign yourself as assignee, select the correct project, choose the correct label that describes the nature of the issue (e.g. bug, enhancement, etc), choose Milestone if applicable if the issue is associated with a specific milestone or target release.

* Address reviewer feedback in threads and iterate as needed, implementing the requested changes or explaining why the task is implemented in the manner it is.  Respect the rule: Whoever opens the thread/conversation in the Pull Request is responsible for closing it.


## 6. **Merging Pull Requests** 

Expand Down Expand Up @@ -138,28 +138,28 @@ This separation keeps release notes accurate and enables clean backports
* Ensure all checklist items for the release are completed.

* Merge the PR into main and tag the release.


## 9. **Continuous Improvement**


* Regularly review and refine the workflow based on team feedback and lessons learned.

* Encourage collaboration and communication among team members to streamline processes and enhance productivity.


## 10. **Documentation and Training**


* Maintain up-to-date documentation outlining the development workflow and procedures.

* Provide training to new team members and ensure existing members are familiar with the workflow and best practices.


## 11. **Automation and Tooling**


* Explore automation tools to streamline repetitive tasks, such as testing, code formatting, and deployment.

* Integrate with CI/CD pipelines for automated testing and deployment processes.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![arXiv:2203.04908](https://img.shields.io/badge/astro--ph.IM-arXiv%3A2203.04908-B31B1B.svg)](http://arxiv.org/abs/2203.04908)
[![yapf](https://img.shields.io/badge/code%20style-yapf-blue.svg)](https://www.python.org/dev/peps/pep-0008/)
[![arXiv:2203.04908](https://img.shields.io/badge/astro--ph.IM-arXiv%3A2203.04908-B31B1B.svg)](http://arxiv.org/abs/2203.04908)
[![yapf](https://img.shields.io/badge/code%20style-yapf-blue.svg)](https://www.python.org/dev/peps/pep-0008/)
[![License](https://img.shields.io/badge/License-MIT-brigthgreen.svg)](https://github.com/tobias-liaudat/wf-psf/tree/master/LICENSE)
[![Documentation](https://img.shields.io/badge/docs-online-blue)](https://cosmostat.github.io/wf-psf/)
<h1 align='center'>WaveDiff</h1>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
For top level release notes, leave all the headers commented out.
-->

<!--
### Breaking changes

- A bullet item for the Breaking changes category.

-->
<!--
### New features

- A bullet item for the New features category.

-->
<!--
### Bug fixes

- A bullet item for the Bug fixes category.

-->
<!--
### Performance improvements

- A bullet item for the Performance improvements category.

-->

### Internal changes

- Added pre-commit hooks for code quality, formatting, and changelog enforcement



2 changes: 1 addition & 1 deletion config/data_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data:
SEDS: null
zernike_coef: null
C_poly: null
params: #
params: #
d_max: 2
max_order: 45
x_lims: [0, 1000.0]
Expand Down
Loading