Skip to content

Commit

Permalink
Template update: from poetry to conda+pip
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola VIGANO <nicola.vigano@cea.fr>
  • Loading branch information
Obi-Wan committed Jun 15, 2024
1 parent b8f5114 commit 503ee13
Show file tree
Hide file tree
Showing 42 changed files with 1,335 additions and 855 deletions.
70 changes: 50 additions & 20 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,62 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
about: Create a bug report to help us improve.
title: "bug: "
labels: unconfirmed
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.
### Description of the bug
<!-- Please provide a clear and concise description of what the bug is. -->

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Run command '...'
3. Scroll down to '...'
4. See error
### To Reproduce
<!-- Please provide a Minimal Reproducible Example (MRE) if possible.
Try to boil down the problem to a few lines of code.
Your code should run by simply copying and pasting it.
**Expected behavior**
A clear and concise description of what you expected to happen.
Example:
**Screenshots**
If applicable, add screenshots to help explain your problem.
```
git clone https://github.com/username/repro
cd repro
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
... # command or code showing the issue
```
-->

**System (please complete the following information):**
- `Auto-Denoise` version: [e.g. 0.2.1]
- Python version: [e.g. 3.10]
- OS: [Windows/Linux]
```
WRITE MRE / INSTRUCTIONS HERE
```

**Additional context**
Add any other context about the problem here.
### Full traceback
<!-- Please provide the full error message / traceback if any, by pasting it in the code block below.
No screenshots! -->

<details><summary>Full traceback</summary>

```python
PASTE TRACEBACK HERE
```

</details>

### Expected behavior
<!-- Please provide a clear and concise description of what you expected to happen. -->

### Environment information
<!-- Please run the following command in your repository and paste its output below it,
redacting sensitive information. -->

```bash
autoden --debug-info # | xclip -selection clipboard
```

PASTE OUTPUT HERE

### Additional context
<!-- Add any other relevant context about the problem here,
like links to other issues or pull requests, screenshots, etc.
-->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: I have a question / I need help
url: https://github.com/CEA-MetroCarac/auto-denoise/discussions/new?category=q-a
about: Ask and answer questions in the Discussions tab.
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
about: Suggest an idea for this project.
title: "feature: "
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
### Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]. -->

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
### Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
Add any other context or screenshots about the feature request here.
### Additional context
<!-- Add any other context or screenshots about the feature request here. -->
84 changes: 38 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: Python package

on:
push:
Expand All @@ -16,14 +16,7 @@ env:
LANG: en_US.utf-8
LC_ALL: en_US.utf-8
PYTHONIOENCODING: UTF-8

# To fix an error when running Poetry on Windows
# (https://github.com/python-poetry/poetry/issues/2629),
# we set Poetry's cache directory to .poetry_cache in the current directory.
# It makes it easier to later remove the virtualenv when it's broken.
# Absolute path is necessary to avoid this issue:
# https://github.com/python-poetry/poetry/issues/3049
POETRY_CACHE_DIR: ${{ github.workspace }}/.poetry_cache
PYTHON_VERSIONS: ""

jobs:

Expand All @@ -35,42 +28,41 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Fetch all tags
run: git fetch --depth=1 --tags

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Set up Poetry
run: pip install poetry

- name: Set up the cache
uses: actions/cache@v3
with:
path: .poetry_cache
key: quality-poetry-cache

- name: Set up the project
run: poetry install -vv

- name: Check if the documentation builds correctly
run: poetry run duty check-docs

- name: Check the code quality
run: poetry run duty check-code-quality
- name: Python info
shell: bash -e {0}
run: |
which python
python --version
- name: Check if the code is correctly typed
run: poetry run duty check-types
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools build
python -m pip install flake8 pytest
python -m pip install .
- name: Check for vulnerabilities in dependencies
- name: Lint with flake8
run: |
pip install safety
poetry run duty check-dependencies
# stop the build if there are Python syntax errors or undefined names
flake8 src/autoden tests examples --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 src/autoden tests examples --count --exit-zero --max-complexity=15 --max-line-length=127 --statistics
tests:

strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os:
- ubuntu-latest
# - windows-latest
# - macos-latest
python-version: [ "3.10", "3.11", "3.12" ]

runs-on: ${{ matrix.os }}
Expand All @@ -80,21 +72,21 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Set up Poetry
run: pip install poetry

- name: Set up the cache
uses: actions/cache@v3
with:
path: .poetry_cache
key: tests-poetry-cache-${{ matrix.os }}-py${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools build
python -m pip install flake8 pytest
python -m pip install .
- name: Set up the project
run: poetry install -vv || { rm -rf .poetry_cache/virtualenvs/*; poetry install -vv; }
- name: Test with pytest
run: |
pytest tests/
- name: Run the test suite
run: poetry run duty test
- name: Verify that we can build the package
run: |
python -m build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ venv.bak/

# mypy
.mypy_cache/
.ruff_cache/
.dmypy.json
dmypy.json

Expand Down
Loading

0 comments on commit 503ee13

Please sign in to comment.