From 4dc5c04c8b369f08c333620a3162dd2c89ae834f Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Wed, 17 Jul 2024 23:01:45 +0800 Subject: [PATCH 01/20] move regolith dir to src/regolith/ dir --- {regolith => src/regolith}/__init__.py | 0 {regolith => src/regolith}/app.py | 0 {regolith => src/regolith}/broker.py | 0 {regolith => src/regolith}/builder.py | 0 {regolith => src/regolith}/builders/__init__.py | 0 .../regolith}/builders/activitylogbuilder.py | 0 .../regolith}/builders/appraisalbuilder.py | 0 {regolith => src/regolith}/builders/basebuilder.py | 0 .../regolith}/builders/beamplanbuilder.py | 0 {regolith => src/regolith}/builders/coabuilder.py | 0 {regolith => src/regolith}/builders/cpbuilder.py | 0 {regolith => src/regolith}/builders/cvbuilder.py | 0 .../regolith}/builders/figurebuilder.py | 0 .../regolith}/builders/formalletterbuilder.py | 0 {regolith => src/regolith}/builders/gradebuilder.py | 0 .../regolith}/builders/grantreportbuilder.py | 0 {regolith => src/regolith}/builders/htmlbuilder.py | 0 .../regolith}/builders/internalhtmlbuilder.py | 0 .../regolith}/builders/manuscriptreviewbuilder.py | 0 .../regolith}/builders/postdocadbuilder.py | 0 .../regolith}/builders/preslistbuilder.py | 0 .../regolith}/builders/proposalreviewbuilder.py | 0 .../regolith}/builders/publistbuilder.py | 0 .../regolith}/builders/readinglistsbuilder.py | 0 .../regolith}/builders/reimbursementbuilder.py | 0 .../regolith}/builders/resumebuilder.py | 0 {regolith => src/regolith}/chained_db.py | 0 {regolith => src/regolith}/classlist.py | 0 {regolith => src/regolith}/client_manager.py | 0 {regolith => src/regolith}/commands.py | 0 {regolith => src/regolith}/credentials.json | 0 {regolith => src/regolith}/database.xsh | 0 {regolith => src/regolith}/dates.py | 0 {regolith => src/regolith}/deploy.py | 0 {regolith => src/regolith}/emailer.py | 0 {regolith => src/regolith}/exemplars.json | 0 {regolith => src/regolith}/fsclient.py | 0 {regolith => src/regolith}/grader.py | 0 {regolith => src/regolith}/helper.py | 0 {regolith => src/regolith}/helper_connect_main.py | 0 {regolith => src/regolith}/helper_gui_main.py | 0 {regolith => src/regolith}/helpers/__init__.py | 0 .../regolith}/helpers/a_expensehelper.py | 0 .../regolith}/helpers/a_grppub_readlisthelper.py | 0 .../regolith}/helpers/a_manurevhelper.py | 0 .../regolith}/helpers/a_presentationhelper.py | 0 .../regolith}/helpers/a_projectumhelper.py | 0 .../regolith}/helpers/a_proposalhelper.py | 0 .../regolith}/helpers/a_proprevhelper.py | 0 {regolith => src/regolith}/helpers/a_todohelper.py | 0 .../regolith}/helpers/attestationshelper.py | 0 {regolith => src/regolith}/helpers/basehelper.py | 0 {regolith => src/regolith}/helpers/f_todohelper.py | 0 {regolith => src/regolith}/helpers/hellohelper.py | 0 .../regolith}/helpers/l_abstracthelper.py | 0 .../regolith}/helpers/l_contactshelper.py | 0 .../helpers/l_currentappointmentshelper.py | 0 .../regolith}/helpers/l_generalhelper.py | 0 .../regolith}/helpers/l_grantshelper.py | 0 .../regolith}/helpers/l_membershelper.py | 0 .../regolith}/helpers/l_milestoneshelper.py | 0 .../regolith}/helpers/l_progressreporthelper.py | 0 .../regolith}/helpers/l_projectahelper.py | 0 {regolith => src/regolith}/helpers/l_todohelper.py | 0 .../regolith}/helpers/makeappointmentshelper.py | 0 .../regolith}/helpers/reimbstatushelper.py | 0 .../regolith}/helpers/u_contacthelper.py | 0 .../regolith}/helpers/u_finishprumhelper.py | 0 .../regolith}/helpers/u_institutionshelper.py | 0 .../regolith}/helpers/u_logurlhelper.py | 0 .../regolith}/helpers/u_milestonehelper.py | 0 {regolith => src/regolith}/helpers/u_todohelper.py | 0 .../regolith}/helpers/v_meetingshelper.py | 0 {regolith => src/regolith}/interact.py | 0 {regolith => src/regolith}/main.py | 0 {regolith => src/regolith}/mongoclient.py | 0 {regolith => src/regolith}/runcontrol.py | 0 {regolith => src/regolith}/schemas.json | 0 {regolith => src/regolith}/schemas.py | 0 {regolith => src/regolith}/sorters.py | 0 {regolith => src/regolith}/static/ace.js | 0 {regolith => src/regolith}/static/bootstrap.min.css | 0 .../regolith}/static/img/jsoneditor-icons.png | Bin {regolith => src/regolith}/static/jquery.min.js | 0 {regolith => src/regolith}/static/jsoneditor.map | 0 .../regolith}/static/jsoneditor.min.css | 0 {regolith => src/regolith}/static/jsoneditor.min.js | 0 {regolith => src/regolith}/static/lodash.min.js | 0 .../regolith}/static/sensei-grid.min.css | 0 .../regolith}/static/sensei-grid.min.js | 0 {regolith => src/regolith}/storage.py | 0 {regolith => src/regolith}/stylers.py | 0 {regolith => src/regolith}/templates/abstract.html | 0 {regolith => src/regolith}/templates/base.html | 0 {regolith => src/regolith}/templates/beamplan.tex | 0 {regolith => src/regolith}/templates/beamplan.txt | 0 .../regolith}/templates/blog_index.html | 0 {regolith => src/regolith}/templates/blog_post.html | 0 .../regolith}/templates/blog_summary.html | 0 .../regolith}/templates/coa_template_doe.xlsx | Bin .../regolith}/templates/coa_template_nsf.xlsx | Bin .../regolith}/templates/collection.html | 0 .../regolith}/templates/columbia_annual_report.tex | 0 .../regolith}/templates/current_pending.tex | 0 {regolith => src/regolith}/templates/cv.tex | 0 {regolith => src/regolith}/templates/former.html | 0 {regolith => src/regolith}/templates/grader.html | 0 .../regolith}/templates/gradereport.tex | 0 .../regolith}/templates/grantreport.txt | 0 .../regolith}/templates/grpmeetings.html | 0 {regolith => src/regolith}/templates/index.html | 0 {regolith => src/regolith}/templates/intbase.html | 0 {regolith => src/regolith}/templates/intindex.html | 0 .../regolith}/templates/introot_index.html | 0 {regolith => src/regolith}/templates/job.html | 0 {regolith => src/regolith}/templates/jobs.html | 0 .../regolith}/templates/jobs_closed.html | 0 {regolith => src/regolith}/templates/jobs_open.html | 0 .../regolith}/templates/naval_correspondence.tex | 0 {regolith => src/regolith}/templates/news.html | 0 {regolith => src/regolith}/templates/people.html | 0 {regolith => src/regolith}/templates/person.html | 0 {regolith => src/regolith}/templates/postdocad.tex | 0 {regolith => src/regolith}/templates/preslist.tex | 0 {regolith => src/regolith}/templates/preslist.txt | 0 {regolith => src/regolith}/templates/projects.html | 0 {regolith => src/regolith}/templates/propreport.txt | 0 {regolith => src/regolith}/templates/publist.tex | 0 .../regolith}/templates/publist_ackno.tex | 0 .../regolith}/templates/publist_nobold.tex | 0 .../regolith}/templates/publist_pandoc_friendly.tex | 0 .../regolith}/templates/recentcollabs.csv | 0 .../regolith}/templates/refreport_author.txt | 0 .../regolith}/templates/refreport_editor.txt | 0 {regolith => src/regolith}/templates/reimb.xlsx | Bin {regolith => src/regolith}/templates/res_open.html | 0 {regolith => src/regolith}/templates/resume.tex | 0 .../regolith}/templates/rlistbibfile.bib | 0 .../regolith}/templates/rlistbibfile.txt | 0 .../regolith}/templates/root_index.html | 0 {regolith => src/regolith}/templates/rss.xml | 0 {regolith => src/regolith}/tools.py | 0 {regolith => src/regolith}/validators.py | 0 {regolith => src/regolith}/version.py | 0 144 files changed, 0 insertions(+), 0 deletions(-) rename {regolith => src/regolith}/__init__.py (100%) rename {regolith => src/regolith}/app.py (100%) rename {regolith => src/regolith}/broker.py (100%) rename {regolith => src/regolith}/builder.py (100%) rename {regolith => src/regolith}/builders/__init__.py (100%) rename {regolith => src/regolith}/builders/activitylogbuilder.py (100%) rename {regolith => src/regolith}/builders/appraisalbuilder.py (100%) rename {regolith => src/regolith}/builders/basebuilder.py (100%) rename {regolith => src/regolith}/builders/beamplanbuilder.py (100%) rename {regolith => src/regolith}/builders/coabuilder.py (100%) rename {regolith => src/regolith}/builders/cpbuilder.py (100%) rename {regolith => src/regolith}/builders/cvbuilder.py (100%) rename {regolith => src/regolith}/builders/figurebuilder.py (100%) rename {regolith => src/regolith}/builders/formalletterbuilder.py (100%) rename {regolith => src/regolith}/builders/gradebuilder.py (100%) rename {regolith => src/regolith}/builders/grantreportbuilder.py (100%) rename {regolith => src/regolith}/builders/htmlbuilder.py (100%) rename {regolith => src/regolith}/builders/internalhtmlbuilder.py (100%) rename {regolith => src/regolith}/builders/manuscriptreviewbuilder.py (100%) rename {regolith => src/regolith}/builders/postdocadbuilder.py (100%) rename {regolith => src/regolith}/builders/preslistbuilder.py (100%) rename {regolith => src/regolith}/builders/proposalreviewbuilder.py (100%) rename {regolith => src/regolith}/builders/publistbuilder.py (100%) rename {regolith => src/regolith}/builders/readinglistsbuilder.py (100%) rename {regolith => src/regolith}/builders/reimbursementbuilder.py (100%) rename {regolith => src/regolith}/builders/resumebuilder.py (100%) rename {regolith => src/regolith}/chained_db.py (100%) rename {regolith => src/regolith}/classlist.py (100%) rename {regolith => src/regolith}/client_manager.py (100%) rename {regolith => src/regolith}/commands.py (100%) rename {regolith => src/regolith}/credentials.json (100%) rename {regolith => src/regolith}/database.xsh (100%) rename {regolith => src/regolith}/dates.py (100%) rename {regolith => src/regolith}/deploy.py (100%) rename {regolith => src/regolith}/emailer.py (100%) rename {regolith => src/regolith}/exemplars.json (100%) rename {regolith => src/regolith}/fsclient.py (100%) rename {regolith => src/regolith}/grader.py (100%) rename {regolith => src/regolith}/helper.py (100%) rename {regolith => src/regolith}/helper_connect_main.py (100%) rename {regolith => src/regolith}/helper_gui_main.py (100%) rename {regolith => src/regolith}/helpers/__init__.py (100%) rename {regolith => src/regolith}/helpers/a_expensehelper.py (100%) rename {regolith => src/regolith}/helpers/a_grppub_readlisthelper.py (100%) rename {regolith => src/regolith}/helpers/a_manurevhelper.py (100%) rename {regolith => src/regolith}/helpers/a_presentationhelper.py (100%) rename {regolith => src/regolith}/helpers/a_projectumhelper.py (100%) rename {regolith => src/regolith}/helpers/a_proposalhelper.py (100%) rename {regolith => src/regolith}/helpers/a_proprevhelper.py (100%) rename {regolith => src/regolith}/helpers/a_todohelper.py (100%) rename {regolith => src/regolith}/helpers/attestationshelper.py (100%) rename {regolith => src/regolith}/helpers/basehelper.py (100%) rename {regolith => src/regolith}/helpers/f_todohelper.py (100%) rename {regolith => src/regolith}/helpers/hellohelper.py (100%) rename {regolith => src/regolith}/helpers/l_abstracthelper.py (100%) rename {regolith => src/regolith}/helpers/l_contactshelper.py (100%) rename {regolith => src/regolith}/helpers/l_currentappointmentshelper.py (100%) rename {regolith => src/regolith}/helpers/l_generalhelper.py (100%) rename {regolith => src/regolith}/helpers/l_grantshelper.py (100%) rename {regolith => src/regolith}/helpers/l_membershelper.py (100%) rename {regolith => src/regolith}/helpers/l_milestoneshelper.py (100%) rename {regolith => src/regolith}/helpers/l_progressreporthelper.py (100%) rename {regolith => src/regolith}/helpers/l_projectahelper.py (100%) rename {regolith => src/regolith}/helpers/l_todohelper.py (100%) rename {regolith => src/regolith}/helpers/makeappointmentshelper.py (100%) rename {regolith => src/regolith}/helpers/reimbstatushelper.py (100%) rename {regolith => src/regolith}/helpers/u_contacthelper.py (100%) rename {regolith => src/regolith}/helpers/u_finishprumhelper.py (100%) rename {regolith => src/regolith}/helpers/u_institutionshelper.py (100%) rename {regolith => src/regolith}/helpers/u_logurlhelper.py (100%) rename {regolith => src/regolith}/helpers/u_milestonehelper.py (100%) rename {regolith => src/regolith}/helpers/u_todohelper.py (100%) rename {regolith => src/regolith}/helpers/v_meetingshelper.py (100%) rename {regolith => src/regolith}/interact.py (100%) rename {regolith => src/regolith}/main.py (100%) rename {regolith => src/regolith}/mongoclient.py (100%) rename {regolith => src/regolith}/runcontrol.py (100%) rename {regolith => src/regolith}/schemas.json (100%) rename {regolith => src/regolith}/schemas.py (100%) rename {regolith => src/regolith}/sorters.py (100%) rename {regolith => src/regolith}/static/ace.js (100%) rename {regolith => src/regolith}/static/bootstrap.min.css (100%) rename {regolith => src/regolith}/static/img/jsoneditor-icons.png (100%) rename {regolith => src/regolith}/static/jquery.min.js (100%) rename {regolith => src/regolith}/static/jsoneditor.map (100%) rename {regolith => src/regolith}/static/jsoneditor.min.css (100%) rename {regolith => src/regolith}/static/jsoneditor.min.js (100%) rename {regolith => src/regolith}/static/lodash.min.js (100%) rename {regolith => src/regolith}/static/sensei-grid.min.css (100%) rename {regolith => src/regolith}/static/sensei-grid.min.js (100%) rename {regolith => src/regolith}/storage.py (100%) rename {regolith => src/regolith}/stylers.py (100%) rename {regolith => src/regolith}/templates/abstract.html (100%) rename {regolith => src/regolith}/templates/base.html (100%) rename {regolith => src/regolith}/templates/beamplan.tex (100%) rename {regolith => src/regolith}/templates/beamplan.txt (100%) rename {regolith => src/regolith}/templates/blog_index.html (100%) rename {regolith => src/regolith}/templates/blog_post.html (100%) rename {regolith => src/regolith}/templates/blog_summary.html (100%) rename {regolith => src/regolith}/templates/coa_template_doe.xlsx (100%) rename {regolith => src/regolith}/templates/coa_template_nsf.xlsx (100%) rename {regolith => src/regolith}/templates/collection.html (100%) rename {regolith => src/regolith}/templates/columbia_annual_report.tex (100%) rename {regolith => src/regolith}/templates/current_pending.tex (100%) rename {regolith => src/regolith}/templates/cv.tex (100%) rename {regolith => src/regolith}/templates/former.html (100%) rename {regolith => src/regolith}/templates/grader.html (100%) rename {regolith => src/regolith}/templates/gradereport.tex (100%) rename {regolith => src/regolith}/templates/grantreport.txt (100%) rename {regolith => src/regolith}/templates/grpmeetings.html (100%) rename {regolith => src/regolith}/templates/index.html (100%) rename {regolith => src/regolith}/templates/intbase.html (100%) rename {regolith => src/regolith}/templates/intindex.html (100%) rename {regolith => src/regolith}/templates/introot_index.html (100%) rename {regolith => src/regolith}/templates/job.html (100%) rename {regolith => src/regolith}/templates/jobs.html (100%) rename {regolith => src/regolith}/templates/jobs_closed.html (100%) rename {regolith => src/regolith}/templates/jobs_open.html (100%) rename {regolith => src/regolith}/templates/naval_correspondence.tex (100%) rename {regolith => src/regolith}/templates/news.html (100%) rename {regolith => src/regolith}/templates/people.html (100%) rename {regolith => src/regolith}/templates/person.html (100%) rename {regolith => src/regolith}/templates/postdocad.tex (100%) rename {regolith => src/regolith}/templates/preslist.tex (100%) rename {regolith => src/regolith}/templates/preslist.txt (100%) rename {regolith => src/regolith}/templates/projects.html (100%) rename {regolith => src/regolith}/templates/propreport.txt (100%) rename {regolith => src/regolith}/templates/publist.tex (100%) rename {regolith => src/regolith}/templates/publist_ackno.tex (100%) rename {regolith => src/regolith}/templates/publist_nobold.tex (100%) rename {regolith => src/regolith}/templates/publist_pandoc_friendly.tex (100%) rename {regolith => src/regolith}/templates/recentcollabs.csv (100%) rename {regolith => src/regolith}/templates/refreport_author.txt (100%) rename {regolith => src/regolith}/templates/refreport_editor.txt (100%) rename {regolith => src/regolith}/templates/reimb.xlsx (100%) rename {regolith => src/regolith}/templates/res_open.html (100%) rename {regolith => src/regolith}/templates/resume.tex (100%) rename {regolith => src/regolith}/templates/rlistbibfile.bib (100%) rename {regolith => src/regolith}/templates/rlistbibfile.txt (100%) rename {regolith => src/regolith}/templates/root_index.html (100%) rename {regolith => src/regolith}/templates/rss.xml (100%) rename {regolith => src/regolith}/tools.py (100%) rename {regolith => src/regolith}/validators.py (100%) rename {regolith => src/regolith}/version.py (100%) diff --git a/regolith/__init__.py b/src/regolith/__init__.py similarity index 100% rename from regolith/__init__.py rename to src/regolith/__init__.py diff --git a/regolith/app.py b/src/regolith/app.py similarity index 100% rename from regolith/app.py rename to src/regolith/app.py diff --git a/regolith/broker.py b/src/regolith/broker.py similarity index 100% rename from regolith/broker.py rename to src/regolith/broker.py diff --git a/regolith/builder.py b/src/regolith/builder.py similarity index 100% rename from regolith/builder.py rename to src/regolith/builder.py diff --git a/regolith/builders/__init__.py b/src/regolith/builders/__init__.py similarity index 100% rename from regolith/builders/__init__.py rename to src/regolith/builders/__init__.py diff --git a/regolith/builders/activitylogbuilder.py b/src/regolith/builders/activitylogbuilder.py similarity index 100% rename from regolith/builders/activitylogbuilder.py rename to src/regolith/builders/activitylogbuilder.py diff --git a/regolith/builders/appraisalbuilder.py b/src/regolith/builders/appraisalbuilder.py similarity index 100% rename from regolith/builders/appraisalbuilder.py rename to src/regolith/builders/appraisalbuilder.py diff --git a/regolith/builders/basebuilder.py b/src/regolith/builders/basebuilder.py similarity index 100% rename from regolith/builders/basebuilder.py rename to src/regolith/builders/basebuilder.py diff --git a/regolith/builders/beamplanbuilder.py b/src/regolith/builders/beamplanbuilder.py similarity index 100% rename from regolith/builders/beamplanbuilder.py rename to src/regolith/builders/beamplanbuilder.py diff --git a/regolith/builders/coabuilder.py b/src/regolith/builders/coabuilder.py similarity index 100% rename from regolith/builders/coabuilder.py rename to src/regolith/builders/coabuilder.py diff --git a/regolith/builders/cpbuilder.py b/src/regolith/builders/cpbuilder.py similarity index 100% rename from regolith/builders/cpbuilder.py rename to src/regolith/builders/cpbuilder.py diff --git a/regolith/builders/cvbuilder.py b/src/regolith/builders/cvbuilder.py similarity index 100% rename from regolith/builders/cvbuilder.py rename to src/regolith/builders/cvbuilder.py diff --git a/regolith/builders/figurebuilder.py b/src/regolith/builders/figurebuilder.py similarity index 100% rename from regolith/builders/figurebuilder.py rename to src/regolith/builders/figurebuilder.py diff --git a/regolith/builders/formalletterbuilder.py b/src/regolith/builders/formalletterbuilder.py similarity index 100% rename from regolith/builders/formalletterbuilder.py rename to src/regolith/builders/formalletterbuilder.py diff --git a/regolith/builders/gradebuilder.py b/src/regolith/builders/gradebuilder.py similarity index 100% rename from regolith/builders/gradebuilder.py rename to src/regolith/builders/gradebuilder.py diff --git a/regolith/builders/grantreportbuilder.py b/src/regolith/builders/grantreportbuilder.py similarity index 100% rename from regolith/builders/grantreportbuilder.py rename to src/regolith/builders/grantreportbuilder.py diff --git a/regolith/builders/htmlbuilder.py b/src/regolith/builders/htmlbuilder.py similarity index 100% rename from regolith/builders/htmlbuilder.py rename to src/regolith/builders/htmlbuilder.py diff --git a/regolith/builders/internalhtmlbuilder.py b/src/regolith/builders/internalhtmlbuilder.py similarity index 100% rename from regolith/builders/internalhtmlbuilder.py rename to src/regolith/builders/internalhtmlbuilder.py diff --git a/regolith/builders/manuscriptreviewbuilder.py b/src/regolith/builders/manuscriptreviewbuilder.py similarity index 100% rename from regolith/builders/manuscriptreviewbuilder.py rename to src/regolith/builders/manuscriptreviewbuilder.py diff --git a/regolith/builders/postdocadbuilder.py b/src/regolith/builders/postdocadbuilder.py similarity index 100% rename from regolith/builders/postdocadbuilder.py rename to src/regolith/builders/postdocadbuilder.py diff --git a/regolith/builders/preslistbuilder.py b/src/regolith/builders/preslistbuilder.py similarity index 100% rename from regolith/builders/preslistbuilder.py rename to src/regolith/builders/preslistbuilder.py diff --git a/regolith/builders/proposalreviewbuilder.py b/src/regolith/builders/proposalreviewbuilder.py similarity index 100% rename from regolith/builders/proposalreviewbuilder.py rename to src/regolith/builders/proposalreviewbuilder.py diff --git a/regolith/builders/publistbuilder.py b/src/regolith/builders/publistbuilder.py similarity index 100% rename from regolith/builders/publistbuilder.py rename to src/regolith/builders/publistbuilder.py diff --git a/regolith/builders/readinglistsbuilder.py b/src/regolith/builders/readinglistsbuilder.py similarity index 100% rename from regolith/builders/readinglistsbuilder.py rename to src/regolith/builders/readinglistsbuilder.py diff --git a/regolith/builders/reimbursementbuilder.py b/src/regolith/builders/reimbursementbuilder.py similarity index 100% rename from regolith/builders/reimbursementbuilder.py rename to src/regolith/builders/reimbursementbuilder.py diff --git a/regolith/builders/resumebuilder.py b/src/regolith/builders/resumebuilder.py similarity index 100% rename from regolith/builders/resumebuilder.py rename to src/regolith/builders/resumebuilder.py diff --git a/regolith/chained_db.py b/src/regolith/chained_db.py similarity index 100% rename from regolith/chained_db.py rename to src/regolith/chained_db.py diff --git a/regolith/classlist.py b/src/regolith/classlist.py similarity index 100% rename from regolith/classlist.py rename to src/regolith/classlist.py diff --git a/regolith/client_manager.py b/src/regolith/client_manager.py similarity index 100% rename from regolith/client_manager.py rename to src/regolith/client_manager.py diff --git a/regolith/commands.py b/src/regolith/commands.py similarity index 100% rename from regolith/commands.py rename to src/regolith/commands.py diff --git a/regolith/credentials.json b/src/regolith/credentials.json similarity index 100% rename from regolith/credentials.json rename to src/regolith/credentials.json diff --git a/regolith/database.xsh b/src/regolith/database.xsh similarity index 100% rename from regolith/database.xsh rename to src/regolith/database.xsh diff --git a/regolith/dates.py b/src/regolith/dates.py similarity index 100% rename from regolith/dates.py rename to src/regolith/dates.py diff --git a/regolith/deploy.py b/src/regolith/deploy.py similarity index 100% rename from regolith/deploy.py rename to src/regolith/deploy.py diff --git a/regolith/emailer.py b/src/regolith/emailer.py similarity index 100% rename from regolith/emailer.py rename to src/regolith/emailer.py diff --git a/regolith/exemplars.json b/src/regolith/exemplars.json similarity index 100% rename from regolith/exemplars.json rename to src/regolith/exemplars.json diff --git a/regolith/fsclient.py b/src/regolith/fsclient.py similarity index 100% rename from regolith/fsclient.py rename to src/regolith/fsclient.py diff --git a/regolith/grader.py b/src/regolith/grader.py similarity index 100% rename from regolith/grader.py rename to src/regolith/grader.py diff --git a/regolith/helper.py b/src/regolith/helper.py similarity index 100% rename from regolith/helper.py rename to src/regolith/helper.py diff --git a/regolith/helper_connect_main.py b/src/regolith/helper_connect_main.py similarity index 100% rename from regolith/helper_connect_main.py rename to src/regolith/helper_connect_main.py diff --git a/regolith/helper_gui_main.py b/src/regolith/helper_gui_main.py similarity index 100% rename from regolith/helper_gui_main.py rename to src/regolith/helper_gui_main.py diff --git a/regolith/helpers/__init__.py b/src/regolith/helpers/__init__.py similarity index 100% rename from regolith/helpers/__init__.py rename to src/regolith/helpers/__init__.py diff --git a/regolith/helpers/a_expensehelper.py b/src/regolith/helpers/a_expensehelper.py similarity index 100% rename from regolith/helpers/a_expensehelper.py rename to src/regolith/helpers/a_expensehelper.py diff --git a/regolith/helpers/a_grppub_readlisthelper.py b/src/regolith/helpers/a_grppub_readlisthelper.py similarity index 100% rename from regolith/helpers/a_grppub_readlisthelper.py rename to src/regolith/helpers/a_grppub_readlisthelper.py diff --git a/regolith/helpers/a_manurevhelper.py b/src/regolith/helpers/a_manurevhelper.py similarity index 100% rename from regolith/helpers/a_manurevhelper.py rename to src/regolith/helpers/a_manurevhelper.py diff --git a/regolith/helpers/a_presentationhelper.py b/src/regolith/helpers/a_presentationhelper.py similarity index 100% rename from regolith/helpers/a_presentationhelper.py rename to src/regolith/helpers/a_presentationhelper.py diff --git a/regolith/helpers/a_projectumhelper.py b/src/regolith/helpers/a_projectumhelper.py similarity index 100% rename from regolith/helpers/a_projectumhelper.py rename to src/regolith/helpers/a_projectumhelper.py diff --git a/regolith/helpers/a_proposalhelper.py b/src/regolith/helpers/a_proposalhelper.py similarity index 100% rename from regolith/helpers/a_proposalhelper.py rename to src/regolith/helpers/a_proposalhelper.py diff --git a/regolith/helpers/a_proprevhelper.py b/src/regolith/helpers/a_proprevhelper.py similarity index 100% rename from regolith/helpers/a_proprevhelper.py rename to src/regolith/helpers/a_proprevhelper.py diff --git a/regolith/helpers/a_todohelper.py b/src/regolith/helpers/a_todohelper.py similarity index 100% rename from regolith/helpers/a_todohelper.py rename to src/regolith/helpers/a_todohelper.py diff --git a/regolith/helpers/attestationshelper.py b/src/regolith/helpers/attestationshelper.py similarity index 100% rename from regolith/helpers/attestationshelper.py rename to src/regolith/helpers/attestationshelper.py diff --git a/regolith/helpers/basehelper.py b/src/regolith/helpers/basehelper.py similarity index 100% rename from regolith/helpers/basehelper.py rename to src/regolith/helpers/basehelper.py diff --git a/regolith/helpers/f_todohelper.py b/src/regolith/helpers/f_todohelper.py similarity index 100% rename from regolith/helpers/f_todohelper.py rename to src/regolith/helpers/f_todohelper.py diff --git a/regolith/helpers/hellohelper.py b/src/regolith/helpers/hellohelper.py similarity index 100% rename from regolith/helpers/hellohelper.py rename to src/regolith/helpers/hellohelper.py diff --git a/regolith/helpers/l_abstracthelper.py b/src/regolith/helpers/l_abstracthelper.py similarity index 100% rename from regolith/helpers/l_abstracthelper.py rename to src/regolith/helpers/l_abstracthelper.py diff --git a/regolith/helpers/l_contactshelper.py b/src/regolith/helpers/l_contactshelper.py similarity index 100% rename from regolith/helpers/l_contactshelper.py rename to src/regolith/helpers/l_contactshelper.py diff --git a/regolith/helpers/l_currentappointmentshelper.py b/src/regolith/helpers/l_currentappointmentshelper.py similarity index 100% rename from regolith/helpers/l_currentappointmentshelper.py rename to src/regolith/helpers/l_currentappointmentshelper.py diff --git a/regolith/helpers/l_generalhelper.py b/src/regolith/helpers/l_generalhelper.py similarity index 100% rename from regolith/helpers/l_generalhelper.py rename to src/regolith/helpers/l_generalhelper.py diff --git a/regolith/helpers/l_grantshelper.py b/src/regolith/helpers/l_grantshelper.py similarity index 100% rename from regolith/helpers/l_grantshelper.py rename to src/regolith/helpers/l_grantshelper.py diff --git a/regolith/helpers/l_membershelper.py b/src/regolith/helpers/l_membershelper.py similarity index 100% rename from regolith/helpers/l_membershelper.py rename to src/regolith/helpers/l_membershelper.py diff --git a/regolith/helpers/l_milestoneshelper.py b/src/regolith/helpers/l_milestoneshelper.py similarity index 100% rename from regolith/helpers/l_milestoneshelper.py rename to src/regolith/helpers/l_milestoneshelper.py diff --git a/regolith/helpers/l_progressreporthelper.py b/src/regolith/helpers/l_progressreporthelper.py similarity index 100% rename from regolith/helpers/l_progressreporthelper.py rename to src/regolith/helpers/l_progressreporthelper.py diff --git a/regolith/helpers/l_projectahelper.py b/src/regolith/helpers/l_projectahelper.py similarity index 100% rename from regolith/helpers/l_projectahelper.py rename to src/regolith/helpers/l_projectahelper.py diff --git a/regolith/helpers/l_todohelper.py b/src/regolith/helpers/l_todohelper.py similarity index 100% rename from regolith/helpers/l_todohelper.py rename to src/regolith/helpers/l_todohelper.py diff --git a/regolith/helpers/makeappointmentshelper.py b/src/regolith/helpers/makeappointmentshelper.py similarity index 100% rename from regolith/helpers/makeappointmentshelper.py rename to src/regolith/helpers/makeappointmentshelper.py diff --git a/regolith/helpers/reimbstatushelper.py b/src/regolith/helpers/reimbstatushelper.py similarity index 100% rename from regolith/helpers/reimbstatushelper.py rename to src/regolith/helpers/reimbstatushelper.py diff --git a/regolith/helpers/u_contacthelper.py b/src/regolith/helpers/u_contacthelper.py similarity index 100% rename from regolith/helpers/u_contacthelper.py rename to src/regolith/helpers/u_contacthelper.py diff --git a/regolith/helpers/u_finishprumhelper.py b/src/regolith/helpers/u_finishprumhelper.py similarity index 100% rename from regolith/helpers/u_finishprumhelper.py rename to src/regolith/helpers/u_finishprumhelper.py diff --git a/regolith/helpers/u_institutionshelper.py b/src/regolith/helpers/u_institutionshelper.py similarity index 100% rename from regolith/helpers/u_institutionshelper.py rename to src/regolith/helpers/u_institutionshelper.py diff --git a/regolith/helpers/u_logurlhelper.py b/src/regolith/helpers/u_logurlhelper.py similarity index 100% rename from regolith/helpers/u_logurlhelper.py rename to src/regolith/helpers/u_logurlhelper.py diff --git a/regolith/helpers/u_milestonehelper.py b/src/regolith/helpers/u_milestonehelper.py similarity index 100% rename from regolith/helpers/u_milestonehelper.py rename to src/regolith/helpers/u_milestonehelper.py diff --git a/regolith/helpers/u_todohelper.py b/src/regolith/helpers/u_todohelper.py similarity index 100% rename from regolith/helpers/u_todohelper.py rename to src/regolith/helpers/u_todohelper.py diff --git a/regolith/helpers/v_meetingshelper.py b/src/regolith/helpers/v_meetingshelper.py similarity index 100% rename from regolith/helpers/v_meetingshelper.py rename to src/regolith/helpers/v_meetingshelper.py diff --git a/regolith/interact.py b/src/regolith/interact.py similarity index 100% rename from regolith/interact.py rename to src/regolith/interact.py diff --git a/regolith/main.py b/src/regolith/main.py similarity index 100% rename from regolith/main.py rename to src/regolith/main.py diff --git a/regolith/mongoclient.py b/src/regolith/mongoclient.py similarity index 100% rename from regolith/mongoclient.py rename to src/regolith/mongoclient.py diff --git a/regolith/runcontrol.py b/src/regolith/runcontrol.py similarity index 100% rename from regolith/runcontrol.py rename to src/regolith/runcontrol.py diff --git a/regolith/schemas.json b/src/regolith/schemas.json similarity index 100% rename from regolith/schemas.json rename to src/regolith/schemas.json diff --git a/regolith/schemas.py b/src/regolith/schemas.py similarity index 100% rename from regolith/schemas.py rename to src/regolith/schemas.py diff --git a/regolith/sorters.py b/src/regolith/sorters.py similarity index 100% rename from regolith/sorters.py rename to src/regolith/sorters.py diff --git a/regolith/static/ace.js b/src/regolith/static/ace.js similarity index 100% rename from regolith/static/ace.js rename to src/regolith/static/ace.js diff --git a/regolith/static/bootstrap.min.css b/src/regolith/static/bootstrap.min.css similarity index 100% rename from regolith/static/bootstrap.min.css rename to src/regolith/static/bootstrap.min.css diff --git a/regolith/static/img/jsoneditor-icons.png b/src/regolith/static/img/jsoneditor-icons.png similarity index 100% rename from regolith/static/img/jsoneditor-icons.png rename to src/regolith/static/img/jsoneditor-icons.png diff --git a/regolith/static/jquery.min.js b/src/regolith/static/jquery.min.js similarity index 100% rename from regolith/static/jquery.min.js rename to src/regolith/static/jquery.min.js diff --git a/regolith/static/jsoneditor.map b/src/regolith/static/jsoneditor.map similarity index 100% rename from regolith/static/jsoneditor.map rename to src/regolith/static/jsoneditor.map diff --git a/regolith/static/jsoneditor.min.css b/src/regolith/static/jsoneditor.min.css similarity index 100% rename from regolith/static/jsoneditor.min.css rename to src/regolith/static/jsoneditor.min.css diff --git a/regolith/static/jsoneditor.min.js b/src/regolith/static/jsoneditor.min.js similarity index 100% rename from regolith/static/jsoneditor.min.js rename to src/regolith/static/jsoneditor.min.js diff --git a/regolith/static/lodash.min.js b/src/regolith/static/lodash.min.js similarity index 100% rename from regolith/static/lodash.min.js rename to src/regolith/static/lodash.min.js diff --git a/regolith/static/sensei-grid.min.css b/src/regolith/static/sensei-grid.min.css similarity index 100% rename from regolith/static/sensei-grid.min.css rename to src/regolith/static/sensei-grid.min.css diff --git a/regolith/static/sensei-grid.min.js b/src/regolith/static/sensei-grid.min.js similarity index 100% rename from regolith/static/sensei-grid.min.js rename to src/regolith/static/sensei-grid.min.js diff --git a/regolith/storage.py b/src/regolith/storage.py similarity index 100% rename from regolith/storage.py rename to src/regolith/storage.py diff --git a/regolith/stylers.py b/src/regolith/stylers.py similarity index 100% rename from regolith/stylers.py rename to src/regolith/stylers.py diff --git a/regolith/templates/abstract.html b/src/regolith/templates/abstract.html similarity index 100% rename from regolith/templates/abstract.html rename to src/regolith/templates/abstract.html diff --git a/regolith/templates/base.html b/src/regolith/templates/base.html similarity index 100% rename from regolith/templates/base.html rename to src/regolith/templates/base.html diff --git a/regolith/templates/beamplan.tex b/src/regolith/templates/beamplan.tex similarity index 100% rename from regolith/templates/beamplan.tex rename to src/regolith/templates/beamplan.tex diff --git a/regolith/templates/beamplan.txt b/src/regolith/templates/beamplan.txt similarity index 100% rename from regolith/templates/beamplan.txt rename to src/regolith/templates/beamplan.txt diff --git a/regolith/templates/blog_index.html b/src/regolith/templates/blog_index.html similarity index 100% rename from regolith/templates/blog_index.html rename to src/regolith/templates/blog_index.html diff --git a/regolith/templates/blog_post.html b/src/regolith/templates/blog_post.html similarity index 100% rename from regolith/templates/blog_post.html rename to src/regolith/templates/blog_post.html diff --git a/regolith/templates/blog_summary.html b/src/regolith/templates/blog_summary.html similarity index 100% rename from regolith/templates/blog_summary.html rename to src/regolith/templates/blog_summary.html diff --git a/regolith/templates/coa_template_doe.xlsx b/src/regolith/templates/coa_template_doe.xlsx similarity index 100% rename from regolith/templates/coa_template_doe.xlsx rename to src/regolith/templates/coa_template_doe.xlsx diff --git a/regolith/templates/coa_template_nsf.xlsx b/src/regolith/templates/coa_template_nsf.xlsx similarity index 100% rename from regolith/templates/coa_template_nsf.xlsx rename to src/regolith/templates/coa_template_nsf.xlsx diff --git a/regolith/templates/collection.html b/src/regolith/templates/collection.html similarity index 100% rename from regolith/templates/collection.html rename to src/regolith/templates/collection.html diff --git a/regolith/templates/columbia_annual_report.tex b/src/regolith/templates/columbia_annual_report.tex similarity index 100% rename from regolith/templates/columbia_annual_report.tex rename to src/regolith/templates/columbia_annual_report.tex diff --git a/regolith/templates/current_pending.tex b/src/regolith/templates/current_pending.tex similarity index 100% rename from regolith/templates/current_pending.tex rename to src/regolith/templates/current_pending.tex diff --git a/regolith/templates/cv.tex b/src/regolith/templates/cv.tex similarity index 100% rename from regolith/templates/cv.tex rename to src/regolith/templates/cv.tex diff --git a/regolith/templates/former.html b/src/regolith/templates/former.html similarity index 100% rename from regolith/templates/former.html rename to src/regolith/templates/former.html diff --git a/regolith/templates/grader.html b/src/regolith/templates/grader.html similarity index 100% rename from regolith/templates/grader.html rename to src/regolith/templates/grader.html diff --git a/regolith/templates/gradereport.tex b/src/regolith/templates/gradereport.tex similarity index 100% rename from regolith/templates/gradereport.tex rename to src/regolith/templates/gradereport.tex diff --git a/regolith/templates/grantreport.txt b/src/regolith/templates/grantreport.txt similarity index 100% rename from regolith/templates/grantreport.txt rename to src/regolith/templates/grantreport.txt diff --git a/regolith/templates/grpmeetings.html b/src/regolith/templates/grpmeetings.html similarity index 100% rename from regolith/templates/grpmeetings.html rename to src/regolith/templates/grpmeetings.html diff --git a/regolith/templates/index.html b/src/regolith/templates/index.html similarity index 100% rename from regolith/templates/index.html rename to src/regolith/templates/index.html diff --git a/regolith/templates/intbase.html b/src/regolith/templates/intbase.html similarity index 100% rename from regolith/templates/intbase.html rename to src/regolith/templates/intbase.html diff --git a/regolith/templates/intindex.html b/src/regolith/templates/intindex.html similarity index 100% rename from regolith/templates/intindex.html rename to src/regolith/templates/intindex.html diff --git a/regolith/templates/introot_index.html b/src/regolith/templates/introot_index.html similarity index 100% rename from regolith/templates/introot_index.html rename to src/regolith/templates/introot_index.html diff --git a/regolith/templates/job.html b/src/regolith/templates/job.html similarity index 100% rename from regolith/templates/job.html rename to src/regolith/templates/job.html diff --git a/regolith/templates/jobs.html b/src/regolith/templates/jobs.html similarity index 100% rename from regolith/templates/jobs.html rename to src/regolith/templates/jobs.html diff --git a/regolith/templates/jobs_closed.html b/src/regolith/templates/jobs_closed.html similarity index 100% rename from regolith/templates/jobs_closed.html rename to src/regolith/templates/jobs_closed.html diff --git a/regolith/templates/jobs_open.html b/src/regolith/templates/jobs_open.html similarity index 100% rename from regolith/templates/jobs_open.html rename to src/regolith/templates/jobs_open.html diff --git a/regolith/templates/naval_correspondence.tex b/src/regolith/templates/naval_correspondence.tex similarity index 100% rename from regolith/templates/naval_correspondence.tex rename to src/regolith/templates/naval_correspondence.tex diff --git a/regolith/templates/news.html b/src/regolith/templates/news.html similarity index 100% rename from regolith/templates/news.html rename to src/regolith/templates/news.html diff --git a/regolith/templates/people.html b/src/regolith/templates/people.html similarity index 100% rename from regolith/templates/people.html rename to src/regolith/templates/people.html diff --git a/regolith/templates/person.html b/src/regolith/templates/person.html similarity index 100% rename from regolith/templates/person.html rename to src/regolith/templates/person.html diff --git a/regolith/templates/postdocad.tex b/src/regolith/templates/postdocad.tex similarity index 100% rename from regolith/templates/postdocad.tex rename to src/regolith/templates/postdocad.tex diff --git a/regolith/templates/preslist.tex b/src/regolith/templates/preslist.tex similarity index 100% rename from regolith/templates/preslist.tex rename to src/regolith/templates/preslist.tex diff --git a/regolith/templates/preslist.txt b/src/regolith/templates/preslist.txt similarity index 100% rename from regolith/templates/preslist.txt rename to src/regolith/templates/preslist.txt diff --git a/regolith/templates/projects.html b/src/regolith/templates/projects.html similarity index 100% rename from regolith/templates/projects.html rename to src/regolith/templates/projects.html diff --git a/regolith/templates/propreport.txt b/src/regolith/templates/propreport.txt similarity index 100% rename from regolith/templates/propreport.txt rename to src/regolith/templates/propreport.txt diff --git a/regolith/templates/publist.tex b/src/regolith/templates/publist.tex similarity index 100% rename from regolith/templates/publist.tex rename to src/regolith/templates/publist.tex diff --git a/regolith/templates/publist_ackno.tex b/src/regolith/templates/publist_ackno.tex similarity index 100% rename from regolith/templates/publist_ackno.tex rename to src/regolith/templates/publist_ackno.tex diff --git a/regolith/templates/publist_nobold.tex b/src/regolith/templates/publist_nobold.tex similarity index 100% rename from regolith/templates/publist_nobold.tex rename to src/regolith/templates/publist_nobold.tex diff --git a/regolith/templates/publist_pandoc_friendly.tex b/src/regolith/templates/publist_pandoc_friendly.tex similarity index 100% rename from regolith/templates/publist_pandoc_friendly.tex rename to src/regolith/templates/publist_pandoc_friendly.tex diff --git a/regolith/templates/recentcollabs.csv b/src/regolith/templates/recentcollabs.csv similarity index 100% rename from regolith/templates/recentcollabs.csv rename to src/regolith/templates/recentcollabs.csv diff --git a/regolith/templates/refreport_author.txt b/src/regolith/templates/refreport_author.txt similarity index 100% rename from regolith/templates/refreport_author.txt rename to src/regolith/templates/refreport_author.txt diff --git a/regolith/templates/refreport_editor.txt b/src/regolith/templates/refreport_editor.txt similarity index 100% rename from regolith/templates/refreport_editor.txt rename to src/regolith/templates/refreport_editor.txt diff --git a/regolith/templates/reimb.xlsx b/src/regolith/templates/reimb.xlsx similarity index 100% rename from regolith/templates/reimb.xlsx rename to src/regolith/templates/reimb.xlsx diff --git a/regolith/templates/res_open.html b/src/regolith/templates/res_open.html similarity index 100% rename from regolith/templates/res_open.html rename to src/regolith/templates/res_open.html diff --git a/regolith/templates/resume.tex b/src/regolith/templates/resume.tex similarity index 100% rename from regolith/templates/resume.tex rename to src/regolith/templates/resume.tex diff --git a/regolith/templates/rlistbibfile.bib b/src/regolith/templates/rlistbibfile.bib similarity index 100% rename from regolith/templates/rlistbibfile.bib rename to src/regolith/templates/rlistbibfile.bib diff --git a/regolith/templates/rlistbibfile.txt b/src/regolith/templates/rlistbibfile.txt similarity index 100% rename from regolith/templates/rlistbibfile.txt rename to src/regolith/templates/rlistbibfile.txt diff --git a/regolith/templates/root_index.html b/src/regolith/templates/root_index.html similarity index 100% rename from regolith/templates/root_index.html rename to src/regolith/templates/root_index.html diff --git a/regolith/templates/rss.xml b/src/regolith/templates/rss.xml similarity index 100% rename from regolith/templates/rss.xml rename to src/regolith/templates/rss.xml diff --git a/regolith/tools.py b/src/regolith/tools.py similarity index 100% rename from regolith/tools.py rename to src/regolith/tools.py diff --git a/regolith/validators.py b/src/regolith/validators.py similarity index 100% rename from regolith/validators.py rename to src/regolith/validators.py diff --git a/regolith/version.py b/src/regolith/version.py similarity index 100% rename from regolith/version.py rename to src/regolith/version.py From a0b132a47fb7683a38e26fcf27ab8cb5397a18ba Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 02:20:28 +0800 Subject: [PATCH 02/20] untrack hidden files --- .gitattributes | 1 + .github/workflows/docs.yml | 43 +++++++++++++++++++++++++ .github/workflows/main.yml | 54 ++++++++++++++++++++++++++++++++ .github/workflows/pre-commit.yml | 19 +++++++++++ .isort.cfg | 4 +++ 5 files changed, 121 insertions(+) create mode 100644 .gitattributes create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .isort.cfg diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..936d6ee22 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +regolith/_version.py export-subst diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..a4661f5c1 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Build Documentation + +on: + push: + branches: + - main + release: + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: build + auto-update-conda: true + + - name: install requirements + run: >- + conda install -n build -c conda-forge + --file requirements/build.txt + --file requirements/run.txt + --file requirements/docs.txt + --quiet --yes + + - name: install the package + run: python -m pip install . --no-deps + + - name: build documents + run: make -C doc html + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc/build/html diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..193efcc27 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: + - main + - CI + pull_request: + workflow_dispatch: + +jobs: + miniconda: + name: Miniconda ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: ["ubuntu-latest"] + steps: + - name: check out regolith + uses: actions/checkout@v3 + with: + repository: regro/regolith + path: . + fetch-depth: 0 # avoid shallow clone with no tags + + - name: initialize miniconda + # this uses a marketplace action that sets up miniconda in a way that makes + # it easier to use. I tried setting it up without this and it was a pain + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: test + # environment.yml file is needed by this action. Because I don't want + # maintain this but rather maintain the requirements files it just has + # basic things in it like conda and pip + environment-file: ./environment.yml + python-version: 3 + auto-activate-base: false + + - name: install regolith requirements + shell: bash -l {0} + run: | + conda config --set always_yes yes --set changeps1 no + conda config --add channels conda-forge + conda activate test + conda install --file requirements/run.txt + conda install --file requirements/test.txt + pip install . + - name: Validate regolith + shell: bash -l {0} + run: | + conda activate test + coverage run -m pytest -vv -s + coverage report -m + codecov diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..f2ff7e42e --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,19 @@ +name: pre-commit + +on: + pull_request: + push: + workflow_dispatch: + +jobs: + pre-commit: + # pull requests are a duplicate of a branch push if within the same repo. + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 000000000..e0926f425 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,4 @@ +[settings] +line_length = 115 +multi_line_output = 3 +include_trailing_comma = True From 1aa73620046c0bf2ea27a52426f729bdc1fa9751 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 02:31:44 +0800 Subject: [PATCH 03/20] add untrack files to branch --- AUTHORS.rst | 10 +++ CODE_OF_CONDUCT.rst | 133 ++++++++++++++++++++++++++++++++++++++++ LICENSE.rst | 30 +++++++++ MANIFEST.in | 14 +++++ requirements/README.txt | 11 ++++ requirements/docs.txt | 4 ++ 6 files changed, 202 insertions(+) create mode 100644 AUTHORS.rst create mode 100644 CODE_OF_CONDUCT.rst create mode 100644 LICENSE.rst create mode 100644 MANIFEST.in create mode 100644 requirements/README.txt create mode 100644 requirements/docs.txt diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 000000000..24344e973 --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,10 @@ +Authors +======= + +Billinge Group and community contibutors. + +Contributors +------------ + +For a list of contributors, visit +https://github.com/regro/regolith/graphs/contributors diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst new file mode 100644 index 000000000..ff9c35614 --- /dev/null +++ b/CODE_OF_CONDUCT.rst @@ -0,0 +1,133 @@ +===================================== + Contributor Covenant Code of Conduct +===================================== + +Our Pledge +---------- + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +Our Standards +------------- + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +Enforcement Responsibilities +---------------------------- + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +Scope +----- + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +Enforcement +----------- + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +sb2896@columbia.edu. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +Enforcement Guidelines +---------------------- + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +1. Correction +**************** + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +2. Warning +************* + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +3. Temporary Ban +****************** + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +4. Permanent Ban +****************** + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +Attribution +----------- + +This Code of Conduct is adapted from the `Contributor Covenant `_. + +Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder `_. + +For answers to common questions about this code of conduct, see the `FAQ `_. `Translations are available `_ diff --git a/LICENSE.rst b/LICENSE.rst new file mode 100644 index 000000000..95a04ac9d --- /dev/null +++ b/LICENSE.rst @@ -0,0 +1,30 @@ +BSD 3-Clause License + +Copyright (c) 2024, The Trustees of Columbia University +in the City of New York. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..bd3a6600c --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,14 @@ +include AUTHORS.rst +include LICENSE +include README.rst +include requirements.txt + +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] + +recursive-include docs *.rst conf.py Makefile make.bat + +include regolith/version.py + +# If including data files in the package, add them like: +# include path/to/data_file diff --git a/requirements/README.txt b/requirements/README.txt new file mode 100644 index 000000000..dc34909d2 --- /dev/null +++ b/requirements/README.txt @@ -0,0 +1,11 @@ +# YOU MAY DELETE THIS FILE AFTER SETTING UP DEPENDENCIES! +# +# This directory is where you should place your project dependencies. +# "pip.txt" should contain all required packages not available on conda. +# All other files should contain only packages available to download from conda. +# build.txt should contain all packages required to build (not run) the project. +# run.txt should contain all packages (including optional packages) required for a user to run the program. +# test.txt should contain all packages required for the testing suite and to ensure all tests pass. +# docs.txt should contain all packages required for building the package documentation page. +# +# YOU MAY DELETE THIS FILE AFTER SETTING UP DEPENDENCIES! diff --git a/requirements/docs.txt b/requirements/docs.txt new file mode 100644 index 000000000..ab17b1c8d --- /dev/null +++ b/requirements/docs.txt @@ -0,0 +1,4 @@ +sphinx +sphinx_rtd_theme +doctr +m2r From 8bc2ecc5130669ca0479c72999c387041eede27a Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 03:19:41 +0800 Subject: [PATCH 04/20] delete requirements/README.txt, update LICENSE.rst, and add author in AUTHORS.rst --- AUTHORS.rst | 1 + LICENSE.rst | 141 +++++++++++++++++++++++++++++++++------- requirements/README.txt | 11 ---- 3 files changed, 118 insertions(+), 35 deletions(-) delete mode 100644 requirements/README.txt diff --git a/AUTHORS.rst b/AUTHORS.rst index 24344e973..30b1d8dd4 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,5 +1,6 @@ Authors ======= +Anthony Scopatz Billinge Group and community contibutors. diff --git a/LICENSE.rst b/LICENSE.rst index 95a04ac9d..00d4606f3 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -4,27 +4,120 @@ Copyright (c) 2024, The Trustees of Columbia University in the City of New York. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator and +subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later +claims of infringement build upon, modify, incorporate in other works, reuse +and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may +contribute to the Commons to promote the ideal of a free culture and the +further production of creative, cultural and scientific works, or to gain +reputation or greater distribution for their Work in part through the use and +efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with a +Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or her +Copyright and Related Rights in the Work and the meaning and intended legal +effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not limited +to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, communicate, + and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + + iii. publicity and privacy rights pertaining to a person's image or likeness + depicted in a Work; + + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + + v. rights protecting the extraction, dissemination, use and reuse of data in + a Work; + + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation thereof, + including any amended or successor version of such directive); and + + vii. other similar, equivalent or corresponding rights throughout the world + based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time +extensions), (iii) in any current or future medium and for any number of +copies, and (iv) for any purpose whatsoever, including without limitation +commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes +the Waiver for the benefit of each member of the public at large and to the +detriment of Affirmer's heirs and successors, fully intending that such Waiver +shall not be subject to revocation, rescission, cancellation, termination, or +any other legal or equitable action to disrupt the quiet enjoyment of the Work +by the public as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account +Affirmer's express Statement of Purpose. In addition, to the extent the Waiver +is so judged Affirmer hereby grants to each affected person a royalty-free, +non transferable, non sublicensable, non exclusive, irrevocable and +unconditional license to exercise Affirmer's Copyright and Related Rights in +the Work (i) in all territories worldwide, (ii) for the maximum duration +provided by applicable law or treaty (including future time extensions), (iii) +in any current or future medium and for any number of copies, and (iv) for any +purpose whatsoever, including without limitation commercial, advertising or +promotional purposes (the "License"). The License shall be deemed effective as +of the date CC0 was applied by Affirmer to the Work. Should any part of the +License for any reason be judged legally invalid or ineffective under +applicable law, such partial invalidity or ineffectiveness shall not +invalidate the remainder of the License, and in such case Affirmer hereby +affirms that he or she will not (i) exercise any of his or her remaining +Copyright and Related Rights in the Work or (ii) assert any associated claims +and causes of action with respect to the Work, in either case contrary to +Affirmer's express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + + b. Affirmer offers the Work as-is and makes no representations or warranties + of any kind concerning the Work, express, implied, statutory or otherwise, + including without limitation warranties of title, merchantability, fitness + for a particular purpose, non infringement, or the absence of latent or + other defects, accuracy, or the present or absence of errors, whether or not + discoverable, all to the greatest extent permissible under applicable law. + + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without limitation + any person's Copyright and Related Rights in the Work. Further, Affirmer + disclaims responsibility for obtaining any necessary consents, permissions + or other rights required for any use of the Work. + + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to this + CC0 or use of the Work. + +For more information, please see + + +---------------------------------- + +NOTE: ace and jsoneditor in the regolith/static/ dir are covered under their own +licences. \ No newline at end of file diff --git a/requirements/README.txt b/requirements/README.txt deleted file mode 100644 index dc34909d2..000000000 --- a/requirements/README.txt +++ /dev/null @@ -1,11 +0,0 @@ -# YOU MAY DELETE THIS FILE AFTER SETTING UP DEPENDENCIES! -# -# This directory is where you should place your project dependencies. -# "pip.txt" should contain all required packages not available on conda. -# All other files should contain only packages available to download from conda. -# build.txt should contain all packages required to build (not run) the project. -# run.txt should contain all packages (including optional packages) required for a user to run the program. -# test.txt should contain all packages required for the testing suite and to ensure all tests pass. -# docs.txt should contain all packages required for building the package documentation page. -# -# YOU MAY DELETE THIS FILE AFTER SETTING UP DEPENDENCIES! From f91a4a5cc54f80596ea14668d06ea984ac9ae906 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 11:16:51 +0800 Subject: [PATCH 05/20] change requirements.txt after cookiecutter and add CHANGELOG.rst after cookiecut --- CHANGELOG.rst | 6 +++--- requirements/test.txt | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 801bcc3b8..45dccaab7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,6 @@ -==================== -Regolith Change Log -==================== +============= +Release Notes +============= .. current developments diff --git a/requirements/test.txt b/requirements/test.txt index 5043224cb..ab09a129f 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,6 +1,8 @@ +flake8 mock pytest coverage codecov requests-mock pytest-mock +pytest-env From 4207f2d0e019370a857c19de9d34269d79ef9a8e Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 11:30:09 +0800 Subject: [PATCH 06/20] pre-commit files in src/regolith dir --- src/regolith/builders/basebuilder.py | 10 +--------- src/regolith/builders/coabuilder.py | 6 +----- src/regolith/builders/cpbuilder.py | 7 +------ src/regolith/builders/grantreportbuilder.py | 6 +----- src/regolith/builders/preslistbuilder.py | 6 +----- src/regolith/builders/publistbuilder.py | 6 +----- src/regolith/helpers/a_todohelper.py | 7 +------ src/regolith/helpers/attestationshelper.py | 7 +------ src/regolith/helpers/basehelper.py | 10 +--------- src/regolith/helpers/l_abstracthelper.py | 7 +------ src/regolith/helpers/l_contactshelper.py | 7 +------ src/regolith/helpers/l_currentappointmentshelper.py | 6 +----- src/regolith/helpers/l_generalhelper.py | 7 +------ src/regolith/helpers/l_milestoneshelper.py | 7 +------ src/regolith/helpers/l_projectahelper.py | 7 +------ 15 files changed, 15 insertions(+), 91 deletions(-) diff --git a/src/regolith/builders/basebuilder.py b/src/regolith/builders/basebuilder.py index 21bf4dee8..9ce2e0ebe 100644 --- a/src/regolith/builders/basebuilder.py +++ b/src/regolith/builders/basebuilder.py @@ -16,15 +16,7 @@ HAVE_BIBTEX_PARSER = False from regolith.sorters import category_val, date_key, doc_date_key, level_val -from regolith.tools import ( - LATEX_OPTS, - date_to_rfc822, - gets, - latex_safe, - latex_safe_url, - month_and_year, - rfc822now, -) +from regolith.tools import LATEX_OPTS, date_to_rfc822, gets, latex_safe, latex_safe_url, month_and_year, rfc822now class BuilderBase(object): diff --git a/src/regolith/builders/coabuilder.py b/src/regolith/builders/coabuilder.py index dfc1d2dd1..766fba389 100644 --- a/src/regolith/builders/coabuilder.py +++ b/src/regolith/builders/coabuilder.py @@ -18,11 +18,7 @@ from regolith.builders.basebuilder import BuilderBase from regolith.dates import get_dates, is_after, month_to_int from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - filter_publications, - fuzzy_retrieval, -) +from regolith.tools import all_docs_from_collection, filter_publications, fuzzy_retrieval NUM_COAUTHOR_MONTHS = 48 NUM_POSTDOC_MONTHS = None diff --git a/src/regolith/builders/cpbuilder.py b/src/regolith/builders/cpbuilder.py index ab4c7598e..8156ee4a1 100644 --- a/src/regolith/builders/cpbuilder.py +++ b/src/regolith/builders/cpbuilder.py @@ -9,12 +9,7 @@ from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - filter_grants, - fuzzy_retrieval, - merge_collections_all, -) +from regolith.tools import all_docs_from_collection, filter_grants, fuzzy_retrieval, merge_collections_all def is_pending(status): diff --git a/src/regolith/builders/grantreportbuilder.py b/src/regolith/builders/grantreportbuilder.py index e0091fb61..7ab1ffb70 100644 --- a/src/regolith/builders/grantreportbuilder.py +++ b/src/regolith/builders/grantreportbuilder.py @@ -10,11 +10,7 @@ from regolith.builders.basebuilder import LatexBuilderBase from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key -from regolith.tools import ( - all_docs_from_collection, - filter_presentations, - fuzzy_retrieval, -) +from regolith.tools import all_docs_from_collection, filter_presentations, fuzzy_retrieval class GrantReportBuilder(LatexBuilderBase): diff --git a/src/regolith/builders/preslistbuilder.py b/src/regolith/builders/preslistbuilder.py index 0652b717e..335fb33ec 100644 --- a/src/regolith/builders/preslistbuilder.py +++ b/src/regolith/builders/preslistbuilder.py @@ -22,11 +22,7 @@ from regolith.fsclient import _id_key from regolith.sorters import position_key from regolith.stylers import month_fullnames, sentencecase -from regolith.tools import ( - all_docs_from_collection, - filter_presentations, - group_member_ids, -) +from regolith.tools import all_docs_from_collection, filter_presentations, group_member_ids class PresListBuilder(LatexBuilderBase): diff --git a/src/regolith/builders/publistbuilder.py b/src/regolith/builders/publistbuilder.py index ad7fccbbf..73bfb2150 100644 --- a/src/regolith/builders/publistbuilder.py +++ b/src/regolith/builders/publistbuilder.py @@ -4,11 +4,7 @@ from regolith.builders.basebuilder import LatexBuilderBase from regolith.sorters import ene_date_key, position_key -from regolith.tools import ( - all_docs_from_collection, - filter_publications, - make_bibtex_file, -) +from regolith.tools import all_docs_from_collection, filter_publications, make_bibtex_file LATEX_OPTS = ["-halt-on-error", "-file-line-error"] diff --git a/src/regolith/helpers/a_todohelper.py b/src/regolith/helpers/a_todohelper.py index 9f1c6450c..607daeccd 100644 --- a/src/regolith/helpers/a_todohelper.py +++ b/src/regolith/helpers/a_todohelper.py @@ -9,12 +9,7 @@ from regolith.chained_db import _convert_to_dict from regolith.fsclient import _id_key from regolith.helpers.basehelper import DbHelperBase -from regolith.tools import ( - all_docs_from_collection, - fragment_retrieval, - get_pi_id, - get_uuid, -) +from regolith.tools import all_docs_from_collection, fragment_retrieval, get_pi_id, get_uuid TARGET_COLL = "todos" ALLOWED_IMPORTANCE = [3, 2, 1, 0] diff --git a/src/regolith/helpers/attestationshelper.py b/src/regolith/helpers/attestationshelper.py index 671e4a7a0..0ca2ca0f5 100644 --- a/src/regolith/helpers/attestationshelper.py +++ b/src/regolith/helpers/attestationshelper.py @@ -9,12 +9,7 @@ from regolith.fsclient import _id_key from regolith.helpers.basehelper import DbHelperBase from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - fuzzy_retrieval, - get_appointments, - merge_collections_superior, -) +from regolith.tools import all_docs_from_collection, fuzzy_retrieval, get_appointments, merge_collections_superior # print([k for k,v in chained_db['people'].items()]) diff --git a/src/regolith/helpers/basehelper.py b/src/regolith/helpers/basehelper.py index fb45f7fac..6f60e3545 100644 --- a/src/regolith/helpers/basehelper.py +++ b/src/regolith/helpers/basehelper.py @@ -8,15 +8,7 @@ from xonsh.lib import subprocess from regolith.sorters import category_val, date_key, doc_date_key, level_val -from regolith.tools import ( - LATEX_OPTS, - date_to_rfc822, - gets, - latex_safe, - latex_safe_url, - month_and_year, - rfc822now, -) +from regolith.tools import LATEX_OPTS, date_to_rfc822, gets, latex_safe, latex_safe_url, month_and_year, rfc822now class HelperBase(object): diff --git a/src/regolith/helpers/l_abstracthelper.py b/src/regolith/helpers/l_abstracthelper.py index c35346dca..07151cfc3 100644 --- a/src/regolith/helpers/l_abstracthelper.py +++ b/src/regolith/helpers/l_abstracthelper.py @@ -5,12 +5,7 @@ from regolith.dates import get_dates from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import ( - all_docs_from_collection, - dereference_institution, - get_person_contact, - get_pi_id, -) +from regolith.tools import all_docs_from_collection, dereference_institution, get_person_contact, get_pi_id TARGET_COLL = "presentations" HELPER_TARGET = "l_abstract" diff --git a/src/regolith/helpers/l_contactshelper.py b/src/regolith/helpers/l_contactshelper.py index 4a3800199..96fe47ae6 100644 --- a/src/regolith/helpers/l_contactshelper.py +++ b/src/regolith/helpers/l_contactshelper.py @@ -9,12 +9,7 @@ from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import ( - all_docs_from_collection, - fuzzy_retrieval, - get_pi_id, - search_collection, -) +from regolith.tools import all_docs_from_collection, fuzzy_retrieval, get_pi_id, search_collection TARGET_COLL = "contacts" HELPER_TARGET = "l_contacts" diff --git a/src/regolith/helpers/l_currentappointmentshelper.py b/src/regolith/helpers/l_currentappointmentshelper.py index 1cabe8fe0..5c21da76b 100644 --- a/src/regolith/helpers/l_currentappointmentshelper.py +++ b/src/regolith/helpers/l_currentappointmentshelper.py @@ -6,11 +6,7 @@ from regolith.helpers.basehelper import SoutHelperBase from regolith.helpers.makeappointmentshelper import _future_grant from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - fuzzy_retrieval, - merge_collections_superior, -) +from regolith.tools import all_docs_from_collection, fuzzy_retrieval, merge_collections_superior SEMESTER_START_MONTH = {"fall": (9, 12), "spring": (1, 5), "summer": (6, 8)} diff --git a/src/regolith/helpers/l_generalhelper.py b/src/regolith/helpers/l_generalhelper.py index c5d1e9a99..9d3adb6a5 100644 --- a/src/regolith/helpers/l_generalhelper.py +++ b/src/regolith/helpers/l_generalhelper.py @@ -2,12 +2,7 @@ from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import ( - all_docs_from_collection, - collection_str, - get_pi_id, - search_collection, -) +from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, search_collection HELPER_TARGET = "lister" diff --git a/src/regolith/helpers/l_milestoneshelper.py b/src/regolith/helpers/l_milestoneshelper.py index 86ec0139c..441189785 100644 --- a/src/regolith/helpers/l_milestoneshelper.py +++ b/src/regolith/helpers/l_milestoneshelper.py @@ -16,12 +16,7 @@ PROJECTUM_PAUSED_STATI, alloweds, ) -from regolith.tools import ( - all_docs_from_collection, - collection_str, - get_pi_id, - key_value_pair_filter, -) +from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, key_value_pair_filter PROJECTUM_STATI = alloweds.get("PROJECTUM_STATI") TARGET_COLL = "projecta" diff --git a/src/regolith/helpers/l_projectahelper.py b/src/regolith/helpers/l_projectahelper.py index 2dd2f5d81..ef2452d5a 100644 --- a/src/regolith/helpers/l_projectahelper.py +++ b/src/regolith/helpers/l_projectahelper.py @@ -17,12 +17,7 @@ PROJECTUM_FINISHED_STATI, PROJECTUM_PAUSED_STATI, ) -from regolith.tools import ( - all_docs_from_collection, - collection_str, - get_pi_id, - key_value_pair_filter, -) +from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, key_value_pair_filter TARGET_COLL = "projecta" HELPER_TARGET = "l_projecta" From 86dbe345bebe284a28df637832ee98d60044afb2 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 11:30:43 +0800 Subject: [PATCH 07/20] Revert "pre-commit files in src/regolith dir" This reverts commit 4207f2d0e019370a857c19de9d34269d79ef9a8e. --- src/regolith/builders/basebuilder.py | 10 +++++++++- src/regolith/builders/coabuilder.py | 6 +++++- src/regolith/builders/cpbuilder.py | 7 ++++++- src/regolith/builders/grantreportbuilder.py | 6 +++++- src/regolith/builders/preslistbuilder.py | 6 +++++- src/regolith/builders/publistbuilder.py | 6 +++++- src/regolith/helpers/a_todohelper.py | 7 ++++++- src/regolith/helpers/attestationshelper.py | 7 ++++++- src/regolith/helpers/basehelper.py | 10 +++++++++- src/regolith/helpers/l_abstracthelper.py | 7 ++++++- src/regolith/helpers/l_contactshelper.py | 7 ++++++- src/regolith/helpers/l_currentappointmentshelper.py | 6 +++++- src/regolith/helpers/l_generalhelper.py | 7 ++++++- src/regolith/helpers/l_milestoneshelper.py | 7 ++++++- src/regolith/helpers/l_projectahelper.py | 7 ++++++- 15 files changed, 91 insertions(+), 15 deletions(-) diff --git a/src/regolith/builders/basebuilder.py b/src/regolith/builders/basebuilder.py index 9ce2e0ebe..21bf4dee8 100644 --- a/src/regolith/builders/basebuilder.py +++ b/src/regolith/builders/basebuilder.py @@ -16,7 +16,15 @@ HAVE_BIBTEX_PARSER = False from regolith.sorters import category_val, date_key, doc_date_key, level_val -from regolith.tools import LATEX_OPTS, date_to_rfc822, gets, latex_safe, latex_safe_url, month_and_year, rfc822now +from regolith.tools import ( + LATEX_OPTS, + date_to_rfc822, + gets, + latex_safe, + latex_safe_url, + month_and_year, + rfc822now, +) class BuilderBase(object): diff --git a/src/regolith/builders/coabuilder.py b/src/regolith/builders/coabuilder.py index 766fba389..dfc1d2dd1 100644 --- a/src/regolith/builders/coabuilder.py +++ b/src/regolith/builders/coabuilder.py @@ -18,7 +18,11 @@ from regolith.builders.basebuilder import BuilderBase from regolith.dates import get_dates, is_after, month_to_int from regolith.sorters import position_key -from regolith.tools import all_docs_from_collection, filter_publications, fuzzy_retrieval +from regolith.tools import ( + all_docs_from_collection, + filter_publications, + fuzzy_retrieval, +) NUM_COAUTHOR_MONTHS = 48 NUM_POSTDOC_MONTHS = None diff --git a/src/regolith/builders/cpbuilder.py b/src/regolith/builders/cpbuilder.py index 8156ee4a1..ab4c7598e 100644 --- a/src/regolith/builders/cpbuilder.py +++ b/src/regolith/builders/cpbuilder.py @@ -9,7 +9,12 @@ from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key from regolith.sorters import position_key -from regolith.tools import all_docs_from_collection, filter_grants, fuzzy_retrieval, merge_collections_all +from regolith.tools import ( + all_docs_from_collection, + filter_grants, + fuzzy_retrieval, + merge_collections_all, +) def is_pending(status): diff --git a/src/regolith/builders/grantreportbuilder.py b/src/regolith/builders/grantreportbuilder.py index 7ab1ffb70..e0091fb61 100644 --- a/src/regolith/builders/grantreportbuilder.py +++ b/src/regolith/builders/grantreportbuilder.py @@ -10,7 +10,11 @@ from regolith.builders.basebuilder import LatexBuilderBase from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key -from regolith.tools import all_docs_from_collection, filter_presentations, fuzzy_retrieval +from regolith.tools import ( + all_docs_from_collection, + filter_presentations, + fuzzy_retrieval, +) class GrantReportBuilder(LatexBuilderBase): diff --git a/src/regolith/builders/preslistbuilder.py b/src/regolith/builders/preslistbuilder.py index 335fb33ec..0652b717e 100644 --- a/src/regolith/builders/preslistbuilder.py +++ b/src/regolith/builders/preslistbuilder.py @@ -22,7 +22,11 @@ from regolith.fsclient import _id_key from regolith.sorters import position_key from regolith.stylers import month_fullnames, sentencecase -from regolith.tools import all_docs_from_collection, filter_presentations, group_member_ids +from regolith.tools import ( + all_docs_from_collection, + filter_presentations, + group_member_ids, +) class PresListBuilder(LatexBuilderBase): diff --git a/src/regolith/builders/publistbuilder.py b/src/regolith/builders/publistbuilder.py index 73bfb2150..ad7fccbbf 100644 --- a/src/regolith/builders/publistbuilder.py +++ b/src/regolith/builders/publistbuilder.py @@ -4,7 +4,11 @@ from regolith.builders.basebuilder import LatexBuilderBase from regolith.sorters import ene_date_key, position_key -from regolith.tools import all_docs_from_collection, filter_publications, make_bibtex_file +from regolith.tools import ( + all_docs_from_collection, + filter_publications, + make_bibtex_file, +) LATEX_OPTS = ["-halt-on-error", "-file-line-error"] diff --git a/src/regolith/helpers/a_todohelper.py b/src/regolith/helpers/a_todohelper.py index 607daeccd..9f1c6450c 100644 --- a/src/regolith/helpers/a_todohelper.py +++ b/src/regolith/helpers/a_todohelper.py @@ -9,7 +9,12 @@ from regolith.chained_db import _convert_to_dict from regolith.fsclient import _id_key from regolith.helpers.basehelper import DbHelperBase -from regolith.tools import all_docs_from_collection, fragment_retrieval, get_pi_id, get_uuid +from regolith.tools import ( + all_docs_from_collection, + fragment_retrieval, + get_pi_id, + get_uuid, +) TARGET_COLL = "todos" ALLOWED_IMPORTANCE = [3, 2, 1, 0] diff --git a/src/regolith/helpers/attestationshelper.py b/src/regolith/helpers/attestationshelper.py index 0ca2ca0f5..671e4a7a0 100644 --- a/src/regolith/helpers/attestationshelper.py +++ b/src/regolith/helpers/attestationshelper.py @@ -9,7 +9,12 @@ from regolith.fsclient import _id_key from regolith.helpers.basehelper import DbHelperBase from regolith.sorters import position_key -from regolith.tools import all_docs_from_collection, fuzzy_retrieval, get_appointments, merge_collections_superior +from regolith.tools import ( + all_docs_from_collection, + fuzzy_retrieval, + get_appointments, + merge_collections_superior, +) # print([k for k,v in chained_db['people'].items()]) diff --git a/src/regolith/helpers/basehelper.py b/src/regolith/helpers/basehelper.py index 6f60e3545..fb45f7fac 100644 --- a/src/regolith/helpers/basehelper.py +++ b/src/regolith/helpers/basehelper.py @@ -8,7 +8,15 @@ from xonsh.lib import subprocess from regolith.sorters import category_val, date_key, doc_date_key, level_val -from regolith.tools import LATEX_OPTS, date_to_rfc822, gets, latex_safe, latex_safe_url, month_and_year, rfc822now +from regolith.tools import ( + LATEX_OPTS, + date_to_rfc822, + gets, + latex_safe, + latex_safe_url, + month_and_year, + rfc822now, +) class HelperBase(object): diff --git a/src/regolith/helpers/l_abstracthelper.py b/src/regolith/helpers/l_abstracthelper.py index 07151cfc3..c35346dca 100644 --- a/src/regolith/helpers/l_abstracthelper.py +++ b/src/regolith/helpers/l_abstracthelper.py @@ -5,7 +5,12 @@ from regolith.dates import get_dates from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import all_docs_from_collection, dereference_institution, get_person_contact, get_pi_id +from regolith.tools import ( + all_docs_from_collection, + dereference_institution, + get_person_contact, + get_pi_id, +) TARGET_COLL = "presentations" HELPER_TARGET = "l_abstract" diff --git a/src/regolith/helpers/l_contactshelper.py b/src/regolith/helpers/l_contactshelper.py index 96fe47ae6..4a3800199 100644 --- a/src/regolith/helpers/l_contactshelper.py +++ b/src/regolith/helpers/l_contactshelper.py @@ -9,7 +9,12 @@ from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import all_docs_from_collection, fuzzy_retrieval, get_pi_id, search_collection +from regolith.tools import ( + all_docs_from_collection, + fuzzy_retrieval, + get_pi_id, + search_collection, +) TARGET_COLL = "contacts" HELPER_TARGET = "l_contacts" diff --git a/src/regolith/helpers/l_currentappointmentshelper.py b/src/regolith/helpers/l_currentappointmentshelper.py index 5c21da76b..1cabe8fe0 100644 --- a/src/regolith/helpers/l_currentappointmentshelper.py +++ b/src/regolith/helpers/l_currentappointmentshelper.py @@ -6,7 +6,11 @@ from regolith.helpers.basehelper import SoutHelperBase from regolith.helpers.makeappointmentshelper import _future_grant from regolith.sorters import position_key -from regolith.tools import all_docs_from_collection, fuzzy_retrieval, merge_collections_superior +from regolith.tools import ( + all_docs_from_collection, + fuzzy_retrieval, + merge_collections_superior, +) SEMESTER_START_MONTH = {"fall": (9, 12), "spring": (1, 5), "summer": (6, 8)} diff --git a/src/regolith/helpers/l_generalhelper.py b/src/regolith/helpers/l_generalhelper.py index 9d3adb6a5..c5d1e9a99 100644 --- a/src/regolith/helpers/l_generalhelper.py +++ b/src/regolith/helpers/l_generalhelper.py @@ -2,7 +2,12 @@ from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, search_collection +from regolith.tools import ( + all_docs_from_collection, + collection_str, + get_pi_id, + search_collection, +) HELPER_TARGET = "lister" diff --git a/src/regolith/helpers/l_milestoneshelper.py b/src/regolith/helpers/l_milestoneshelper.py index 441189785..86ec0139c 100644 --- a/src/regolith/helpers/l_milestoneshelper.py +++ b/src/regolith/helpers/l_milestoneshelper.py @@ -16,7 +16,12 @@ PROJECTUM_PAUSED_STATI, alloweds, ) -from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, key_value_pair_filter +from regolith.tools import ( + all_docs_from_collection, + collection_str, + get_pi_id, + key_value_pair_filter, +) PROJECTUM_STATI = alloweds.get("PROJECTUM_STATI") TARGET_COLL = "projecta" diff --git a/src/regolith/helpers/l_projectahelper.py b/src/regolith/helpers/l_projectahelper.py index ef2452d5a..2dd2f5d81 100644 --- a/src/regolith/helpers/l_projectahelper.py +++ b/src/regolith/helpers/l_projectahelper.py @@ -17,7 +17,12 @@ PROJECTUM_FINISHED_STATI, PROJECTUM_PAUSED_STATI, ) -from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, key_value_pair_filter +from regolith.tools import ( + all_docs_from_collection, + collection_str, + get_pi_id, + key_value_pair_filter, +) TARGET_COLL = "projecta" HELPER_TARGET = "l_projecta" From 93109f36573aa1b8a6f6c9f1c22484218beb7ed8 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 11:31:27 +0800 Subject: [PATCH 08/20] pre-commit files in src/regolith dir --- src/regolith/builders/basebuilder.py | 10 +--------- src/regolith/builders/coabuilder.py | 6 +----- src/regolith/builders/cpbuilder.py | 7 +------ src/regolith/builders/grantreportbuilder.py | 6 +----- src/regolith/builders/preslistbuilder.py | 6 +----- src/regolith/builders/publistbuilder.py | 6 +----- src/regolith/helpers/a_todohelper.py | 7 +------ src/regolith/helpers/attestationshelper.py | 7 +------ src/regolith/helpers/basehelper.py | 10 +--------- src/regolith/helpers/l_abstracthelper.py | 7 +------ src/regolith/helpers/l_contactshelper.py | 7 +------ src/regolith/helpers/l_currentappointmentshelper.py | 6 +----- src/regolith/helpers/l_generalhelper.py | 7 +------ src/regolith/helpers/l_milestoneshelper.py | 7 +------ src/regolith/helpers/l_projectahelper.py | 7 +------ 15 files changed, 15 insertions(+), 91 deletions(-) diff --git a/src/regolith/builders/basebuilder.py b/src/regolith/builders/basebuilder.py index 21bf4dee8..9ce2e0ebe 100644 --- a/src/regolith/builders/basebuilder.py +++ b/src/regolith/builders/basebuilder.py @@ -16,15 +16,7 @@ HAVE_BIBTEX_PARSER = False from regolith.sorters import category_val, date_key, doc_date_key, level_val -from regolith.tools import ( - LATEX_OPTS, - date_to_rfc822, - gets, - latex_safe, - latex_safe_url, - month_and_year, - rfc822now, -) +from regolith.tools import LATEX_OPTS, date_to_rfc822, gets, latex_safe, latex_safe_url, month_and_year, rfc822now class BuilderBase(object): diff --git a/src/regolith/builders/coabuilder.py b/src/regolith/builders/coabuilder.py index dfc1d2dd1..766fba389 100644 --- a/src/regolith/builders/coabuilder.py +++ b/src/regolith/builders/coabuilder.py @@ -18,11 +18,7 @@ from regolith.builders.basebuilder import BuilderBase from regolith.dates import get_dates, is_after, month_to_int from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - filter_publications, - fuzzy_retrieval, -) +from regolith.tools import all_docs_from_collection, filter_publications, fuzzy_retrieval NUM_COAUTHOR_MONTHS = 48 NUM_POSTDOC_MONTHS = None diff --git a/src/regolith/builders/cpbuilder.py b/src/regolith/builders/cpbuilder.py index ab4c7598e..8156ee4a1 100644 --- a/src/regolith/builders/cpbuilder.py +++ b/src/regolith/builders/cpbuilder.py @@ -9,12 +9,7 @@ from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - filter_grants, - fuzzy_retrieval, - merge_collections_all, -) +from regolith.tools import all_docs_from_collection, filter_grants, fuzzy_retrieval, merge_collections_all def is_pending(status): diff --git a/src/regolith/builders/grantreportbuilder.py b/src/regolith/builders/grantreportbuilder.py index e0091fb61..7ab1ffb70 100644 --- a/src/regolith/builders/grantreportbuilder.py +++ b/src/regolith/builders/grantreportbuilder.py @@ -10,11 +10,7 @@ from regolith.builders.basebuilder import LatexBuilderBase from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key -from regolith.tools import ( - all_docs_from_collection, - filter_presentations, - fuzzy_retrieval, -) +from regolith.tools import all_docs_from_collection, filter_presentations, fuzzy_retrieval class GrantReportBuilder(LatexBuilderBase): diff --git a/src/regolith/builders/preslistbuilder.py b/src/regolith/builders/preslistbuilder.py index 0652b717e..335fb33ec 100644 --- a/src/regolith/builders/preslistbuilder.py +++ b/src/regolith/builders/preslistbuilder.py @@ -22,11 +22,7 @@ from regolith.fsclient import _id_key from regolith.sorters import position_key from regolith.stylers import month_fullnames, sentencecase -from regolith.tools import ( - all_docs_from_collection, - filter_presentations, - group_member_ids, -) +from regolith.tools import all_docs_from_collection, filter_presentations, group_member_ids class PresListBuilder(LatexBuilderBase): diff --git a/src/regolith/builders/publistbuilder.py b/src/regolith/builders/publistbuilder.py index ad7fccbbf..73bfb2150 100644 --- a/src/regolith/builders/publistbuilder.py +++ b/src/regolith/builders/publistbuilder.py @@ -4,11 +4,7 @@ from regolith.builders.basebuilder import LatexBuilderBase from regolith.sorters import ene_date_key, position_key -from regolith.tools import ( - all_docs_from_collection, - filter_publications, - make_bibtex_file, -) +from regolith.tools import all_docs_from_collection, filter_publications, make_bibtex_file LATEX_OPTS = ["-halt-on-error", "-file-line-error"] diff --git a/src/regolith/helpers/a_todohelper.py b/src/regolith/helpers/a_todohelper.py index 9f1c6450c..607daeccd 100644 --- a/src/regolith/helpers/a_todohelper.py +++ b/src/regolith/helpers/a_todohelper.py @@ -9,12 +9,7 @@ from regolith.chained_db import _convert_to_dict from regolith.fsclient import _id_key from regolith.helpers.basehelper import DbHelperBase -from regolith.tools import ( - all_docs_from_collection, - fragment_retrieval, - get_pi_id, - get_uuid, -) +from regolith.tools import all_docs_from_collection, fragment_retrieval, get_pi_id, get_uuid TARGET_COLL = "todos" ALLOWED_IMPORTANCE = [3, 2, 1, 0] diff --git a/src/regolith/helpers/attestationshelper.py b/src/regolith/helpers/attestationshelper.py index 671e4a7a0..0ca2ca0f5 100644 --- a/src/regolith/helpers/attestationshelper.py +++ b/src/regolith/helpers/attestationshelper.py @@ -9,12 +9,7 @@ from regolith.fsclient import _id_key from regolith.helpers.basehelper import DbHelperBase from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - fuzzy_retrieval, - get_appointments, - merge_collections_superior, -) +from regolith.tools import all_docs_from_collection, fuzzy_retrieval, get_appointments, merge_collections_superior # print([k for k,v in chained_db['people'].items()]) diff --git a/src/regolith/helpers/basehelper.py b/src/regolith/helpers/basehelper.py index fb45f7fac..6f60e3545 100644 --- a/src/regolith/helpers/basehelper.py +++ b/src/regolith/helpers/basehelper.py @@ -8,15 +8,7 @@ from xonsh.lib import subprocess from regolith.sorters import category_val, date_key, doc_date_key, level_val -from regolith.tools import ( - LATEX_OPTS, - date_to_rfc822, - gets, - latex_safe, - latex_safe_url, - month_and_year, - rfc822now, -) +from regolith.tools import LATEX_OPTS, date_to_rfc822, gets, latex_safe, latex_safe_url, month_and_year, rfc822now class HelperBase(object): diff --git a/src/regolith/helpers/l_abstracthelper.py b/src/regolith/helpers/l_abstracthelper.py index c35346dca..07151cfc3 100644 --- a/src/regolith/helpers/l_abstracthelper.py +++ b/src/regolith/helpers/l_abstracthelper.py @@ -5,12 +5,7 @@ from regolith.dates import get_dates from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import ( - all_docs_from_collection, - dereference_institution, - get_person_contact, - get_pi_id, -) +from regolith.tools import all_docs_from_collection, dereference_institution, get_person_contact, get_pi_id TARGET_COLL = "presentations" HELPER_TARGET = "l_abstract" diff --git a/src/regolith/helpers/l_contactshelper.py b/src/regolith/helpers/l_contactshelper.py index 4a3800199..96fe47ae6 100644 --- a/src/regolith/helpers/l_contactshelper.py +++ b/src/regolith/helpers/l_contactshelper.py @@ -9,12 +9,7 @@ from regolith.dates import get_dates, is_current from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import ( - all_docs_from_collection, - fuzzy_retrieval, - get_pi_id, - search_collection, -) +from regolith.tools import all_docs_from_collection, fuzzy_retrieval, get_pi_id, search_collection TARGET_COLL = "contacts" HELPER_TARGET = "l_contacts" diff --git a/src/regolith/helpers/l_currentappointmentshelper.py b/src/regolith/helpers/l_currentappointmentshelper.py index 1cabe8fe0..5c21da76b 100644 --- a/src/regolith/helpers/l_currentappointmentshelper.py +++ b/src/regolith/helpers/l_currentappointmentshelper.py @@ -6,11 +6,7 @@ from regolith.helpers.basehelper import SoutHelperBase from regolith.helpers.makeappointmentshelper import _future_grant from regolith.sorters import position_key -from regolith.tools import ( - all_docs_from_collection, - fuzzy_retrieval, - merge_collections_superior, -) +from regolith.tools import all_docs_from_collection, fuzzy_retrieval, merge_collections_superior SEMESTER_START_MONTH = {"fall": (9, 12), "spring": (1, 5), "summer": (6, 8)} diff --git a/src/regolith/helpers/l_generalhelper.py b/src/regolith/helpers/l_generalhelper.py index c5d1e9a99..9d3adb6a5 100644 --- a/src/regolith/helpers/l_generalhelper.py +++ b/src/regolith/helpers/l_generalhelper.py @@ -2,12 +2,7 @@ from regolith.fsclient import _id_key from regolith.helpers.basehelper import SoutHelperBase -from regolith.tools import ( - all_docs_from_collection, - collection_str, - get_pi_id, - search_collection, -) +from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, search_collection HELPER_TARGET = "lister" diff --git a/src/regolith/helpers/l_milestoneshelper.py b/src/regolith/helpers/l_milestoneshelper.py index 86ec0139c..441189785 100644 --- a/src/regolith/helpers/l_milestoneshelper.py +++ b/src/regolith/helpers/l_milestoneshelper.py @@ -16,12 +16,7 @@ PROJECTUM_PAUSED_STATI, alloweds, ) -from regolith.tools import ( - all_docs_from_collection, - collection_str, - get_pi_id, - key_value_pair_filter, -) +from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, key_value_pair_filter PROJECTUM_STATI = alloweds.get("PROJECTUM_STATI") TARGET_COLL = "projecta" diff --git a/src/regolith/helpers/l_projectahelper.py b/src/regolith/helpers/l_projectahelper.py index 2dd2f5d81..ef2452d5a 100644 --- a/src/regolith/helpers/l_projectahelper.py +++ b/src/regolith/helpers/l_projectahelper.py @@ -17,12 +17,7 @@ PROJECTUM_FINISHED_STATI, PROJECTUM_PAUSED_STATI, ) -from regolith.tools import ( - all_docs_from_collection, - collection_str, - get_pi_id, - key_value_pair_filter, -) +from regolith.tools import all_docs_from_collection, collection_str, get_pi_id, key_value_pair_filter TARGET_COLL = "projecta" HELPER_TARGET = "l_projecta" From 0ae915ca0bc0faf0d7142fb5b4aef584c9a9bf97 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 13:59:48 +0800 Subject: [PATCH 09/20] change tests dir to src/regolith/tests dir --- {tests => src/regolith/tests}/__init__.py | 0 {tests => src/regolith/tests}/bootstrap_builders.py | 0 {tests => src/regolith/tests}/conftest.py | 0 .../regolith/tests}/outputs/a_expense/expenses.yaml | 0 .../outputs/a_grppub_readlist/reading_lists.yaml | 0 .../tests}/outputs/a_manurev/refereeReports.yaml | 0 .../tests}/outputs/a_presentation/expenses.yaml | 0 .../outputs/a_presentation/presentations.yaml | 0 .../tests}/outputs/a_projectum/projecta.yaml | 0 .../tests}/outputs/a_proposal/proposals.yaml | 0 .../regolith/tests}/outputs/a_todo/todos.yaml | 0 .../annual-activity/sbillinge-ann-report.tex | 0 .../tests}/outputs/annual-activity/sbillinge.bib | 0 .../regolith/tests}/outputs/beamplan/2020-1-XPD.tex | 0 .../regolith/tests}/outputs/beamplan/2020-1-XPD.txt | 0 .../current-pending-ergs-scopatz.tex | 0 .../regolith/tests}/outputs/cv/scopatz.bib | 0 .../regolith/tests}/outputs/cv/scopatz.tex | 0 .../regolith/tests}/outputs/f_prum/projecta.yaml | 0 .../regolith/tests}/outputs/f_todo/todos.yaml | 0 .../regolith/tests}/outputs/figure/figure_rend.tex | 0 .../tests}/outputs/formalletter/first_letter_nc.tex | 0 .../SymPy-1.1_report_2017-04-01_2018-03-31.txt | 0 .../tests}/outputs/helper/proposalReviews.yml | 0 .../regolith/tests}/outputs/html/.nojekyll | 0 .../outputs/html/abstracts/Mouginot.Model.html | 0 .../regolith/tests}/outputs/html/blog/index.html | 0 .../tests}/outputs/html/blog/my-vision.html | 0 .../regolith/tests}/outputs/html/blog/rss.xml | 0 .../regolith/tests}/outputs/html/former/index.html | 0 .../regolith/tests}/outputs/html/group.bib | 0 .../regolith/tests}/outputs/html/index.html | 0 .../regolith/tests}/outputs/html/jobs/0004.html | 0 .../regolith/tests}/outputs/html/jobs/index.html | 0 .../regolith/tests}/outputs/html/people/index.html | 0 .../tests}/outputs/html/people/sbillinge.bib | 0 .../tests}/outputs/html/people/sbillinge.html | 0 .../regolith/tests}/outputs/html/people/scopatz.bib | 0 .../tests}/outputs/html/people/scopatz.html | 0 .../regolith/tests}/outputs/html/projects.html | 0 .../regolith/tests}/outputs/internalhtml/.nojekyll | 0 .../tests}/outputs/internalhtml/grpmeetings.html | 0 .../tests}/outputs/internalhtml/intindex.html | 0 .../outputs/preslist/presentations-ergs-scopatz.tex | 0 .../regolith/tests}/outputs/publist/scopatz.bib | 0 .../regolith/tests}/outputs/publist/scopatz.tex | 0 .../tests}/outputs/publist/scopatz_ackno.bib | 0 .../tests}/outputs/publist/scopatz_ackno.tex | 0 ..._from2016-01-01_to2018-12-01_facility_nslsii.tex | 0 ...016-01-01_to2018-12-01_facility_nslsii_ackno.tex | 0 ...16-01-01_to2018-12-01_facility_nslsii_nobold.tex | 0 ...16-01-01_to2018-12-01_facility_nslsii_pandoc.tex | 0 .../tests}/outputs/publist/scopatz_nobold.bib | 0 .../tests}/outputs/publist/scopatz_nobold.tex | 0 .../tests}/outputs/publist/scopatz_pandoc.tex | 0 .../tests}/outputs/recent-collabs/scopatz_doe.xlsx | Bin .../tests}/outputs/recent-collabs/scopatz_nsf.xlsx | Bin .../regolith/tests}/outputs/reimb/test.xlsx | Bin .../regolith/tests}/outputs/resume/scopatz.bib | 0 .../regolith/tests}/outputs/resume/scopatz.tex | 0 .../review-man/1902nature_sbillinge_author.txt | 0 .../review-man/1902nature_sbillinge_editor.txt | 0 .../review-prop/1906doeExample_sbillinge.txt | 0 .../review-prop/1906nsfExample_sbillinge.txt | 0 .../regolith/tests}/outputs/u_contact/contacts.yaml | 0 .../tests}/outputs/u_institutions/institutions.yaml | 0 .../regolith/tests}/outputs/u_logurl/projecta.yaml | 0 .../tests}/outputs/u_milestone/projecta.yaml | 0 .../regolith/tests}/outputs/u_todo/todos.yaml | 0 {tests => src/regolith/tests}/test_broker.py | 0 {tests => src/regolith/tests}/test_builders.py | 0 {tests => src/regolith/tests}/test_chain_db.py | 0 .../regolith/tests}/test_client_manager.py | 0 {tests => src/regolith/tests}/test_commands.py | 0 {tests => src/regolith/tests}/test_dates.py | 0 {tests => src/regolith/tests}/test_fsclient.py | 0 {tests => src/regolith/tests}/test_helpers.py | 0 {tests => src/regolith/tests}/test_main.py | 0 {tests => src/regolith/tests}/test_runcontrol.py | 0 {tests => src/regolith/tests}/test_schemas.py | 0 {tests => src/regolith/tests}/test_storage.py | 0 {tests => src/regolith/tests}/test_tools.py | 0 {tests => src/regolith/tests}/test_validate.py | 0 {tests => src/regolith/tests}/test_validators.py | 0 84 files changed, 0 insertions(+), 0 deletions(-) rename {tests => src/regolith/tests}/__init__.py (100%) rename {tests => src/regolith/tests}/bootstrap_builders.py (100%) rename {tests => src/regolith/tests}/conftest.py (100%) rename {tests => src/regolith/tests}/outputs/a_expense/expenses.yaml (100%) rename {tests => src/regolith/tests}/outputs/a_grppub_readlist/reading_lists.yaml (100%) rename {tests => src/regolith/tests}/outputs/a_manurev/refereeReports.yaml (100%) rename {tests => src/regolith/tests}/outputs/a_presentation/expenses.yaml (100%) rename {tests => src/regolith/tests}/outputs/a_presentation/presentations.yaml (100%) rename {tests => src/regolith/tests}/outputs/a_projectum/projecta.yaml (100%) rename {tests => src/regolith/tests}/outputs/a_proposal/proposals.yaml (100%) rename {tests => src/regolith/tests}/outputs/a_todo/todos.yaml (100%) rename {tests => src/regolith/tests}/outputs/annual-activity/sbillinge-ann-report.tex (100%) rename {tests => src/regolith/tests}/outputs/annual-activity/sbillinge.bib (100%) rename {tests => src/regolith/tests}/outputs/beamplan/2020-1-XPD.tex (100%) rename {tests => src/regolith/tests}/outputs/beamplan/2020-1-XPD.txt (100%) rename {tests => src/regolith/tests}/outputs/current-pending/current-pending-ergs-scopatz.tex (100%) rename {tests => src/regolith/tests}/outputs/cv/scopatz.bib (100%) rename {tests => src/regolith/tests}/outputs/cv/scopatz.tex (100%) rename {tests => src/regolith/tests}/outputs/f_prum/projecta.yaml (100%) rename {tests => src/regolith/tests}/outputs/f_todo/todos.yaml (100%) rename {tests => src/regolith/tests}/outputs/figure/figure_rend.tex (100%) rename {tests => src/regolith/tests}/outputs/formalletter/first_letter_nc.tex (100%) rename {tests => src/regolith/tests}/outputs/grant-report/SymPy-1.1_report_2017-04-01_2018-03-31.txt (100%) rename {tests => src/regolith/tests}/outputs/helper/proposalReviews.yml (100%) rename {tests => src/regolith/tests}/outputs/html/.nojekyll (100%) rename {tests => src/regolith/tests}/outputs/html/abstracts/Mouginot.Model.html (100%) rename {tests => src/regolith/tests}/outputs/html/blog/index.html (100%) rename {tests => src/regolith/tests}/outputs/html/blog/my-vision.html (100%) rename {tests => src/regolith/tests}/outputs/html/blog/rss.xml (100%) rename {tests => src/regolith/tests}/outputs/html/former/index.html (100%) rename {tests => src/regolith/tests}/outputs/html/group.bib (100%) rename {tests => src/regolith/tests}/outputs/html/index.html (100%) rename {tests => src/regolith/tests}/outputs/html/jobs/0004.html (100%) rename {tests => src/regolith/tests}/outputs/html/jobs/index.html (100%) rename {tests => src/regolith/tests}/outputs/html/people/index.html (100%) rename {tests => src/regolith/tests}/outputs/html/people/sbillinge.bib (100%) rename {tests => src/regolith/tests}/outputs/html/people/sbillinge.html (100%) rename {tests => src/regolith/tests}/outputs/html/people/scopatz.bib (100%) rename {tests => src/regolith/tests}/outputs/html/people/scopatz.html (100%) rename {tests => src/regolith/tests}/outputs/html/projects.html (100%) rename {tests => src/regolith/tests}/outputs/internalhtml/.nojekyll (100%) rename {tests => src/regolith/tests}/outputs/internalhtml/grpmeetings.html (100%) rename {tests => src/regolith/tests}/outputs/internalhtml/intindex.html (100%) rename {tests => src/regolith/tests}/outputs/preslist/presentations-ergs-scopatz.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz.bib (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_ackno.bib (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_ackno.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_ackno.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_nobold.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_pandoc.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_nobold.bib (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_nobold.tex (100%) rename {tests => src/regolith/tests}/outputs/publist/scopatz_pandoc.tex (100%) rename {tests => src/regolith/tests}/outputs/recent-collabs/scopatz_doe.xlsx (100%) rename {tests => src/regolith/tests}/outputs/recent-collabs/scopatz_nsf.xlsx (100%) rename {tests => src/regolith/tests}/outputs/reimb/test.xlsx (100%) rename {tests => src/regolith/tests}/outputs/resume/scopatz.bib (100%) rename {tests => src/regolith/tests}/outputs/resume/scopatz.tex (100%) rename {tests => src/regolith/tests}/outputs/review-man/1902nature_sbillinge_author.txt (100%) rename {tests => src/regolith/tests}/outputs/review-man/1902nature_sbillinge_editor.txt (100%) rename {tests => src/regolith/tests}/outputs/review-prop/1906doeExample_sbillinge.txt (100%) rename {tests => src/regolith/tests}/outputs/review-prop/1906nsfExample_sbillinge.txt (100%) rename {tests => src/regolith/tests}/outputs/u_contact/contacts.yaml (100%) rename {tests => src/regolith/tests}/outputs/u_institutions/institutions.yaml (100%) rename {tests => src/regolith/tests}/outputs/u_logurl/projecta.yaml (100%) rename {tests => src/regolith/tests}/outputs/u_milestone/projecta.yaml (100%) rename {tests => src/regolith/tests}/outputs/u_todo/todos.yaml (100%) rename {tests => src/regolith/tests}/test_broker.py (100%) rename {tests => src/regolith/tests}/test_builders.py (100%) rename {tests => src/regolith/tests}/test_chain_db.py (100%) rename {tests => src/regolith/tests}/test_client_manager.py (100%) rename {tests => src/regolith/tests}/test_commands.py (100%) rename {tests => src/regolith/tests}/test_dates.py (100%) rename {tests => src/regolith/tests}/test_fsclient.py (100%) rename {tests => src/regolith/tests}/test_helpers.py (100%) rename {tests => src/regolith/tests}/test_main.py (100%) rename {tests => src/regolith/tests}/test_runcontrol.py (100%) rename {tests => src/regolith/tests}/test_schemas.py (100%) rename {tests => src/regolith/tests}/test_storage.py (100%) rename {tests => src/regolith/tests}/test_tools.py (100%) rename {tests => src/regolith/tests}/test_validate.py (100%) rename {tests => src/regolith/tests}/test_validators.py (100%) diff --git a/tests/__init__.py b/src/regolith/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to src/regolith/tests/__init__.py diff --git a/tests/bootstrap_builders.py b/src/regolith/tests/bootstrap_builders.py similarity index 100% rename from tests/bootstrap_builders.py rename to src/regolith/tests/bootstrap_builders.py diff --git a/tests/conftest.py b/src/regolith/tests/conftest.py similarity index 100% rename from tests/conftest.py rename to src/regolith/tests/conftest.py diff --git a/tests/outputs/a_expense/expenses.yaml b/src/regolith/tests/outputs/a_expense/expenses.yaml similarity index 100% rename from tests/outputs/a_expense/expenses.yaml rename to src/regolith/tests/outputs/a_expense/expenses.yaml diff --git a/tests/outputs/a_grppub_readlist/reading_lists.yaml b/src/regolith/tests/outputs/a_grppub_readlist/reading_lists.yaml similarity index 100% rename from tests/outputs/a_grppub_readlist/reading_lists.yaml rename to src/regolith/tests/outputs/a_grppub_readlist/reading_lists.yaml diff --git a/tests/outputs/a_manurev/refereeReports.yaml b/src/regolith/tests/outputs/a_manurev/refereeReports.yaml similarity index 100% rename from tests/outputs/a_manurev/refereeReports.yaml rename to src/regolith/tests/outputs/a_manurev/refereeReports.yaml diff --git a/tests/outputs/a_presentation/expenses.yaml b/src/regolith/tests/outputs/a_presentation/expenses.yaml similarity index 100% rename from tests/outputs/a_presentation/expenses.yaml rename to src/regolith/tests/outputs/a_presentation/expenses.yaml diff --git a/tests/outputs/a_presentation/presentations.yaml b/src/regolith/tests/outputs/a_presentation/presentations.yaml similarity index 100% rename from tests/outputs/a_presentation/presentations.yaml rename to src/regolith/tests/outputs/a_presentation/presentations.yaml diff --git a/tests/outputs/a_projectum/projecta.yaml b/src/regolith/tests/outputs/a_projectum/projecta.yaml similarity index 100% rename from tests/outputs/a_projectum/projecta.yaml rename to src/regolith/tests/outputs/a_projectum/projecta.yaml diff --git a/tests/outputs/a_proposal/proposals.yaml b/src/regolith/tests/outputs/a_proposal/proposals.yaml similarity index 100% rename from tests/outputs/a_proposal/proposals.yaml rename to src/regolith/tests/outputs/a_proposal/proposals.yaml diff --git a/tests/outputs/a_todo/todos.yaml b/src/regolith/tests/outputs/a_todo/todos.yaml similarity index 100% rename from tests/outputs/a_todo/todos.yaml rename to src/regolith/tests/outputs/a_todo/todos.yaml diff --git a/tests/outputs/annual-activity/sbillinge-ann-report.tex b/src/regolith/tests/outputs/annual-activity/sbillinge-ann-report.tex similarity index 100% rename from tests/outputs/annual-activity/sbillinge-ann-report.tex rename to src/regolith/tests/outputs/annual-activity/sbillinge-ann-report.tex diff --git a/tests/outputs/annual-activity/sbillinge.bib b/src/regolith/tests/outputs/annual-activity/sbillinge.bib similarity index 100% rename from tests/outputs/annual-activity/sbillinge.bib rename to src/regolith/tests/outputs/annual-activity/sbillinge.bib diff --git a/tests/outputs/beamplan/2020-1-XPD.tex b/src/regolith/tests/outputs/beamplan/2020-1-XPD.tex similarity index 100% rename from tests/outputs/beamplan/2020-1-XPD.tex rename to src/regolith/tests/outputs/beamplan/2020-1-XPD.tex diff --git a/tests/outputs/beamplan/2020-1-XPD.txt b/src/regolith/tests/outputs/beamplan/2020-1-XPD.txt similarity index 100% rename from tests/outputs/beamplan/2020-1-XPD.txt rename to src/regolith/tests/outputs/beamplan/2020-1-XPD.txt diff --git a/tests/outputs/current-pending/current-pending-ergs-scopatz.tex b/src/regolith/tests/outputs/current-pending/current-pending-ergs-scopatz.tex similarity index 100% rename from tests/outputs/current-pending/current-pending-ergs-scopatz.tex rename to src/regolith/tests/outputs/current-pending/current-pending-ergs-scopatz.tex diff --git a/tests/outputs/cv/scopatz.bib b/src/regolith/tests/outputs/cv/scopatz.bib similarity index 100% rename from tests/outputs/cv/scopatz.bib rename to src/regolith/tests/outputs/cv/scopatz.bib diff --git a/tests/outputs/cv/scopatz.tex b/src/regolith/tests/outputs/cv/scopatz.tex similarity index 100% rename from tests/outputs/cv/scopatz.tex rename to src/regolith/tests/outputs/cv/scopatz.tex diff --git a/tests/outputs/f_prum/projecta.yaml b/src/regolith/tests/outputs/f_prum/projecta.yaml similarity index 100% rename from tests/outputs/f_prum/projecta.yaml rename to src/regolith/tests/outputs/f_prum/projecta.yaml diff --git a/tests/outputs/f_todo/todos.yaml b/src/regolith/tests/outputs/f_todo/todos.yaml similarity index 100% rename from tests/outputs/f_todo/todos.yaml rename to src/regolith/tests/outputs/f_todo/todos.yaml diff --git a/tests/outputs/figure/figure_rend.tex b/src/regolith/tests/outputs/figure/figure_rend.tex similarity index 100% rename from tests/outputs/figure/figure_rend.tex rename to src/regolith/tests/outputs/figure/figure_rend.tex diff --git a/tests/outputs/formalletter/first_letter_nc.tex b/src/regolith/tests/outputs/formalletter/first_letter_nc.tex similarity index 100% rename from tests/outputs/formalletter/first_letter_nc.tex rename to src/regolith/tests/outputs/formalletter/first_letter_nc.tex diff --git a/tests/outputs/grant-report/SymPy-1.1_report_2017-04-01_2018-03-31.txt b/src/regolith/tests/outputs/grant-report/SymPy-1.1_report_2017-04-01_2018-03-31.txt similarity index 100% rename from tests/outputs/grant-report/SymPy-1.1_report_2017-04-01_2018-03-31.txt rename to src/regolith/tests/outputs/grant-report/SymPy-1.1_report_2017-04-01_2018-03-31.txt diff --git a/tests/outputs/helper/proposalReviews.yml b/src/regolith/tests/outputs/helper/proposalReviews.yml similarity index 100% rename from tests/outputs/helper/proposalReviews.yml rename to src/regolith/tests/outputs/helper/proposalReviews.yml diff --git a/tests/outputs/html/.nojekyll b/src/regolith/tests/outputs/html/.nojekyll similarity index 100% rename from tests/outputs/html/.nojekyll rename to src/regolith/tests/outputs/html/.nojekyll diff --git a/tests/outputs/html/abstracts/Mouginot.Model.html b/src/regolith/tests/outputs/html/abstracts/Mouginot.Model.html similarity index 100% rename from tests/outputs/html/abstracts/Mouginot.Model.html rename to src/regolith/tests/outputs/html/abstracts/Mouginot.Model.html diff --git a/tests/outputs/html/blog/index.html b/src/regolith/tests/outputs/html/blog/index.html similarity index 100% rename from tests/outputs/html/blog/index.html rename to src/regolith/tests/outputs/html/blog/index.html diff --git a/tests/outputs/html/blog/my-vision.html b/src/regolith/tests/outputs/html/blog/my-vision.html similarity index 100% rename from tests/outputs/html/blog/my-vision.html rename to src/regolith/tests/outputs/html/blog/my-vision.html diff --git a/tests/outputs/html/blog/rss.xml b/src/regolith/tests/outputs/html/blog/rss.xml similarity index 100% rename from tests/outputs/html/blog/rss.xml rename to src/regolith/tests/outputs/html/blog/rss.xml diff --git a/tests/outputs/html/former/index.html b/src/regolith/tests/outputs/html/former/index.html similarity index 100% rename from tests/outputs/html/former/index.html rename to src/regolith/tests/outputs/html/former/index.html diff --git a/tests/outputs/html/group.bib b/src/regolith/tests/outputs/html/group.bib similarity index 100% rename from tests/outputs/html/group.bib rename to src/regolith/tests/outputs/html/group.bib diff --git a/tests/outputs/html/index.html b/src/regolith/tests/outputs/html/index.html similarity index 100% rename from tests/outputs/html/index.html rename to src/regolith/tests/outputs/html/index.html diff --git a/tests/outputs/html/jobs/0004.html b/src/regolith/tests/outputs/html/jobs/0004.html similarity index 100% rename from tests/outputs/html/jobs/0004.html rename to src/regolith/tests/outputs/html/jobs/0004.html diff --git a/tests/outputs/html/jobs/index.html b/src/regolith/tests/outputs/html/jobs/index.html similarity index 100% rename from tests/outputs/html/jobs/index.html rename to src/regolith/tests/outputs/html/jobs/index.html diff --git a/tests/outputs/html/people/index.html b/src/regolith/tests/outputs/html/people/index.html similarity index 100% rename from tests/outputs/html/people/index.html rename to src/regolith/tests/outputs/html/people/index.html diff --git a/tests/outputs/html/people/sbillinge.bib b/src/regolith/tests/outputs/html/people/sbillinge.bib similarity index 100% rename from tests/outputs/html/people/sbillinge.bib rename to src/regolith/tests/outputs/html/people/sbillinge.bib diff --git a/tests/outputs/html/people/sbillinge.html b/src/regolith/tests/outputs/html/people/sbillinge.html similarity index 100% rename from tests/outputs/html/people/sbillinge.html rename to src/regolith/tests/outputs/html/people/sbillinge.html diff --git a/tests/outputs/html/people/scopatz.bib b/src/regolith/tests/outputs/html/people/scopatz.bib similarity index 100% rename from tests/outputs/html/people/scopatz.bib rename to src/regolith/tests/outputs/html/people/scopatz.bib diff --git a/tests/outputs/html/people/scopatz.html b/src/regolith/tests/outputs/html/people/scopatz.html similarity index 100% rename from tests/outputs/html/people/scopatz.html rename to src/regolith/tests/outputs/html/people/scopatz.html diff --git a/tests/outputs/html/projects.html b/src/regolith/tests/outputs/html/projects.html similarity index 100% rename from tests/outputs/html/projects.html rename to src/regolith/tests/outputs/html/projects.html diff --git a/tests/outputs/internalhtml/.nojekyll b/src/regolith/tests/outputs/internalhtml/.nojekyll similarity index 100% rename from tests/outputs/internalhtml/.nojekyll rename to src/regolith/tests/outputs/internalhtml/.nojekyll diff --git a/tests/outputs/internalhtml/grpmeetings.html b/src/regolith/tests/outputs/internalhtml/grpmeetings.html similarity index 100% rename from tests/outputs/internalhtml/grpmeetings.html rename to src/regolith/tests/outputs/internalhtml/grpmeetings.html diff --git a/tests/outputs/internalhtml/intindex.html b/src/regolith/tests/outputs/internalhtml/intindex.html similarity index 100% rename from tests/outputs/internalhtml/intindex.html rename to src/regolith/tests/outputs/internalhtml/intindex.html diff --git a/tests/outputs/preslist/presentations-ergs-scopatz.tex b/src/regolith/tests/outputs/preslist/presentations-ergs-scopatz.tex similarity index 100% rename from tests/outputs/preslist/presentations-ergs-scopatz.tex rename to src/regolith/tests/outputs/preslist/presentations-ergs-scopatz.tex diff --git a/tests/outputs/publist/scopatz.bib b/src/regolith/tests/outputs/publist/scopatz.bib similarity index 100% rename from tests/outputs/publist/scopatz.bib rename to src/regolith/tests/outputs/publist/scopatz.bib diff --git a/tests/outputs/publist/scopatz.tex b/src/regolith/tests/outputs/publist/scopatz.tex similarity index 100% rename from tests/outputs/publist/scopatz.tex rename to src/regolith/tests/outputs/publist/scopatz.tex diff --git a/tests/outputs/publist/scopatz_ackno.bib b/src/regolith/tests/outputs/publist/scopatz_ackno.bib similarity index 100% rename from tests/outputs/publist/scopatz_ackno.bib rename to src/regolith/tests/outputs/publist/scopatz_ackno.bib diff --git a/tests/outputs/publist/scopatz_ackno.tex b/src/regolith/tests/outputs/publist/scopatz_ackno.tex similarity index 100% rename from tests/outputs/publist/scopatz_ackno.tex rename to src/regolith/tests/outputs/publist/scopatz_ackno.tex diff --git a/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii.tex b/src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii.tex similarity index 100% rename from tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii.tex rename to src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii.tex diff --git a/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_ackno.tex b/src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_ackno.tex similarity index 100% rename from tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_ackno.tex rename to src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_ackno.tex diff --git a/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_nobold.tex b/src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_nobold.tex similarity index 100% rename from tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_nobold.tex rename to src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_nobold.tex diff --git a/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_pandoc.tex b/src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_pandoc.tex similarity index 100% rename from tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_pandoc.tex rename to src/regolith/tests/outputs/publist/scopatz_from2016-01-01_to2018-12-01_facility_nslsii_pandoc.tex diff --git a/tests/outputs/publist/scopatz_nobold.bib b/src/regolith/tests/outputs/publist/scopatz_nobold.bib similarity index 100% rename from tests/outputs/publist/scopatz_nobold.bib rename to src/regolith/tests/outputs/publist/scopatz_nobold.bib diff --git a/tests/outputs/publist/scopatz_nobold.tex b/src/regolith/tests/outputs/publist/scopatz_nobold.tex similarity index 100% rename from tests/outputs/publist/scopatz_nobold.tex rename to src/regolith/tests/outputs/publist/scopatz_nobold.tex diff --git a/tests/outputs/publist/scopatz_pandoc.tex b/src/regolith/tests/outputs/publist/scopatz_pandoc.tex similarity index 100% rename from tests/outputs/publist/scopatz_pandoc.tex rename to src/regolith/tests/outputs/publist/scopatz_pandoc.tex diff --git a/tests/outputs/recent-collabs/scopatz_doe.xlsx b/src/regolith/tests/outputs/recent-collabs/scopatz_doe.xlsx similarity index 100% rename from tests/outputs/recent-collabs/scopatz_doe.xlsx rename to src/regolith/tests/outputs/recent-collabs/scopatz_doe.xlsx diff --git a/tests/outputs/recent-collabs/scopatz_nsf.xlsx b/src/regolith/tests/outputs/recent-collabs/scopatz_nsf.xlsx similarity index 100% rename from tests/outputs/recent-collabs/scopatz_nsf.xlsx rename to src/regolith/tests/outputs/recent-collabs/scopatz_nsf.xlsx diff --git a/tests/outputs/reimb/test.xlsx b/src/regolith/tests/outputs/reimb/test.xlsx similarity index 100% rename from tests/outputs/reimb/test.xlsx rename to src/regolith/tests/outputs/reimb/test.xlsx diff --git a/tests/outputs/resume/scopatz.bib b/src/regolith/tests/outputs/resume/scopatz.bib similarity index 100% rename from tests/outputs/resume/scopatz.bib rename to src/regolith/tests/outputs/resume/scopatz.bib diff --git a/tests/outputs/resume/scopatz.tex b/src/regolith/tests/outputs/resume/scopatz.tex similarity index 100% rename from tests/outputs/resume/scopatz.tex rename to src/regolith/tests/outputs/resume/scopatz.tex diff --git a/tests/outputs/review-man/1902nature_sbillinge_author.txt b/src/regolith/tests/outputs/review-man/1902nature_sbillinge_author.txt similarity index 100% rename from tests/outputs/review-man/1902nature_sbillinge_author.txt rename to src/regolith/tests/outputs/review-man/1902nature_sbillinge_author.txt diff --git a/tests/outputs/review-man/1902nature_sbillinge_editor.txt b/src/regolith/tests/outputs/review-man/1902nature_sbillinge_editor.txt similarity index 100% rename from tests/outputs/review-man/1902nature_sbillinge_editor.txt rename to src/regolith/tests/outputs/review-man/1902nature_sbillinge_editor.txt diff --git a/tests/outputs/review-prop/1906doeExample_sbillinge.txt b/src/regolith/tests/outputs/review-prop/1906doeExample_sbillinge.txt similarity index 100% rename from tests/outputs/review-prop/1906doeExample_sbillinge.txt rename to src/regolith/tests/outputs/review-prop/1906doeExample_sbillinge.txt diff --git a/tests/outputs/review-prop/1906nsfExample_sbillinge.txt b/src/regolith/tests/outputs/review-prop/1906nsfExample_sbillinge.txt similarity index 100% rename from tests/outputs/review-prop/1906nsfExample_sbillinge.txt rename to src/regolith/tests/outputs/review-prop/1906nsfExample_sbillinge.txt diff --git a/tests/outputs/u_contact/contacts.yaml b/src/regolith/tests/outputs/u_contact/contacts.yaml similarity index 100% rename from tests/outputs/u_contact/contacts.yaml rename to src/regolith/tests/outputs/u_contact/contacts.yaml diff --git a/tests/outputs/u_institutions/institutions.yaml b/src/regolith/tests/outputs/u_institutions/institutions.yaml similarity index 100% rename from tests/outputs/u_institutions/institutions.yaml rename to src/regolith/tests/outputs/u_institutions/institutions.yaml diff --git a/tests/outputs/u_logurl/projecta.yaml b/src/regolith/tests/outputs/u_logurl/projecta.yaml similarity index 100% rename from tests/outputs/u_logurl/projecta.yaml rename to src/regolith/tests/outputs/u_logurl/projecta.yaml diff --git a/tests/outputs/u_milestone/projecta.yaml b/src/regolith/tests/outputs/u_milestone/projecta.yaml similarity index 100% rename from tests/outputs/u_milestone/projecta.yaml rename to src/regolith/tests/outputs/u_milestone/projecta.yaml diff --git a/tests/outputs/u_todo/todos.yaml b/src/regolith/tests/outputs/u_todo/todos.yaml similarity index 100% rename from tests/outputs/u_todo/todos.yaml rename to src/regolith/tests/outputs/u_todo/todos.yaml diff --git a/tests/test_broker.py b/src/regolith/tests/test_broker.py similarity index 100% rename from tests/test_broker.py rename to src/regolith/tests/test_broker.py diff --git a/tests/test_builders.py b/src/regolith/tests/test_builders.py similarity index 100% rename from tests/test_builders.py rename to src/regolith/tests/test_builders.py diff --git a/tests/test_chain_db.py b/src/regolith/tests/test_chain_db.py similarity index 100% rename from tests/test_chain_db.py rename to src/regolith/tests/test_chain_db.py diff --git a/tests/test_client_manager.py b/src/regolith/tests/test_client_manager.py similarity index 100% rename from tests/test_client_manager.py rename to src/regolith/tests/test_client_manager.py diff --git a/tests/test_commands.py b/src/regolith/tests/test_commands.py similarity index 100% rename from tests/test_commands.py rename to src/regolith/tests/test_commands.py diff --git a/tests/test_dates.py b/src/regolith/tests/test_dates.py similarity index 100% rename from tests/test_dates.py rename to src/regolith/tests/test_dates.py diff --git a/tests/test_fsclient.py b/src/regolith/tests/test_fsclient.py similarity index 100% rename from tests/test_fsclient.py rename to src/regolith/tests/test_fsclient.py diff --git a/tests/test_helpers.py b/src/regolith/tests/test_helpers.py similarity index 100% rename from tests/test_helpers.py rename to src/regolith/tests/test_helpers.py diff --git a/tests/test_main.py b/src/regolith/tests/test_main.py similarity index 100% rename from tests/test_main.py rename to src/regolith/tests/test_main.py diff --git a/tests/test_runcontrol.py b/src/regolith/tests/test_runcontrol.py similarity index 100% rename from tests/test_runcontrol.py rename to src/regolith/tests/test_runcontrol.py diff --git a/tests/test_schemas.py b/src/regolith/tests/test_schemas.py similarity index 100% rename from tests/test_schemas.py rename to src/regolith/tests/test_schemas.py diff --git a/tests/test_storage.py b/src/regolith/tests/test_storage.py similarity index 100% rename from tests/test_storage.py rename to src/regolith/tests/test_storage.py diff --git a/tests/test_tools.py b/src/regolith/tests/test_tools.py similarity index 100% rename from tests/test_tools.py rename to src/regolith/tests/test_tools.py diff --git a/tests/test_validate.py b/src/regolith/tests/test_validate.py similarity index 100% rename from tests/test_validate.py rename to src/regolith/tests/test_validate.py diff --git a/tests/test_validators.py b/src/regolith/tests/test_validators.py similarity index 100% rename from tests/test_validators.py rename to src/regolith/tests/test_validators.py From 5dbfa7c3df4c20a2938526f994f98b6367929c07 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 02:32:33 -0400 Subject: [PATCH 10/20] clean authors, add CJ --- AUTHORS.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 30b1d8dd4..3c992f352 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -1,11 +1,12 @@ Authors ======= -Anthony Scopatz -Billinge Group and community contibutors. +Originally written by Anthony Scopatz +Significant contributions by Christopher "CJ" Wright and Simon J. L. Billinge +Billinge Group and other community contibutors. Contributors ------------ -For a list of contributors, visit +For a full list of contributors, visit https://github.com/regro/regolith/graphs/contributors From 4fabee576ac3c2f0d57c08168e78f61e5d42bf97 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 02:33:25 -0400 Subject: [PATCH 11/20] remove Columbia copyright statement from CC0 license --- LICENSE.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/LICENSE.rst b/LICENSE.rst index 00d4606f3..0e287f788 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -1,9 +1,3 @@ -BSD 3-Clause License - -Copyright (c) 2024, The Trustees of Columbia University -in the City of New York. -All rights reserved. - The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of @@ -120,4 +114,4 @@ For more information, please see ---------------------------------- NOTE: ace and jsoneditor in the regolith/static/ dir are covered under their own -licences. \ No newline at end of file +licences. From 8af4b9cf07f8d04cded304f0ad6499f42e6b7a82 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 02:48:29 -0400 Subject: [PATCH 12/20] change package directory to src in toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 09d82ee7c..abce09f05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ dev_template = "{tag}" dirty_template = "{tag}" [tool.setuptools.packages.find] -where = ["."] # list of folders that contain the packages (["."] by default) +where = ["src"] # list of folders that contain the packages (["."] by default) include = ["regolith*"] # package names should match these glob patterns (["*"] by default) exclude = [] # exclude packages matching these glob patterns (empty by default) namespaces = true # to disable scanning PEP 420 namespaces (true by default) From e114e98256d565ef96adb243145e0f3635008f56 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 02:56:11 -0400 Subject: [PATCH 13/20] fstring quotes to pass pre-commit and change path in coverate --- .coveragerc | 2 +- src/regolith/helpers/l_currentappointmentshelper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.coveragerc b/.coveragerc index 428fa75eb..a4d2293a9 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,6 +1,6 @@ [run] source = - regolith/ + src/regolith/ [report] omit = */python?.?/* diff --git a/src/regolith/helpers/l_currentappointmentshelper.py b/src/regolith/helpers/l_currentappointmentshelper.py index 5c21da76b..94f627d8f 100644 --- a/src/regolith/helpers/l_currentappointmentshelper.py +++ b/src/regolith/helpers/l_currentappointmentshelper.py @@ -80,7 +80,7 @@ def sout(self): for _id, appt in p_appt.items(): grantid = appt.get("grant") if not grantid: - print(f"No grant found in {person.get("_id")} appt {person.get("appt")}") + print(f"No grant found in {person.get('_id')} appt {person.get('appt')}") grant = fuzzy_retrieval(grants, ["name", "_id", "alias"], grantid) if not grant: print(f"No grant found for {grantid}") From 06ba10312f4a81197190ec28298a54737a0de316 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 03:08:56 -0400 Subject: [PATCH 14/20] remove duplicate testing workflow and add pip requirements to main.yml --- .github/workflows/main.yml | 3 +- .github/workflows/python-package.yml | 56 ---------------------------- 2 files changed, 2 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 193efcc27..1a869394e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: CI +jhname: CI on: push: @@ -44,6 +44,7 @@ jobs: conda activate test conda install --file requirements/run.txt conda install --file requirements/test.txt + pip install -r requirements/pip.txt pip install . - name: Validate regolith shell: bash -l {0} diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml deleted file mode 100644 index 4a488d826..000000000 --- a/.github/workflows/python-package.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: CI - -on: - push: - branches: - - main - pull_request: - workflow_dispatch: - -jobs: - miniconda: - name: Miniconda ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-latest"] - steps: - - name: check out regolith - uses: actions/checkout@v3 - with: - repository: regro/regolith - # for bookkeeping have regolith at the same level as everything else in the - # directory tree - path: . - - - name: initialize miniconda - # this uses a marketplace action that sets up miniconda in a way that makes - # it easier to use. I tried setting it up without this and it was a pain - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: test - # environment.yml file is needed by this action. Because I don't want - # maintain this but rather maintain the requirements files it just has - # basic things in it like conda and pip - environment-file: environment.yml - python-version: 3 - auto-activate-base: false - - - name: install regolith requirements - shell: bash -l {0} - run: | - conda config --set always_yes yes --set changeps1 no - conda config --add channels conda-forge - conda activate test - conda install --file requirements/run.txt - conda install --file requirements/test.txt - pip install -r requirements/pip.txt - pip install . - - - name: run tests - shell: bash -l {0} - run: | - conda activate test - coverage run run_tests.py - coverage report -m - codecov From 18985090da2ac54a9d4ffd3bd8f14970d0e2511f Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 03:21:53 -0400 Subject: [PATCH 15/20] update tests import in test_commands so tests run --- src/regolith/tests/test_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/regolith/tests/test_commands.py b/src/regolith/tests/test_commands.py index f395a710e..e0a2cc77a 100644 --- a/src/regolith/tests/test_commands.py +++ b/src/regolith/tests/test_commands.py @@ -12,7 +12,7 @@ from regolith.main import main from regolith.mongoclient import load_mongo_col from regolith.runcontrol import DEFAULT_RC, load_rcfile -from tests.conftest import ALTERNATE_REGOLITH_MONGODB_NAME, FS_DB_NAME +from regolith.tests.conftest import ALTERNATE_REGOLITH_MONGODB_NAME, FS_DB_NAME BILLINGE_TEST = False # special tests for Billinge group, switch it to False before push to remote From 0a0a0ea0a13996c5444fe16259e490305c552033 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 03:23:15 -0400 Subject: [PATCH 16/20] cookiecutter news --- news/regolith_cookiecut.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/regolith_cookiecut.rst b/news/regolith_cookiecut.rst index c265f51bc..4b96dc575 100644 --- a/news/regolith_cookiecut.rst +++ b/news/regolith_cookiecut.rst @@ -16,7 +16,7 @@ **Fixed:** -* Fix Regolith by flake8 and black under PEP-8 standard. +* Rearrange Regolith package to new Billingegroup package standards **Security:** From 1aa7737abe55369bd0923a8436c07c22870d1906 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 03:25:15 -0400 Subject: [PATCH 17/20] fix inadvertent typo in main.yml workflow --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a869394e..cefb25c05 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -jhname: CI +name: CI on: push: From 716f2c9b9f5863f1a4e50cfb02682d8ce26df31c Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 03:29:57 -0400 Subject: [PATCH 18/20] reset flake8 ignores on helper tests --- .flake8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flake8 b/.flake8 index 5473b48e7..d58c2a826 100644 --- a/.flake8 +++ b/.flake8 @@ -11,4 +11,4 @@ max-line-length = 115 # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings extend-ignore = E203 per-file-ignores = - tests/test_helpers.py: E501 + src/regolith/tests/test_helpers.py: E501 From 5733fbb24b7251edbc473fdaed68cee322762397 Mon Sep 17 00:00:00 2001 From: stevenhua0320 Date: Thu, 18 Jul 2024 16:38:02 +0800 Subject: [PATCH 19/20] copy docs dir files to doc dir, cover old version of conf.py and index.rst to new dir --- doc/Makefile | 194 +++++ doc/make.bat | 36 + {docs => doc/source}/Makefile | 0 doc/source/_static/.placeholder | 0 .../source}/_static/regolith-logo-white.png | Bin .../source}/_static/regolith-logo-white.svg | 0 .../source}/_static/regolith-logo.ico | Bin .../source}/_static/regolith-logo.png | Bin .../source}/_static/regolith-logo.svg | 0 {docs => doc/source}/_static/rg-dungeon.js | 0 {docs => doc/source}/_static/unicodetiles.css | 0 .../source}/_static/unicodetiles.min.js | 0 .../blackcloud/static/blackcloud.css_t | 0 .../source}/_themes/blackcloud/theme.conf | 0 {docs => doc/source}/api/app.rst | 0 {docs => doc/source}/api/basebuilder.rst | 0 {docs => doc/source}/api/broker.rst | 0 {docs => doc/source}/api/builder.rst | 0 {docs => doc/source}/api/chained_db.rst | 0 {docs => doc/source}/api/commands.rst | 0 {docs => doc/source}/api/cvbuilder.rst | 0 {docs => doc/source}/api/database.rst | 0 {docs => doc/source}/api/dates.rst | 0 {docs => doc/source}/api/deploy.rst | 0 {docs => doc/source}/api/htmlbuilder.rst | 0 {docs => doc/source}/api/index.rst | 0 {docs => doc/source}/api/interactive.rst | 0 {docs => doc/source}/api/main.rst | 0 doc/source/api/regolith.example_package.rst | 31 + doc/source/api/regolith.rst | 30 + {docs => doc/source}/api/runcontrol.rst | 0 {docs => doc/source}/api/tools.rst | 0 {docs => doc/source}/api/validators.rst | 0 .../source}/collections/citations.rst | 0 {docs => doc/source}/collections/courses.rst | 0 {docs => doc/source}/collections/index.rst | 0 {docs => doc/source}/collections/jobs.rst | 0 {docs => doc/source}/collections/news.rst | 0 {docs => doc/source}/commands/fs-to-mongo.rst | 0 {docs => doc/source}/commands/index.rst | 0 {docs => doc/source}/commands/validate.rst | 0 doc/source/conf.py | 424 ++++++++++ .../source}/database_maintenance/index.rst | 0 .../mongo_maintenance.rst | 0 .../dp_regolith_prums_to_mongodb.md | 0 {docs => doc/source}/helper_gui.rst | 0 .../source}/helper_gui_images/a_projectum.png | Bin .../source}/helper_gui_images/l_members.png | Bin .../source}/helper_gui_images/layout.png | Bin .../source}/helper_gui_images/u_logurl.png | Bin .../source}/helper_gui_images/workflow1.png | Bin .../source}/helper_gui_images/workflow10.png | Bin .../source}/helper_gui_images/workflow12.png | Bin .../source}/helper_gui_images/workflow3.png | Bin .../source}/helper_gui_images/workflow6.png | Bin .../source}/helper_gui_images/workflow8.png | Bin doc/source/index.rst | 721 ++++++++++++++++++ doc/source/license.rst | 39 + {docs => doc/source}/make.bat | 0 {docs => doc/source}/rc.rst | 0 {docs => doc/source}/regolithrc.json | 0 doc/source/release.rst | 5 + {docs => doc/source}/tutorials/broker.rst | 0 {docs => doc/source}/tutorials/index.rst | 0 64 files changed, 1480 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/make.bat rename {docs => doc/source}/Makefile (100%) create mode 100644 doc/source/_static/.placeholder rename {docs => doc/source}/_static/regolith-logo-white.png (100%) rename {docs => doc/source}/_static/regolith-logo-white.svg (100%) rename {docs => doc/source}/_static/regolith-logo.ico (100%) rename {docs => doc/source}/_static/regolith-logo.png (100%) rename {docs => doc/source}/_static/regolith-logo.svg (100%) rename {docs => doc/source}/_static/rg-dungeon.js (100%) rename {docs => doc/source}/_static/unicodetiles.css (100%) rename {docs => doc/source}/_static/unicodetiles.min.js (100%) rename {docs => doc/source}/_themes/blackcloud/static/blackcloud.css_t (100%) rename {docs => doc/source}/_themes/blackcloud/theme.conf (100%) rename {docs => doc/source}/api/app.rst (100%) rename {docs => doc/source}/api/basebuilder.rst (100%) rename {docs => doc/source}/api/broker.rst (100%) rename {docs => doc/source}/api/builder.rst (100%) rename {docs => doc/source}/api/chained_db.rst (100%) rename {docs => doc/source}/api/commands.rst (100%) rename {docs => doc/source}/api/cvbuilder.rst (100%) rename {docs => doc/source}/api/database.rst (100%) rename {docs => doc/source}/api/dates.rst (100%) rename {docs => doc/source}/api/deploy.rst (100%) rename {docs => doc/source}/api/htmlbuilder.rst (100%) rename {docs => doc/source}/api/index.rst (100%) rename {docs => doc/source}/api/interactive.rst (100%) rename {docs => doc/source}/api/main.rst (100%) create mode 100644 doc/source/api/regolith.example_package.rst create mode 100644 doc/source/api/regolith.rst rename {docs => doc/source}/api/runcontrol.rst (100%) rename {docs => doc/source}/api/tools.rst (100%) rename {docs => doc/source}/api/validators.rst (100%) rename {docs => doc/source}/collections/citations.rst (100%) rename {docs => doc/source}/collections/courses.rst (100%) rename {docs => doc/source}/collections/index.rst (100%) rename {docs => doc/source}/collections/jobs.rst (100%) rename {docs => doc/source}/collections/news.rst (100%) rename {docs => doc/source}/commands/fs-to-mongo.rst (100%) rename {docs => doc/source}/commands/index.rst (100%) rename {docs => doc/source}/commands/validate.rst (100%) create mode 100644 doc/source/conf.py rename {docs => doc/source}/database_maintenance/index.rst (100%) rename {docs => doc/source}/database_maintenance/mongo_maintenance.rst (100%) rename {docs => doc/source}/developer_notes/dp_regolith_prums_to_mongodb.md (100%) rename {docs => doc/source}/helper_gui.rst (100%) rename {docs => doc/source}/helper_gui_images/a_projectum.png (100%) rename {docs => doc/source}/helper_gui_images/l_members.png (100%) rename {docs => doc/source}/helper_gui_images/layout.png (100%) rename {docs => doc/source}/helper_gui_images/u_logurl.png (100%) rename {docs => doc/source}/helper_gui_images/workflow1.png (100%) rename {docs => doc/source}/helper_gui_images/workflow10.png (100%) rename {docs => doc/source}/helper_gui_images/workflow12.png (100%) rename {docs => doc/source}/helper_gui_images/workflow3.png (100%) rename {docs => doc/source}/helper_gui_images/workflow6.png (100%) rename {docs => doc/source}/helper_gui_images/workflow8.png (100%) create mode 100644 doc/source/index.rst create mode 100644 doc/source/license.rst rename {docs => doc/source}/make.bat (100%) rename {docs => doc/source}/rc.rst (100%) rename {docs => doc/source}/regolithrc.json (100%) create mode 100644 doc/source/release.rst rename {docs => doc/source}/tutorials/broker.rst (100%) rename {docs => doc/source}/tutorials/index.rst (100%) diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 000000000..ac5036632 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,194 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = build +BASENAME = $(subst .,,$(subst $() $(),,regolith)) + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(BASENAME).qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(BASENAME).qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/$(BASENAME)" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/$(BASENAME)" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +# Manual publishing to the gh-pages branch + +GITREPOPATH = $(shell cd $(CURDIR) && git rev-parse --git-dir) +GITREMOTE = origin +GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE).url) +GITLASTCOMMIT = $(shell git rev-parse --short HEAD) + +publish: + @test -d build/html || \ + ( echo >&2 "Run 'make html' first!"; false ) + git show-ref --verify --quiet refs/heads/gh-pages || \ + git branch --track gh-pages $(GITREMOTE)/gh-pages + test -d build/gh-pages || \ + git clone -s -b gh-pages $(GITREPOPATH) build/gh-pages + cd build/gh-pages && \ + git pull $(GITREMOTEURL) gh-pages + rsync -acv --delete --exclude=.git --exclude=.rsync-exclude \ + --exclude-from=build/gh-pages/.rsync-exclude \ + --link-dest=$(CURDIR)/build/html build/html/ build/gh-pages/ + cd build/gh-pages && \ + git add --all . && \ + git diff --cached --quiet || \ + git commit -m "Sync with the source at $(GITLASTCOMMIT)." + cd build/gh-pages && \ + git push origin gh-pages diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 000000000..2be830693 --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=PackagingScientificPython + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/docs/Makefile b/doc/source/Makefile similarity index 100% rename from docs/Makefile rename to doc/source/Makefile diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/docs/_static/regolith-logo-white.png b/doc/source/_static/regolith-logo-white.png similarity index 100% rename from docs/_static/regolith-logo-white.png rename to doc/source/_static/regolith-logo-white.png diff --git a/docs/_static/regolith-logo-white.svg b/doc/source/_static/regolith-logo-white.svg similarity index 100% rename from docs/_static/regolith-logo-white.svg rename to doc/source/_static/regolith-logo-white.svg diff --git a/docs/_static/regolith-logo.ico b/doc/source/_static/regolith-logo.ico similarity index 100% rename from docs/_static/regolith-logo.ico rename to doc/source/_static/regolith-logo.ico diff --git a/docs/_static/regolith-logo.png b/doc/source/_static/regolith-logo.png similarity index 100% rename from docs/_static/regolith-logo.png rename to doc/source/_static/regolith-logo.png diff --git a/docs/_static/regolith-logo.svg b/doc/source/_static/regolith-logo.svg similarity index 100% rename from docs/_static/regolith-logo.svg rename to doc/source/_static/regolith-logo.svg diff --git a/docs/_static/rg-dungeon.js b/doc/source/_static/rg-dungeon.js similarity index 100% rename from docs/_static/rg-dungeon.js rename to doc/source/_static/rg-dungeon.js diff --git a/docs/_static/unicodetiles.css b/doc/source/_static/unicodetiles.css similarity index 100% rename from docs/_static/unicodetiles.css rename to doc/source/_static/unicodetiles.css diff --git a/docs/_static/unicodetiles.min.js b/doc/source/_static/unicodetiles.min.js similarity index 100% rename from docs/_static/unicodetiles.min.js rename to doc/source/_static/unicodetiles.min.js diff --git a/docs/_themes/blackcloud/static/blackcloud.css_t b/doc/source/_themes/blackcloud/static/blackcloud.css_t similarity index 100% rename from docs/_themes/blackcloud/static/blackcloud.css_t rename to doc/source/_themes/blackcloud/static/blackcloud.css_t diff --git a/docs/_themes/blackcloud/theme.conf b/doc/source/_themes/blackcloud/theme.conf similarity index 100% rename from docs/_themes/blackcloud/theme.conf rename to doc/source/_themes/blackcloud/theme.conf diff --git a/docs/api/app.rst b/doc/source/api/app.rst similarity index 100% rename from docs/api/app.rst rename to doc/source/api/app.rst diff --git a/docs/api/basebuilder.rst b/doc/source/api/basebuilder.rst similarity index 100% rename from docs/api/basebuilder.rst rename to doc/source/api/basebuilder.rst diff --git a/docs/api/broker.rst b/doc/source/api/broker.rst similarity index 100% rename from docs/api/broker.rst rename to doc/source/api/broker.rst diff --git a/docs/api/builder.rst b/doc/source/api/builder.rst similarity index 100% rename from docs/api/builder.rst rename to doc/source/api/builder.rst diff --git a/docs/api/chained_db.rst b/doc/source/api/chained_db.rst similarity index 100% rename from docs/api/chained_db.rst rename to doc/source/api/chained_db.rst diff --git a/docs/api/commands.rst b/doc/source/api/commands.rst similarity index 100% rename from docs/api/commands.rst rename to doc/source/api/commands.rst diff --git a/docs/api/cvbuilder.rst b/doc/source/api/cvbuilder.rst similarity index 100% rename from docs/api/cvbuilder.rst rename to doc/source/api/cvbuilder.rst diff --git a/docs/api/database.rst b/doc/source/api/database.rst similarity index 100% rename from docs/api/database.rst rename to doc/source/api/database.rst diff --git a/docs/api/dates.rst b/doc/source/api/dates.rst similarity index 100% rename from docs/api/dates.rst rename to doc/source/api/dates.rst diff --git a/docs/api/deploy.rst b/doc/source/api/deploy.rst similarity index 100% rename from docs/api/deploy.rst rename to doc/source/api/deploy.rst diff --git a/docs/api/htmlbuilder.rst b/doc/source/api/htmlbuilder.rst similarity index 100% rename from docs/api/htmlbuilder.rst rename to doc/source/api/htmlbuilder.rst diff --git a/docs/api/index.rst b/doc/source/api/index.rst similarity index 100% rename from docs/api/index.rst rename to doc/source/api/index.rst diff --git a/docs/api/interactive.rst b/doc/source/api/interactive.rst similarity index 100% rename from docs/api/interactive.rst rename to doc/source/api/interactive.rst diff --git a/docs/api/main.rst b/doc/source/api/main.rst similarity index 100% rename from docs/api/main.rst rename to doc/source/api/main.rst diff --git a/doc/source/api/regolith.example_package.rst b/doc/source/api/regolith.example_package.rst new file mode 100644 index 000000000..e8fdb885f --- /dev/null +++ b/doc/source/api/regolith.example_package.rst @@ -0,0 +1,31 @@ +.. _example_package documentation: + +|title| +======= + +.. |title| replace:: regolith.example_package package + +.. automodule:: regolith.example_package + :members: + :undoc-members: + :show-inheritance: + +|foo| +----- + +.. |foo| replace:: regolith.example_package.foo module + +.. automodule:: regolith.example_package.foo + :members: + :undoc-members: + :show-inheritance: + +|bar| +----- + +.. |bar| replace:: regolith.example_package.bar module + +.. automodule:: regolith.example_package.foo + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/api/regolith.rst b/doc/source/api/regolith.rst new file mode 100644 index 000000000..44aceb0e3 --- /dev/null +++ b/doc/source/api/regolith.rst @@ -0,0 +1,30 @@ +:tocdepth: -1 + +|title| +======= + +.. |title| replace:: regolith package + +.. automodule:: regolith + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + regolith.example_package + +Submodules +---------- + +|module| +-------- + +.. |module| replace:: regolith.example_submodule module + +.. automodule:: regolith.example_submodule + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/api/runcontrol.rst b/doc/source/api/runcontrol.rst similarity index 100% rename from docs/api/runcontrol.rst rename to doc/source/api/runcontrol.rst diff --git a/docs/api/tools.rst b/doc/source/api/tools.rst similarity index 100% rename from docs/api/tools.rst rename to doc/source/api/tools.rst diff --git a/docs/api/validators.rst b/doc/source/api/validators.rst similarity index 100% rename from docs/api/validators.rst rename to doc/source/api/validators.rst diff --git a/docs/collections/citations.rst b/doc/source/collections/citations.rst similarity index 100% rename from docs/collections/citations.rst rename to doc/source/collections/citations.rst diff --git a/docs/collections/courses.rst b/doc/source/collections/courses.rst similarity index 100% rename from docs/collections/courses.rst rename to doc/source/collections/courses.rst diff --git a/docs/collections/index.rst b/doc/source/collections/index.rst similarity index 100% rename from docs/collections/index.rst rename to doc/source/collections/index.rst diff --git a/docs/collections/jobs.rst b/doc/source/collections/jobs.rst similarity index 100% rename from docs/collections/jobs.rst rename to doc/source/collections/jobs.rst diff --git a/docs/collections/news.rst b/doc/source/collections/news.rst similarity index 100% rename from docs/collections/news.rst rename to doc/source/collections/news.rst diff --git a/docs/commands/fs-to-mongo.rst b/doc/source/commands/fs-to-mongo.rst similarity index 100% rename from docs/commands/fs-to-mongo.rst rename to doc/source/commands/fs-to-mongo.rst diff --git a/docs/commands/index.rst b/doc/source/commands/index.rst similarity index 100% rename from docs/commands/index.rst rename to doc/source/commands/index.rst diff --git a/docs/commands/validate.rst b/doc/source/commands/validate.rst similarity index 100% rename from docs/commands/validate.rst rename to doc/source/commands/validate.rst diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 000000000..5f7abb709 --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,424 @@ +# -*- coding: utf-8 -*- +# +# xo documentation build configuration file, created by +# sphinx-quickstart on Sun Jan 27 00:12:33 2013. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import json +import tempfile +from collections.abc import MutableMapping +from subprocess import check_output +from textwrap import indent + +import cloud_sptheme as csp + +from regolith import __version__ as REGOLITH_VERSION +from regolith.fsclient import _id_key, dump_json, json_to_yaml +from regolith.main import CONNECTED_COMMANDS, DISCONNECTED_COMMANDS +from regolith.schemas import EXEMPLARS, SCHEMAS + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.mathjax", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", +] + +napoleon_google_docstring = False +napoleon_use_param = False +napoleon_use_ivar = True + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix of source filenames. +source_suffix = ".rst" + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = "index" + +# General information about the project. +project = "regolith" +copyright = "2015, Anthony Scopatz" + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = REGOLITH_VERSION.rsplit(".", 1)[0] + +# The full version, including alpha/beta/rc tags. +release = REGOLITH_VERSION + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ["_build"] + +# The reST default role (used for this markup: `text`) to use for all documents. +# default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +# add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +# add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +# show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +# pygments_style = 'sphinx' +pygments_style = "pastie" + +# A list of ignored prefixes for module index sorting. +# modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = "redcloud" +# html_theme = 'blackcloud' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# html_theme_options = {} +html_theme_options = {"roottarget": "index"} + +# Add any paths that contain custom themes here, relative to this directory. +# html_theme_path = [] +# html_theme_path = [csp.get_theme_dir()] +html_theme_path = ["_themes", csp.get_theme_dir()] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +html_title = "regolith - software group content managment system" + +# A shorter title for the navigation bar. Default is the same as html_title. +html_short_title = "regolith" + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +html_logo = "_static/regolith-logo.svg" + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +html_favicon = "_static/regolith-logo.ico" + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ["_static"] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +# html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +# html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +# html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {} + +# If false, no module index is generated. +html_domain_indices = False + +# If false, no index is generated. +html_use_index = False + +# If true, the index is split into individual pages for each letter. +html_split_index = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = False + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +# html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +# html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +# html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = "regolithdoc" + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + # Additional stuff for the LaTeX preamble. + # 'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ( + "index", + "regolith.tex", + "Regolith Documentation", + "Anthony Scopatz", + "manual", + ) +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +# latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +# latex_use_parts = False + +# If true, show page references after internal links. +# latex_show_pagerefs = False + +# If true, show URL addresses after external links. +# latex_show_urls = False + +# Documents to append as an appendix to all manuals. +# latex_appendices = [] + +# If false, no module index is generated. +# latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [("index", "regolith", "regolith docs", ["Anthony Scopatz"], 1)] + +# If true, show URL addresses after external links. +# man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ( + "index", + "regolith", + "regolith documentation", + "Anthony Scopatz", + "regolith", + "Research group managment software.", + "Miscellaneous", + ) +] + + +# Documents to append as an appendix to all manuals. +# texinfo_appendices = [] + +# If false, no module index is generated. +# texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +# texinfo_show_urls = 'footnote' + + +def format_key(schema, key, indent_str=""): + s = "" + if key == "schema" or key == "required": + return s + line_format = ":{key}: {type}, {description}, required\n" + line_format_o = ":{key}: {type}, {description}, optional\n" + if not schema.get("required", False): + lf = line_format_o + else: + lf = line_format + if "type" in schema.get(key, {}) or "anyof_type" in schema.get(key, {}): + schema = schema[key] + if "type" in schema or "anyof_type" in schema: + s += indent( + lf.format( + key=key, + description=schema.get("description", ""), + type=schema.get("type", schema.get("anyof_type", "")), + ), + indent_str, + ) + allowed = schema.get("allowed", "") or schema.get("eallowed", "") + if allowed: + s += indent("\nAllowed values: \n", indent_str + "\t") + for allow in allowed: + if allow: + s += indent("* {}\n".format(allow), indent_str + "\t" * 2) + else: + s += indent("* ``''``\n", indent_str + "\t" * 2) + s = s.replace(", , ", ", ") + if schema.get("schema", False): + s += "\n" + for inner_key in schema.get("schema", ()): + s += format_key(schema["schema"], inner_key, indent_str=indent_str + "\t") + + return s + + +def build_schema_doc(key): + fn = "collections/" + key + ".rst" + with open(fn, "w") as f: + s = "" + s += key.title() + "\n" + s += "=" * len(key) + "\n" + s += SCHEMAS[key]["_description"]["description"] + "\n\n" + s += "Schema\n------\nThe following lists key names mapped to its " "type and meaning for each entry.\n\n" + schema = SCHEMAS[key] + schema_list = list(schema.keys()) + schema_list.sort() + for k in schema_list: + if k not in ["_description"]: + s += format_key(schema[k], key=k) + s += "\n\n" + s += "YAML Example\n------------\n\n" + s += ".. code-block:: yaml\n\n" + temp = tempfile.NamedTemporaryFile() + temp2 = tempfile.NamedTemporaryFile() + documents = EXEMPLARS[key] + if isinstance(documents, MutableMapping): + documents = [documents] + documents = {doc["_id"]: doc for doc in documents} + dump_json(temp.name, documents) + docs = sorted(documents.values(), key=_id_key) + lines = [json.dumps(doc, sort_keys=True, indent=4, separators=(",", ": ")) for doc in docs] + jd = "\n".join(lines) + json_to_yaml(temp.name, temp2.name) + with open(temp2.name, "r") as ff: + s += indent(ff.read(), "\t") + s += "\n\n" + s += "JSON/Mongo Example\n------------------\n\n" + s += ".. code-block:: json\n\n" + s += indent(jd, "\t") + s += "\n" + f.write(s) + + +for k in SCHEMAS: + build_schema_doc(k) + + +docs_not_in_schemas = ["citations", "courses", "jobs", "news"] +all_collection_docs = sorted(list(SCHEMAS.keys()) + docs_not_in_schemas) + +collections_header = """.. _regolith_collections: + +================= +Collections +================= +The following contain the regolith schemas and examples in both YAML and JSON/Mongo. + +.. toctree:: + :maxdepth: 1 + +""" + +collections_header += indent("\n".join(all_collection_docs), " ") + +with open("collections/index.rst", "w") as f: + f.write(collections_header) + + +def build_cli_doc(cli): + fn = "commands/" + cli + ".rst" + out = check_output(["regolith", cli, "-h"]).decode("utf-8") + s = "{}\n".format(cli) + "=" * len(cli) + "\n\n" + s += ".. code-block:: bash\n\n" + s += indent(out, "\t") + "\n" + if cli == "validate": + s += """Misc +---- + +This can also be added as a git hook by adding the following to +``.git/hooks/pre-commit`` + +.. code-block:: sh + + #!/bin/sh + regolith validate + +This can be enabled with ``chmod +x .git/hooks/pre-commit``""" + with open(fn, "w") as f: + f.write(s) + + +# build CLI docs +clis = sorted(set(CONNECTED_COMMANDS.keys()) | set(DISCONNECTED_COMMANDS.keys())) +for cli in clis: + build_cli_doc(cli) + +cli_index = """.. _commands: + +================= +Regolith Commands +================= +Shell commands for regolith + +{} + +.. toctree:: + :maxdepth: 1 + +""" +cli_index += indent("\n".join(clis), " ") +with open("commands/index.rst", "w") as f: + out = check_output(["regolith", "-h"]).decode("utf-8") + s = ".. code-block:: bash\n\n" + s += indent(out, "\t") + "\n" + f.write(cli_index.format(s)) diff --git a/docs/database_maintenance/index.rst b/doc/source/database_maintenance/index.rst similarity index 100% rename from docs/database_maintenance/index.rst rename to doc/source/database_maintenance/index.rst diff --git a/docs/database_maintenance/mongo_maintenance.rst b/doc/source/database_maintenance/mongo_maintenance.rst similarity index 100% rename from docs/database_maintenance/mongo_maintenance.rst rename to doc/source/database_maintenance/mongo_maintenance.rst diff --git a/docs/developer_notes/dp_regolith_prums_to_mongodb.md b/doc/source/developer_notes/dp_regolith_prums_to_mongodb.md similarity index 100% rename from docs/developer_notes/dp_regolith_prums_to_mongodb.md rename to doc/source/developer_notes/dp_regolith_prums_to_mongodb.md diff --git a/docs/helper_gui.rst b/doc/source/helper_gui.rst similarity index 100% rename from docs/helper_gui.rst rename to doc/source/helper_gui.rst diff --git a/docs/helper_gui_images/a_projectum.png b/doc/source/helper_gui_images/a_projectum.png similarity index 100% rename from docs/helper_gui_images/a_projectum.png rename to doc/source/helper_gui_images/a_projectum.png diff --git a/docs/helper_gui_images/l_members.png b/doc/source/helper_gui_images/l_members.png similarity index 100% rename from docs/helper_gui_images/l_members.png rename to doc/source/helper_gui_images/l_members.png diff --git a/docs/helper_gui_images/layout.png b/doc/source/helper_gui_images/layout.png similarity index 100% rename from docs/helper_gui_images/layout.png rename to doc/source/helper_gui_images/layout.png diff --git a/docs/helper_gui_images/u_logurl.png b/doc/source/helper_gui_images/u_logurl.png similarity index 100% rename from docs/helper_gui_images/u_logurl.png rename to doc/source/helper_gui_images/u_logurl.png diff --git a/docs/helper_gui_images/workflow1.png b/doc/source/helper_gui_images/workflow1.png similarity index 100% rename from docs/helper_gui_images/workflow1.png rename to doc/source/helper_gui_images/workflow1.png diff --git a/docs/helper_gui_images/workflow10.png b/doc/source/helper_gui_images/workflow10.png similarity index 100% rename from docs/helper_gui_images/workflow10.png rename to doc/source/helper_gui_images/workflow10.png diff --git a/docs/helper_gui_images/workflow12.png b/doc/source/helper_gui_images/workflow12.png similarity index 100% rename from docs/helper_gui_images/workflow12.png rename to doc/source/helper_gui_images/workflow12.png diff --git a/docs/helper_gui_images/workflow3.png b/doc/source/helper_gui_images/workflow3.png similarity index 100% rename from docs/helper_gui_images/workflow3.png rename to doc/source/helper_gui_images/workflow3.png diff --git a/docs/helper_gui_images/workflow6.png b/doc/source/helper_gui_images/workflow6.png similarity index 100% rename from docs/helper_gui_images/workflow6.png rename to doc/source/helper_gui_images/workflow6.png diff --git a/docs/helper_gui_images/workflow8.png b/doc/source/helper_gui_images/workflow8.png similarity index 100% rename from docs/helper_gui_images/workflow8.png rename to doc/source/helper_gui_images/workflow8.png diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 000000000..8dd6b62dd --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,721 @@ +.. role:: bash(code) + :language: bash +.. role:: python(code) + :language: python + +.. raw:: html + + + + +
+

