Getting Started
Configure your Chalk project.
Your Chalk project’s configuration is shared across the following files:
chalk.yaml
(or chalk.yml
): Configuration for your project’s deployment.chalkignore
: Files to exclude from your project’s deploymentpip
(can be overridden in chalk.yaml
).
This can either be requirements.txt
or a Poetry pyproject.toml
.Here’s our recommended repository structure:
company_chalk/
├── src/
│ ├── resolvers/
│ │ ├── .../
│ │ ├── __init__.py
│ │ └── pipelines.py
│ ├── __init__.py
│ ├── datasources.py
│ └── feature_sets.py
├── tests/
│ └── ...
├── notebooks/
│ └── ...
├── .chalkignore
├── chalk.yaml
├── README.md
└── requirements.txt
Use chalk.yaml
to configure your project’s Docker environment, Python configuration, and metadata validation for your
features and resolvers.
projectstr
environmentsdictionary
[environment_name]dictionary
prod
or qa
. Find available environment names in your dashboard. Use default
to configure default values to apply to all of this project's environments.runtime"python310" | "python311"
requirementsstr
pip
. This can either be a `requirements.txt` file or a `pyproject.toml` file.dockerfilestr
platform_versionstr
validationdictionary
featuredictionary
metadatalist
name"description" | "owner" | "tags"
missing"info" | "warning" | "error"
info
and warning
levels, but disallowed for `error` level.resolverdictionary
metadatalist
name"description" | "owner" | "tags"
missing"info" | "warning" | "error"
info
and warning
levels, but disallowed for `error` level.Here is a sample chalk.yaml
file. In this file, we use a different Dockerfile in production.
project: my-project-id
environments:
default:
runtime: python311
requirements: requirements.txt
prod:
dockerfile: ./DockerfileProd
validation:
feature:
metadata:
- name: owner
missing: error
- name: description
missing: warning
- name: tags
missing: info
resolver:
metadata:
- name: owner
missing: error
Your .chalkignore
file should include your scripts, notebooks, and tests. Anything that you are not actively using in
your deployment should be added so that non-deployment code does not clutter or interfere with your deployment.
Chalk will use install the Python requirements for your project as specified in the requirements
parameter of your chalk.yaml
file. This can either be a requirements.txt
file or a pyproject.toml
. You can specify this file’s location
and type in your chalk.yaml
file like below:
project: my-project-id
environments:
dev:
runtime: python311
requirements: requirements-dev.txt
prod:
requirements: pyproject.yaml