Skip to content

Add initial dev setup automation #231

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

Merged
merged 11 commits into from
May 5, 2022
Merged

Add initial dev setup automation #231

merged 11 commits into from
May 5, 2022

Conversation

fpliger
Copy link
Contributor

@fpliger fpliger commented May 5, 2022

Addresses #69

@fpliger fpliger added tag: environment Related to Python environment configuration status: WIP PR that is not yet ready for review labels May 5, 2022
Copy link
Contributor

@mattkram mattkram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions related to conda run

.PHONY: shell
shell:
@export CONDA_ENV_PROMPT='<{name}>'
@echo 'conda activate $(env)'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been unable to coerce this into working in other repos. As-is, this is a no-op echo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if you are + or - on this one :D

This specific cmd is not that relevant anymore(and I think I'll remove it) no that we want to default using conda run... right? Or am I missing something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was indirectly suggesting we remove it, unless you have a way to make it work :)

.PHONY: setup
setup:
@if [ -z "$${CONDA_SHLVL:+x}" ]; then echo "Conda is not installed." && exit 1; fi
$(CONDA_EXE) env $(shell [ -d $(env) ] && echo update || echo create) -p $(env) --file environmentwh.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this environment filename a typo?

Copy link
Contributor Author

@fpliger fpliger May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah.. doing a 100 thing at the same time type of typo. Thanks for the catch!

Copy link
Contributor

@mattkram mattkram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

There is a suggestion to fix one of the test targets, where pytest is missing.

# This is the configuration for pre-commit, a local framework for managing pre-commit hooks
# Check out the docs at: https://pre-commit.com/

repos: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-commit will add a newline here at the end of the file :) Not important right now.

@fpliger fpliger changed the title [WIP] add initial dev setup automation Add initial dev setup automation May 5, 2022
@fpliger fpliger added status: ready PR that is ready for review and removed status: WIP PR that is not yet ready for review labels May 5, 2022
fpliger and others added 2 commits May 5, 2022 14:12
Co-authored-by: Matt Kramer <matthew.robert.kramer@gmail.com>
@fpliger fpliger merged commit d89e8fb into main May 5, 2022
@fpliger fpliger deleted the fpliger/69_add_makefile branch May 5, 2022 19:33
@fpliger fpliger added status: accepted PR that has been reviewed and accepted and removed status: ready PR that is ready for review labels May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted PR that has been reviewed and accepted tag: environment Related to Python environment configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants