GithubHelp home page GithubHelp logo

Comments (4)

tms-bananaquit avatar tms-bananaquit commented on August 16, 2024 1

This is another one that should probably use pip install -e .[test] instead of [dev].

from menelaus.

Anmol-Srivastava avatar Anmol-Srivastava commented on August 16, 2024

A Python example-script-runner is added among the unit tests, but the example scripts create a lot of output are not always needed:

  • when run by the unit test script, examples should not create output (use test_env_var)
  • add unit test script for Jupyter notebooks
  • since examples.yml runs only example scripts, unit tests should be reorganized so that the main workflow only runs the non-example test files -- maybe using more directories for labelling, etc.

from menelaus.

Anmol-Srivastava avatar Anmol-Srivastava commented on August 16, 2024

Unit tests refactored into tests/menelaus and tests/examples, which also helps the examples.yml and github-ci.yml workflows run those tests separately.

Current issue is FileNotFoundError appearing for multiple instances of example scripts being run by tests/examples/test_example_scripts.py -- even when changing those examples to use os.abspath instead of assuming a root-level CWD.

# in example script
data_path = os.path.join("..", "..", "src", "menelaus", "tools", "artifacts", "example_data.csv")
data_path = os.path.abspath(data_path)
data = pd.read_csv(data_path)

(the failing commit)

from menelaus.

Anmol-Srivastava avatar Anmol-Srivastava commented on August 16, 2024

Added unit test script that runs Juypter notebooks. There needed to be some steps to get it working:

  • add jupyter, nbconvert to .[test] installation
    - the script assumes there is a kernel made for notebooks in this repository to be run, and that it has a specific name
    • for now, I assume that the user has created a virtual environment at the root level called venv
    • I then do ipython kernell install --name "venv" --user to set that as the kernel for notebooks
    • the unit test script assumes that such a "venv" kernel will always be set up

So, any of those set up steps (and some I may be missing) will need to be included in examples.yml. Apart from that issue, the feature is working as intended, and subsequent commits should pass.

from menelaus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.