-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Simplify model subsystem * Test of the graphics module * 2018 PHM Data Challenge * CMAPSS2: Update url and downloading procedure
- Loading branch information
1 parent
b8d1f59
commit 626355e
Showing
220 changed files
with
18,327 additions
and
8,682 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,8 @@ | ||
[bumpversion] | ||
current_version = 2.0.0 | ||
commit = True | ||
tag = True | ||
|
||
[bumpversion:file:ceruleo/__init__.py] | ||
|
||
[bumpversion:file:setup.cfg] |
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: Documentation | ||
|
||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
|
||
doc: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y pandoc | ||
python -m pip install --upgrade pip | ||
python -m pip install flake8 pytest coverage | ||
python -m pip install wheel setuptools cython | ||
python -m pip install tensorflow | ||
python -m pip install --upgrade nbconvert | ||
python -m pip install jinja2 | ||
if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi | ||
python -m pip install -e $GITHUB_WORKSPACE | ||
- name: Deploy docs | ||
run: | | ||
mkdocs gh-deploy --force | ||
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,68 @@ | ||
|
||
|
||
name: Publish | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
|
||
jobs: | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.10" | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
# - name: Publish distribution 📦 to Test PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
# repository_url: https://test.pypi.org/legacy/ | ||
- name: Publish distribution 📦 to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Get Asset name | ||
run: | | ||
export PKG=$(ls dist/ | grep tar) | ||
set -- $PKG | ||
echo "name=$1" >> $GITHUB_ENV | ||
- name: Upload Release Asset (sdist) to GitHub | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: dist/${{ env.name }} | ||
asset_name: ${{ env.name }} | ||
asset_content_type: application/zip |
4 changes: 1 addition & 3 deletions
4
.github/workflows/python-package.yml → .github/workflows/test.yml
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
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,69 @@ | ||
# Contributing to CeRULEo | ||
|
||
When contributing to CeRULEo, make sure that the changes you wish to make are in line with the project direction. If you are not sure about this, open an issue first, so we can discuss it. | ||
|
||
We use github to host code, to track issues and feature requests, as well as accept pull requests. | ||
|
||
We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's: | ||
|
||
* Reporting a bug | ||
* Discussing the current state of the code | ||
* Submitting a fix | ||
* Proposing new features | ||
|
||
|
||
|
||
# Report bugs | ||
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy! | ||
|
||
Write bug reports with detail, background, and sample code | ||
|
||
Great Bug Reports tend to have: | ||
|
||
1. A quick summary and/or background | ||
2. Steps to reproduce | ||
3. Be specific! | ||
4. Give sample code if you can. | ||
4. What you expected would happen | ||
5. What actually happens | ||
6. Notes (possibly including why you think this might be happening, or stuff you tried that didn't work) | ||
|
||
|
||
# Code submission policy | ||
|
||
Pull requests are the best way to propose changes to the codebase (we use Github Flow). We actively welcome your pull requests: | ||
|
||
1. Fork the repo and create your branch from main. | ||
2. If you've added code that should be tested, add tests. | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the test suite passes. | ||
5. Make sure your code lints. | ||
6. Issue that pull request! | ||
|
||
|
||
## Rules for submission policy | ||
|
||
* Conform to the project coding style: We use black as the code formatter and isort for sorting the imports. | ||
* Choose expressive variable, function and class names. Make it as obvious as possible what the code is doing. | ||
* Split your changes into separate, atomic commits (i.e. A commit per feature or fix, where the build, tests and the system are all functioning). | ||
* Wrap your commit messages at 72 characters. | ||
* The first line of the commit message is the subject line, and must have the format "Category: Brief description of what's being changed". The | ||
* Write the commit message subject line in the imperative mood ("Foo: Change the way dates work", not "Foo: Changed the way dates work"). | ||
* Squash your commits when making revisions after a patch review. | ||
* Add your personal copyright line to files when making substantive changes. (Optional but encouraged!) | ||
* Check the spelling of your code, comments and commit messages. | ||
|
||
|
||
## Versioning | ||
|
||
We are using [Semantic Versioning](https://semver.org/) for keep tracking the development. When the Pull Request is ready, create a new commit for bumping the version following the rules of SymVer. | ||
|
||
```bash | ||
bump2version --tag --commit --allow-dirty --commit-args="-a" patch | ||
``` | ||
|
||
# License | ||
|
||
Any contributions you make will be under the MIT Software License | ||
In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern. | ||
|
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
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 |
---|---|---|
@@ -1,40 +1,43 @@ | ||
<div align="center"> | ||
<img src="doc/images/logo.png"><br> | ||
<img src="https://github.com/lucianolorenti/ceruleo/blob/main/docs/images/cerulean.png?raw=true"><br> | ||
</div> | ||
|
||
# RUL-PM | ||
# CeRULEo | ||
----------------- | ||
|
||
|
||
# RUL-PM: python Remaining Useful Life estimation toolkit | ||
# CeRULEo: Comprehensive utilitiEs for Remaining Useful Life Estimation methOds | ||
|
||
[![Coverage Status](https://coveralls.io/repos/github/lucianolorenti/rul_pm/badge.svg?branch=main&t=dYuRdM)](https://coveralls.io/github/lucianolorenti/rul_pm?branch=main) | ||
[![Documentation](https://img.shields.io/badge/documentation-dev-brightgreen)](https://lucianolorenti.github.io/rul_pm/) | ||
[![Coverage Status](https://coveralls.io/repos/github/lucianolorenti/ceruleo/badge.svg?branch=main)](https://coveralls.io/github/lucianolorenti/ceruleo?branch=main) | ||
[![Documentation](https://img.shields.io/badge/documentation-dev-brightgreen)](https://lucianolorenti.github.io/ceruleo/) | ||
|
||
## What is it? | ||
|
||
**RUL-PM** is a Python package that provides a flexible environment designed to make working with predictive maintenance task both easy and intuitive. (Yes, I stole that from pandas readme) | ||
**CeRULeo** is a Python package that provides a flexible environment designed to make working with predictive maintenance task both easy and intuitive. | ||
|
||
## Where to get it | ||
The source code is currently hosted on GitHub at: | ||
https://github.com/lucianolorenti/rul_pm | ||
|
||
```sh | ||
git clone https://github.com/lucianolorenti/rul_pm | ||
pip install [-e] rul_pm | ||
# Installation | ||
It is recommended to use pip for installation. Please make sure the latest version is installed: | ||
|
||
```bash | ||
pip install ceruleo # normal install | ||
pip install --upgrade ceruleo # or update if needed | ||
``` | ||
|
||
Alternatively, you could clone and install it from the sources: | ||
|
||
```bash | ||
git clone https://github.com/lucianolorenti/ceruleo.git | ||
cd ceruleo | ||
pip install . | ||
``` | ||
|
||
## Main Features | ||
|
||
* Model fitting for RUL regression on PM datasets. | ||
* Model evaluation and comparison through metrics and plots | ||
|
||
## Example | ||
Take a look at the [Getting Started Guide](https://lucianolorenti.github.io/rul_pm/examples/ExampleAircraftEngine.html) | ||
|
||
|
||
This library relies on Temporis [Temporis](https://github.com/lucianolorenti/Temporis) for handling PM datasets and feature extraction. | ||
|
||
Made with <3 @ <a href="https://www.dei.unipd.it/"> | ||
<img alt="University of Padova" src="doc/images/unipd_logo.png" width=100 /> | ||
<img alt="University of Padova" src="https://github.com/lucianolorenti/ceruleo/blob/main/docs/images/unipd_logo.png?raw=true" width=100 /> | ||
</a> | ||
|
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,11 @@ | ||
# Releasing a new version | ||
|
||
Publication in pypi is made automatically by a GitHub action. The action is executed when a tag starting with "v" is pushed to main. | ||
The tag must correspond to the version of `bumpversion.cfg`. | ||
|
||
```bash | ||
git tag -a "v2.0.0" -m "Description of the release" | ||
``` | ||
|
||
|
||
After the publication in pypi, a tag is created and a release is uploaded to github. |
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,12 @@ | ||
from pathlib import Path | ||
import os | ||
|
||
PACKAGE_PATH = Path(__file__).resolve().parent | ||
DATA_PATH = Path(os.environ.get('CERULEO_DATA_PATH', Path.home() / '.ceruleo' / 'data')) | ||
DATA_PATH.mkdir(parents=True, exist_ok=True) | ||
|
||
CACHE_PATH = Path(os.environ.get('CERULEO_CACHE_PATH', Path.home() / '.ceruleo' / 'cache')) | ||
CACHE_PATH.mkdir(parents=True, exist_ok=True) | ||
|
||
|
||
__version__ = "2.0.0" |
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,8 @@ | ||
""" | ||
The dataset package provides an abstract class to handle dataset for predictive maintenance. | ||
The constitutive unit of the dataset are run-to-failure cycles, stored as a DataFrame. The dataset | ||
should provides an access to each cycle separately. | ||
Models implemented in this library accepts as input method for fitting and predicting, | ||
an instance of a Dataset defined in this package. | ||
""" |
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,5 @@ | ||
|
||
from ceruleo.dataset.analysis.sample_rate import sample_rate | ||
|
||
from ceruleo.dataset.analysis.correlation import correlation_analysis | ||
from ceruleo.dataset.analysis.distribution import features_divergeces |
Oops, something went wrong.