wtbarnes / fiasco

Python interface to the CHIANTI atomic database
http://fiasco.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
21 stars 17 forks source link

Unskip doctests in Quick Start guide #266

Open wtbarnes opened 7 months ago

wtbarnes commented 7 months ago

259 reorganized the docs to add a quick start guide which includes some code snippets. However, these have proved difficult to test because of the need to set up the database beforehand.

One method is of course to build the database in a custom location (a temp file) and then pass that path each time you instantiate that ion but ideally this level of detail is not included in the quick start guide. Instead, we want the default values to be used, with the problem being that the default values are dependent on the RC file and those can change based on how a user has configured their RC file.

Somehow, we need to isolate the creation of an RC file (or really just the defaults), have that be set up when the tests are run, and then torn down when the tests are finished. Ideally, all of the tests would then target this same database and we wouldn't have to worry about configuring this many different ways. This would mean a pretty significant overhaul of how the test database is handled now since currently it is just a fixture explicitly passed around to every test that needs it.