Skip to content

Commit

Permalink
Merge pull request #7 from umr-lops/package2
Browse files Browse the repository at this point in the history
Package 3rd PR
  • Loading branch information
agrouaze authored Jun 30, 2023
2 parents cda0cfc + 3bdccb2 commit 352c17c
Show file tree
Hide file tree
Showing 21 changed files with 496 additions and 87 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload package to PyPI

on:
release:
types: [created]

jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip build twine
- name: Build
run: |
python -m build --sdist --wheel .
- name: Check the built archives
run: |
twine check dist/*
pip install dist/*.whl
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_token }}
repository_url: https://upload.pypi.org/legacy/
verify_metadata: true
137 changes: 131 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,134 @@
# Fichier .gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# 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
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
*.csv
*.dat
*.out
*.pid
*.gz
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.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

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.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/

.settings/
.project
.pydevproject
tmp/


#.idea/
/.idea/

dask-worker-space/
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ci:
autoupdate_schedule: weekly

# https://pre-commit.com/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-yaml
- id: check-toml
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- id: black-jupyter
- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
hooks:
- id: blackdoc
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
args: [--extra-keys=metadata.kernelspec metadata.language_info.version]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
2 changes: 1 addition & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=======
Credits
Authors
=======

Development Lead
Expand Down
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ Package to perform Wind inversion from GRD Level-1 SAR images
Features
--------

* TODO
This Python library (based on `xarray`) allows to perform wind inversion from level-1 GRD (compressed magnitude image) or SLC (I and Q complexe image in slant range).


Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
This package was created with Cookiecutter_.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage

20 changes: 20 additions & 0 deletions ci/requirements/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: grdwindinversion-docs
channels:
- conda-forge
dependencies:
- python=3.10
- sphinx>=4
- sphinx-book-theme
- ipython
- myst-parser
- jinja2<=3.03
- pandoc
- numpydoc
- sphinx-rtd-theme
- nbsphinx
- jupyter-sphinx
- sphinxcontrib-programoutput
- aiohttp
- holoviews
- pip:
- -e ../..
35 changes: 35 additions & 0 deletions ci/requirements/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: grdwindinversion-tests
channels:
- conda-forge
dependencies:
- python=3.10
# development
- ipython
- pre-commit
- jupyterlab
- jupyterlab_code_formatter
- isort
- black
- dask-labextension
# testing
- pytest
- pytest-reportlog
- hypothesis
- coverage
# I/O
- rioxarray
- h5netcdf
- zarr
- scipy
# data
- xarray
- xarray-datatree
- dask
- numpy
- pandas
- shapely
# processing
- more-itertools
- tqdm
- lxml
- importlib_resources
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
pip install -r ../requirements_doc.txt
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
4 changes: 4 additions & 0 deletions docs/algorithm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Algorithm description
=====================

TODO
36 changes: 33 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,36 @@

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx.ext.doctest',
'sphinx.ext.autosummary',
'sphinx.ext.autosectionlabel',
'sphinx_rtd_theme',
'sphinxcontrib.mermaid',
'nbsphinx',
'jupyter_sphinx',
]
# order by source
autodoc_member_order = 'bysource'

# Napoleon settings
napoleon_google_docstring = False
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = False
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True
napoleon_type_aliases = None


# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -64,7 +93,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -84,6 +113,7 @@
# a list of builtin themes.
#
html_theme = 'alabaster'
#html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand All @@ -95,7 +125,7 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

#html_style = 'css/grdwindinversion.css'

# -- Options for HTMLHelp output ---------------------------------------

Expand Down
Loading

0 comments on commit 352c17c

Please sign in to comment.