Skip to content

Commit

Permalink
Merge pull request #1 from INGEOTEC/develop
Browse files Browse the repository at this point in the history
Version - 0.0.1
  • Loading branch information
mgraffg authored Feb 17, 2024
2 parents 655f949 + 6fd3394 commit 31adfa5
Show file tree
Hide file tree
Showing 11 changed files with 531 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
omit =
*/tests*
4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"image":"mcr.microsoft.com/devcontainers/universal:2-linux",
"postCreateCommand": "conda install -c conda-forge --yes numpy scipy scikit-learn nose pandas"
}
48 changes: 48 additions & 0 deletions .github/workflows/pip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Pip

on:
workflow_dispatch:
push:
tags:
- v*

jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
allow-softlinks: true
channel-priority: flexible
show-channel-urls: true
- name: Install dependencies
run: |
conda install --yes pip
pip install twine build
conda install --yes numpy scipy scikit-learn nose pandas
python -m build
- name: Pip
if: ${{ runner.os == 'Linux' }}
env:
TWINE: ${{ secrets.TWINE }}
run: |
twine upload --skip-existing -u __token__ -p $TWINE dist/*.tar.gz;
- name: Wheel
if: ${{ runner.os != 'Linux' }}
env:
TWINE: ${{ secrets.TWINE }}
run: |
twine upload --skip-existing -u __token__ -p $TWINE dist/*.whl;
53 changes: 53 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests

on:
push:
branches:
- develop

jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: conda-forge
allow-softlinks: true
channel-priority: flexible
show-channel-urls: true
- name: Install dependencies
run: |
conda install --yes pip
pip install coverage
pip install coveralls
conda install --yes numpy scipy scikit-learn nose pandas
python setup.py build_ext --inplace
- name: Tests on Linux
if: ${{ runner.os == 'Linux' }}
run: |
which python
python --version
which coverage
nosetests --verbose --with-coverage --cover-package=CompStats CompStats/tests
- name: Tests on macOS and Windows
if: ${{ runner.os != 'Linux' }}
run: |
nosetests --verbose CompStats/tests
- name: coveralls
if: ${{ runner.os == 'Linux' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
14 changes: 14 additions & 0 deletions CompStats/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2024 Sergio Nava Muñoz and Mario Graff Guerrero

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = '0.0.1'
Loading

0 comments on commit 31adfa5

Please sign in to comment.