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

Distribute config file from primary location #739

Merged
merged 1 commit into from
Mar 13, 2025

Conversation

ethanwhite
Copy link
Member

@ethanwhite ethanwhite commented Aug 11, 2024

We had two copies of deepforest_config.yml. The first was the main copy in the root directory of the repo. The second was a copy that got distributed with the package. This is error prone and unnecessary since we can package directly from the root file. We had some infrastructure to ensure these were the same, but that was removed as part of moving to the src/deepforest structure. This revived PR finishes the job by remove the extra copy and directly packaging the copy in the root directory.

Closes #531. Fixes #881 (again).

@ethanwhite ethanwhite force-pushed the one-config-to-rule-them-all branch from fbf2f66 to 21276f6 Compare August 11, 2024 16:27
@ethanwhite ethanwhite changed the title Distribute config file from primary location [WIP] Distribute config file from primary location Aug 11, 2024
@ethanwhite
Copy link
Member Author

This is currently broken because we're not actually testing against the installed package, we're testing against the source code, which doesn't have the data included. This is part of the same problem as #562. I'm going to open an issue to discuss the general solution

@bw4sz
Copy link
Collaborator

bw4sz commented Oct 28, 2024

This relates to a broader conversation that I would love to move to hydra, add argparse support for config. This is a 2.0 kinda thing, there may be a more short term patch here for the immediate need.

@ethanwhite
Copy link
Member Author

Resolved by our move to src/deepforest structure

@ethanwhite ethanwhite closed this Feb 26, 2025
@ethanwhite
Copy link
Member Author

Actually there's probably some cleanup in here that is still worth including so reopening to check if it still needs to be added

@ethanwhite ethanwhite reopened this Feb 26, 2025
@ethanwhite ethanwhite force-pushed the one-config-to-rule-them-all branch from 21276f6 to 3cf3921 Compare February 27, 2025 13:24
@ethanwhite ethanwhite changed the title [WIP] Distribute config file from primary location Distribute config file from primary location Feb 27, 2025
@ethanwhite ethanwhite force-pushed the one-config-to-rule-them-all branch 3 times, most recently from eb172bb to 2ab40b0 Compare February 28, 2025 14:42
@ethanwhite
Copy link
Member Author

@bw4sz & @henrykironde - this should finally complete our move to src/deepforest by reducing us to a single deepforest_config.yml. I did end up having to move it out of root, so I moved it to src/deepforest/deepforest_config.yml which I think makes sense. All other changes are in service of this move. I'd like you both to sign off on this one in case there's something weird about that file move that I failed to consider.

@ethanwhite
Copy link
Member Author

And @henrykironde - once this is merged lets go ahead and roll a new release.

We had two copies of deepforest_config.yml. The first was the main copy
in the root directory of the repo. The second was a copy that got
distributed with the package. This is error prone and unnecessary since
we can package directly from a single file. Since it makes sense for
this file to be exposed at the top level in src/deepforest this puts
the canonical file in that location the removes other files.

Also requires updating some tests to make sure they are getting the config
file from the package itself not the working directory.

Closes weecology#531
@ethanwhite ethanwhite force-pushed the one-config-to-rule-them-all branch from 2ab40b0 to ed03835 Compare March 12, 2025 11:29
@ethanwhite
Copy link
Member Author

I've rebased this again. @henrykironde can we please get this merged once the tests pass and roll a new release.

@bw4sz bw4sz removed their request for review March 13, 2025 17:06
@henrykironde henrykironde merged commit 86579cd into weecology:main Mar 13, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants