Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor documentation structure for issue #1043 #1199

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ __pycache__/
# C extensions
*.so

# Ignore the build directory for Sphinx documentation
docs/_build/
C:\Users\User\contribute-hamilton\hamilton\docs\_build

# Distribution / packaging
.Python
build/
Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/fastapi.md → docs/cookbook/fastapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ app.routes[-1].description += f"""<img src="data:image/png;base64,{base64_viz}"/
```
> 📞 If you are interested in a generic approach to add visualizations to all of your endpoints, please reach out to us on [Slack](https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g)!

![FastAPI Swagger](./fastapi_docs.png)
![FastAPI Swagger](fastapi_docs.png)

### Benefits
- **Separation of concerns**: the decoupling between `server.py` and `summarization.py` makes it easier to extend and test the server separately from the data transformations.
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def job_hist(job_df: pd.DataFrame) -> Figure:
return px.histogram(job_df["balance"])
```

![logic dataflow](./streamlit_logic.png)
![logic dataflow](streamlit_logic.png)

Then, the Streamlit UI is defined in `app.py`. Notice a few things:
- `app.py` doesn't have to depend on `pandas` and `plotly`.
Expand Down
79 changes: 52 additions & 27 deletions docs/integrations/index.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,55 @@
============
Integrations
============
=============
Documentation
=============

This section showcases how Hamilton integrates with popular frameworks.
This section showcases how Hamilton integrates with various tools and frameworks.

Plugins
=======

This section highlights the plugins and libraries that Hamilton has extensions for.

.. toctree::
:maxdepth: 2
:caption: Plugins:

plugins/dlt/index
plugins/ibis/index
plugins/dbt

Cookbook
========

This section provides practical examples of how to use Hamilton with various tools.

.. toctree::
:maxdepth: 2
:caption: Cookbook:

cookbook/fastapi
cookbook/streamlit

Other Integrations
==================

This section lists other Hamilton integrations available for various platforms and services.

.. toctree::
dlt/index
fastapi
ibis/index
streamlit
dbt
MLFlow <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/mlflow>
Airflow <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/airflow>
Amazon Web Services <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/aws>
Burr <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/LLM_Workflows/image_telephone>
Dagster <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/dagster>
Dask <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/dask>
Feast <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/feast>
Metaflow <https://github.com/outerbounds/hamilton-metaflow>
Pandera <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/data_quality/pandera>
Plotly <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/plotly>
Polars <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/polars>
Prefect <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/prefect>
Ray <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/ray>
Slack <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/slack>
Spark <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/spark>
Vaex <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/vaex>
Narwhals <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/narwhals>
OpenLineage <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/openlineage>
MLFlow <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/mlflow>
Airflow <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/airflow>
Amazon Web Services <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/aws>
Burr <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/LLM_Workflows/image_telephone>
Dagster <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/dagster>
Dask <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/dask>
Feast <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/feast>
Metaflow <https://github.com/outerbounds/hamilton-metaflow>
Pandera <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/data_quality/pandera>
Plotly <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/plotly>
Polars <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/polars>
Prefect <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/prefect>
Ray <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/ray>
Slack <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/slack>
Spark <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/spark>
Vaex <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/vaex>
Narwhals <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/narwhals>
OpenLineage <https://github.com/DAGWorks-Inc/hamilton/tree/main/examples/openlineage>
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
164 changes: 164 additions & 0 deletions hamilton/env1/Include/site/python3.9/greenlet/greenlet.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */

/* Greenlet object interface */

#ifndef Py_GREENLETOBJECT_H
#define Py_GREENLETOBJECT_H


#include <Python.h>

#ifdef __cplusplus
extern "C" {
#endif

/* This is deprecated and undocumented. It does not change. */
#define GREENLET_VERSION "1.0.0"

#ifndef GREENLET_MODULE
#define implementation_ptr_t void*
#endif

typedef struct _greenlet {
PyObject_HEAD
PyObject* weakreflist;
PyObject* dict;
implementation_ptr_t pimpl;
} PyGreenlet;

#define PyGreenlet_Check(op) (op && PyObject_TypeCheck(op, &PyGreenlet_Type))


/* C API functions */

/* Total number of symbols that are exported */
#define PyGreenlet_API_pointers 12

#define PyGreenlet_Type_NUM 0
#define PyExc_GreenletError_NUM 1
#define PyExc_GreenletExit_NUM 2

#define PyGreenlet_New_NUM 3
#define PyGreenlet_GetCurrent_NUM 4
#define PyGreenlet_Throw_NUM 5
#define PyGreenlet_Switch_NUM 6
#define PyGreenlet_SetParent_NUM 7

#define PyGreenlet_MAIN_NUM 8
#define PyGreenlet_STARTED_NUM 9
#define PyGreenlet_ACTIVE_NUM 10
#define PyGreenlet_GET_PARENT_NUM 11

#ifndef GREENLET_MODULE
/* This section is used by modules that uses the greenlet C API */
static void** _PyGreenlet_API = NULL;

# define PyGreenlet_Type \
(*(PyTypeObject*)_PyGreenlet_API[PyGreenlet_Type_NUM])

# define PyExc_GreenletError \
((PyObject*)_PyGreenlet_API[PyExc_GreenletError_NUM])

# define PyExc_GreenletExit \
((PyObject*)_PyGreenlet_API[PyExc_GreenletExit_NUM])

/*
* PyGreenlet_New(PyObject *args)
*
* greenlet.greenlet(run, parent=None)
*/
# define PyGreenlet_New \
(*(PyGreenlet * (*)(PyObject * run, PyGreenlet * parent)) \
_PyGreenlet_API[PyGreenlet_New_NUM])

/*
* PyGreenlet_GetCurrent(void)
*
* greenlet.getcurrent()
*/
# define PyGreenlet_GetCurrent \
(*(PyGreenlet * (*)(void)) _PyGreenlet_API[PyGreenlet_GetCurrent_NUM])

/*
* PyGreenlet_Throw(
* PyGreenlet *greenlet,
* PyObject *typ,
* PyObject *val,
* PyObject *tb)
*
* g.throw(...)
*/
# define PyGreenlet_Throw \
(*(PyObject * (*)(PyGreenlet * self, \
PyObject * typ, \
PyObject * val, \
PyObject * tb)) \
_PyGreenlet_API[PyGreenlet_Throw_NUM])

/*
* PyGreenlet_Switch(PyGreenlet *greenlet, PyObject *args)
*
* g.switch(*args, **kwargs)
*/
# define PyGreenlet_Switch \
(*(PyObject * \
(*)(PyGreenlet * greenlet, PyObject * args, PyObject * kwargs)) \
_PyGreenlet_API[PyGreenlet_Switch_NUM])

/*
* PyGreenlet_SetParent(PyObject *greenlet, PyObject *new_parent)
*
* g.parent = new_parent
*/
# define PyGreenlet_SetParent \
(*(int (*)(PyGreenlet * greenlet, PyGreenlet * nparent)) \
_PyGreenlet_API[PyGreenlet_SetParent_NUM])

/*
* PyGreenlet_GetParent(PyObject* greenlet)
*
* return greenlet.parent;
*
* This could return NULL even if there is no exception active.
* If it does not return NULL, you are responsible for decrementing the
* reference count.
*/
# define PyGreenlet_GetParent \
(*(PyGreenlet* (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_GET_PARENT_NUM])

/*
* deprecated, undocumented alias.
*/
# define PyGreenlet_GET_PARENT PyGreenlet_GetParent

# define PyGreenlet_MAIN \
(*(int (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_MAIN_NUM])

# define PyGreenlet_STARTED \
(*(int (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_STARTED_NUM])

# define PyGreenlet_ACTIVE \
(*(int (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_ACTIVE_NUM])




/* Macro that imports greenlet and initializes C API */
/* NOTE: This has actually moved to ``greenlet._greenlet._C_API``, but we
keep the older definition to be sure older code that might have a copy of
the header still works. */
# define PyGreenlet_Import() \
{ \
_PyGreenlet_API = (void**)PyCapsule_Import("greenlet._C_API", 0); \
}

#endif /* GREENLET_MODULE */

#ifdef __cplusplus
}
#endif
#endif /* !Py_GREENLETOBJECT_H */
21 changes: 21 additions & 0 deletions hamilton/env1/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Niels Bantilan

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.
Loading