Package: pypolsar
PyPolSARPyPolSAR is a python module for Polarimetric Synthetic Aperture Radar (PolSAR) data processing.Documentation & Software CitationTo see the latest full documentation click onhere.If you use the software in a publication then please cite it using the Zenodo DOI. Be aware that this badge links to the latest package version.Please select your specific version at [to do in future] to get the DOI of that version. You should normally always use the DOI for the specific version of your record in citations. This is to ensure that other researchers can access the exact research artefact you used for reproducibility.You can find additional information regarding DOI versioning athttp://help.zenodo.org/#versioningInstallation
This package should be installable through pip which downloads the package from the python package repository Pypi. However, pypolsar also needs some packages that depend on C or Fortran libraries (like netCDF4). They should be installed first with conda. Seehttp://conda.pydata.org/docs/on how to use it. We recommend using either Anaconda or Miniconda.condainstall-cconda-forgenumpyscipypandasnetCDF4cythonlibgdalgdalAfterwards pypolsar can be installed via pip.pipinstallpypolsarYou can also install all needed (conda and pip) dependencies at once using the following commands after cloning this repository. This is recommended for developers of the package. Note that the git --recursive flag will clone test-data, which is needed by some tests.gitclonehttps://github.com/IslamAlam/pypolsar.git--recursivecdpypolsar
condacreate-npypolsarpython=3.6# or any supported python versionsourceactivatepypolsar
condaupdate-fenvironment.yml-npypolsar
pythonsetup.pydevelopInitial setting upSet upDependabotto ensure you have the latest dependencies.Set upStale botfor automatic issue closing.PoetryAll manipulations with dependencies are executed through Poetry. If you're new to it, look throughthe documentation.Notes about PoetryPoetry'scommandsare very intuitive and easy to learn, like:poetry add numpypoetry run pytestpoetry buildetcBuilding your packageBuilding a new version of the application contains steps:Bump the version of your packagepoetry version <version>. You can pass the new version explicitly, or a rule such asmajor,minor, orpatch. For more details, refer to theSemantic Versionsstandard.Make a commit toGitHub.Create aGitHub release.And... publish 🙂poetry publish --buildWhat's nextWell, that's up to you. I can only recommend the packages and articles that helped me.Packages:Typeris great for creating CLI applications.Richmakes it easy to add beautiful formatting in the terminal.FastAPIis a type-driven asynchronous web framework.IceCreamis a little library for sweet and creamy debuggingArticles:Open Source GuidesGitHub Actions DocumentationMaybe you would like to addgitmojito commit names. This is really funny. 😄🚀 FeaturesFor your development we've prepared:Supports forPython 3.7and higher.Poetryas the dependencies manager. See configuration inpyproject.tomlandsetup.cfg.Power ofblack,isortandpyupgradeformatters.Ready-to-usepre-commithooks with formatters above.Type checks with the configuredmypy.Testing withpytest.Docstring checks withdarglint.Security checks withsafetyandbandit.Well-made.editorconfig,.dockerignore, and.gitignore. You don't have to worry about those things.For building and deployment:GitHubintegration.Makefilefor building routines. Everything is already set up for security checks, codestyle checks, code formatting, testing, linting, docker builds, etc. More details atMakefile summary).Dockerfilefor your package.Github Actionswith predefinedbuild workflowas the default CI/CD.Always up-to-date dependencies with@dependabot(You will onlyenable it).Automatic drafts of new releases withRelease Drafter. It creates a list of changes based on labels in mergedPull Requests. You can see labels (akacategories) inrelease-drafter.yml. Works perfectly withSemantic Versionsspecification.For creating your open source community:Ready-to-usePull Requests templatesand severalIssue templates.Files such as:LICENSE,CONTRIBUTING.md,CODE_OF_CONDUCT.md, andSECURITY.mdare generated automatically.Stale botthat closes abandoned issues after a period of inactivity. (You will onlyneed to setup free plan). Configuration ishere.Semantic Versionsspecification withRelease Drafter.Installationpipinstallpypolsaror install withPoetrypoetryaddpypolsarThen you can runpypolsar--helppypolsar--nameRomanor if installed withPoetry:poetryrunpypolsar--helppoetryrunpypolsar--nameRomanMakefile usageMakefilecontains many functions for fast assembling and convenient work.1. Download Poetrymakedownload-poetry2. Install all dependencies and pre-commit hooksmakeinstallIf you do not want to install pre-commit hooks, run the command with the NO_PRE_COMMIT flag:makeinstallNO_PRE_COMMIT=13. Check the security of your codemakecheck-safetyThis command launches aPoetryandPipintegrity check as well as identifies security issues withSafetyandBandit. By default, the build will not crash if any of the items fail. But you can setSTRICT=1for the entire build, or you can configure strictness for each item separately.makecheck-safetySTRICT=1or only forsafety:makecheck-safetySAFETY_STRICT=1multiplemakecheck-safetyPIP_STRICT=1SAFETY_STRICT=1List of flags forcheck-safety(can be set to1or0):STRICT,POETRY_STRICT,PIP_STRICT,SAFETY_STRICT,BANDIT_STRICT.4. Check the codestyleThe command is similar tocheck-safetybut to check the code style, obviously. It usesBlack,Darglint,Isort, andMypyinside.makecheck-styleIt may also contain theSTRICTflag.makecheck-styleSTRICT=1List of flags forcheck-style(can be set to1or0):STRICT,BLACK_STRICT,DARGLINT_STRICT,ISORT_STRICT,MYPY_STRICT.5. Run all the codestyle formatersCodestyle usespre-commithooks, so ensure you've runmake installbefore.makecodestyle6. Run testsmaketest7. Run all the lintersmakelintthe same as:maketest&&makecheck-safety&&makecheck-styleList of flags forlint(can be set to1or0):STRICT,POETRY_STRICT,PIP_STRICT,SAFETY_STRICT,BANDIT_STRICT,BLACK_STRICT,DARGLINT_STRICT,ISORT_STRICT,MYPY_STRICT.8. Build dockermakedockerwhich is equivalent to:makedockerVERSION=latestMore informationhere.9. Cleanup dockermakeclean_dockeror to remove all buildmakecleanMore informationhere.📈 ReleasesYou can see the list of available releases on theGitHub Releasespage.We followSemantic Versionsspecification.We useRelease Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.For Pull Request this labels are configured, by default:LabelTitle in Releasesenhancement,feature🚀 Featuresbug,refactoring,bugfix,fix🔧 Fixes & Refactoringbuild,ci,testing📦 Build System & CI/CDbreaking💥 Breaking Changesdocumentation📝 Documentationdependencies⬆️ Dependencies updatesYou can update it inrelease-drafter.yml.GitHub creates thebug,enhancement, anddocumentationlabels for you. Dependabot creates thedependencieslabel. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.🛡 LicenseThis project is licensed under the terms of theGPL-3.0-or-laterlicense. SeeLICENSEfor more details.📃 Citation@misc{pypolsar,
  author = {Earth-Observation},
  title = {PyPolSAR is a python module for Polarimetric Synthetic Aperture Radar (PolSAR) data processing.},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/IslamAlam/pypolsar}}
}CreditsThis project was generated withpython-package-template.