NYCPlanning / NYCPlanning/data-engineering
dcpy user configuration
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43
- Forks
- 3
- Avg merge
- 23h 3m
- Merged PRs (30d)
- 44
Description
I figure for a first pass, use pyproject.toml or another type of config file, but since we use it pyproject.toml already this seems like a decent path. But this issue is meant to be a bit of a brainstorming space
sqlfluff has a lot of nice logic around how you might go about this just in terms of reading in a config, especially around looking for different files at different paths - see here
But we could do something simpler to start - just assume that pyproject.toml is in the current folder or something for now. Basically, for ingest-related stuff, I'm thinking something like this
[tools.dcpy.lifecycle.connectors]
recipes.datasets = { conn_type = "s3", prefix = "datasets" }
ingest = { conn_type = "ingest_datastore", storage = "recipes.datasets" }
and then we'd have something in python
config = config_from_toml("pyproject.toml")
...
connectors = ConnectorRegistry()
...
for connector in config["lifecycle"]["connectors"]:
connectors.register(Connector(**connector))
this is clearly a little ugly as is, but something along these lines.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed pyproject.toml structure and the linked sqlfluff config loader for approaches to locating configuration files. Then inspect the existing connector and ingest-related entry points to determine how configuration could reach ConnectorRegistry. Done should include an agreed configuration shape and a defined loading and connector-registration flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100