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

Add error classes for symbol delisting errors, closes #270 #1918

Closed
wants to merge 4 commits into from

Conversation

elibroftw
Copy link
Contributor

@elibroftw elibroftw commented Apr 24, 2024

Breaking changes

  • raise new types of errors
  • renames the exceptions that are raised.
  • renamed test files
  • removed deprecated datetime functions

@ValueRaider
Copy link
Collaborator

Can you give a simple scenario that is broken?

@elibroftw
Copy link
Contributor Author

The issue is that the error messages can't be ignored on a per ticker basis easily.

Comment on lines +12 to +13
requests_cache>=1.0
requests-ratelimiter>=0.3.1
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are not required to use yfinance. They're optional and README already explains.

Comment on lines +271 to +292
### Running Tests

Tests have been written using the built-in Python module `unittest`

An example of running all tests in a file that calls `unittest.main`:

```sh
python -m unittest tests.test_prices
```

An example of running a test of a single method (applicable to a class as well):

```sh
python -m unittest tests.test_prices.TestPriceRepair.test_ticker_missing
```

To run all tests

```sh
python -m unittest discover -s tests
```

Copy link
Collaborator

Choose a reason for hiding this comment

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

Best place for this is in Developer Guide #1084 , which already describes running tests.

@ValueRaider
Copy link
Collaborator

The issue is that the error messages can't be ignored on a per ticker basis easily.

I'm not seeing any significant behaviour changes. raise_errors=False still prints error, raise_errors=True still raises an exception.

@elibroftw elibroftw closed this Apr 26, 2024
@elibroftw
Copy link
Contributor Author

Cool I'll just maintain my own fork then.

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.

2 participants