diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..409d028 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.idea/ +.tox/ +__pycache__ + diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..74a72c6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +software@scec.org. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1c29175 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,132 @@ + +# Contributing to dbcsep + +First off, thanks for taking the time to contribute! ❤️ + +All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 + +> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: +> - Star the project +> - Refer this project in your project's readme +> - Mention the project at local meetups and tell your friends/colleagues + + +## Table of Contents + +- [I Have a Question](#i-have-a-question) +- [I Want To Contribute](#i-want-to-contribute) + - [Reporting Bugs](#reporting-bugs) + - [Suggesting Enhancements](#suggesting-enhancements) + - [Your First Code Contribution](#your-first-code-contribution) +- [Styleguides](#styleguides) + - [Commit Messages](#commit-messages) +- [Join The Project Team](#join-the-project-team) + +## I Have a Question + +> If you want to ask a question, we hope that you have already read the available [Documentation](https://floatcsep.readthedocs.io). + +Before you ask a question, it is best to search for existing [Issues](https://github.com/cseptesting/floatcsep/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. + +If you then still feel the need to ask a question and need clarification, we recommend the following: + +- Open an [Issue](https://github.com/cseptesting/floatcsep/issues/new). +- Provide as much context as you can about what you're running into. +- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. +- Provide the files/artifacts, or simplified versions of them + +We will then take care of the issue as soon as possible. + +## I Want To Contribute + +> ### Legal Notice +> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. + +### Reporting Bugs + + +#### Before Submitting a Bug Report + +Please complete the following steps in advance to help us fix any potential bug as fast as possible. + +- Make sure that you are using the latest version (or a tag release). +- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://floatcsep.readthedocs.io). If you are looking for support, you might want to check [this section](#i-have-a-question)). +- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/cseptesting/floatcsepissues?q=label%3Abug). +- Collect information about the bug: + - Stack trace (Traceback) + - OS, Platform and Version (Windows, Linux, macOS, x86, ARM) + - Possibly your input and the expected output + - Can you reliably reproduce the issue? + +> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead, sensitive bugs must be sent by email to . + + + +### Suggesting Enhancements + +This section guides you through submitting an enhancement suggestion for floatcsep, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. + +#### Before Submitting an Enhancement + +- Make sure that you are using the latest version. +- Read the [documentation](https://floatcsep.readthedocs.io) carefully and find out if the functionality is already covered, maybe by an individual configuration. +- Perform a [search](https://github.com/cseptesting/floatcsep/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. +- Use a **clear and descriptive title** for the issue to identify the suggestion. +- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you. +- **Explain why this enhancement would be useful** to most floatcsep users. You may also want to point out the other projects that solved it better and which could serve as inspiration. + +### Your First Code Contribution + +* Make sure you have an active GitHub account +* Fork the repo on GitHub. It will now live at `https://github.com//dbcsep` ([here is some helping info](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks)). +* Download and install `git`. Check out the git documentaion if you aren't familiar with it. +* Please follow the [Installation](https://floatcsep.readthedocs.io) instructions for developers. Here is a summarized version. + + # clone your fork + git clone https://github.com//dbcsep.git + cd dbcsep + + # prepare environment + conda env create -n dbcsep-dev + conda activate dbcsep-dev + pip install -e .[dev] + + # add upstream repository + git remote add upstream https://github.com/cseptesting/dbcsep.git + + * Note: use the command `conda deactivate` to go back to your regular environment when you are done working with floatCSEP. + + You can now do any local changes in your `dbcsep` source code, which you can then `add`, `commit` and `push` to your personal fork. + +### Submitting a Pull Request + +Pull requests are how we use your changes to the code! Please submit them to us! Here's how: + +1. Make a new branch. For features/additions base your new branch at `main`. +2. Make sure to add tests! Only pull requests for documentation, refactoring, or plotting features do not require a test. +3. Also, documentation must accompany new feature requests. + - Note: We would really appreciate pull requests that help us improve documentation. +4. Make sure the tests pass. Run `pytest -v tests/` in the top-level directory of the repo. +5. Push your changes to your fork and submit a pull request. Make sure to set the branch to `dbcsep:main`. +6. Wait for our review. There may be some suggested changes or improvements. Changes can be made after + the pull request has been opening by simply adding more commits to your branch. + +Pull requests can be changed after they are opened, so create a pull request as early as possible. +This allows us to provide feedback during development and to answer any questions. + +Also, if you find floatCSEP to be useful, but don't want to contribute to the code we highly encourage updates to the documentation! + +## Additional Resources +* [Working with Git Forks](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks) +* [Style Guide](http://google.github.io/styleguide/pyguide.html) +* [Docs or it doesn’t exist](https://lukeplant.me.uk/blog/posts/docs-or-it-doesnt-exist/) +* [Quickstart guide for Sphinx](https://www.sphinx-doc.org/en/master/usage/quickstart.html) +* [Pep8 style guide](https://pep8.org/) +* Performance Tips: + * [Python](https://wiki.python.org/moin/PythonSpeed/PerformanceTips) + * [NumPy and ctypes](https://scipy-cookbook.readthedocs.io/) + * [SciPy](https://www.scipy.org/docs.html) + * [NumPy Book](http://csc.ucdavis.edu/~chaos/courses/nlp/Software/NumPyBook.pdf) + +## Attribution +This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)! diff --git a/CREDITS.md b/CREDITS.md new file mode 100644 index 0000000..c25d091 --- /dev/null +++ b/CREDITS.md @@ -0,0 +1,4 @@ +Developers and scientific team: + +* Danijel Schorlemmer - Deutsches GeoForschungsZentrum (GFZ), Germany; ETH Zurich, Switzerland - ds@gfz-potsdam.de +* Pablo Iturrieta - Deutsches GeoForschungsZentrum (GFZ), Germany - pciturri@gfz-potsdam.de diff --git a/LICENSE b/LICENSE index f288702..0ad25db 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies @@ -7,17 +7,15 @@ Preamble - The GNU General Public License is a free, copyleft license for -software and other kinds of works. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to +our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. +software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you @@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. The precise terms and conditions for copying, distribution and modification follow. @@ -72,7 +60,7 @@ modification follow. 0. Definitions. - "This License" refers to version 3 of the GNU General Public License. + "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. @@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - 13. Use with the GNU Affero General Public License. + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single +under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General +Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published +GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's +versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. @@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Affero General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see +For more information on this, and how to apply and follow the GNU AGPL, see . - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/README.md b/README.md index 82e2f4a..ef8cca1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,59 @@ -# dbcsep -A database application to store, manage and evaluate seismicity forecasts +# dbCSEP + + + + +**A database application to store, manage and evaluate seismicity forecasts** + +# Table of Contents + +* [Installation](#installing-dbcsep) +* [Useful Links](#important-links) +* [Roadmap/Issues](#roadmap-and-known-issues) +* [Contributing](#contributing) +* [License](#license) + + +# Installing dbCSEP + +* Clone the repository and access the top directory: + +```shell +git clone https://github.com/cseptesting/dbcsep +cd dbcsep +``` + +* Using `conda` environment: https://conda.io - check out Anaconda, Miniconda or Miniforge (recommended): + +```shell +conda env create -f environment.yml +conda activate dbcsep +pip install . +``` + +If using Miniforge, replace `conda` with `mamba` for faster installations. + +* Using `pip` environments: +```shell +python -m venv venv +source venv/bin/activate +pip install . +``` + +# Important Links + +* [CSEP Website](https://cseptesting.org) +* `pyCSEP` [Github](https://github.com/sceccode/pycsep) +* `pyCSEP` [Documentation](https://docs.cseptesting.org/) + +# Roadmap and Known Issues + +* Define a roadmap + +# Contributing + +We encourage all types of contributions, from reporting bugs, suggesting enhancements, adding new features and more. Please refer to the [Contribution Guidelines](https://github.com/cseptesting/dbcsep/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/cseptesting/dbcsep/blob/main/CODE_OF_CONDUCT.md) for more information + +# License + +The `dbcsep` software is distributed under the GNU Affero GPL 3-Clause open-source license. Please see the [license file](https://github.com/cseptesting/dbcsep/blob/main/LICENSE) for more information. \ No newline at end of file diff --git a/dbcsep/__init__.py b/dbcsep/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/docs/_static/dbcsep_logo.png b/docs/_static/dbcsep_logo.png new file mode 100644 index 0000000..c99a622 Binary files /dev/null and b/docs/_static/dbcsep_logo.png differ diff --git a/docs/_static/dbcsep_logo.svg b/docs/_static/dbcsep_logo.svg new file mode 100644 index 0000000..48a1e14 --- /dev/null +++ b/docs/_static/dbcsep_logo.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + db + + diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..4a81946 --- /dev/null +++ b/environment.yml @@ -0,0 +1,11 @@ +name: dbcsep +channels: + - conda-forge + - defaults +dependencies: + - packaging + - numpy + - obspy + - mercantile + - shapely + - pycsep diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..89a4ac1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +requires = ["setuptools>=52.0", "wheel"] +build-backend = "setuptools.build_meta" + +[tool.pytest.ini_options] +addopts = "--cov=dbcsep" +testpaths = [ + "tests", +] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..fc1f548 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +packaging +numpy +obspy +mercantile +shapely +pycsep \ No newline at end of file diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000..fd40d56 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,15 @@ + packaging + numpy + obspy + mercantile + shapely + pycsep + flake8 + mypy + pytest-cov + pytest + sphinx + sphinx-autoapi + sphinx-gallery + sphinx-rtd-theme + tox \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..8602f6f --- /dev/null +++ b/setup.cfg @@ -0,0 +1,49 @@ +[metadata] +name = dbcsep +description = CSEP Database management application +long_description = file: README.md +long_description_content_type = text/markdown +author = Danijel Schorlemmer +author_email = ds@gfz-potsdam.de +license = GNU Affero General Public License v3.0 +platforms = unix, linux, osx, win32 +classifiers = + Programming Language :: Python :: 3.11 +url = https://github.com/cseptesting/dbcsep.git + +[options] +packages = + dbcsep +install_requires = + packaging + numpy + obspy + mercantile + shapely + pycsep +python_requires >= 3.11 +zip_safe = no + +[options.packages.find] +include = dbcsep* + +[options.extras_require] +dev = + packaging + numpy + obspy + mercantile + shapely + pycsep + flake8 + mypy + pytest-cov + pytest + sphinx + sphinx-autoapi + sphinx-gallery + sphinx-rtd-theme + tox + +[flake8] +max-line-length = 79 \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..7f1a176 --- /dev/null +++ b/setup.py @@ -0,0 +1,4 @@ +from setuptools import setup + +if __name__ == "__main__": + setup() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..6bec5f4 --- /dev/null +++ b/tox.ini @@ -0,0 +1,20 @@ +[tox] +minversion = 3.11 +envlist = + {py311} +isolated_build = true +requires = tox-conda + +[testenv] +setenv= + PYTHONPATH = {toxinidir} +conda_channels= + defaults + conda-forge +conda_deps= + pycsep +deps= + -r{toxinidir}/requirements_dev.txt +commands= + pip install -e .[dev] + pytest --basetemp={envtmpdir}