welcome to the regolith docs

+
+ + +Regolith +======== +Regolith is a content management system for software & research groups. +Regolith creates and manages a database of people, publications, projects, +proposals & grants, courses, and more! From this database, regolith is then +able to: + +* Generate a group website, +* Generate CVs and publication lists for the group members, +* Act as a grade book for your courses, and more! + +Databases may be file-based (JSON and YAML) or MongoDB-based. + +Regolith is developed as a `regro project `_ + +Example Sites +============= +The following are some sample websites that are powered by regolith, even though +building +websites is just one of the many facets of this tool: + +1. `ERGS Home Page `_ +2. `Technical WorkShop on Fuel Cycle Simulation `_ + +Installation +============ +1. Make your first database +---------------------------- +The quickest way to get started is to set up your first minimal database using a +handy cookie cutter. These instructions use the command line and assume you know +how to use the terminal/cmd prompt, and that you know how to install software from +either Pypi using :bash:`pip` or Anaconda/Miniconda using :bash:`conda`. The +instructions use the linux shell commands which should work on Mac and linux +computers, and on windows if you are running from at Git Bash terminal (recommended) +but will be slightly different (but still work) on a windows cmd terminal. + +First install the cookiecutter package if you don't already have it + +.. code-block:: sh + + $ conda install cookiecutter + +or + +.. code-block:: sh + + $ pip install cookiecutter + +Next, clone the GitHub repository with the handy beginning database template + +.. code-block:: sh + + $ git clone git@github.com/sbillinge/regolithdb-cookiecutter.git + +to get it using SSH or + +.. code-block:: sh + + $ git clone https://github.com/sbillinge/regolithdb-cookiecutter.git + +to get it using the HTTPS protocol (just use whichever works for you) + +Make a note of the path to the resulting :bash:`regolithdb-cookiecutter` directory, +(e.g., :bash:`/c/Users/me/scratch/regolithdb-cookiecutter` but yours will be different). +This is not your database, this is just the template and will be removed shortly. + +Next, in a new terminal, or in the same terminal, move to the directory where +you want to install your own permanent database. For example, we like to +create a directory off our home directory called :bash:`dbs` where we will keep +all of our databases (believe me, once you start using Regolith you will want +to make more and more) + +.. code-block:: bash + + $ cd ~ # takes you to your home directory + $ mkdir dbs # creates the dbs directory if it is not already there + $ cd dbs # change dir to the new dbs directory + +Now by running cookiecutter your starting db will be built from the template + +.. code-block:: bash + + $ cookiecutter //regolithdb-cookiecutter + +The program will ask a series of questions and you can type responses. Take your +time and answer the questions as accurately as possible, because you are already +entering data into your database! + +Here is an example, and the questions look like + +.. code-block:: bash + + $ cookiecutter ~/scratch/regolithdb-cookiecutter/ + database_name [my-cv-db]: + my_first_name [Albert]: Simon + my_last_name [Einstein]: Billinge + id_for_me [aeinstein]: sbillinge + my_group_name [Einstein Group]: Billinge Group + +and so on. If you just hit enter the cookie-cutter will use the default values +and you will build a database for Einstein, but type the values you want in +answer to each question to make your own. + +If you make a mistake just type CTL^C +and do it again. You may have to remove the directory if it has already been +created, for example, :bash:`$ rm -r my-cv-db`. Watch what you type here and +be careful not to remove something you care about by mistake! + +When you are happy with your database setup, type + +.. code-block:: bash + + $ ls + +which lists all the files in your current directory, +and you should see a directory called :bash:`my-cv-db` or whatever you chose to +call you database. OK, let's go and look at our database. change directory into it and do a directory +listing, + +.. code-block:: bash + + $ cd my-cv-db + $ ls + +or open a file +browser such as windows explorer and check out what is in there. + +You will see a direcotry called :bash:`db` and a file called :bash:`regolithrc.json`. +All of the collections in your database are in the :bash:`db` directory. The +:bash:`regolithrc.json` contains a bunch of information that Regolith needs to run and do its business. + +You can use the Regolith program to do many things with, and to, your +database. But you must always run Regolith from a directory that contains a +:bash:`regolithrc.json` file. Since you are in a directory that contains one, +you can run Regolith from here, but first you have to install it.... + +2. install Regolith +--------------------- +Regolith packages are available from conda-forge and PyPI: + +**conda:** + +.. code-block:: sh + + $ conda install -c conda-forge regolith + +**pip:** + +.. code-block:: sh + + $ pip install regolith + +The Regolith code is migrating quickly these days. If you prefer you can +install from the GitHub repository mode and get the latest changes. +In that case, clone the `GitHub repository `_, +change directory to the top level directory in that cloned repository where the +:bash:`setup.py` file is. From inside your virtual environment, type + +.. code-block:: sh + + $ pip install regolith -e + +which installs regolith in this environment in develop mode. In this mode, the +version of Regolith you run will change each time you update from the repo +leading to instability so be careful. + +To check that your installation is working, let's have Regolith make us a +todo list from our database. + +Make sure you are in a directory that +contains a :bash:`regolithrc.json` file (which you should be, i.e., the +top level directory of :bash:`~/dbs/my-cv-db`, if you have been +following these instructions) and type + +.. code-block:: sh + + $ regolith helper l_todos + +and you should see something like + +.. code-block:: sh + + loading .\./db\todos.yml... + dumping todos... + usage: regolith helper [-h] [-s STATI [STATI ...]] [--short [SHORT]] + [-t TAGS [TAGS ...]] [-a ASSIGNED_TO] + [-b [ASSIGNED_BY]] [--date DATE] + [-f FILTER [FILTER ...]] + helper_target + + positional arguments: + helper_target helper target to run. Currently valid targets are: + ['a_expense', 'a_grppub_readlist', 'a_manurev', + 'a_presentation', 'a_projectum', 'a_proposal', + 'a_proprev', 'a_todo', 'f_prum', 'f_todo', + 'l_abstract', 'l_contacts', 'l_grants', 'l_members', + 'l_milestones', 'l_progress', 'l_projecta', 'l_todo', + 'u_contact', 'u_institution', 'u_logurl', + 'u_milestone', 'u_todo', 'v_meetings', 'lister', + 'makeappointments'] + + optional arguments: + -h, --help show this help message and exit + -s STATI [STATI ...], --stati STATI [STATI ...] + Filter tasks with specific status from ['started', + 'finished', 'cancelled', 'paused']. Default is + started. + --short [SHORT] Filter tasks with estimated duration <= 30 mins, but + if a number is specified, the duration of the filtered + tasks will be less than that number of minutes. + -t TAGS [TAGS ...], --tags TAGS [TAGS ...] + Filter tasks by tags. Items are returned if they + contain any of the tags listed + -a ASSIGNED_TO, --assigned-to ASSIGNED_TO + Filter tasks that are assigned to this user id. + Default id is saved in user.json. + -b [ASSIGNED_BY], --assigned-by [ASSIGNED_BY] + Filter tasks that are assigned to other members by + this user id. Default id is saved in user.json. + --date DATE Enter a date such that the helper can calculate how + many days are left from that date to the due-date. + Default is today. + -f FILTER [FILTER ...], --filter FILTER [FILTER ...] + Search this collection by giving key element pairs. + '-f description paper' will return tasks with + description containing 'paper' + If the indices are far from being in numerical order, please renumber them by running regolith helper u_todo -r + (index) action (days to due date|importance|expected duration (mins)|tags|assigned by) + -------------------------------------------------------------------------------- + started: + (1) Do all the things to set up todos in regolith (59|3|60.0||None) + ------------------------------ + Tasks (decreasing priority going up) + ------------------------------ + 2021-07-29(59 days): (1) Do all the things to set up todos in regolith (59|3|60.0||None) + ------------------------------ + Deadlines: + ------------------------------ + +After all the help messages is your list of Todo items. There is just one item, +:bash:`Do all the things to set up todos in regolith`. + +OK, your Regolith is working. If it isn't working, consider joining, browsing +and posting questions to the `regolith-users `_ +Google group. + +Quick(ish) Start +================ +OK, let's use Regolith to build our cv. Why not. again, in a terminal navigate +to the top level directory of your database (where the :bash:`regolithrc.json` +file is). and type: + +.. code-block:: sh + + $ regolith build cv + +Regolith will take information from the various collections in your database and +build them into your academic cv according to a pre-determined template. The +current template builds the cv using latex. If your computer has latex installed +and Regolith can find it, your cv should appear as a pdf document in the directory +:bash:`my-cv-db/_build` (or more generally :bash:`///_build`). +All your built documents will appear in the :bash:`_build` +directory. + +If you don't have latex installed we can have Regolith build the latex +source file for the cv but without trying to +render it to PDF, + +.. code-block:: sh + + $ regolith build cv --no-pdf + +The latex source is a text file that you will find in the :bash:`_build` directory +and you can open it in a text editor. Even without latex installed you can +render it by opening a free account at http://overleaf.com starting a new blank +project, uploading the :bash:`.tex` and :bash:`.bib` files to +that project and hitting the :bash:`recompile` button. + +Whether it builds on your computer or on overleaf, it should look something like + +.. image:: ../_static/cv.pdf + +If, for some reason, the publication list doesn't render +correctly, try running the latex command again. If you are going to +do much building with regolith it is definitely recommended to install latex on +your computer, such as MikTeX for windows (latex comes installed with many linux +systems and is easily installed on IOS). + +What Next? +=========== + +You have not spent too much time entering data into your database yet, but you +can already build a number of different things. Try building your +resume (:bash:`$ regolith build resume`), your publication list +(:bash:`$ regolith build publist`) and your presentation list +(:bash:`$ regolith build preslist`). You can even build a web-page +for your group (:bash:`$ regolith build html`). It will look pretty +ugly until we set it up properly with a nice template, but all the content +will be dynamically built from the latest info in your databases. + +To see everything you can build, type :bash:`$ regolith build --help`. +To build some of those things you will need more collections that are not +in the cookie cutter template, for example, +:bash:`proposals` and :bash:`grants` collections, but you get the idea. + +So next we might want to work on those collections and start adding more data. +This can be done in a couple of ways. Probably the simplest to begin +with is just use a text editor or IDE like PyCharm. The :bash:`yml` files are +yaml files, which is a human readable way of storing information that can be +read and understood by python. Please read about it `here `_ +if you are not familiar with it. However, briefly to get you started, it encodes +whether information is part of a list or a dictionary by indentation and semantics. +For example, + +.. code-block:: sh + + key: + - list item + - another list item + +would be read by python as :python:`{"key": ["list item", "another list item"]}`, +and a collection consisting of a list of dictionaries would look like this in yaml: + +.. code-block:: sh + + id: + - name: Arthur + quest: To find the Holy Grail + favorite_color: Blue + - name: Sir Lancelot + quest: To find the Holy Grail + favorite_color: Green, no pink + +Long story short, you can update your database by directly editing the file, +and this is quick and easy when you get comfortable with the YAML syntax, +but can be frustrating as you are learning it. + +If you want to check what +fields are allowed or required in a collection look at the Collections part of +the docs, :ref:`regolith_collections`, which are built from the Regolith schema +(or directly look at the +schema in :bash:`schema.py`). You can automatically check if your database +edits are valid by running :bash:`$ regolith validate`. + +Getting Help from Helpers +========================== +Regolith builders build documents, but there are a small but growing number of +tools that either will run popular queries on the database and print the results +to the terminal ("lister helpers" with :bash:`l_` prefixes -- you +already used one, +it was the lister helper that builds your todo list). + +There are also helpers +that help you to add documents to your database collections. These are +"adder helpers" with :bash:`a_` prefixes. An important adder helper is +:bash:`a_todo` helper that will add a todo item to your list. + +"Updater +helpers" will update existing entries in your databases and have prefix +:bash:`u_`. + +An important special kind of updater helper is a "finish helper" that will mark +something as finished (and give it a finish date). So when you do that +pesky 15th todo item on your todo list, run +:bash:`regolith helper f_todo -i 15` to finish it. + +That is a lot of typing to finish a todo, so consider setting up an alias in +the config file for your terminal program (my terminals run bash so I put the +alias in the :bash:`.bashrc` file in my home directory (:bash:`$ cd ~` to get there). +With this alias I just type :bash:`rhlt 15` to finish that 15th todo item. + +To explore what helpers are there so you can play with them, type + +.. code-block:: sh + + $ regolith helper + +and hit return. It will return a list of available helpers, e.g., + +.. code-block:: sh + + $ regolith helper + usage: regolith helper [-h] helper_target + regolith helper: error: the following arguments are required: helper_target + usage: regolith helper [-h] helper_target + + positional arguments: + helper_target helper target to run. Currently valid targets are: + ['a_expense', 'a_grppub_readlist', 'a_manurev', + 'a_presentation', 'a_projectum', 'a_proposal', 'a_proprev', + 'a_todo', 'f_prum', 'f_todo', 'l_abstract', 'l_contacts', + 'l_grants', 'l_members', 'l_milestones', 'l_progress', + 'l_projecta', 'l_todo', 'u_contact', 'u_institution', + 'u_logurl', 'u_milestone', 'u_todo', 'v_meetings', 'lister', + 'makeappointments'] + +then if you want to know how to use any of the helpers type + +.. code-block:: sh + + $ regolith helper + +and hit return, e.g., + +.. code-block:: sh + + $ regolith helper l_contacts + usage: regolith helper [-h] [-v] [-n NAME] [-i INST] [-d DATE] [-r RANGE] + [-o NOTES] [-f FILTER [FILTER ...]] + [-k KEYS [KEYS ...]] + helper_target run + regolith helper: error: the following arguments are required: run + usage: regolith helper [-h] [-v] [-n NAME] [-i INST] [-d DATE] [-r RANGE] + [-o NOTES] [-f FILTER [FILTER ...]] + [-k KEYS [KEYS ...]] + helper_target run + + positional arguments: + helper_target helper target to run. Currently valid targets are: + ['a_expense', 'a_grppub_readlist', 'a_manurev', + 'a_presentation', 'a_projectum', 'a_proposal', + 'a_proprev', 'a_todo', 'f_prum', 'f_todo', + 'l_abstract', 'l_contacts', 'l_grants', 'l_members', + 'l_milestones', 'l_progress', 'l_projecta', 'l_todo', + 'u_contact', 'u_institution', 'u_logurl', + 'u_milestone', 'u_todo', 'v_meetings', 'lister', + 'makeappointments'] + run run the lister. To see allowed optional arguments, + type "regolith helper l_contacts". + + optional arguments: + -h, --help show this help message and exit + -v, --verbose Increases the verbosity of the output. + -n NAME, --name NAME name or name fragment (single argument only) to use to + find contacts. + -i INST, --inst INST institution or an institution fragment (single + argument only) to use to find contacts. + -d DATE, --date DATE approximate date in ISO format (YYYY-MM-DD) + corresponding to when the contact was entered in the + database. Comes with a default range of 4 months + centered around the date; change range using --range + argument. + -r RANGE, --range RANGE + range (in months) centered around date d specified by + --date, i.e. (d +/- r/2). + -o NOTES, --notes NOTES + fragment (single argument only) to be found in the + notes section of a contact. + -f FILTER [FILTER ...], --filter FILTER [FILTER ...] + Search this collection by giving key element pairs. + -k KEYS [KEYS ...], --keys KEYS [KEYS ...] + Specify what keys to return values from when running + --filter. If no argument is given the default is just + the id. + +you then would rerun the command giving all required, and any +optional, command +line arguments. e.g., + +.. code-block:: sh + + $ regolith helper l_contacts run --name frank -v + +will return all contacts in the contacts collection where :bash:`frank` appears anywhere +in the name, such as :bash:`Frankie Valli`, :bash:`Baron von Frankenstein` +and :bash:`Anne Frank` (if they are in your contacts). The :bash:`-v` +command stands for :bash:`verbose` which means more information is +returned than if you don't type :bash:`-v`. You can try it now: + +.. code-block:: sh + + $ regolith helper l_contacts run -n auth -v + +Setting up Gitlab repository information for API requests +========================================================= + +Some helpers have features that make API requests to GitLab (or GitHub). For example, the a_presentation helper has a functionality that +creates a repository in a designated GitLab group. In order to use these features, the target repository +information needs to be defined in your configuration files (:code:`regolithrc.json`, :code:`user.json`). + +Setting up Destination Repo Information +--------------------------------------- + +The designated repository information should be defined in :code:`regolithrc.json` in the directory in which you are +running the helper. Create a collection of repository targets designated as :code:`repos` (see below for an example). +according to the following pattern. We will use as an example an entry that will +allow :code:`a_presentation` to successfully create a repository in a group called `talks` +on a GitLab instance. + +:code:`a_presentation` looks for a rep with the entry :code:`_id` with value ``"talk_repo"``. + +.. code-block:: json + +"repos":[ + {"_id": "talk_repo", # a_presentation looks for the entry with this ID + "params": {"namespace_id": "35", # These params are handed to the API post request. + "initialize_with_readme": "True" # "name" is also needed but a_presentation generates that automatially + }, + "url": "https://gitlab.example.com", # The URL of the main GitLab/GitHub instance + "api_route": "/api/v4/projects/", # This is the route to the REST-API. The value + # shown here is correct for GitLab at the time of writing + "namespace_name": "talks" # the name of group/org which corresponds to the namespace_id above. + }, + { + "_id": "another_example_repo", + [...] + } + ] + +The namespace ID is the repository's group ID which can be found on the target repository's main page. +The :code:`url` and :code:`api_route` should be in the format above, including the dashes. + +For more information on the required request info, or to see a list of additional attributes +that can also be defined in the request (e.g. ``initialize_with_readme``, ``description``, etc.), +see GitHub or GitLab API documentation, e.g., for GitLab the `GitLab docs `_. +(Note that additional attributes can be defined under ``params``, where needed.) + +Setting up your Private Access Token +------------------------------------ + +Your personal/private API request token should be defined in :code:`user.json`, which can be found in your +~/.config directory. Similarly, define a distinct ID for each private token. For example, to create a repo +in GitLab, you should define your authentication token with the ID, ``"gitlab_private_token"``: + +.. code-block:: json + + [ + { + "_id": "gitlab_private_token", + "token": "" + }, + { + "_id": "example_token", + [...] + } + ] + +To learn more about creating a personal access token, refer to the +`Gitlab docs `_. +Note that your personal access token should have the ``api`` scope enabled in order to make a successful request. + +To change the target directory, you can change the parameters (or IDs) in the function +:code:`create_repo(destination_id, token_info_id, rc)` in `a_presentationhelper.py` to +the IDs of your desired repo info and corresponding token. + +Setting up GitHub repository information for API requests +========================================================= + +Using the filter capabilities in the helpers +============================================ + +Most helpers have a filter field. This allows you to filter the relevant collection +before running the helper functionality. + +The logic of filter is the following. A document will be valid if the value of key contains value for all keys and values using AND logic. + +As an example, if we consider filtering in the :bash:`l_milestones` helper we will get the following behavior. :bash:`l_milestones` operates on the :bash:`projecta` collection, so the filter will be applied to this collection. +If you specify :bash:`--filter lead voe` it will return all documents where :bash:`voe` appears in the value for the :bash:`lead` field (e.g., if there is someone with an id of :bash:`carvoe` and another person with and id of :bash:`voedemort` the filter will return all the documents where either of these people are :bash:`lead`). + +If you then select :bash:`current` and :bash:`verbose` the helper will do the normal thing of returning in verbose form the current milestones, but it will do it on the filtered collection. + +A slight gotcha is that since filter uses "in" in its logic, if the type of the key value is a string it will find all strings that contain that fragment, as above, but if the type of the key value is a list it will return documents where the specified value is in the list, so :bash:`--filter group_member voe` will return all the documents where :bash:`voe` is listed as a group member, but it won't return any documents where :bash:`carvoe` or :bash:`voedemort` are listed as a group member. + +The filter uses AND logic and operates such that :bash:`--filter lead voe grants mygrant21 status finished` will return all prums that are led by :bash:`carvoe` or :bash:`voedemort` that acknowledge the mygrant21 grant and are finished. Actually, similar behavior can be obtained also by selecting :bash:`--lead voe --stati finished --filter grants mygrant21` + +unfortunately the filter function does not currently recurse, so it will only operate on top level key-value pairs where the type of the value is a string or a list or a tuple. + +Backing up and protecting your work +=================================== +Now you have started saving your precious life's work in your regolith database +you better start protecting it and backing it up. One low overhead approach +for this is simply to set up your database directory to be backed up remotely as +a Google drive or Dropbox synced directory, for example. + +However, Regolith is set up to +work with git and GitHub and this is a powerful option if you are +comfortable with it. This gets more useful when you want to start +sharing databases with group members, for example, using GitHub access rights. +It is also possible to make sure people's edits to the database won't +break things by setting up continuous integration (CI) that runs some +validation and builders and makes sure they don't crash before the +edits are accepted. This is much more advanced usage which you +should save for later. + +To get started with the GitHub option, the next thing to do is to turn your database directory +on your filesystem into a git repository and link it to a repository on +your personal space on GitHub (you will need a GitHub account). You can make +that repo private so the world +cannot see your todo list, or public so that the world can see the web-page +you build from it. We will get back to this later, but Regolith will build +collections from across databases, so you can have parts of your :bash:`people` +collection private and other parts public. Depending which :bash:`regolithrc.json` +file you use to build with, you can pull from the public, or private, or both +parts. Again, this is a peep to the future. +For now, let's assume you just want to back up and keep versions of +you private database. You will make a repository on your personal GitHub account +and synchronize your local database with this repo. +`Instructions for doing this are here `_ + +Once you get everything set up you will want to periodically (meaning +frequently) type + + +.. code-block:: sh + + $ git commit -a -m "my commit message" + $ git push + +This will add, commit and push all files that git is tracking that have been +updated locally. If you add a new file to the repository and want it in the +GitHub backup, you will have to explicitly add it before committing, + +.. code-block:: sh + + $ git add my_new_file.py + $ git commit -m "an even more informative commit message" + +:bash:`$ git commit` commits (i.e., checks in) to the git database (yes, +git, like you now, is using a database backend) everything that has been added, or staged, for commit. +:bash:`$ git commit -a` automatically adds all files that git is tracking +(have been previously committed in the past) that have been edited and then +commits them. + +They are now safely captured in the git database and you can retrieve them +later if you accidentally delete your personal database or mess it up some other way. +But this version of the git database is still stored on your local computer, so +if you spill coffee on your computer, you may lose everything. :bash:`$ git push` pushes all +these updates to a remote computer on the internet at the GitHub headquarters. +Git and GitHub form a wonderful but complicated infrastructure, it is well worth +getting to know how to use them well. For now, we have used it to +secure your precious database. Remember to make frequent pushes. + +OK, you are started with your Regolith database. Go play. Regolith +can do many more complicated things to help with administering your +research group, or whatever you are working on. We will continue to +add tutorials below explaining some of these things, so check back +from time to time. And remember join and to ask questions at the `regolith-users `_ +Google group. They will get answered. + + + +Tutorials +========= +.. toctree:: + :maxdepth: 1 + + tutorials/index + +Run Control +=========== + +.. toctree:: + :maxdepth: 1 + + rc + + +Database Collections +==================== +**Collections** are the regolith (and mongo) abstraction for *tables*. +**Entries** (or *rows*) in +a collection must follow the schema defined below. In general, the following notions +hold: + +* An entry is a dictionary with string keys. +* Each entry must contain a unique identifier. This is called ``"_id"`` in JSON + and Mongo, and is simply the top-level key in YAML. +* A collection is a list of entries that follow the same schema. + +Not all regolith actions will use every collection type. It is common for regolith +projects to just use some of the collections below. For example, building a group +website will use different collections than managing students and grades in a course! +With these points in mind, feel free to dive into the databases below! + +.. toctree:: + :maxdepth: 2 + + collections/index + + +Regolith API +============ +For those who want to dive deeper into the library itself. + +.. toctree:: + :maxdepth: 1 + + api/index + + +Regolith Commands +================= +Shell commmands for regolith + +.. toctree:: + :maxdepth: 2 + + commands/index + + +Database Maintenance +========= +.. toctree:: + :maxdepth: 1 + + database_maintenance/index diff --git a/doc/source/license.rst b/doc/source/license.rst new file mode 100644 index 000000000..cfab61c2a --- /dev/null +++ b/doc/source/license.rst @@ -0,0 +1,39 @@ +:tocdepth: -1 + +.. index:: license + +License +####### + +OPEN SOURCE LICENSE AGREEMENT +============================= +BSD 3-Clause License + +Copyright (c) 2024, The Trustees of Columbia University in +the City of New York. +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/docs/make.bat b/doc/source/make.bat similarity index 100% rename from docs/make.bat rename to doc/source/make.bat diff --git a/docs/rc.rst b/doc/source/rc.rst similarity index 100% rename from docs/rc.rst rename to doc/source/rc.rst diff --git a/docs/regolithrc.json b/doc/source/regolithrc.json similarity index 100% rename from docs/regolithrc.json rename to doc/source/regolithrc.json diff --git a/doc/source/release.rst b/doc/source/release.rst new file mode 100644 index 000000000..27cd0cc94 --- /dev/null +++ b/doc/source/release.rst @@ -0,0 +1,5 @@ +:tocdepth: -1 + +.. index:: release notes + +.. include:: ../../CHANGELOG.rst diff --git a/docs/tutorials/broker.rst b/doc/source/tutorials/broker.rst similarity index 100% rename from docs/tutorials/broker.rst rename to doc/source/tutorials/broker.rst diff --git a/docs/tutorials/index.rst b/doc/source/tutorials/index.rst similarity index 100% rename from docs/tutorials/index.rst rename to doc/source/tutorials/index.rst From 7ab3e00fb9f6fb7c595490915a231fc2b2161d3e Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 18 Jul 2024 05:31:50 -0400 Subject: [PATCH 20/20] remove columbia copyright from cc license text --- doc/source/license.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc/source/license.rst b/doc/source/license.rst index cfab61c2a..3ba00c3d5 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -7,11 +7,6 @@ License OPEN SOURCE LICENSE AGREEMENT ============================= -BSD 3-Clause License - -Copyright (c) 2024, The Trustees of Columbia University in -the City of New York. -All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: