Skip to content

Commit

Permalink
update chromedriver
Browse files Browse the repository at this point in the history
auto check chromedriver

set specific chrome driver versioni for unit test

fix ci

ci

work around

use browser-action

add vitalDSP to the requirements

astro

update ci

fix ci again

final update

chrome-version

check coverall upload

rtd fix

update docstring

update rtd

gen rtd

update manifest

fix rtd

update rtd

update coverage

add contributing.md

update installation instruction

update readme pyproject toml file

update readthedocs

update pyproject.toml

fix pyproject

fix pyproj

update pyproject

fix rtd

use install editable in rtd

fix rtd hyphen

go go go

to the mars
  • Loading branch information
Koaha committed Nov 28, 2024
1 parent e672935 commit f14bb88
Show file tree
Hide file tree
Showing 100 changed files with 1,370 additions and 3,979 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
omit =
vital_sqi/app/*
43 changes: 15 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, 3.10, 3.11]
python-version: [3.7, 3.8, 3.9, 3.11]

env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand All @@ -33,41 +33,28 @@ jobs:
pip install --upgrade setuptools importlib-metadata
pip install -e .
- name: Install Chrome and dependencies
run: |
sudo apt-get update
sudo apt-get install -y google-chrome-stable libnss3 xvfb
# - name: Install Chromedriver
# run: |
# wget http://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_linux64.zip
# unzip chromedriver_linux64.zip
# sudo mv chromedriver /usr/local/bin/chromedriver
# sudo chmod +x /usr/local/bin/chromedriver

# - name: Install Chromedriver using webdriver-manager
# run: |
# pip install webdriver-manager
# python -c "from webdriver_manager.chrome import ChromeDriverManager; print(ChromeDriverManager().install())"
- name: Install Chromedriver
run: |
CHROME_VERSION=$(google-chrome --version | awk '{print $3}' | cut -d'.' -f1)
wget https://chromedriver.storage.googleapis.com/${CHROME_VERSION}.0.5249.61/chromedriver_linux64.zip || true
wget https://chromedriver.storage.googleapis.com/${CHROME_VERSION}.0/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/chromedriver
sudo chmod +x /usr/local/bin/chromedriver
- name: Set up Chrome and ChromeDriver
uses: browser-actions/setup-chrome@v1
with:
chrome-version: '131.0.6778.85' # Use 'latest' or specify a specific version
install-chromedriver: true # Install the compatible ChromeDriver

- name: Run tests with coverage
env:
DISPLAY: :99.0
run: |
Xvfb :99 & sleep 3
pytest --cov=vital_sqi --cov-report=xml --cov-report=term-missing tests
pytest --cov=vital_sqi --cov-config=.coveragerc --cov-report=xml --cov-report=term-missing tests
- name: Debug coverage files
run: |
ls -la
cat coverage.xml
- name: Upload to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
coveralls-endpoint: https://coveralls.io
path-to-lcov: ./tests # Adjust if necessary
path-to-lcov: coverage.xml
# path-to-lcov: ./tests
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ environment.yml

# -------------------------------------------------

# Example gen by local makefile
examples/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -49,6 +52,11 @@ pip-delete-this-directory.txt
# ChromeDriver
chromedriver/

# extra docstrings
docs/source/extra/.
docs/source/_examples/tutorials
docs/source/sg_execution_times.rst

# Unit test / coverage reports
htmlcov/
.tox/
Expand Down
7 changes: 4 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.7"
python: "3.9"
jobs:
post_install:
- pip install -r docs/requirements.txt # Documentation dependencies
- pip install -r requirements.txt # Project dependencies
- pip install git+https://github.com/Oucru-Innovations/vital-sqi.git # Latest code from GitHub if needed
# - pip install git+https://github.com/Oucru-Innovations/vital-sqi.git # Latest code from GitHub if needed
- pip install -e .

# Sphinx configuration
sphinx:
builder: html
configuration: docs/source/conf.py
fail_on_warning: true # Fail build on any warnings for stricter error checking
fail_on_warning: false # Fail build on any warnings for stricter error checking

# Python setup
python:
Expand Down
123 changes: 123 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@

# Contributing to Vital_SQI

🎉 Thank you for your interest in contributing to **Vital_SQI**! 🎉
We’re thrilled to have you on board. Below is a step-by-step guide to help you navigate the contribution process.

---

## How Can You Contribute? 🤔

There are several ways you can contribute to the project:
- **Report Bugs** 🐛
- **Request Features**
- **Submit Pull Requests** 🔧
- **Improve Documentation** 📖

---

## Reporting Issues 🐞

If you find a bug or want to suggest an enhancement, let us know:
1. Go to the [Issues](https://github.com/Oucru-Innovations/vital-sqi/issues) page.
2. Click on `New Issue`.
3. Choose the appropriate template:
- **Bug Report** for bugs.
- **Feature Request** for enhancements.
4. Fill out the form and submit!

---

## Contributing Code 🔨

Ready to dive into the code? Awesome! Here’s how you can get started:

### 1. Fork the Repository 🍴
Click the **Fork** button at the top right of the [Vital_SQI GitHub page](https://github.com/Oucru-Innovations/vital-sqi).

### 2. Clone Your Fork 🖥️
```bash
git clone https://github.com/<your-username>/vital-sqi.git
cd vital-sqi
```

### 3. Create a New Branch 🌿
Always create a new branch for your work:
```bash
git checkout -b feature/my-awesome-feature
```

### 4. Install Dependencies 📦
We use `pip` for dependencies:
```bash
pip install -r requirements.txt
```

### 5. Make Your Changes ✏️
- Write clean, modular, and well-documented code.
- Ensure your changes align with our [Code of Conduct](#code-of-conduct).

### 6. Run Tests ✅
Before pushing your code, ensure all tests pass:
```bash
pytest tests/
```

### 7. Push Your Changes 🚀
```bash
git add .
git commit -m "Add my awesome feature"
git push origin feature/my-awesome-feature
```

### 8. Open a Pull Request 🔃
1. Go to the [Pull Requests](https://github.com/Oucru-Innovations/vital-sqi/pulls) page.
2. Click `New Pull Request`.
3. Choose your branch and describe your changes.

---

## Style Guide 🖌️

To keep our code consistent:
- Follow **PEP8** guidelines.
- Use meaningful variable and function names.
- Document your code with docstrings.
- Format code using `flake8`:
```bash
flake8 --config=.flake8 vital_sqi tests
```

---

## Local Development 🛠️

For development and debugging, use the `Makefile`:
- Install the package:
```bash
make install
```
- Run tests with coverage:
```bash
make test
```

---

## Code of Conduct ❤️

Be respectful and kind. We are committed to fostering an inclusive community where everyone feels welcome.

---

## Need Help? 🤝

If you’re stuck or have any questions, feel free to:
- Open a discussion on the [Discussions](https://github.com/Oucru-Innovations/vital-sqi/discussions) page.
- Reach out via email: **[email protected]**.

---

Thank you for contributing! Your efforts make **Vital_SQI** better for everyone. 🚀

— The **Vital_SQI** Development Team
8 changes: 7 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
include LICENSE
include Readme.md
include Readme.md
include vital_sqi/resource/sqi_dict.json
include vital_sqi/resource/rule_dict.json
include tests/test_data/sqi_dict.json
include tests/test_data/rule_dict.json
include vital_sqi/resource/peak_dectector_list.txt
include vital_sqi/resource/citations.bib
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ doc-style: ## convert documentation style to numpy style
pyment -o numpydoc -w $(filename)

test: ## run tests with coverage report
pytest --cov=vital_sqi --cov-report term tests/
pytest --cov=vital_sqi --cov-config=.coveragerc --cov-report term tests/

BROWSER ?= firefox

cov: ## Run tests and show coverage report by file in the terminal
pytest --cov=vital_sqi --browser=$(BROWSER) tests/
pytest --cov=vital_sqi --cov-config=.coveragerc --browser=$(BROWSER) tests/
coverage report -m

test-all: ## run tests on every Python version with tox
Expand Down
Loading

0 comments on commit f14bb88

Please sign in to comment.