Comments (5)
Thanks @guidorice it looks like your fix is working, just tested it
from radiant-mlhub.
I thought of a simple fix for this, which is to add a new environment variable to our GitHub action for CI runner. Call it MLHUB_CI
. The hilighted code in the description would then become:
if 'PYTEST_CURRENT_TEST' in os.environ and 'MLHUB_CI' in os.environ:
...
This should free up the pytest context to work normally for users of radiant_mlhub. Does this sound OK @kbgg @mirob9363 ?
from radiant-mlhub.
Re: the underlying issue with vcr.py and multithreading, there are a bunch of related github issues, but these comments seem pretty relevant, from a former maintainer:
but this is the one area of code I would say I am probably still the resident expert in, and I really don't think that vcrpy is EVER going to be multi threaded (at least with its current design). kevin1024/vcrpy#212 (comment)
from radiant-mlhub.
@guidorice thanks for taking a look at this! Does the above comment indicate that it is just not a good idea to run catalog_downloader.py within a pytest environment?
from radiant-mlhub.
@rbavery I believe your use case should be fine (unless you are using vcr.py in your own code). Here is a feature branch, would you be able to test it out by installing it manually?
https://github.com/radiantearth/radiant-mlhub/tree/Fix/148-pytest-compatibility
I put together a little test and it seems to work for me by running pytest
:
from radiant_mlhub import Dataset
from pathlib import Path
def test_mlhub_and_pytest():
ds = Dataset.fetch('su_sar_moisture_content_main')
ds.download()
path = Path.cwd() / 'su_sar_moisture_content_main'
csv_files = list(path.glob('**/*.csv'))
assert len(csv_files) == 2616
from radiant-mlhub.
Related Issues (20)
- Failure to download catalogs or data for datasets dlr_fusion_competition_germany and ref_fusion_competition_south_africa HOT 4
- Bug caused by PySTAC upgrade. bad version pinning in our setup.py
- 404 not found for registry url from recent mlhub version HOT 2
- improve projection metadata for sen12floods and other stacs so they can be used more easily with stackstac HOT 4
- Data download Error with collection_filter option HOT 2
- LandCoverNet download includes unnecessary metadata when using collection_filter HOT 1
- Method for getting archive size HOT 1
- Add keywords and long descriptions to Datasets/Collections
- Include LICENSE file in package distribution
- Additional dataset attributes break Dataset.collections HOT 1
- Human-readable Collection info HOT 3
- When using api_key parameter, some class properties cannot be accessed HOT 1
- Move to One Flow branching strategy instead of Git Flow HOT 3
- Using `api_key` in `Dataset.download(...)` raises an exception HOT 4
- Drop support for Python 3.6 HOT 1
- Dataset organisation of SpaceNet 2: Vegas collection HOT 1
- Nothing is happening when I start a download HOT 2
- Continuous 104 exception trying to download the data for "dlr_fusion_competition_germany" HOT 3
- SpaceNet missing collections HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radiant-mlhub.