Skip to content

Commit

Permalink
Merge pull request #30 from azogue/chore/maintenance
Browse files Browse the repository at this point in the history
♻️ Maintenance update to upgrade used libraries
  • Loading branch information
azogue authored Jun 1, 2023
2 parents daf037e + 4921755 commit ea00722
Show file tree
Hide file tree
Showing 37 changed files with 11,053 additions and 10,298 deletions.
8 changes: 0 additions & 8 deletions .coveragerc

This file was deleted.

6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
pull_request:
push:
branches: [master]

jobs:
test-and-publish-flow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Run Poetry image
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.5.0

- name: Install library
run: poetry install --no-interaction

- name: Run tests
run: poetry run pytest

# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v3
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# publish version only when pyproject.toml is changed in master
- name: Filter changes in pyproject
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
root:
- 'pyproject.toml'
- if: ${{ (github.ref == 'refs/heads/master') && (steps.changes.outputs.root == 'true')}}
name: Build and publish
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: poetry publish --username $PYPI_USER --password $PYPI_PASSWORD --build
214 changes: 214 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Visual Studio Code
.vscode

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints
*/.ipynb_checkpoints/*

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.env.prod
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

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

# Pyre type checker
.pyre/

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# Full pycharm folder
.idea

# Mac Os X files
**/.DS_Store
66 changes: 41 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,52 @@
minimum_pre_commit_version: "2.10.0"
exclude: >
(?x)^(
.*\.svg|.*\.json
.*\.svg
)$
minimum_pre_commit_version: 1.13.0
repos:
- repo: https://github.com/ambv/black
rev: 19.10b0
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.270
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args:
- --dont-order-by-type
- repo: https://github.com/psf/black
rev: "23.3.0"
hooks:
- id: black
args: [--line-length=79]
name: Format code (black)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
rev: "v4.4.0"
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
- id: check-json
- id: check-toml
- id: check-yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: prettier
- repo: "https://github.com/pre-commit/mirrors-mypy"
rev: "v1.3.0"
hooks:
- id: flake8
name: Lint code (flake8)
args: ['--ignore=W503,PIE782,PIE781']
exclude: "psychrochart/psychrolib_extra.py"
additional_dependencies:
- flake8==3.7.9
- flake8-broken-line==0.1.1
- flake8-bugbear==19.8.0
- flake8-builtins==1.4.1
- flake8-comprehensions==3.0.1
- flake8-import-order==0.18.1
- flake8-mutable==1.2.0
- flake8-pie==0.4.2
- flake8-quotes==2.1.0
- flake8-string-format==0.2.3
- flake8-tidy-imports==3.0.0
- pep8-naming==0.8.2
- id: "mypy"
name: "Check type hints (mypy)"
verbose: true
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: monthly
skip: []
submodules: false
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit ea00722

Please sign in to comment.