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

Repo structure #107

Merged
merged 20 commits into from
Mar 29, 2024
Merged

Repo structure #107

merged 20 commits into from
Mar 29, 2024

Conversation

barneydobson
Copy link
Collaborator

@barneydobson barneydobson commented Mar 21, 2024

Description

I've mainly just repurposed what was used in WSIMOD.

  • CONTRIBUTING
  • AUTHORS
  • CODE_OF_CONDUCT
  • HISTORY
  • LICENSE
  • Use conda by default - see quote below? Though the testing has been fine so far and it tests on ubuntu, macos and windows. Is there a simple way to implement this that is also compatible with the pyproject.toml installation?

Since this package depends on geospatial packages, using conda (mamba, or micromamba) is recommended for development and users, too. There are many discussions about this on the internet, but the main reason is that many of the these geospatial packages depend on non-python libraries that can be tricky to install on different platforms. Using conda solves this issue since conda packages are pre-compiled and optimized for different platforms. So, it makes managing the dependencies easier and codes may even run faster, too.

From #24 by @cheginit

Fixes #24

@barneydobson barneydobson linked an issue Mar 21, 2024 that may be closed by this pull request
@barneydobson barneydobson changed the title Create LICENSE Repo structure Mar 21, 2024
@barneydobson barneydobson self-assigned this Mar 21, 2024
Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

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

LGTM!

Conda/Mamba does not support pyproject.toml. You will need write an environment file for that (or more than one for normal users and developers).

I've just come across Pixi. I've never tried to use it but I know they are working on implementing support for pyroject.toml. Might be worth to have a look from time to time.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated
Comment on lines 60 to 69
We use [`pip-tools`](https://pip-tools.readthedocs.io/en/latest/) to ensure
consistency in the development process, ensuring all people contributing to
`SWMManywhere` uses the same versions for all the dependencies, which minimiese
the conflicts. To install the development dependencies and then `SWMManywhere`
in development mode run:

```bash
pip install -r requirements-dev.txt
pip install -e .
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why you started out with conda then switched to pip?

Regardless, I think using micromamba makes things much more straightforward. Installation is very easy and is much, much faster than using conda since it's based on mamba.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've been using the pyproject.toml - which I think conda/mamba doesn't use? Does it make sense to just discuss this as part of #113 ? Or is it different?

CONTRIBUTING.md Show resolved Hide resolved
@cheginit
Copy link
Collaborator

@barneydobson @dalonsoa I've used pixi for a while. It's a very exciting up-and-coming project and their road map is great. They are planning to use uv instead of pip which makes it even more exciting. However, it's still in early stages and does not support all use cases. It's definitely something to keep an eye on, though.

My current workflow is using micromamba for development and nox for all other stuff. This requires having two env files: environment.yml for CI testing only, and environment-dev.yml for development purposes. I usually put them under a folder called ci/requirements. So, for development purposes, the command becomes:

micromamba env create -f ci/requirements/environment-dev.yml
micromamba activate env_name

Then, testing, linting, and type checking becomes just running:

nox

@barneydobson barneydobson mentioned this pull request Mar 25, 2024
@barneydobson
Copy link
Collaborator Author

@barneydobson @dalonsoa I've used pixi for a while. It's a very exciting up-and-coming project and their road map is great. They are planning to use uv instead of pip which makes it even more exciting. However, it's still in early stages and does not support all use cases. It's definitely something to keep an eye on, though.

My current workflow is using micromamba for development and nox for all other stuff. This requires having two env files: environment.yml for CI testing only, and environment-dev.yml for development purposes. I usually put them under a folder called ci/requirements. So, for development purposes, the command becomes:

micromamba env create -f ci/requirements/environment-dev.yml
micromamba activate env_name

Then, testing, linting, and type checking becomes just running:

nox

Sounds good - referenced in issue #113

@barneydobson
Copy link
Collaborator Author

Merging this as any of the leftovers can be discussed in #113

@barneydobson barneydobson merged commit a0d982d into main Mar 29, 2024
10 checks passed
@barneydobson barneydobson deleted the 24-repo-structure branch March 29, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Repo structure
3 participants