Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

Commit

Permalink
fixed pyproject.toml and added README
Browse files Browse the repository at this point in the history
  • Loading branch information
mj0nez committed Nov 8, 2022
1 parent 960d3f1 commit c9f62a3
Show file tree
Hide file tree
Showing 20 changed files with 801 additions and 765 deletions.
552 changes: 276 additions & 276 deletions .gitignore

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2022 mj0nez

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2022 mj0nez
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# FileSwitch
------------
A file router for distributed systems, which (just) handles routing logic. Like a railway switch, this tool (neither) pulls nor pushes files (yet), it simply evaluates their names, meta-data or content and provides a route to get the files to their destination.

### **Note**:
While the core idea - providing a simple, testable and extendable logic for file routings - of this project has not changed, features to actually move files will be added from now on.

This extends the projects uses cases to the underlying problem: Connecting different file sources and destinations. By implementing both, we allow ETL-tools like [Prefect](https://www.prefect.io/) and [Airflow](https://airflow.apache.org/) to utilize their proficiency in orchestrating and executing task/flows, while centralizing or separating the underlying routing logic and services with this package.

A standalone application, overseeing the complete routing process - from source to destination, is currently out of scope but may be implemented in the future. PR are more than welcome!


## Installation
---------------
As usual, use a virtualenv, and install via pip or pipenv. Because this package is not yet published on PyPi, please install the latest stable version from GitHub or from source.

```bash
pip install git+https://github.com/mj0nez/FileSwitch.git
```

Alternatively, clone this project and install in development mode:
```bash
git clone https://github.com/mj0nez/FileSwitch.git
cd FileSwitch
pip install -e .[dev]
```

## Development
--------------
Follow the above mentioned dev-installation. Format all files with [black](https://black.readthedocs.io).

PR are more than welcome to make this library better, or to add a feature that matches your needs. Nevertheless, don't forget adding tests for every aspect you. This project uses [pytest](http://pytest.org).


## License
----------
This library is licensed under the
*MIT* license, see the
[LICENSE file](LICENSE).
40 changes: 20 additions & 20 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
136 changes: 68 additions & 68 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "FileSwitch"
copyright = "2022, Marcel Johannesmann"
author = "Marcel Johannesmann"
release = "2022"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
# 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.napoleon",
"sphinx.ext.viewcode",
]

napoleon_google_docstring = False
napoleon_use_param = False
napoleon_use_ivar = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["tests", "_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = "classic"

# Add any paths that contain custom static files (such as style sheets) here,
# 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"]


# A boolean that decides whether parentheses are appended to function and
# method role text (e.g. the content of :func:`input`) to signify that the name
# is callable. Default is True.
add_function_parentheses = False

# A boolean that decides whether module names are prepended to all object
# names (for object types where a “module” of some kind is defined),
# e.g. for py:function directives. Default is True.
add_module_names = False

# This value controls how to represent typehints. The setting takes the following values:
# 'signature' – Show typehints in the signature (default)
# 'description' – Show typehints as content of the function or method The typehints of overloaded functions or methods will still be represented in the signature.
# 'none' – Do not show typehints
# 'both' – Show typehints in the signature and as content of the function or method
# Overloaded functions or methods will not have typehints included in the description because it is impossible to accurately represent all possible overloads as a list of parameters.
autodoc_typehints = "description"
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "FileSwitch"
copyright = "2022, Marcel Johannesmann"
author = "Marcel Johannesmann"
release = "2022"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
# 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.napoleon",
"sphinx.ext.viewcode",
]

napoleon_google_docstring = False
napoleon_use_param = False
napoleon_use_ivar = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["tests", "_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = "classic"

# Add any paths that contain custom static files (such as style sheets) here,
# 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"]


# A boolean that decides whether parentheses are appended to function and
# method role text (e.g. the content of :func:`input`) to signify that the name
# is callable. Default is True.
add_function_parentheses = False

# A boolean that decides whether module names are prepended to all object
# names (for object types where a “module” of some kind is defined),
# e.g. for py:function directives. Default is True.
add_module_names = False

# This value controls how to represent typehints. The setting takes the following values:
# 'signature' – Show typehints in the signature (default)
# 'description' – Show typehints as content of the function or method The typehints of overloaded functions or methods will still be represented in the signature.
# 'none' – Do not show typehints
# 'both' – Show typehints in the signature and as content of the function or method
# Overloaded functions or methods will not have typehints included in the description because it is impossible to accurately represent all possible overloads as a list of parameters.
autodoc_typehints = "description"
14 changes: 7 additions & 7 deletions docs/fileswitch.errors.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fileswitch.errors module
========================

.. automodule:: fileswitch.errors
:members:
:undoc-members:
:show-inheritance:
fileswitch.errors module
========================

.. automodule:: fileswitch.errors
:members:
:undoc-members:
:show-inheritance:
14 changes: 7 additions & 7 deletions docs/fileswitch.filters.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fileswitch.filters module
=========================

.. automodule:: fileswitch.filters
:members:
:undoc-members:
:show-inheritance:
fileswitch.filters module
=========================

.. automodule:: fileswitch.filters
:members:
:undoc-members:
:show-inheritance:
14 changes: 7 additions & 7 deletions docs/fileswitch.providers.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fileswitch.providers module
===========================

.. automodule:: fileswitch.providers
:members:
:undoc-members:
:show-inheritance:
fileswitch.providers module
===========================

.. automodule:: fileswitch.providers
:members:
:undoc-members:
:show-inheritance:
42 changes: 21 additions & 21 deletions docs/fileswitch.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
fileswitch package
==================

Submodules
----------

.. toctree::
:maxdepth: 4

fileswitch.errors
fileswitch.filters
fileswitch.providers
fileswitch.switch

Module contents
---------------

.. automodule:: fileswitch
:members:
:undoc-members:
:show-inheritance:
fileswitch package
==================

Submodules
----------

.. toctree::
:maxdepth: 4

fileswitch.errors
fileswitch.filters
fileswitch.providers
fileswitch.switch

Module contents
---------------

.. automodule:: fileswitch
:members:
:undoc-members:
:show-inheritance:
14 changes: 7 additions & 7 deletions docs/fileswitch.switch.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fileswitch.switch module
========================

.. automodule:: fileswitch.switch
:members:
:undoc-members:
:show-inheritance:
fileswitch.switch module
========================

.. automodule:: fileswitch.switch
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit c9f62a3

Please sign in to comment.