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

Build resspect contract tests #21

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mtauraso
Copy link
Collaborator

@mtauraso mtauraso commented Nov 7, 2024

No description provided.

@mtauraso mtauraso force-pushed the build-resspect-contract-tests branch from 93346c1 to 16b1642 Compare November 7, 2024 20:10
@mtauraso mtauraso force-pushed the build-resspect-contract-tests branch from 16b1642 to 16d2180 Compare November 7, 2024 20:10
@mtauraso mtauraso marked this pull request as ready for review November 12, 2024 23:48
@mtauraso
Copy link
Collaborator Author

Requesting review from @rknop (for some reason I can't seem to add you to the PR. I think I'm lacking in access rights)

I will also need help setting the SLACK_BOT_TOKEN secret in the repo for this to work correctly.

@mtauraso
Copy link
Collaborator Author

For those with access, The slack "app" that implements the posting bot is here: https://api.slack.com/apps/A080610AY23/general


- name: Run Cycle Tests
run: |
docker compose exec -it shell /bin/bash -c "python3 -m pytest /tests/test_elasticc2_spectrumcycle.py"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also add test_elasticc2_alertcycle.py and test_elasticc2_spectrumcycle.py to the tests that are done here. I'm not sure that all the other tests are up to date (I need to get on that!), but those two should be.

Really, what I should do is clean up the test directory and put tests in subdirectories, so that the ones we want run in GH actions are collected together in some subdirectories, and one-offs that we run manually are elsewhere.

@@ -157,3 +157,8 @@ tom_desc/admin_tools/elasticc2_dump_10obj.sql
tom_desc/admin_tools/elasticc2_dump_100obj.sql
tom_desc/admin_tools/elasticc2_dump_1000obj.sql
tom_desc/elasticc_subset.sql

# Locations of runtime files for a docker compose dev setup
tom_desc/elasticc2/static/
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a little bit nervous adding this to .gitignore. Right now lots of things are generated during the run that get saved here, but it's also possible at some point that things that should be part of the archive will get put here.

(Probably what this means is that the things I save to static should be saved somewhere else.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FWIW you can !tom_desc/elasticc2/static/filetokeep.txt for those even without changing the directory structure or this line.

Ref: https://git-scm.com/docs/gitignore "Pattern Format" section.

@@ -48,7 +48,9 @@
from rest_framework.settings import api_settings

_logger = logging.getLogger("fastdb_queries")
_logout = logging.FileHandler( pathlib.Path( os.getenv('LOGDIR'), "/logs" ) / "fastdb_queries.log" )
_log_path = pathlib.Path( os.environ.get('LOGDIR',"."), "/logs" )
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change will mess up (at least) Liz's dev environment, where she bind-mounts a directory at /logs to hold the logs.

The docker-compose for the tests does create and mount something at /logs for (I think) all the necessary running services.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pulling out the "." default like we were talking about.

@mtauraso mtauraso requested a review from rknop November 14, 2024 20:52
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