Skip to content

Commit

Permalink
Update hooks and documentation building
Browse files Browse the repository at this point in the history
Signed-off-by: Willem Pienaar <git@willem.co>
  • Loading branch information
woop committed Jun 7, 2021
1 parent a446522 commit 2b89571
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 77 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ default_stages:
repos:
- repo: local
hooks:
- id: format
name: Format
stages: [ push ]
language: system
entry: make format
- id: lint
name: Lint
stages: [ push ]
Expand Down
18 changes: 6 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Development Guide: Main Feast Repository
> The higher level [Development Guide](https://docs.feast.dev/contributing/development-guide)
> gives guidance on contributing to Feast codebase as a whole.
> Please see [Development Guide](https://docs.feast.dev/contributing/development-guide) for project level development instructions.
### Overview
This guide is targeted at developers looking to contribute to Feast components in
Expand All @@ -9,25 +8,20 @@ the main Feast repository:
- [Feast Go Client](#feast-go-client)
- [Feast Terraform](#feast-terraform)

> Don't see the Feast component that you want to contribute to here?
> Check out the
> [Development Guide](https://docs.feast.dev/contributing/development-guide)
> to learn how Feast components are distributed over multiple repositories.
### Pre-commit Hooks
Setup [`pre-commit`](https://pre-commit.com/) to automatically lint and format the codebase on commit:
1. Ensure that you have Python (3.6 and above) with `pip`, installed.
2. Install `pre-commit` with `pip` &amp; install pre-commit hooks
1. Ensure that you have Python (3.7 and above) with `pip`, installed.
2. Install `pre-commit` with `pip` &amp; install pre-push hooks
```sh
pip install pre-commit
pre-commit install
pre-commit install --hook-type pre-push
```
3. On commit, the pre-commit hook will run.
3. On push, the pre-commit hook will run. This runs `make format` and `make lint`.

## Feast Python SDK / CLI
### Environment Setup
Setting up your development environment for Feast Python SDK / CLI:
1. Ensure that you have `make`, Python (3.6 and above) with `pip`, installed.
1. Ensure that you have `make`, Python (3.7 and above) with `pip`, installed.
2. _Recommended:_ Create a virtual environment to isolate development dependencies to be installed
```sh
# create & activate a virtual environment
Expand Down
39 changes: 0 additions & 39 deletions infra/netlify/requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion infra/netlify/runtime.txt

This file was deleted.

1 change: 0 additions & 1 deletion sdk/python/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ build-api-source:

html: clean-html build-api-source
sphinx-build -b html source html
rm -rf $(PROJECT_ROOT)/sdk/python/docs/source

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
45 changes: 45 additions & 0 deletions sdk/python/docs/source/feast.infra.offline_stores.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
feast.infra.offline\_stores package
===================================

Submodules
----------

feast.infra.offline\_stores.bigquery module
-------------------------------------------

.. automodule:: feast.infra.offline_stores.bigquery
:members:
:undoc-members:
:show-inheritance:

feast.infra.offline\_stores.file module
---------------------------------------

.. automodule:: feast.infra.offline_stores.file
:members:
:undoc-members:
:show-inheritance:

feast.infra.offline\_stores.helpers module
------------------------------------------

.. automodule:: feast.infra.offline_stores.helpers
:members:
:undoc-members:
:show-inheritance:

feast.infra.offline\_stores.offline\_store module
-------------------------------------------------

.. automodule:: feast.infra.offline_stores.offline_store
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: feast.infra.offline_stores
:members:
:undoc-members:
:show-inheritance:
14 changes: 11 additions & 3 deletions sdk/python/docs/source/feast.infra.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
feast.infra package
===================

Subpackages
-----------

.. toctree::
:maxdepth: 4

feast.infra.offline_stores

Submodules
----------

Expand All @@ -20,10 +28,10 @@ feast.infra.key\_encoding\_utils module
:undoc-members:
:show-inheritance:

feast.infra.local\_sqlite module
--------------------------------
feast.infra.local module
------------------------

.. automodule:: feast.infra.local_sqlite
.. automodule:: feast.infra.local
:members:
:undoc-members:
:show-inheritance:
Expand Down
30 changes: 19 additions & 11 deletions sdk/python/docs/source/feast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ feast.entity module
:undoc-members:
:show-inheritance:

feast.example\_repo module
--------------------------
feast.errors module
-------------------

.. automodule:: feast.example_repo
.. automodule:: feast.errors
:members:
:undoc-members:
:show-inheritance:
Expand Down Expand Up @@ -127,14 +127,6 @@ feast.names module
:undoc-members:
:show-inheritance:

feast.offline\_store module
---------------------------

.. automodule:: feast.offline_store
:members:
:undoc-members:
:show-inheritance:

feast.online\_response module
-----------------------------

Expand Down Expand Up @@ -183,6 +175,14 @@ feast.type\_map module
:undoc-members:
:show-inheritance:

feast.utils module
------------------

.. automodule:: feast.utils
:members:
:undoc-members:
:show-inheritance:

feast.value\_type module
------------------------

Expand All @@ -191,6 +191,14 @@ feast.value\_type module
:undoc-members:
:show-inheritance:

feast.version module
--------------------

.. automodule:: feast.version
:members:
:undoc-members:
:show-inheritance:

feast.wait module
-----------------

Expand Down
9 changes: 2 additions & 7 deletions sdk/python/docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ Config

.. automodule:: feast.repo_config
:members:
:exclude-members: load_repo_config
:exclude-members: load_repo_config, FeastBaseModel

Data Source
==================

.. automodule:: feast.data_source
:members:
:exclude-members: KafkaOptions, KafkaSource, KinesisOptions, KinesisSource


Entity
Expand All @@ -38,12 +39,6 @@ Feature View
.. automodule:: feast.feature_view
:members:

Feature Table
==================

.. automodule:: feast.feature_table
:members:

Feature
==================

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tensorflow_metadata/proto/v0/path_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/python/tensorflow_metadata/proto/v0/schema_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdk/python/tensorflow_metadata/proto/v0/statistics_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2b89571

Please sign in to comment.