From 18d8c2ff660c4f14fd9c9374e54898baaabc6d3f Mon Sep 17 00:00:00 2001 From: mnyrop Date: Fri, 27 May 2022 11:33:16 -0400 Subject: [PATCH] drop the not dones --- lib/parsers/default.rb | 17 ++++++++++++++--- lib/tasks/fetch/people.rake | 1 - lib/tasks/fetch/projects.rake | 1 - lib/utils.rb | 7 ------- source/_data/courses.yml | 13 +++++++++++++ source/_data/people.yml | 20 -------------------- source/_data/projects.yml | 20 -------------------- source/_projects/inquisite.md | 22 ---------------------- 8 files changed, 27 insertions(+), 74 deletions(-) delete mode 100644 source/_projects/inquisite.md diff --git a/lib/parsers/default.rb b/lib/parsers/default.rb index 41005888..db68b51b 100644 --- a/lib/parsers/default.rb +++ b/lib/parsers/default.rb @@ -1,9 +1,11 @@ module Parsers module Default def self.parse(data, array_keys=[]) + data = inject_order data data = compact_all data data = split_arrays(data, array_keys) unless array_keys.empty? data = convert_bools data + data = drop_not_done data data end @@ -18,9 +20,11 @@ def self.convert_bools(data) end def self.compact_all(data) - data.map do |h| - h.compact - end + data.map { |h| h.compact } + end + + def self.drop_not_done(data) + data.reject { |h| !h['done'] } end def self.split_semicolon_string(string) @@ -33,5 +37,12 @@ def self.split_arrays(data, keys) hash end end + + def self.inject_order(data) + data.map.with_index do |h, i| + h['order'] = i.to_s.rjust(3, "0") + h + end + end end end diff --git a/lib/tasks/fetch/people.rake b/lib/tasks/fetch/people.rake index a3a64c50..51e074db 100644 --- a/lib/tasks/fetch/people.rake +++ b/lib/tasks/fetch/people.rake @@ -17,7 +17,6 @@ namespace :fetch do Utils.wget_sheet(sheet_key, csv_file) unless ENV['SKIP_WGET'] data = Utils.csv_open csv_file - data = Utils.inject_order data data = Parsers::Default.parse data, array_keys data = Parsers::People.parse data diff --git a/lib/tasks/fetch/projects.rake b/lib/tasks/fetch/projects.rake index 17eda358..453d39a9 100644 --- a/lib/tasks/fetch/projects.rake +++ b/lib/tasks/fetch/projects.rake @@ -19,7 +19,6 @@ namespace :fetch do Utils.wget_sheet(sheet_key, csv_file) unless ENV['SKIP_WGET'] data = Utils.csv_open csv_file - data = Utils.inject_order data data = Parsers::Default.parse data, array_keys data = Parsers::Projects.parse data tags = Parsers::Projects.pull_tags data diff --git a/lib/utils.rb b/lib/utils.rb index cc21d13c..00875ed1 100644 --- a/lib/utils.rb +++ b/lib/utils.rb @@ -18,11 +18,4 @@ def self.write_to_file(content, file) FileUtils.mkdir_p File.dirname(file) File.open(file, "w") { |f| f.write content } end - - def self.inject_order(data) - data.map.with_index do |h, i| - h['order'] = i.to_s.rjust(3, "0") - h - end - end end diff --git a/source/_data/courses.yml b/source/_data/courses.yml index deba6689..4a2d68c4 100644 --- a/source/_data/courses.yml +++ b/source/_data/courses.yml @@ -11,6 +11,7 @@ description: Provides an introduction to the practice, history, and principles of programming for students in the humanities through the Python language. url: https://benschmidt.org/code21 + order: '000' - pid: 1089-fa21 done: true number: CEH-GA.1089 @@ -36,6 +37,7 @@ will include readings on network culture and digital curation by authors such as McLuhan, Gitelman, Castells, Shirky, Manovich, Cohen, Ramsay, and Galloway. url: https://kimon.hosting.nyu.edu/sites/dh-collections-connections/ + order: '001' - pid: 1121-sp22 done: true number: DHSS-GA.1121 @@ -58,6 +60,7 @@ data is messy and culturally contingent, and where the reading audience is not necessarily trained or interested in statistics.' url: https://benschmidt.org/WWD22 + order: '002' - pid: 1137-sp22 done: true number: CEH-GA.1137 @@ -76,6 +79,7 @@ that are used as alternatives to textual explanation. We will work with digital tools for analyzing and visualizing humanities data, such as AbbyFine, Voyant, Topic Modeling Tool, ArcGIS, and Agisoft Metashape. + order: '003' - pid: 1122-sp22 done: true number: DHSS-GA.1122 @@ -92,6 +96,7 @@ our notions of discourse and explore how websites can be used for scholarly communication. A deeper understanding of these topics will help you make better decisions not only in your own web development practice but also in sharing your work more effectively. + order: '004' - pid: 1121-fa22 done: true number: DHSS-GA.1120 @@ -104,6 +109,7 @@ description: Provides an introduction to the practice, history, and principles of programming for students in the humanities through the Python language. url: https://benschmidt.org/code21 + order: '005' - pid: 1089-fa22 done: true number: CEH-GA.1089 @@ -127,6 +133,7 @@ will include readings on network culture and digital curation by authors such as McLuhan, Gitelman, Castells, Shirky, Manovich, Cohen, Ramsay, and Galloway. url: https://kimon.hosting.nyu.edu/sites/dh-collections-connections/ + order: '006' - pid: 1121-sp23 done: true number: DHSS-GA.1121 @@ -143,6 +150,7 @@ and a series of programming worksets that will teach you how to do a variety of types of data analysis and visualization.' url: https://benschmidt.org/WWD22 + order: '007' - pid: 1122-sp23 done: true number: DHSS-GA.1122 @@ -157,6 +165,7 @@ our notions of discourse and explore how websites can be used for scholarly communication. A deeper understanding of these topics will help you make better decisions not only in your own web development practice but also in sharing your work more effectively. + order: '008' - pid: 1137-sp23 done: true number: CEH-GA.1137 @@ -175,6 +184,7 @@ that are used as alternatives to textual explanation. We will work with digital tools for analyzing and visualizing humanities data, such as AbbyFine, Voyant, Topic Modeling Tool, ArcGIS, and Agisoft Metashape. + order: '009' - pid: 3032-fa22 done: true number: CEH-GA 3032 @@ -203,6 +213,7 @@ and current events we will be studying relate to the day-to-day progress coming out of their race. url: https://kimon.hosting.nyu.edu/sites/citizenship-in-the-digital-age/ + order: '010' - pid: 3047-fa22 done: true number: CEH-GA 3047 @@ -232,6 +243,7 @@ relative strengths and weaknesses, including Google Maps/Earth, StoryMap JS, Tableau, ArcGIS, ESRI StoryMaps and ARIS. url: https://kimon.hosting.nyu.edu/sites/space-place-data/ + order: '011' - pid: 1089-001-fa22 done: true number: CEH-GA 1089-001, MSMS-GA 1089-001 @@ -254,3 +266,4 @@ these networks and collections to present intellectual arguments in new ways and tell more compelling stories. url: https://kimon.hosting.nyu.edu/sites/dh-collections-connections/ + order: '012' diff --git a/source/_data/people.yml b/source/_data/people.yml index e9d90ccd..a191e494 100644 --- a/source/_data/people.yml +++ b/source/_data/people.yml @@ -8,7 +8,6 @@ - affil_fac link: https://library.nyu.edu/people/zachary-coble/ local_image: coble.jpg - display_order: '1' original_image: https://s3.amazonaws.com/nyulibraries-www-assets/people-images/zachary-coble.jpg order: '000' affiliated: true @@ -21,7 +20,6 @@ - affil_fac link: https://benschmidt.org local_image: schmidt.jpg - display_order: '2' original_image: https://benschmidt.org/authors/admin/avatar_hu100dbceb67e8fdbed30bfdcfd276f9b6_54689_250x250_fill_lanczos_center_2.png order: '001' affiliated: true @@ -33,7 +31,6 @@ - exec_com link: https://library.nyu.edu/people/marii-nyrop/ local_image: nyrop.jpg - display_order: '3' order: '002' affiliated: true - pid: karlin @@ -44,7 +41,6 @@ - exec_com link: https://library.nyu.edu/people/jojo-karlin/ local_image: karlin.jpg - display_order: '4' original_image: https://commons.gc.cuny.edu/files/avatars/5851/5d7424f5d81ff-bpfull.jpg order: '003' affiliated: true @@ -56,7 +52,6 @@ - exec_com link: https://library.nyu.edu/people/himanshu-mistry/ local_image: mistry.jpg - display_order: '4' original_image: https://s3.amazonaws.com/nyulibraries-www-assets/people-images/himanshu-mistry.jpg order: '004' affiliated: true @@ -68,7 +63,6 @@ - exec_com link: https://wp.nyu.edu/fas-edtech/about/our-team/ local_image: appert.jpg - display_order: '5' original_image: https://s18798.pcdn.co/fas-edtech/wp-content/uploads/sites/354/2021/12/appert2021headshot-300x295.jpg order: '005' affiliated: true @@ -82,7 +76,6 @@ - proj_pi link: https://library.nyu.edu/people/nicholas-wolf/ local_image: wolf.jpg - display_order: '6' original_image: https://as.nyu.edu/content/dam/nyu-as/irelandHouse/images/headshots-portraits-promopics-etc/Faculty/Nicholas%20Wolf.JPG order: '006' affiliated: true @@ -95,7 +88,6 @@ - exec_com link: https://steinhardt.nyu.edu/people/ben-maddox local_image: maddox.jpg - display_order: '7' original_image: https://steinhardt.nyu.edu/sites/default/files/styles/nyu_profile_image/public/2021-03/4E0BD43F-9787-445D-B0E5-F425455FC5DB%20-%20Ben%20Maddox.jpeg?h=14580d8e&itok=4CrKN7lM order: '007' affiliated: true @@ -382,18 +374,6 @@ local_image: zehngut-willits.jpg original_image: https://as.nyu.edu/content/dam/nyu-as/history/images/BryanZehngutWillits.jpg order: '037' -- pid: zohar - name: Ryan Zohar - titles: Dual Degree Graduate Student, Kevorkian Center and Palmer School - site_roles: - - fellow - order: '038' -- pid: deniz - name: Fatma Deniz - titles: Doctoral Student in Middle Eastern and Islamic Studies - site_roles: - - fellow - order: '039' - pid: ansari done: true name: Ahmed Ansari diff --git a/source/_data/projects.yml b/source/_data/projects.yml index 7a1f5d58..1b8909d3 100644 --- a/source/_data/projects.yml +++ b/source/_data/projects.yml @@ -756,26 +756,6 @@ local_image: wax.jpg original_img: https://minicomp.github.io/wax/img/logo.png order: '027' -- pid: inquisite - done: false - title: Inquisite - category: Other - tags: - - linked-open-data - abstract: Closely aligned with the objects of NewYorkScapes to provide support for - the creation, design, and preservation of humanities data, support for the software - platform Inquisite is being sought to facilitate the use of research data in the - classroom and on long-term project development. Data and discipline agnostic, - the platform is intended to fill needs among faculty and researchers for a low-technology-barrier - interface for hosting and documenting data iteratively for research management - purposes. - pis: - - wolf - - augst - link: http://www.inquisite.org/ - local_image: inquisite.jpg - original_img: http://www.inquisite.org/images/inquisite_collage.png - order: '028' - pid: bookworm done: true title: Bookworm diff --git a/source/_projects/inquisite.md b/source/_projects/inquisite.md deleted file mode 100644 index 2ad0b782..00000000 --- a/source/_projects/inquisite.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -pid: inquisite -done: false -title: Inquisite -category: Other -tags: -- linked-open-data -abstract: Closely aligned with the objects of NewYorkScapes to provide support for - the creation, design, and preservation of humanities data, support for the software - platform Inquisite is being sought to facilitate the use of research data in the - classroom and on long-term project development. Data and discipline agnostic, the - platform is intended to fill needs among faculty and researchers for a low-technology-barrier - interface for hosting and documenting data iteratively for research management purposes. -pis: -- wolf -- augst -link: http://www.inquisite.org/ -local_image: inquisite.jpg -original_img: http://www.inquisite.org/images/inquisite_collage.png -order: '028' -layout: project ---- \ No newline at end of file