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

Clean the global state #33

Merged
merged 15 commits into from
Jul 11, 2024
Merged

Clean the global state #33

merged 15 commits into from
Jul 11, 2024

Conversation

lewisjared
Copy link
Collaborator

@lewisjared lewisjared commented Jul 8, 2024

Description

Currently a lot of global state is used (inputs, outputs etc). This makes it very hard to test the application and generally requires running scripts via subprocess which is hard to debug.

This removes the global state in preference for a PriorConfig object to carry around the options. This config object is still created from environment variables.

This also enables the GeoJSON test which was previously disabled because of dependency issues.

Checklist

Please confirm that this pull request has done the following:

  • Tests added
  • Documentation added (where applicable)

Notes

This also moves the input and output directories into the data/ directory

@lewisjared lewisjared added the enhancement New feature or request label Jul 8, 2024
@lewisjared lewisjared self-assigned this Jul 8, 2024
@lewisjared lewisjared requested a review from crdanielbusch July 8, 2024 03:49
@lewisjared
Copy link
Collaborator Author

@crdanielbusch Ping

Copy link
Contributor

@crdanielbusch crdanielbusch left a comment

Choose a reason for hiding this comment

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

Nice, looks much cleaner now.

I've tested make run and make download on my machine, it all works fine.

@lewisjared lewisjared merged commit 50062e4 into main Jul 11, 2024
3 checks passed
@lewisjared lewisjared deleted the clean branch July 11, 2024 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants